自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(753)
  • 收藏
  • 关注

转载 gyp

参考:http://lianliuwei.github.io/tools/2012/09/10/gyp-misc/http://erikge.com/articles/HelloGyp/GYP (Generate Your Projects)下载:git clone https://chromium.googlesource.com/external/gyp

2016-07-22 19:16:16 6742

转载 浏览器 hard refresh

浏览器 hard referesh (force refresh) 不同于普通的按 F5 键刷新页面,它会先清当前页面的 cache,然后再刷新页面。这比手工找在浏览器设置中清当前站点的 cache 要方便的多。方法:Windows:     Ctrl + F5Mac:              Apple + R or command + R

2016-03-20 10:03:06 2244

转载 Linux使用dd命令快速生成大文件

转自:http://blog.csdn.net/wind19/article/details/7352983dd命令可以轻易实现创建指定大小的文件,如dd if=/dev/zero of=test bs=1M count=1000会生成一个1000M的test文件,文件内容为全0(因从/dev/zero中读取,/dev/zero为0源)=========

2016-02-04 11:13:50 6993

转载 Linux中find批量删除空文件及空文件夹脚本

转自:http://www.111cn.net/sys/linux/46433.htmlinux下批量删除空文件(大小等于0的文件)的方法 代码如下复制代码find . -name "*" -type f -size 0c | xargs -n 1 rm -f用这个还可以删除指定大小的文件,只要修改对应的

2016-02-02 17:44:47 14489

转载 GDB Python pretty printers

转自:http://lumiera.org/documentation/technical/howto/DebugGdbPretty.htmlGDB Python pretty printersSince some time, GDB supports Python written extension modules, especially for

2015-12-21 13:52:18 2246

转载 Oracle 使用PreparedStatement防止SQL注入

转自:http://blog.csdn.net/maxracer/article/details/6118036一条效率差的sql语句,足以毁掉整个应用.Statement是PreparedStatement的父接口,不进行预编译操作,减少了进行预编译的开销.单次运行PreparedStatement要比Statement要慢一些. PreparedStatemen

2015-12-15 10:01:53 5853 1

转载 Tomcat 8 解决“At least one JAR was scanned for TLDs yet contained no TLDs”问题

参考:http://stackoverflow.com/questions/24821865/tomcat-8-enable-debug-logging-to-list-unneeded-jars【问题描述】Tomcat 在启动过程中加载众多 jar 文件,默认会对其做 TLDs 扫描,{CATALINA-HOME}/logs/catalina.xxxx-xx-xx.log

2015-11-04 20:21:29 231012 18

转载 如何调试bash脚本

转自:http://coolshell.cn/articles/1379.htmlBash 是Linux操作系统的默认Shell脚本。Shell是用来处理操作系统和用户交互的一个程序。Shell的脚本可以帮助用户自动化地和操作系统进行交互。你也可以理解为一种脚本式的编程。即然有编程,那么,程序的编译器,解释器,调试器就必不可少了,Bash也一样,但在调试方面可能会有一些和编程语言不

2015-09-21 11:27:15 755

转载 3dsmax修改对象的旋转中心的位置

参考:https://www.youtube.com/watch?v=DXCVQLLe4ks

2015-09-03 18:04:43 5736

转载 将网页转成pdf的方法

转自:http://www.novapdf.com/kb/convert-a-web-page-to-pdf-100.htmlConvert a web page to PDFJan 27, 2015Related ArticlesAdd commentEmail articlePrint

2015-08-31 14:24:05 1996

转载 [Objective-C] NSArray initWithObjects "Expression result unused" warning

参考:http://stackoverflow.com/questions/7914990/xcode-4-warning-expression-result-unused-for-nsurlconnection【问题】ViewController.h@interface ViewController: UIViewController@property NSArr

2015-07-31 14:29:51 7409

转载 [XCode] XCode 6 中 UIPickerView 的简单示例

参考:Xcode 6.iOS 8. Swift. Simple UIPickerView. Part 11)在 IB 中通过拖拽的方式创建 UIPickerView 控件到 ViewController 代码的 connection,包括 data source 和 delegate 两个connection2)代码中设置 UIPickerView 的实际数据,并实

2015-07-31 12:54:27 1911

转载 [XCode] Interface Builder 是怎么工作的

参考:http://www.informit.com/articles/article.aspx?p=1828676IB 的作用:可视化地创建界面元素可视化地将界面元素映射成变量实例,比如将一个按钮在.h文件中映射成一个 IBOutlet UIButton * 的指针(通过对界面元素右键菜单选择”New Referncing Outlet“并拖拽至代码中实现)可视化地在界面

2015-07-30 15:40:30 3597

转载 [XCode] 显示 storyboard 的 Document Outline

参考:http://www.informit.com/articles/article.aspx?p=1828676在 Document Outline 中,可以很方便的定位到某个界面元素。在界面元素拥挤或者相互重叠的情况下,通过 Document Outline 选择界面元素的功能尤为重要。

2015-07-30 14:18:05 2040

转载 Windows git 控制台怎么拷贝粘贴

转自:http://stackoverflow.com/questions/2304372/how-do-you-copy-and-paste-into-git-bash【从git控制台拷贝内容】1)选“Mark”2)然后高亮选择要拷贝的内容3)按 Enter 键【向git控制台粘贴内容】从别处拷贝了内容之后,在git控制台中按 In

2015-07-28 09:04:08 7702

原创 CentOS安装cgdb

如果是要阅读和修改cgdb的最新代码,可以git拿最新的代码:git clone git://github.com/cgdb/cgdb.git否则,不要用git拿最新的代码,而是拿最近的稳定版本,比如下面的cgdb-0.6.8.tar.gz:Stable ReleaseDownload source package: cgdb-0.6.8.tar.gz(changes)

2015-07-24 16:39:54 2959

转载 CentOS yum中科大源

转自:http://kaifage.com/notes/112/centos-yum-source.html更换yum源到国内,可以获得更高的速度。推荐选择中国科技大学的yun源,使用广泛、资源收录全。进入到yum源管理目录:cd /etc/yum.repos.d/备份Base源:mv CentOS-Base.repo CentOS-

2015-07-24 13:32:25 17598 1

转载 Linux下允许或禁止root用户远程登录的方法

转自:http://shaoxia.blog.51cto.com/6667141/11581601)vi /etc/ssh/sshd_config,将PermitRootLogin的值改成yes,并保存PermitRootLogin yes2)service sshd restart这样,就能用root直接ssh登录了如果在1)中,将PermitRootLogi

2015-07-24 12:01:12 26876

转载 [Objective-C] 用 dispatch_once 实现单例

转自:http://blog.csdn.net/ryantang03/article/details/8622415http://www.raywenderlich.com/46988/ios-design-patterns自苹果引入了Grand Central Dispatch (GCD)(Mac OS 10.6和iOS4.0)后,创建单例又有了新的方法,

2015-07-11 09:50:30 1791

转载 [XCode] 在哪下载XCode dmg安装文件

参考:http://stackoverflow.com/questions/10335747/how-to-download-xcode-4-5-6-and-get-the-dmg-fileYou can find the DMGs for Xcode and other development tools onhttps://developer.apple.com/downl

2015-07-10 17:31:43 11166

转载 [Objective-C] Cocoa's Target-Action Pattern

转自:http://justinvoss.com/2011/08/19/cocoa-target-action/

2015-07-10 16:26:43 741

转载 [Objective-C] Protocol 简介

转自:http://rypress.com/tutorials/objective-c/protocolsA protocol is a group of related properties and methods that can be implemented by any class. They are more flexible than a normal class

2015-07-10 09:41:00 865

转载 [Objective-C] strong/weak 属性——狗项圈的比喻

转自:http://stackoverflow.com/questions/8927727/objective-c-arc-strong-vs-retain-and-weak-vs-assignhttp://rdcworld-iphone.blogspot.in/2012/12/variable-property-attributes-or.htmlBJ Homer 对

2015-07-10 09:05:11 1976

转载 [Objective-C] self 和 this 的区别

参考:http://stackoverflow.com/questions/3810824/difference-b-w-objective-cs-self-and-cs-thishttp://stackoverflow.com/questions/2385980/objective-c-when-to-use-self【self 和 this 的区别】th

2015-07-10 08:19:08 2117

转载 [XCode] 编译器介绍

转自:http://www.cnblogs.com/ydhliphonedev/archive/2012/08/29/2661726.html    在XCode中,我们经常会看到这些编译选项(如下图),有些人可能会有些茫然,本文将对GCC4.2、LLVM GCC 4.2、LLVM compliler 2.0三个编译选项进行一个详细的介绍。 GCC

2015-07-09 19:10:59 688

转载 [Objective-C] alloc和init要嵌套写而不要分开写

转自:https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithObjects/WorkingwithObjects.html#//apple_ref/doc/uid/TP40011210-CH4下面的写法是不建议的:NS

2015-07-09 13:54:43 1715

原创 [Objective-C] isKindOfClass 和 class 方法

参考:https://developer.apple.com/library/prerelease/ios/documentation/Cocoa/Reference/Foundation/Protocols/NSObject_Protocol/index.html#//apple_ref/occ/intfm/NSObject/isKindOfClass:Objc 中,isKi

2015-07-09 11:52:38 3971

转载 [Objective-C] 重载objectAtIndexedSubscript和objectForKeyedSubscript方法实现subscripting

参考:http://stackoverflow.com/questions/3613980/can-i-overload-an-operator-in-objective-chttp://stackoverflow.com/questions/13028574/objective-c-ios6-operator-overloading-const-idC++ 支持运算符重载

2015-07-09 10:50:35 12730

转载 [Objective-C] selector 简介

参考:http://www.jb51.net/article/32049.htmhttp://rypress.com/tutorials/objective-c/methodsObjective-C语言中方法的传递有二种:①Selector ② Blocks,本文主要说一下Selector,关于Blocks会在后续总结一下。消息传递模型(Message

2015-07-09 07:53:12 6389

转载 [Objective-C] send message 和 call method 的区别

参考:http://stackoverflow.com/questions/2852381/calling-a-method-or-sending-a-message-in-objective-chttp://davedelong.tumblr.com/post/58428190187/an-observation-on-objective-cCall method:

2015-07-08 17:16:25 1392

转载 [Objective-C] 目标文件反编译得到Objecitve-C源文件

http://stackoverflow.com/questions/10429857/is-it-possible-to-see-the-code-generated-by-arc-at-compile-time/10564459#10564459介绍了从 .o 文件反编译得到 objc 源文件的方法,需要用到 otx 或 IDA 工具:1) otx源码下载:http://www

2015-07-08 14:41:18 3621

转载 [Mac OS X] 从Finder快速进入当前目录的命令行

参考:http://www.howtogeek.com/210147/how-to-open-terminal-in-the-current-os-x-finder-location/方法一:以 cd some_diretory 命令为例,先进入命令行,敲“cd ”,然后从 Finder 中,把需要进入的文件夹拖拽到命令行中。该文件夹的绝对路径就自动填充到命令行末尾了。

2015-07-08 09:59:56 42621 3

转载 [XCode] 默认源文件和build目录

假设我们以hans用户登录Mac系统,在XCode中创建一个名为 test 的 Single View Application 的工程,不改工程路径,则默认的工程路径是:/Users/hans/Desktop/test

2015-07-07 10:11:50 6590

转载 [Objective-C] 哪些变量默认初始化为0

参考:http://stackoverflow.com/questions/1786781/are-instance-variables-set-to-nil-by-default-in-objective-chttps://developer.apple.com/library/mac/documentation/General/Conceptual/CocoaEncyclopedi

2015-07-07 09:25:20 4042

转载 [Objective-C] assign/retain/copy 详解

转自:http://www.88cto.com/996655/article/details/21674.html注意:assign 是默认值1.assign:这个属性一般用来处理基础类型,比如int、float等等,如果你声明的属性是基础类型的话,assign是默认的,你可以不加这个属性!(一个常见的例外是delegate的set方法通常设为assign,这是为了

2015-07-07 08:22:05 1257

转载 [Objective-C] 属性中的 atomic/nonatomic/assign/retain/copy/readwrite/readonly 详解

转自:http://www.cnblogs.com/andyque/archive/2011/08/03/2125728.html之前很多网友对我翻译的教程中的Property的使用感到有些迷惑不解,搞不清楚什么时候要release,什么时候要self.xxx = nil;同时对于Objective-c的内存管理以及cocos2d的内存管理规则不够清楚。本文主要讲解objc里面

2015-07-07 07:44:34 1473 1

转载 [Objective-C] @property是不能被“预处理”的,而是直接编译成汇编指令

参考:http://stackoverflow.com/questions/31241643/how-can-i-get-direcitve-preprocessed-objective-c-code对于下面的Objc代码,我们想看到@property被“预处理”之后长什么样子// ========= Person.h =========@interface Person: NS

2015-07-07 07:27:09 520

原创 [Objective-C] property setter/getter via @property

环境:Mac OS Yosemite (10.10) + XCode 6.1.1Pracitce #1// ========= Person.h =========@interface Person: NSObject{}-(id) Print;@property NSString* name;@end// ========= Person.

2015-07-06 16:03:44 614

转载 [Objective-C] 不建议使用点语法糖

转自:https://www.bignerdranch.com/blog/dot-notation-syntax/When I teach, I always make sure to mention the dot-notation addition to Objective-C 2.0. Then, I make sure to tell the students neve

2015-07-06 09:38:41 6490

转载 [Objective-C] NSArray/NSDictionary/NSNumber 的语法糖

转自:http://www.cnblogs.com/ludashi/p/3893854.html  写这篇博客源于一个疑问:“WoK~, 这也行?!”。刚接触OC不久,今天做深浅拷贝的测试,无意中把获取NSArray的值写成了用下标获取的方式。当时把注意力放在了深浅拷贝的内存地址分析上了,就没太在意,测试做完啦,在回顾的时候发现数组是用下标的方式获取的! 于是就有了个疑问,在O

2015-07-06 09:19:56 1576

空空如也

空空如也

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

TA关注的人

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