随笔分类 - 计算机
纯粹的计算机科学
摘要:获得资源的接口 /*NSString *img1 = [[NSBundle mainBundle] pathForResource:@"ad_1" ofType:@"png"]; NSString *img2 = [[NSBundle mainBundle] pathForR...
阅读全文
摘要:@property 1,assign : 简单赋值,不更改索引计数 假设你用malloc分配了一块内存,并且把它的地址赋值给了指针a,后来你希望指针b也共享这块内存,于是你又把a赋值给(assign)了b。此时a 和b指向同一块内存,请问当a不再需要这块内存,能否直接释放它?答案是否定的,因为a并不知道b是否还在使用这块内存,如果a释放了,那么b在使用这块内存的时候会引起程序crash掉 ...
阅读全文
摘要:this class is not key value coding-compliant for the key xxxxxxx.' " 问题:设置IBAction和IBOutlet时有多余的连线, 解决:按下ctrl键检查控件的连接将多余的连续删除(检查Referencing outlet) 查看当前xcode支持的硬件版本 /Applications/Xcode.app/Contents...
阅读全文
摘要:vs2008搜索的问题,提示No files were found to look in, 解决方式:Ctl+Scroll Lock. vs2015的KEY: HMGNV-WCYXV-X7G9W-YCX63-B98R2
阅读全文
摘要:md5算法 MD5 and SHA are hash functions (SHA is actually a family of hash functions) - they take a piece of data, compact it and create a suitably unique
阅读全文
摘要:client-SSL-client.o: In function `ACE_SSL_SOCK_Stream::close()':../../../../ace/SSL/SSL_SOCK_Stream.i:278: undefined reference to `SSL_shutdown'../../
阅读全文
摘要:对于整形常量,0x01,0x0001都是整形(int),4byte的大小; 0x01L这个是8byte的长度 普通的static变量,如果包含在不同的源文件中,则产生多个符号; 类中的static变量,只需要一处初始化,然后其他地方引用的时候,也只会有这一个符号。 函数中的static变量,只会有一
阅读全文
摘要:file format not recognized,在ld时候出这个错误,有可能是符号链接失效了。 加快编译 #服务端: distcc-3.2rc1.tar.gz ./configure;make;make install; #客户端: yum install distcc #配置 ~/.bash_profile中的动作: export CC=distcc export CXX="distc...
阅读全文
摘要:显示所有的组 cat /etc/group 添加组 groupadd www 在组内添加用户 useradd -g www wwwtestuser
阅读全文
摘要:Bash按照颜色显示 编辑 ~/.bash_profile, 加入以下代码: export CLICOLOR=1 export LSCOLORS=gxfxaxdxcxegedabagacad 自动补全功能 nano .inputrc set completion-ignore-case on set show-all-if-ambiguous on TAB: menu-complete
阅读全文
摘要:/usr/sbin/ntpdate ntpupdate.tencentyun.com >/dev/null 2>&1 &echo "/data/gamelogs/core/core-%e-%t" > /proc/sys/kernel/core_pattern yum install crontabs
阅读全文
摘要:I also faced the same problem few weeks ago when implementing a VoIP server. After spending several days I could come up with a solution. As many othe
阅读全文
摘要:http://www.vectorns.com/blog/technical-articles/1-tortoisesvn-over-ssh-on-windows-via-putty
阅读全文
摘要:wget http://192.168.1.4:8001/login?uid=1\&channel=1\&token=2
阅读全文
摘要:获取一个时间戳有时候会使用时间戳,或者随机数,UUID这样的东西,百度一下也有相关文章(比如搜索”shell date随机数“等)。一般来说,可以用%s和%N组合的方式就没问题,同一秒内,两次运行%N肯定不会一样,所以%s和%N组合能得到一个唯一数。
阅读全文
摘要:All paths are either absolute or relative to prefix path nginx.org/en/docs/configure.html vhost:虚拟主机 vps:虚拟私人服务器 nginx.conf中配置日志类型: error_log logs/err
阅读全文
摘要:mysql中间件:Atlas是由 Qihoo 360, Web平台部基础架构团队开发维护的一个基于MySQL协议的数据中间层项目。它是在mysql-proxy 0.8.2版本的基础上,对其进行了优化,增加了一些新的功能特性。360内部使用Atlas运行的mysql业务,每天承载的读写请求数达几十亿条...
阅读全文
摘要:grep-rIlo$'^\xEF\xBB\xBF'.|xargssed--in-place-e's/\xef\xbb\xbf//'
阅读全文