07 2016 档案

摘要:宏定义的使用与注意事项 ##是一个连接符号,用于把参数连在一起 #是“字符串化”的意思。出现在宏定义中的#是把跟在后面的参数转换成一个字符串#define paster( n ) printf( "token " #n" = %d\n ", token##n ) 所以paster(9);就是相当于 阅读全文
posted @ 2016-07-29 11:09 PKICA 阅读(2735) 评论(1) 推荐(1) 编辑
摘要:classA{ public: f(int); }; 这里f函数其实有两个参数,第一个是A*const this, 另一个才是int类型的参数 如果我们不想f函数改变参数的值,可以把函数原型改为f(constint),但如果我们不允许f改变this指向的对象呢?因为this是隐含参数,const没法 阅读全文
posted @ 2016-07-27 22:10 PKICA 阅读(246) 评论(0) 推荐(0) 编辑
摘要:sort()函数是C++中的排序函数其头文件为:#include<algorithm>头文件; qsort()是C中的排序函数,其头文件为:#include<stdlib.h> 1、qsort() 六类qsort排序方法 qsort函数很好用,但有时不太会用比如按结构体一级排序、二级排序、字符串排序 阅读全文
posted @ 2016-07-27 21:42 PKICA 阅读(555) 评论(0) 推荐(0) 编辑
摘要:#ifndef RC4_H #define RC4_H #define KEYLEN256 256 class rc4 { public: rc4(); ~rc4(); void swap(unsigned char *a, unsigned char *b); //initial state in 阅读全文
posted @ 2016-07-17 19:16 PKICA 阅读(336) 评论(0) 推荐(0) 编辑
摘要://heads.h #ifndef HEAD_H #define HEAD_H #include <iostream> #include <sys/shm.h> //share momery #include <unistd.h> #include <stdio.h> #include <strin 阅读全文
posted @ 2016-07-14 21:34 PKICA 阅读(617) 评论(0) 推荐(0) 编辑
摘要:http://www.cnblogs.com/shipfi/archive/2008/08/04/1260293.html 感谢作者! 程序变量查看文件中某变量的值:file::variablefunction::variable可以通过这种形式指定你所想查看的变量,是哪个文件中的或是哪个函数中的。 阅读全文
posted @ 2016-07-12 06:27 PKICA 阅读(415) 评论(0) 推荐(0) 编辑
摘要:时间限制:3000 ms | 内存限制:65535 KB 难度:4 //C v0.1 AC #include<stdio.h> #include <stdlib.h> #include <string.h> #include <alloca.h> struct rectangle { int len 阅读全文
posted @ 2016-07-10 17:47 PKICA 阅读(331) 评论(0) 推荐(0) 编辑
摘要:300. Longest Increasing Subsequence 300. Longest Increasing Subsequence https://www.felix021.com/blog/read.php?entryid=1587&page=3&part=1 感谢作者! 标题:最长递 阅读全文
posted @ 2016-07-09 21:08 PKICA 阅读(321) 评论(0) 推荐(0) 编辑
摘要:编程类: 曹乐的个人主页 ACM网站: 南阳理工学院acm1 南阳理工学院acm2 武汉大学acm Universal Online Judge 洛谷网校 编程类: 学术类: 开放自由学术成果发布平台: arxiv open journals Linux OS类 Linux OS command 功 阅读全文
posted @ 2016-07-09 20:45 PKICA 阅读(192) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 #include 3 #include 4 int max(int a, int b); 5 int main() 6 { 7 int n; 8 scanf("%d", &n); 9 int i; 10 //arr stores data 11 int arr[101]; 12 //path sto... 阅读全文
posted @ 2016-07-09 16:10 PKICA 阅读(465) 评论(0) 推荐(0) 编辑
摘要://pool.h 1 #ifndef POOL_H 2 #define POOL_H 3 #include 4 5 class pool 6 { 7 public: 8 pool(); 9 ~pool(); 10 11 void func(); 12 static void *schedule(void *ptr); 13 int s... 阅读全文
posted @ 2016-07-08 18:02 PKICA 阅读(711) 评论(0) 推荐(0) 编辑
摘要:http://blog.csdn.net/scanery/article/details/7241890 感谢作者! 近来发现 在线程函数第一行调用 pthread_detach(pthread_self()) 返回值是22不是0,后来在网上找到以下话语: linux线程执行和windows不同,p 阅读全文
posted @ 2016-07-08 17:18 PKICA 阅读(412) 评论(0) 推荐(0) 编辑
摘要:http://www.hawstein.com/posts/dp-novice-to-advanced.html https://www.topcoder.com/community/data-science/data-science-tutorials/dynamic-programming-fr 阅读全文
posted @ 2016-07-03 21:56 PKICA 阅读(658) 评论(0) 推荐(0) 编辑
摘要://C v0.01 不知题意,正在理解,正在(一)上修改。 <!--StartFragment-->#include <stdio.h> #include <string.h> #include <stdlib.h> #define STACK_SIZE 10000 typedef struct S 阅读全文
posted @ 2016-07-03 19:15 PKICA 阅读(306) 评论(0) 推荐(0) 编辑
摘要:add-auto-load-safe-path /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19-gdb.pyset auto-load safe-path / add-auto-load-safe-path /usr/lib/x86_64-linux-gn 阅读全文
posted @ 2016-07-03 17:16 PKICA 阅读(7831) 评论(0) 推荐(2) 编辑
摘要:1.解决ubuntu 14 system setttings失效的问题 sudo apt-get install unity-control-center 2. 支持root用户登录 修改以下配置文件 $vi /usr/share/lightdm/lightdm.conf.d/50-ubuntu.c 阅读全文
posted @ 2016-07-02 12:09 PKICA 阅读(228) 评论(0) 推荐(0) 编辑