#import int main(int argc, const char * argv[]) { // 冒泡排序 比较相邻两个数的大小 前面大于后面则交换位置 for (int i = 0; i array[j + 1]) { int temp = array...
分类:
编程语言 时间:
2015-09-22 16:21:59
阅读次数:
122
设计3个函数,分别实现已下功能:交换两个整数交换两个整形指针交换任意两个同类型的变量 1 #include 2 #include 3 #include 4 void swap_int(int* pa, int* qa) //交换两个整数 5 { 6 int temp = *pa; 7 ...
分类:
其他好文 时间:
2015-09-22 06:37:56
阅读次数:
129
首先先建立两个文件夹,一个temp,存储编译前的文件,一个comp,存储编译后的文件,编译前的文件使用{$title}代替,然后将前者编译成后者再解析,解析后存储在comp文件夹中定义一个解析类smarty.class.php_var[$key]=$value; } public fun...
分类:
其他好文 时间:
2015-09-22 01:22:01
阅读次数:
170
红黑树:publicclassRBTree{privatefinalNodeNIL=newNode(null,null,null,Color.BLACK,-1);privateNoderoot;publicRBTree(){root=NIL;}publicRBTree(Noderoot){this.root=root;}//插入节点publicvoidrbInsert(Nodenode){Nodeprevious=NIL;Nodetemp=root;while(temp!=NIL){previ..
分类:
编程语言 时间:
2015-09-22 00:12:12
阅读次数:
309
#include #include #include /*全局变量*/char * chr_form[100];int q=0,temp;char *word[6]={"begin","end","if","then","do","while"};int i=0,j=0,k=0,t=0;char c...
分类:
其他好文 时间:
2015-09-21 19:33:41
阅读次数:
196
1 temp=input("猜一下我想的那个数字吧:") 2 guess=int(temp) 3 while guess!=8: 4 temp=input("诶呀错误了在输入一次吧:") 5 guess=int(temp) 6 if guess==8: 7 ...
分类:
其他好文 时间:
2015-09-21 15:46:49
阅读次数:
117
1 print("...............我爱鱼C工作室..................") 2 temp=input("不妨猜一下小甲鱼现在心里想的是那个数字:") 3 guess=int(temp) 4 if guess==8: #添加“:”号后 点击回车会自动缩进 缩进相当...
分类:
其他好文 时间:
2015-09-21 15:35:33
阅读次数:
101
方法1: public class test0920{ public static void swap(int[] arr,int i,int j){ int temp=arr[i]; arr[i]=arr[j]; arr[j]=te...
分类:
编程语言 时间:
2015-09-20 21:57:06
阅读次数:
143
提醒大家一句,别一直使用root用户,因为root用户在系统中有着至高无上的权力,一不小心 就可能破坏系统。比如我们想删除/temp目录下的文件却将命令不小心输成“rm / temp(在‘/’后 多了一个空格)”,那么...
分类:
系统相关 时间:
2015-09-20 13:22:56
阅读次数:
177
例如:获取到的文件路径为C:\Documents and Settings\Leeo\My Documents\logo.gif现在想要取得图片的名称logo.gif,我们知道反斜杠“\”是转义字符,所以不能直接String temp[] = filePath.split("\");//filePa...
分类:
编程语言 时间:
2015-09-20 06:56:29
阅读次数:
171