_在路上

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2018年9月16日

摘要: mkdir -p ~/.vim/bundle/Vundle.vim git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim ######################################## 阅读全文
posted @ 2018-09-16 15:25 _在路上 阅读(265) 评论(0) 推荐(0) 编辑

2016年9月6日

摘要: (1)Ubuntu 10.04.4 LTS (Lucid Lynx) 下载地址:http://old-releases.ubuntu.com/releases/lucid/ (2)passwd root,然后以root登录,gedit /etc/network/interfaces ,添加静态ip: 阅读全文
posted @ 2016-09-06 14:45 _在路上 阅读(1263) 评论(0) 推荐(0) 编辑

2012年10月9日

摘要: #include <stdio.h>#include <stdlib.h>#include <string.h>/************************************************************************//* 冒泡排序:又叫简单交换排序,冒泡,顾名思义,实际上总是将要扫描到的 *//* 最大/小的元素值推到尾部 *//************************************************************************/void swapSort (int *d 阅读全文
posted @ 2012-10-09 10:54 _在路上 阅读(210) 评论(0) 推荐(0) 编辑

2012年10月8日

摘要: 下面的源代码出来源于我在“西安朱洪计算机培训”学习时的老师之手,马上要找工作了,赶紧复习下,顺便分享下#include <stdio.h>#include <stdlib.h>#include <string.h>/************************************************************************//* 插入排序算法思想:考虑打扑克牌时的抓牌过程,从小到大排序, *//* 前面总是已经排序好的,新牌插入到合适的位置。 *//*********************... 阅读全文
posted @ 2012-10-08 20:37 _在路上 阅读(250) 评论(0) 推荐(0) 编辑

2012年10月7日

摘要: #include <stdio.h>#include <stdlib.h>#include <string.h>//显示字符串的全排列组合void DisAllStrExt (char * str, int low, int high){ int index; if (low >= high - 1) { for (index = 0; index < high; index++) putchar(str[index]); puts("\r\n"); } else { for (inde... 阅读全文
posted @ 2012-10-07 22:00 _在路上 阅读(219) 评论(0) 推荐(1) 编辑

2012年10月4日

摘要: #include <stdio.h>/************************************************************************//* 汉诺塔: 将n个盘从one座借助two座,移到three座 *//************************************************************************/void hanoi_Example (void){ int m; printf("input the number of di... 阅读全文
posted @ 2012-10-04 21:12 _在路上 阅读(231) 评论(7) 推荐(0) 编辑

摘要: 该题目摘自《C专家编程》附录A.4 编程挑战。#include <stdio.h>//检查该点有效返回1,否则返回0int CheckPosition (int (*chess)[8], int row, int col){ int IsTrue = 1; int i, j; //左上方,行数减,列数减 for (i = row, j = col; IsTrue && i >= 0 && j >= 0; i--, j--) { if (chess[i][j] == 1) IsTrue = 0; } //上方,列数不... 阅读全文
posted @ 2012-10-04 21:04 _在路上 阅读(188) 评论(0) 推荐(0) 编辑

摘要: 该题目摘自《C专家编程》附录A.4 编程挑战。#include <stdio.h>#include <stdlib.h>#include <string.h>void DisOneStr (const char * str, int k, int n){ int i, j; char * buf; if (k <= 0 || n <= 0 || k > n) return ; if (k == 1) { for (i = 0; i < n; i++) printf("%c\r\n", str[i]); ... 阅读全文
posted @ 2012-10-04 20:57 _在路上 阅读(408) 评论(2) 推荐(0) 编辑

摘要: #include <stdio.h>#include <stdlib.h>#include <math.h>#include <string.h>#define TRUE 1#define FALSE 0//筛选法非优化版本void CalPrime (int n){ int i, j, k; int * arr; if (n < 2) return ; arr = (int *)malloc(sizeof(int) * (n+1)); memset(arr, TRUE, sizeof(int) * (n+1)); ar... 阅读全文
posted @ 2012-10-04 20:28 _在路上 阅读(369) 评论(0) 推荐(0) 编辑