创建新仓库 创建新文件夹,打开,然后执行git init以创建新的 git 仓库。检出仓库 执行如下命令以创建一个本地仓库的克隆版本:git clone /path/to/repository如果是远端服务器上的仓库,你的命令会是这个样子:git clone username@host:/path/...
分类:
其他好文 时间:
2014-11-15 23:11:08
阅读次数:
315
//冒泡排序void Bubble_Sort(int *a,int n)/*定义两个参数:数组首地址与数组大小*/{ int i,j,temp; for(i=0;ia[j+1]) { temp=a[j]; a[j]=a[+1]; a[j+1]=temp; }...
分类:
编程语言 时间:
2014-11-15 23:05:28
阅读次数:
259
知道两个文件的绝对目录,怎样计算出两个文件的相对目录,例如:知道 a='/usr/share/pyshared/test/a.py' b='/usr/lib/dist/test/a.py'可以直接应用OS模块中的os.path.reppath得到结果: >>> print(os.path.re...
分类:
编程语言 时间:
2014-11-15 23:04:53
阅读次数:
306
//选择排序void Select_Sort(int *a,int n){ int i,j,k,temp; for(i=0;ia[j]) k=j; } temp=a[i]; a[i]=a[k]; a[k]=temp; }}
分类:
编程语言 时间:
2014-11-15 23:04:42
阅读次数:
276
//希尔(shell)排序void Shell_Sort(int *a,int n){ int gap,i,j,temp; for(gap=n/2;gap>0;gap/=2)/*设置排序的步长,步长gap每次减半,直到减到1*/ { for(i=gap;i=0)&&(a[j]>a[j+gap]);....
分类:
编程语言 时间:
2014-11-15 23:02:09
阅读次数:
203
有一个在用的nginx,以yum方法安装的,怎样在不改动配置的情况下,为它添加模块.以添加spdy模块为例.编译新模块预编译./configure --prefix=/etc/nginx \ --sbin-path=/usr/sbin \ --conf-path=/etc/nginx/ngin...
分类:
其他好文 时间:
2014-11-15 21:42:26
阅读次数:
344
//快速排序void Quick_Sort(int *a,int low,int high){ int Partition(int *a,int low,int high); int mid; if(lowmid); if(i>=j)break; temp=a[i]; a[i]=a[j]; ...
分类:
编程语言 时间:
2014-11-15 21:41:57
阅读次数:
347
//插入排序void Insert_Sort(int *a,int n){ int i,j,temp; for(i=1;i=0&&a[j]>temp;j--) { a[j+1]=a[j];/*一边找一边移动元素*/ } a[j+1]=temp; }}
分类:
编程语言 时间:
2014-11-15 21:41:29
阅读次数:
241
可能是因为我是按难度顺序刷的原因,这个其实在之前的几道题里面已经写过了。题目如下: Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path...
分类:
其他好文 时间:
2014-11-15 21:31:17
阅读次数:
194
Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical an...
分类:
其他好文 时间:
2014-11-15 18:47:58
阅读次数:
103