插入排序 public static int[] insert_sort(int arr[]){ int i = 0,temp; //插入排序 for(int j = 1;j0 && arr[i]>temp){ arr[i+1]=arr[i]; i-...
分类:
编程语言 时间:
2014-11-11 20:42:08
阅读次数:
255
1 #include"string.h" 2 #include"malloc.h" 3 4 5 void swap(int a,int b) 6 { 7 int temp; 8 temp=a; 9 a=b;10 b=temp;11 }12 13 int get_...
分类:
编程语言 时间:
2014-11-11 20:36:56
阅读次数:
204
杀死数据库连接:
DECLARE @temp NVARCHAR(20)
DECLARE myCurse CURSOR
FOR
SELECT spid
FROM sys.sysprocesses
WHERE dbid = DB_ID('YourDatabaseName')
OPEN myCurse
FETCH NEXT FROM myCurse INTO @temp
WH...
分类:
数据库 时间:
2014-11-11 19:12:36
阅读次数:
214
有些时候即便是思路再正确也总有考虑不到的地方,而经验让我们一点点填平不足。冒泡排序: //大泡“浮”到右端 function bubbleSort1(arr){ var i=arr.length, j; var temp; while(i>0){ ...
分类:
编程语言 时间:
2014-11-11 18:31:42
阅读次数:
239
go语言真的是很简洁,下面用它来实现快速排序算法packageqsort
funcquickSort(values[]int,leftint,rightint){
ifleft<right{
temp:=values[left]
i,j:=left,right
for{
forvalues[j]>temp{
j--
}
forvalues[i]<temp{
i++
}
ifi>..
分类:
编程语言 时间:
2014-11-11 12:51:43
阅读次数:
200
Cannyfunction [ canny ] = canny( rgb )temp=rgb2gray(rgb);canny=edge(temp,'canny');end灰度temp=rgb2gray(rgb);播放视频clear allsource = VideoReader('d:\v\\bus...
分类:
其他好文 时间:
2014-11-11 12:30:23
阅读次数:
265
Python文件IO有如下文本内容,文件路径为D:\temp,文件名称为lyric.txt,line1 Look ! line2 If U had one shotline3 One opportunityline4 To seize everything U ever wantedline5 On...
分类:
编程语言 时间:
2014-11-11 00:41:54
阅读次数:
305
安装VS2010 SP1后,再安装mvc3会报错,估计原因是此安装包会安装VS的补丁,而sp1的补丁版本高过此安装包的。AspNetMVC3ToolsUpdateSetup.exe解决办法:运行此安装包,停在 接受协议 的地方,会在某个盘根目录解压一个临时文件夹Temp,进入后,单独安装如下4个ms...
分类:
Web程序 时间:
2014-11-10 19:50:31
阅读次数:
220
使用HibernateSQLQuery进行查询时,如果有两个列的列明相同,那么在取值时,Hibernate会取第一个同名列的值(在SQLPlus中会自动在列明后面跟上写字符进行区分)。如:1、SQL语句SELECT
*FROM(SELECT‘A‘A,‘B‘BFROMDUAL)TEMP_A,(SELECT‘C‘A,‘D‘BFROMDUAL)
TEMP_B2、Sqlplus查询结..
分类:
数据库 时间:
2014-11-10 18:12:01
阅读次数:
234
//载入核心文件include "./libs/Smarty.class.php";$smarty = new Smarty();//模版目录$smarty->template_dir = "template";//模版目录$smarty->compile_dir = "temp/compile";...
分类:
其他好文 时间:
2014-11-09 20:40:35
阅读次数:
216