- 博客(12)
- 收藏
- 关注
原创 alter table xxx disable row movement
C 更新分区关键字列将导致分区的更改。这种情况可以通过开启表的行移动来允许对分区字段的update 操作:alter table tableName enable row movement;updatetableName set colunmName = 'columValue' where queryCondition;alter table xxx disable row movement;以上语句需要分开执行。...
2021-02-09 14:14:35 1725
原创 easyUI datagrid 如何做出左右滚动条
一:设置 fitColumns : false二:columns 中,设置所有 fixed : true,但是留其中一个设置 width : 100(根据实际需求)
2021-01-26 09:17:29 1537
原创 归并排序 mergeSort
public class mergeSort { public static void main(String[] args) { int arr[] = {8,4,5,7,1,3,6,2}; int[] temp = new int[arr.length]; mergeSort(arr,0,arr.length - 1,temp); System.out.println(Arrays.toString(arr)); } .
2020-11-27 17:35:43 171 2
原创 二分法查找 binarySearch
public static ArrayList<Integer> binarySearch(int[] arr,int left,int right,int findVal){ //找不到时返回空数组 if(left > right) return new ArrayList<>(); //定义数组中间指针 int mid = (left + right) / 2; if(arr[mid] &.
2020-11-26 09:09:18 114
原创 快速排序 QuickSort
public static int[] sort(int[] ints, int left, int right) { //左边指针 int l = left; //右边指针 int r = right; //中间指针 int mid = (left + right) / 2; //临时变量 int temp; //左指针在右指针的前面时,进行循环 ..
2020-11-25 14:44:18 78
原创 LDAPS验证密码
LdapsAuthn.classimport javax.naming.Context;import javax.naming.NamingEnumeration;import javax.naming.NamingException;import javax.naming.directory.*;import java.util.Hashtable;public class ...
2018-09-12 10:15:02 1892
原创 Jdbc,DBUtils
public class JdbcUtils { //定义Properties类 public static Properties prop = new Properties(); static{ try { //获取配置文件 InputStream in = Thread.currentThread().getContextClassLoader(). getRe...
2018-06-08 10:24:05 264
原创 JDBC MySql 入门程序
import java.sql.Connection;import java.sql.DriverManager;import java.sql.ResultSet;import java.sql.SQLException;import java.sql.Statement;public class MySqlJDBCDemo { //加载数据库驱动 final static St...
2018-04-16 11:03:54 150
原创 递归,裴波那挈 Fibonacci
public class RecursiveFibonacci { public static int rF(int number){ //第一个数是0 if(number == 1){ return 0; } //第二个数是1 else if(number ==2){ return 1; } //从第三个开始,后一个是前两个的和 else { return rF(nu...
2018-04-12 22:41:33 111
原创 递归——加法、阶乘
//从1 开始,一直累加到一个给定的数public class RecursiveAdd { //定义全局变量sum static int sum = 0; public static int count(int init){ //从100开始计算,逐渐变小 sum += init; init--; //只要还大于0,递归调用自身 if(init > 0){ count(ini...
2018-04-12 19:28:14 961
原创 对数组的冒泡排序 BubbleSort
public class BubbleSort { public static int[] bubbleSort(int[] array) { //数值交换时使用的中间变量 int temp; //用于判断是否进行过值的交换 int flag = 1; //数组长度值-1,代表进行比较时如果 i 是最后一项,则不再进行比较 int m = array.length - 1...
2018-04-12 17:39:22 642
原创 统计文件中字符的出现次数,WordCount
import java.io.BufferedReader;import java.io.File;import java.io.FileInputStream;import java.io.IOException;import java.io.InputStreamReader;public class WordCount { //私有的构造方法 private WordCount...
2018-04-04 16:22:53 513
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人