ruby中proc和lambda的return区别
摘要:学习ruby有一段时间了,但是我看了好几遍proc和lambda的return区别的区别讲解,始终没明白到底什么区别,今天上午又看,终于感觉是茅塞顿开有点领悟了 一下内容部分来自<<ruby元编程>>第二版92页 1 lambda中的return表示仅仅才从,这个lambda中返回,那么从lambd
阅读全文
posted @
2016-10-17 12:52
c3tc3tc3t
阅读(251)
推荐(0)
fgets读取文件时的注意事项
摘要:1 文本文件 a.txt 内容如下 输出结果 总结: fgets读取时,如果指定的读取大小,小于实际行大小 那么 不添加\n做结尾,使用\0 ,然后接着读取没读完的当前行数据作为新的一行开始 fgets读取时,如果指定读取大小.大于实际行大小,那么将\n添加到末端.再添加\0 \0不算做有效长度里的
阅读全文
posted @
2016-10-06 15:25
c3tc3tc3t
阅读(2384)
推荐(0)
ubuntu16.04解决播放swf视频文件问题
摘要:使用下面 sudo apt-get install swfdec-gnome
阅读全文
posted @
2016-10-04 14:58
c3tc3tc3t
阅读(369)
推荐(0)
ubuntu下设置clion是使用clang和clang++
摘要:链接 http://stackoverflow.com/questions/31725681/how-to-setup-clion-with-portable-clang-on-ubuntu I got the answer from CLion blog and it works and here
阅读全文
posted @
2016-10-04 13:45
c3tc3tc3t
阅读(4747)
推荐(0)
Linux 下没有conio.h 已解决
摘要:原文:http://blog.sina.com.cn/s/blog_6a95e00b0100zqvf.html #include <stdio.h>//#include <conio.h>void main(){ char ch; for(;;){// system("stty -echo"); c
阅读全文
posted @
2016-10-04 13:16
c3tc3tc3t
阅读(3360)
推荐(2)