自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(71)
  • 收藏
  • 关注

原创 iOS7新特色

导航栏背景色用barTintColor设置using barTintColorinstead of tintColorto tint a bar’s background.

2013-10-11 14:55:45 708

原创 iOS7TransitionGuide阅读笔记

动态字体iOS 7 introduces Dynamic Type, which makes it easy to display great-looking text in your app. tint colorIn iOS 7, tint color is a property ofUIView. iOS 7 apps

2013-10-10 15:03:12 149

原创 ssh-keygen linux免登陆

http://www.colorfuldays.org/tag/ssh-keygen/

2013-07-22 16:01:08 541

原创 git clone 和 git push

git clone qq@42.121.0.72:/srv/auntgroups.gitgit push qq@42.121.0.72:/srv/auntgroups.git master

2013-07-22 15:17:52 408

原创 活动app当前

发消息收推送消息,刷新消息列表先读数据库,后读接口

2013-07-04 14:11:11 100

原创 时间类微博格式的转换逻辑

是否60秒内   提示:xx秒前是否60分钟内    提示:xx分钟前是否昨天     提示:xx是否大于60分钟且小于24 * 60 分钟  提示:xx小时前是否更多天前

2013-07-04 09:43:00 373

转载 判断是否包含汉字

UTF8编码:汉字占3个字节,英文字符占1个字节NSString *text = @"i'm a 苹果。...";int length = [text length];for (int i=0; i{NSRange range = NSMakeRange(i, 1);NSString *subString = [text substringWithRange:ran

2012-10-10 15:49:04 531

原创 11

UTF8编码:汉字占3个字节,英文字符占1个字节NSString *text = @"i'm a 苹果。...";int length = [text length];for (int i=0; i{NSRange range = NSMakeRange(i, 1);NSString *subString = [text substringWithRange:ran

2012-10-10 15:40:19 91

原创 终端下强制删除文件夹

rm -rf Ski.git/

2012-10-08 19:09:54 558

转载 在iOS中获取AGSMapView的图片

http://www.giser.net/?p=1047在iOS中有时候会需要截取mapview当前的显示内容,用来辅助描述你的地理位置,下面的代码为截图的方法:if (NULL != UIGraphicsBeginImageContextWithOptions)UIGraphicsBeginImageContextWithOptions(self.mapView.fram

2012-09-30 12:53:15 939

转载 ios文件分享

由于最近项目需要读取本地用户的视频..发现无法读取ios设备自带"视频"应用中的视频..很懊恼..4了很多种方法.连assetLibrary都用上了.还不能...国内根本没有..去国外找也没有..最后发现一些看书软件..办公软件有个文件共享功能..只能以后让用户自己添加到文件共享了...不给力的apple..还发现苹果自身的软件在播放视频的时候,如果连续快进或后退..一会就应用就挂

2012-09-28 02:25:15 698

转载 使用sqlite时遇到的错误 read-only

在模拟器上运行没有问题;在真机上报如下错误:Attempt to add read-only file at path file://localhost/var/mobile/Applications/A80208B7-36C8-4CD0-94D9-E3EC57BDA4D6/BookingMeals.app/ShopCar.sqlite read/write. Adding it read

2012-09-25 18:39:55 559

转载 "Format string is not a string literal (potentially insecure)"

"Format string is not a string literal (potentially insecure)"NSLog([NSString stringWithFormat:@"%@", entered]);he compiler wants us to use an NSString constant for the format string (the fi

2012-09-24 10:27:38 345

转载 "Format string is not a string literal (potentially insecure)"

"Format string is not a string literal (potentially insecure)"NSLog([NSString stringWithFormat:@"%@", entered]);he compiler wants us to use an NSString constant for the format string (the

2012-09-22 19:06:24 818

原创 linux学习笔记2012-09-21

在man info页面输入/,后跟关键字,可以进行向下搜索。?是向上搜索

2012-09-21 11:00:34 77

原创 mac下的包管理软件(相当于linux下的apt-get)

homebrew ,macport

2012-09-17 14:33:51 664

原创 //为cell设背景色

UIView *backgrdView = [[UIViewalloc]initWithFrame:cell.frame];    backgrdView.backgroundColor =RGBCOLOR(244,148,35);    cell.backgroundView = backgrdView;或者- (void)tableView:

2012-09-16 20:43:05 398

转载 svn忽略目录

http://blog.sina.com.cn/s/blog_6f066a890100zjzd.html看了上面两篇转载的文章,加上自己的实践总结如下: Request:我有一个工程,工程名为simple,采用maven进行依赖管理,在check in时我不想工程下maven产生的target目录被提交到SVN(包括目录下所有文件和目录本身)。

2012-09-08 17:02:44 3561

转载 linux下django使用imagefield需要的配置

我的环境:centos / Python2.5PIL是python理想的图片处理module,但是想要良好的支持各种图片,还需要检查一下几步,否则会提示:IOError: decoder jpeg not available之类的。第一步:安装zlib png freetype jpeginstall zlib (官方源没有zlib,别想yum了)下载zlib,(zli

2012-08-28 18:03:47 1633

转载 linux解压命令

tar-c: 建立压缩档案-x:解压-t:查看内容-r:向压缩归档文件末尾追加文件-u:更新原压缩包中的文件这五个是独立的命令,压缩解压都要用到其中一个,可以和别的命令连用但只能用其中一个。下面的参数是根据需要在压缩或解压档案时可选的。-z:有gzip属性的-j:有bz2属性的-Z:有compress属性的-v:显示所有过程-O:将文件解开到

2012-08-28 17:48:07 427

原创 xz解压命令——sudo apt-get install unrar p7zip-rar p7zip-full cabextract

sudo apt-get install unrar p7zip-rar p7zip-full cabextract XZ命令解压缩xz这个压缩可能很多都很陌生,不过您可知道xz是绝大数linux默认就带的一个压缩工具。之前xz使用一直很少,所以几乎没有什么提起。我是在下载phpmyadmin的时候看到这种压缩格式的,phpmyadmin压缩包xz格式的居然比7z还要小,这引起我的兴趣

2012-08-28 17:40:29 3954

原创 django国际化时步骤

1.setting.py里language_code = 'zh-cn'     //注意减号和小写2.模板文件里加入{% load i18n %} ,相当于引入translate的相关标签3.在app目录下建立目录4.django-admin.py makemessages -l zh_CN5.django-admin.py makemessages -a6.django-a

2012-08-27 15:12:42 797

原创 django国际化时遇到的一个问题

Error: This script should be run from the Django SVN tree or your project or app tree. If you did indeed run it from the SVN checkout or your project or application, maybe you are just missing the con

2012-08-27 10:09:49 905

转载 程序员技术练级攻略

http://coolshell.cn/articles/8088.html月光博客6月12日发表了《写给新手程序员的一封信》,翻译自《An open letter to those who want to start programming》,我的朋友(他在本站的id是Mailper)告诉我,他希望在酷壳上看到一篇更具操作性的文章。因为他也是喜欢编程和技术的家伙,于是,我让他把他

2012-08-26 23:15:17 551

转载 【每日一记】对技术的态度

http://coolshell.cn/articles/8088.htmlBy 陈皓最近人品爆发,图灵社区,InfoQ,51CTO相继对我做了采访,前两天我把InfoQ对我的采访张贴了出来,今天,图灵社区和51CTO对我的采访发布了(图灵的访谈 ,51CTO的访谈),我是一个有技术焦虑症的人,我的经历比较特殊,对大家来说可能也没有什么意思,这两个采都有一些重叠的部分,不过有些

2012-08-26 23:14:30 1070

原创 Django集成已有的数据库和应用[转]

Django最适合于所谓的green-field开发,即从头开始的一个项目,正如你在一块还长着青草的未开垦的土地上从零开始建造一栋建筑一 般。 然而,尽管Django偏爱从头开始的项目,将这个框架和以前遗留的数据库和应用相整合仍然是可能的。 本章就将介绍一些整合的技巧。与遗留数据库整合Django的数据库层从Python代码生成SQL schemas—但是对于遗留数据库,你已经拥有SQ

2012-08-26 00:54:09 5602

原创 keyWindow,[UIApplication sharedApplication]

[touchlocationInView:[[UIApplicationsharedApplication] keyWindow]]keyWindowThe application's key window. (read-only)@property(nonatomic, readonly) UIWindow *keyWindowDi

2012-08-25 23:27:27 2867

原创 [UIApplication sharedApplication] keyWindow]

[touchlocationInView:[[UIApplicationsharedApplication] keyWindow]

2012-08-25 23:26:31 166

原创 UITableView删除行的问题

删除数据源中的对应数据必须在输出行cell之前,不然会崩溃,报错Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 0.  The number of rows

2012-08-25 00:13:40 3026 1

原创 django国际化——加提示

Comments for translatorsNew in Django 1.3: Please see the release notesIf you would like to give translators hints about a translatable string, you can add a comment prefixed with the Translator

2012-08-23 17:40:52 443

原创 django国际化——格式化字符串

The strings you pass to _() or ugettext() can take placeholders, specified with Python's standard named-string interpolation syntax. Example:def my_view(request, m, d): output = _('Today i

2012-08-23 17:32:24 583

原创 web前端开发中,点击导航,刷新内容

采用标签中的target,具体见w3school的在线手册

2012-08-23 17:27:51 543

原创 python的字符串对象有一个join函数,用来连接多个字符串

words = ['Welcome', 'to', 'my', 'site.'] output = _(' '.join(words))

2012-08-23 17:25:23 492

转载 tableview插入,删除,改变cell高度的动画用beginUpdates和endUpdates

Call this method if you want subsequent insertions, deletion, and selection operations (for example, cellForRowAtIndexPath: and indexPathsForVisibleRows) to be animated simultaneously. This group of

2012-08-23 09:51:30 2503

原创 xib文件生成view

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{    static NSString *CellIdentifier = @"ProductCatagoryCell";    ProductCatagoryCel

2012-08-22 23:31:00 720

原创 linux 改编码命令——————iconv

Usage: iconv [OPTION...] [FILE...]Convert encoding of given files from one encoding to another. Input/Output format specification:  -f, --from-code=NAME       encoding of original text  -t

2012-08-22 18:09:13 804

原创 ValueError: The database backend does not accept 0 as a value for AutoField.

django工程数据库从sqlite换到mysql,我的做法是直接python manage.py syncdb生成表,然后python manage.py schemamigration --initial order,python manage.py migrate order,结果报了上述错误。问了同事,说我这样直接把应用表生成了的话,就得运行一个south接管的命令。他建议我先把我的应

2012-08-22 13:41:51 2224

转载 mysql编码配置

Ubuntu修改mysql默认编码修改mysql的配置文件,使数据库与服务器操作系统的字符集设置一致。    vi /etc/my.cnf 设置(如果没有发现这个文件,就新建1个)    [mysqld]    datadir=/var/lib/mysql    socket=/var/lib/mysql/mysql.sock    default-ch

2012-08-22 01:12:37 335

原创 进入mysql命令行模式——mysql -u root -p

1:mysql -u root -p2:输密码

2012-08-22 01:03:14 1772

原创 No module named mysqldb,数据库换成mysql时发生上述错误

Use one of this commands, depends what os and software do u have and useeasy_install mysql-python (mix os)pip install mysql-python (mix os)apt-get install python-mysqldb (Linux Ubuntu,

2012-08-21 23:25:30 1783

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除