码迷,mamicode.com
首页 >  
搜索关键字:os    ( 139979个结果
STL 队列 、优先队列、栈 小结
学长说现在基本上可以开始学习STL中一些标准模板了,今天先总结一下 队列、栈、优先队列 1、队列(queue)       先进先出原则,头文件#include ,定义结构queue名称;queueq、queueq等; 如: struct node { int x; }f; queueq;//结构体类型队列 q.push(f) //将f压入队列的尾部 node t...
分类:其他好文   时间:2014-06-28 08:36:49    阅读次数:162
《学习bash》笔记--定制用户环境
1...
分类:其他好文   时间:2014-06-28 08:33:18    阅读次数:218
ProjectRuler 算法练习之 位数组成字符串相同的整数
Problem :It can be seen that the number, 125874, and its double, 251748, contain exactly the same digits, but in a different order.Find the smallest positive integer, x, such that 2x, 3x, 4x, 5x, and ...
分类:其他好文   时间:2014-06-28 08:13:17    阅读次数:249
使用 & ^ << 等 位符实现加法运算
学习过C语言的同学都知道,再写代码的时候,位操作运算总比算数运算操作快, 本文就是用C语言提供的位运算实现两个数的加法。 本文使用的代码都经过调试正常并且能够运行,调试环境centos     gcc  一下是实现代码,以及测试结果: #include #include int main(int argc, char **argv) { int add_a,add_b;...
分类:其他好文   时间:2014-06-28 07:26:38    阅读次数:183
正整数划分的另一种解法 (纯递归)
Step 1: n ==1 : return 1 n == 2 : return  [1,1],[2]Step 2:for n > 2a.arr.push(n)b.arr.push([n-1,1])c.1 get result of recursion(n-2)c.2 combine n==2 & result => retc.3 remove duplicate record in retcod...
分类:其他好文   时间:2014-06-28 07:17:11    阅读次数:255
hdu-4035-Maze-树上的概率dp
对于叶子节点和非叶子节点非别列公式。 然后化简公式。 和非树上的差不多。。 #include #include #include #include #include #include #include using namespace std; #define eps 1e-9 #define zero(x) ((fabs(x)<eps?0:x)) #define maxn 11000 #de...
分类:其他好文   时间:2014-06-28 07:15:49    阅读次数:263
POJ1026 Cipher 【polya】
This question is not so difficult. First,my thoughts were we should use a lot of code to find out the loop block,but there is no need to do that . you just need to get every new position of char in ...
分类:其他好文   时间:2014-06-27 23:39:44    阅读次数:293
通过查看源码,查看invalidate和postInvalidate的区别
查View的源码可知: postInvalidate是使用handler发送消息,即可以使用在非UI线程中,而invalidate直接修改布局,所以只能用在UI线程里了。 public void invalidate() {         invalidate(true);     } void invalidate(boolean invalidateCa...
分类:其他好文   时间:2014-06-27 23:39:04    阅读次数:256
UIImagePickerController相册选择视频
UIImagePickerController *picker = [[UIImagePickerController alloc] init];     //资源类型为视频库     NSString *requiredMediaType1 = ( NSString *)kUTTypeMovie;     picker.sourceType = UIImagePick...
分类:其他好文   时间:2014-06-27 23:32:34    阅读次数:241
vc++教程之win7下基址定位处理
作者:无名  邮箱:coolmoonf($#)163.com  博客:http://blog.csdn.net/nnsword 处理目标程序如下: 里面有二个方法,一个加血,一个是减血。由于系统是win7,寻到的Call基址,会改变,所以不能通过固定基址来远程调用这二个方法。所以我们只能变通了。 首先我们知道,编译后程序相对于模块基址的偏移量是不变的,所以我们可以按这个思路来处理。 ...
分类:编程语言   时间:2014-06-27 23:22:02    阅读次数:338
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!