会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
飞飞喵
博客园
首页
新随笔
联系
订阅
管理
1
2
3
4
下一页
2016年3月31日
stl bitset
摘要: bitset就是里面装了bit的set count () 1的个数 any() 是否有1 set(pos, value) pos 是从右数的 test() 返回值 flip(pos) 翻转某一位
阅读全文
posted @ 2016-03-31 05:44 飞飞喵
阅读(114)
评论(0)
推荐(0)
2016年3月14日
自定义compare 函数
摘要: priority_queue 默认情况下最大值在最前! 在sort的时候,也可以自己定义比较函数,可以把比较的方法写成函数或者类: 然后就可以用自己写的方法去sort 但是! 如果把比较函数写在类里,要把这个比较函数定义成static http://stackoverflow.com/questio
阅读全文
posted @ 2016-03-14 04:32 飞飞喵
阅读(1554)
评论(0)
推荐(0)
2016年2月28日
Implement Trie Tree,用memset做初始化
摘要: class TrieNode { public: bool exist; TrieNode* children[26]; TrieNode() { exist = false; memset(children, 0, sizeof(children)); } }; class Trie { publ
阅读全文
posted @ 2016-02-28 13:03 飞飞喵
阅读(274)
评论(1)
推荐(0)
2016年1月30日
JAVA bugFree!
摘要: JAVA * while(count==0) {} // 不能写成while(count) java不会自己变类型 * int i; long sqr = (long)i*i; // 要手动做类型转换 * If you use the nextLine() method immediately fo
阅读全文
posted @ 2016-01-30 10:34 飞飞喵
阅读(268)
评论(1)
推荐(0)
2016年1月28日
MySQL 笔记
摘要: create databasecreate TUTORIALS // create database delete databasedrop TUTORIALS // delete databse Change databaseuse TUTORIALS; // use database Data
阅读全文
posted @ 2016-01-28 07:31 飞飞喵
阅读(223)
评论(0)
推荐(1)
2016年1月24日
C++ 继承
摘要: C++中public,protected,private访问小结第一:private,public,protected方法的访问范围.(public继承下)private: 只能由该类中的函数、其友元函数访问,不能被任何其他访问,该类的对象也不能访问.protected: 可以被该类中的函数、子类的...
阅读全文
posted @ 2016-01-24 12:32 飞飞喵
阅读(144)
评论(0)
推荐(0)
流插入运算符为什么要被重载为全局函数?
摘要: https://www.coursera.org/learn/cpp-chengxu-sheji/lecture/c3tbl/liu-cha-ru-yun-suan-fu-he-liu-ti-qu-yun-suan-fu-de-zhong-zai 笔记Part 1. 流插入运算符的重载:cout<<...
阅读全文
posted @ 2016-01-24 11:31 飞飞喵
阅读(1020)
评论(1)
推荐(0)
C++ syntax
摘要: new:int *a = new int[size];int **a = new int*[size];运算符重载: // 输入输出运算符必须被重载为全局函数!class Complex{ public: int a,b;};Complex operator+(Complex ...
阅读全文
posted @ 2016-01-24 08:50 飞飞喵
阅读(607)
评论(2)
推荐(0)
2016年1月23日
Java PriorityQueue
摘要: heap insideQueue qi = new PriorityQueue();常用函数add()poll()peek()remove()contains()clear()
阅读全文
posted @ 2016-01-23 04:27 飞飞喵
阅读(157)
评论(0)
推荐(0)
Java Cheatsheet
摘要: Hello, World. public class learn { public static void main(String[] args){ System.out.println("hi"); } } Built-in data types: int, double, boolean, ch
阅读全文
posted @ 2016-01-23 04:08 飞飞喵
阅读(803)
评论(0)
推荐(0)
1
2
3
4
下一页
公告