笔记
HM残云
这个作者很懒,什么都没留下…
展开
-
位运算小技巧
判断是否存在连续的1 bool check(int st)//判断是否合法,连续的1 { return !(x&x>>1) }原创 2021-09-28 15:26:03 · 122 阅读 · 0 评论 -
算法_二叉树笔记
请再接再厉! public class test { public static void main(String[] args) { BST<Integer,Integer> a=new BST(); a.put(10, 9); a.put(20, 19); a.put(6, 5); System.out.println(a.floor(18)); } } class BST<K原创 2021-03-20 16:28:27 · 104 阅读 · 2 评论 -
C++使用Sqlite3笔记
sqlite3_step步没有走完可以使用 sqlite3_finalize(stmt) 结束,否则会卡死数据库 函数 //UTF-8到GB2312的转换 char* U2G(const char* utf8) { int len = MultiByteToWideChar(CP_UTF8, 0, utf8, -1, NULL, 0); wchar_t* wstr = new wchar_t[len + 1]; memset(wstr, 0, len + 1); MultiByteToWideCha原创 2020-12-20 12:48:05 · 210 阅读 · 1 评论