摘要: 删除字符串中的多余空白,包含前,中,尾。“ I am a boy . ”->"I am a boy"/* *删除多余的空白,包括前面,后面,中间 *" I am a boy . " => "I am a boy ." */ #in... 阅读全文
posted @ 2014-10-30 22:42 cc_jony 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 将一组整数中的数字按负数在前,零在中间,正数在末尾摆放。美团电话面试程序题:#include #include /* run this program using the console pauser or add your own getch, system("pause") or input l... 阅读全文
posted @ 2014-10-30 00:43 cc_jony 阅读(555) 评论(0) 推荐(0) 编辑
摘要: 征服C指针:P70#include "stdio.h"char *int_to_str(int int_value){ static char buf[20]; sprintf(buf,"%d",int_value); return buf;}int main(){ c... 阅读全文
posted @ 2014-05-26 12:55 cc_jony 阅读(160) 评论(0) 推荐(0) 编辑
摘要: #include "stdio.h"#include "stdlib.h"#define random(x) (rand()%x)void creat_array(int a[],int len,int max);void print_array(int a[],int n);void main()... 阅读全文
posted @ 2014-05-07 11:23 cc_jony 阅读(449) 评论(0) 推荐(0) 编辑
摘要: ubuntu12.04安装hadoop2.2.0 阅读全文
posted @ 2014-04-30 15:00 cc_jony 阅读(273) 评论(0) 推荐(0) 编辑
摘要: #include#include"math.h"int howmany (int x,int y){ int p=x,q=y; int a[100000]; int c[100000]; int t=0,i,j,m,n,chej,g=0; int k=0,s=0,b=0,h=0; for(i=2;i (int)sqrt(i)) { a[k++]=i; printf("质数的值:%d\n",i);//打印出质数的值 } } printf("打印出质数的个数:%... 阅读全文
posted @ 2014-02-28 12:52 cc_jony 阅读(1025) 评论(0) 推荐(0) 编辑
摘要: 问题1:在创建新函数(如function P(){};)的时候会自动创建一个原型对象P.prototype(也称作原型属性prototype)。当创建一个新对象(此处指非函数对象,在js里面函数也会被称作对象)的时候会不会也创建一个原型对象呢?(P.prototype.constractor=(pattern:\ ={2,3}\)P)。问题2:位置操作方式和属性:location.assgin("http://www.baidu.com");window.location("http://www.baidu.com");location.href(&qu 阅读全文
posted @ 2013-12-02 17:28 cc_jony 阅读(234) 评论(0) 推荐(0) 编辑
摘要: 此代码是用html5调用本地摄像头代码在chrome下有效 , firefox 360 ie均调不到 ! 转自http://blog.csdn.net/hfahe/article/details/7485452Bootstrap:Bootstrap为用户提供了13个很有用的jquery插件,下面列出了各个插件及对应的js文件:轮播 --------bootstrap-carousel.js过度效果-----bootstrap-transition.js模态对话框------bootstrap-modal.js下拉菜单-------bootstrap-dropdown.js滚... 阅读全文
posted @ 2013-10-29 23:08 cc_jony 阅读(1712) 评论(4) 推荐(0) 编辑
摘要: data-page 页面data-header 页面的头部data-content 页面的内容data-footer 页面的页脚data-navbar 定义一个导航条,一般位于header中data-button 渲染为一个可视化的按钮data-controlgroup 渲染一个组件data-collapsible-set 一组可折叠的内容面板data-filedcontain 用于表单-域的容器data-listview 由多项内容组成的列表data-dialog 对话页面slider 用于布尔值的可视化滑块data-nojs 在兼容jquery mobile的浏览器上会被隐藏的元素1.jq 阅读全文
posted @ 2013-10-20 10:49 cc_jony 阅读(424) 评论(0) 推荐(0) 编辑
摘要: import urllibimport urllib2import requestsurl = "http://www.blog.pythonlibrary.org/wp-content/uploads/2012/06/wxDbViewer.zip"print "downloading with urllib"urllib.urlretrieve(url, "code1.zip")print "downloading with urllib2"f = urllib2.urlopen(url)data = f.rea 阅读全文
posted @ 2013-08-24 14:48 cc_jony 阅读(286) 评论(0) 推荐(0) 编辑