This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
如果你不幸遇到iphone5上下黑边的问题,别慌。 | |
随便搞一张640 × 1136的图片,命名为[email protected], 拖到工程里面去,不需要在任何地方用它,然后黑边问题就会消失了。 | |
640x1136刚好是iphone的屏幕分辨率。可能是系统自动识别这种图片尺寸,然后自适配iphone5的屏幕了吧。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wamp 出现这个问题,解决办法: | |
打开工程的config.inc.php, 把密码置为空。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://medium.com/ios-apprentice/dark-magic-for-debugging-your-ios-app-bc76f237be21 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
可以用dos2unix 工具做dos 2 unix 格式转换。 | |
dos2unix可以用brew安装. | |
更多dos 2 unix 格式转换请参考 | |
http://www.cyberciti.biz/faq/howto-unix-linux-convert-dos-newlines-cr-lf-unix-text-format/ | |
note: | |
dos2unix貌似不工作,没有仔细研究为何。最后用TextMate做格式转换解决了这个问题。TextMate->Text->Reformat可以帮忙去除windows换行符,然后用vim做下处理,添加换行符就可以了。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc] initWithString:text]; | |
[attrString addAttribute:NSForegroundColorAttributeName | |
value:[UIColor redColor] | |
range:NSMakeRange(0, @"yyyy年MM月dd日".length)]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//下面的命令可以用来删除空行 | |
:g/^$/d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var githubList = [ | |
{ | |
name:'系统基础库', | |
list: [ | |
{name:'Category/Util', | |
list: [ | |
{name:'sstoolkit', owner:'soffes', desc:'一套Category类型的库,附带很多自定义控件 功能不错~'}, | |
{name:'BlocksKit', owner:'pandamonia', desc:'将Block风格带入UIKit和Founcation'}, | |
{name:'cocoa-helpers', owner:'enormego', desc:'一些Cocoa的扩展 2年前的工程'}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <AppKit/AppKit.h> | |
@interface NSImage (DrawAttributedString) | |
+ (NSImage *)imageWithAttributedString:(NSAttributedString *)attributedString | |
backgroundColor:(NSColor *)backgroundColor; | |
+ (NSImage *)imageWithAttributedString:(NSAttributedString *)attributedString; | |
+ (NSImage *)imageWithString:(NSString *)string; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TextMate, | |
vim, | |
xvim, | |
Spectacle | |
SimHolders | |
Alfred | |
iFunBox | |
The unarchiver | |
evernote | |
CoreDataEditor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Model: | |
class People < ActiveRecord | |
acts_as_taggable_on :genders,:features | |
end | |
index.html.erb | |
<%= search_form_for @q do |f| %> | |
<%= f.search_field :features_name_cont, class: "form-control", placeholder:type here" %> |
OlderNewer