iOS6 之前版本给 tableview 设置背景只需如下: self.tableView.backgroundColor = [UIColor redColor]; iOS6 却无效。 然后,查...
2013-02-19
self.twoDimString = symbol.data; //编解码问题 if ([self.twoDimString canBeConvertedToEncoding:NSS...
2013-02-06
使用ARC能帮我们减轻不少内存管理方面的负担,尤其是对用惯了Java的程序员来说。但是像我这种Java基础本身就不牢固,做了两年的iOS已经习惯手动管理内存的半吊子,使用ARC还是经常碰壁。 最近碰到...
2013-01-09
sudo apt-get install snmp snmpd vim /etc/snmp/snmpd.conf 1.将原有“agentAddress udp:127.0.0.1:161”改为: ...
2012-12-28
exit()函数 调用exit会让用户感觉程序崩溃了,不会有按Home键返回时的平滑过渡和动画效果;另外,使用exit可能会丢失数据,因为调用exit并不会调用- applicationWillTer...
2012-12-12
建立一个新的 Django 开发环境: 使用 virtualenv 创建一个新的虚拟环境。 mkdir ~/env/ virtualenv ~/env/tutorial source ~/env/...
2012-12-07
sitemap 主要是描述了网站的结构, 使得搜索引擎更容易的理解网站得内容。 具体 sitemap 生成可以参考 sietmaps.org Django sitemap 的建立: 在 settin...
为 rabbitMQ 添加 vhost 和 user rabbitmqctl add_vhost /myhost # 添加 vhost rabbitmqctl add_user me me123 #...
2012-10-30
1、如何自定义NSLog呢? 直接在工程的XXX_Prefix.pch中加入以下语句(就相当于在全局中定义了) define NSLog NSLog(@"#%s##%d#",strrchr(FILE,...
2012-08-29
After mongoengine 0.6 release, it has support RelicaSet connection For exapmle: from mongoengine imp...
2012-08-21
做下笔记, Django 中的一些文本处理工具. 觉得挺有用的:) get_text_list(items, last_word='or') from django.utils.text import...
2012-08-18
大陆程序员技能必备 iptables -I FORWARD -p tcp --syn -i ppp+ -j TCPMSS --set-mss 1410 iptables --table nat --a...
2012-07-27
文章很老了。不过感觉很不错。 mark下同时也分享给大家 https://help.ubuntu.com/community/HighlyAvailableLAMP...
2012-06-05
Decorators: Another common way to alter the way a function behaves is to “decorate” it with another ...
2012-05-29
折腾了好久 apache+wsgi 不知道为什么一直在 memory leak 在失去了改源码的激情中, 只能通过换服务的方式解决了. 借鉴 instagram 的典型架构使用 django + gu...
方法一: 直接修改 /etc/timezone 文件 echo "Asia/Shanghai" > /etc/timezone 方法二: 使用 dpkg-reconfig...
2012-05-21
化学品查询 apps 正式上线....审核了将近 2 周 下载链接. http://itunes.apple.com/cn/app/wu-jing- shu-ju-ku/id518583101?l=e...
2012-05-01
求函数 1!+2!+....+n! 列出两种算法比较性能 方法一: int fact1(int n) { int i, j, temp, s; s = 0; for (i=1; i&...
2012-04-22
图片等比缩放: w = float( originWidth ) #原始宽度 h = float( originheight ) #原始高度 boxW...
Django's template is not support Dict sort :( I have write a new filter that support Dict sort in te...
2012-04-09