摘要: // pc[i] is the populatio count of ivar pc [256]byte//统计出o~255每个数对应二进制上1的个数func init() { for i := range pc { pc[i] = pc[i/2] + byte(i&1) // fmt.Printf 阅读全文
posted @ 2017-04-04 21:35 c碰 阅读(652) 评论(0) 推荐(0) 编辑
摘要: //原帖http://www.doc88.com/p-612602414790.html 阅读全文
posted @ 2017-03-05 21:14 c碰 阅读(184) 评论(0) 推荐(0) 编辑
摘要: struct Point{ Point() { posx = 0; posy = 0; } Point(int x, int y) { posx = x; posy = y; } int posx; int posy;}; void bresenham(int x1, int y1, int x2, 阅读全文
posted @ 2017-02-27 19:15 c碰 阅读(623) 评论(0) 推荐(0) 编辑
摘要: //转自http://www.linuxidc.com/Linux/2014-10/108195.htm Linux修改Shell命令提示符及颜色 1. Linux登录过程中加载配置文件顺序: /etc/profile → /etc/profile.d/*.sh → ~/.bash_profile 阅读全文
posted @ 2017-02-18 11:14 c碰 阅读(1839) 评论(0) 推荐(0) 编辑
摘要: 1. Linux进程状态:R (TASK_RUNNING),可执行状态&运行状态(在run_queue队列里的状态) 2. Linux进程状态:S (TASK_INTERRUPTIBLE),可中断的睡眠状态, 可处理signal 3. Linux进程状态:D (TASK_UNINTERRUPTIBL 阅读全文
posted @ 2017-02-17 22:13 c碰 阅读(1195) 评论(0) 推荐(0) 编辑
摘要: //活动日期(星期) int week_day_limit = 0; for(int i=0;i<ac;i++) { week_day_limit |= 1 << (atoi(av[i])-1); } item.start.weekday = week_day_limit; item.end.wee 阅读全文
posted @ 2017-01-17 14:57 c碰 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 第三方软件库: http://download1.rpmfusion.org/free/fedora/releases/25/Everything/x86_64/os/repoview/index.html 原帖http://www.linuxdown.net/install/soft/2016/0 阅读全文
posted @ 2016-05-09 21:05 c碰 阅读(589) 评论(0) 推荐(0) 编辑
摘要: from https://segmentfault.com/a/1190000002596724{ "font_size": 21, "highlight_line": true, "show_full_path": true, "ignored_packages": [ "Vintage" ], 阅读全文
posted @ 2016-04-23 22:17 c碰 阅读(219) 评论(0) 推荐(0) 编辑
摘要: find . -type f -name "*.lua" | xargs sed -i '1 i \#!\/usr\/bin\/lua' #一行前添加(文件至少有一行) 复制自: http://blog.163.com/chen_dawn/blog/static/112506320112284440 阅读全文
posted @ 2016-03-04 13:19 c碰 阅读(1065) 评论(0) 推荐(0) 编辑
摘要: 首先说下没搞定的事项:1,grub不能启动w102,ubuntu不能检测到无线网卡硬件3,ubuntu更新软件和语言支持时,unpacking文件时经常都会发生卡死(怀疑是emmc驱动的问题)w10安装ubuntu的注意事项1,现在安装并使用的是Ubuntu 15.10 ,Ubuntu 16.04 ... 阅读全文
posted @ 2016-01-26 12:21 c碰 阅读(1689) 评论(0) 推荐(0) 编辑