摘要:
阅读全文
摘要:
private void main(){ private delegate void MyInvoke(); Thread th = new Thread(new ThreadStart(selectThread)); th.IsBackground = true; th.Start(); } public void selectThread() { ... 阅读全文
摘要:
数组 数组在C#中是最早出现的。它在内存中是连续的存储的,所以索引速度很快,而且赋值与修改元素也很简单。可以利用偏移地址访问元素,时间复杂度为O(1);可以用折半查找法查找元素,效率高。 同时,数组也有很多缺点。数组分配在一块连续的数据空间上,因此分配空间时必须确定大小。空间的连续,也导致了存储效率 阅读全文
摘要:
1 -- 字符串拼接 2 SET @this_year=YEAR(CURDATE()); 3 SET @str=CONCAT('select time from tb_history_',@this_year) 4 PREPARE stmt from @str; 5 EXECUTE stmt; 6 DEALLOCATE stmt; 7 8 -- 视图 9 DROP VIEW ... 阅读全文
摘要:
1.翻转字符串算法 1 function reverseString(str) { 2 var res=str.split("").reverse().join(""); 3 return res; 4 } 5 reverseString("hello"); 2.阶乘算法 1 function fa 阅读全文
摘要:
public string AesEncrypt(string str, string key) { //加密 if (string.IsNullOrEmpty(str)) return null; Byte[] toEncryptArray = Encoding.UTF8.GetBytes(str); ... 阅读全文
摘要:
int[] num = new int[10] { 3, 5, 7, 0, 1, 9, 4, 8, 2, 6 }; //冒泡排序 时间复杂度:最优O(n)最差O(n^2)平均O(n^2) 空间复杂度:O(1) 稳定性:稳定 for (int i = 0; i num[j + 1]) { ... 阅读全文
摘要:
坐标 坐标 ... 阅读全文