摘要: 1.distinct 用来查询不重复记录的条数,可以是单个字段去重、也可以是多个字段去重,但是不能与all同时使用并且不能在insert、delete、update中使用 select distinct column1 from table_name; 2.where 子句用于提取那些满足指定条件的 阅读全文
posted @ 2020-09-04 15:42 若离若不弃 阅读(3380) 评论(0) 推荐(0) 编辑
摘要: 1.新增 (1)向数据库表中插入数据 insert into table_name(column1,column2,...) values(value1,value2,...) (2)新增表的字段 alter table table_name add column_name datatype; 2. 阅读全文
posted @ 2020-05-08 11:22 若离若不弃 阅读(575) 评论(0) 推荐(0) 编辑
摘要: 做了一下小工具,在文本框txtbox中输入cmd命令,运行之后,结果显示在另一个txtbox中,源码如下: private void button1_Click(object sender, EventArgs e) { Process proc = new Process(); proc.Star 阅读全文
posted @ 2020-04-22 14:51 若离若不弃 阅读(521) 评论(0) 推荐(0) 编辑
摘要: public static void main(String[] args) { //定义整型数组 int[] a = {73,22,93,43,55,14,28,65,39,1,3,55}; //输出排序前的数组 for(int i : a) { System.out.print(i + " ") 阅读全文
posted @ 2020-04-20 09:07 若离若不弃 阅读(241) 评论(0) 推荐(0) 编辑
摘要: public void countingsort(int[] array, int[] b, int k) { //创建数组c int[] c = new int[k+1]; for(int i=0;i<c.length;i++) { c[i] = 0; } //统计数组array中每个元素出现的次 阅读全文
posted @ 2020-04-18 12:26 若离若不弃 阅读(238) 评论(0) 推荐(0) 编辑
摘要: public static void quicksort(int[] array,int low,int high) { if(low > high) { return; } int i=low; int j=high; int temp = array[low];//temp就是基准位 while 阅读全文
posted @ 2020-04-17 09:08 若离若不弃 阅读(272) 评论(0) 推荐(0) 编辑
摘要: public static void heapsort(int[] a) { int len = a.length; //构建堆 for(int i = len / 2 - 1;i >= 0 ;i-- ) { heapadjust(a,i,len - 1); } for(int j=len -1;j 阅读全文
posted @ 2020-04-16 09:00 若离若不弃 阅读(175) 评论(0) 推荐(0) 编辑
摘要: public static void merge(int[] array, int start, int mid, int end) { int[] temp = new int[array.length]; int i=start,j=mid+1,k=start; while(i != mid+1 阅读全文
posted @ 2020-04-15 09:08 若离若不弃 阅读(216) 评论(0) 推荐(0) 编辑
摘要: public static void shellsort(int[] array) { int n = array.length; int d = n / 2; while(d > 0) { for(int i = d ;i < n;i++) { int j = i - d; while(j >= 阅读全文
posted @ 2020-04-14 09:09 若离若不弃 阅读(125) 评论(0) 推荐(0) 编辑
摘要: public static void insertsort(int[] array) { int temp; for(int i =1;i<array.length;i++) { for(int j=i;j>0;j--) { if(array[j]<array[j-1]) { temp = arra 阅读全文
posted @ 2020-04-13 09:03 若离若不弃 阅读(154) 评论(0) 推荐(0) 编辑