上一页 1 2 3 4 5 6 7 ··· 10 下一页
摘要: 首先保证:1 self.tableView.allowsSelection = YES; // 默认是 YES2 self.tableView.allowsSelectionDuringEditing = YES;UITableView中的声明:1 @property(nonatomic) BOOL allowsSelection __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0); // default is YES. Controls whether rows can be selected when not in editing mode2.. 阅读全文
posted @ 2012-11-25 17:06 SubmarineX 阅读(1740) 评论(0) 推荐(0) 编辑
摘要: 获取网页中文本信息试验中用到www.17k.com的资源,参考了http://www.cnblogs.com/huxi/archive/2010/07/04/1771073.html的博文。 1 from urllib import urlopen 2 import re 3 4 # 将正则表达式编译成Pattern对象 5 # re.S(DOTALL): 点任意匹配模式,改变'.'的行为。不加匹配不到内容? 6 p = re.compile(r'<div class="p" id="chapterContent">( 阅读全文
posted @ 2012-11-22 22:42 SubmarineX 阅读(3377) 评论(0) 推荐(0) 编辑
摘要: 参考:链接C++ 字符数组有存储区,其值为存储区首地址;字符指针不分配存储区吗,"abc" 以常量形式存于静态数据区,指针指向该区首地址。 1 #include <iostream> 2 3 using namespace std; 4 5 int main() 6 { 7 char s1[] = "abc"; 8 char s2[] = "abc"; 9 10 const char s3[] = "abc";11 const char s4[] = "abc";12 13 cons 阅读全文
posted @ 2012-11-17 10:45 SubmarineX 阅读(408) 评论(0) 推荐(0) 编辑
摘要: 1 - (void)viewDidLoad 2 { 3 [super viewDidLoad]; 4 5 self.editButtonItem.possibleTitles = [NSSet setWithObjects:@"编辑", @"完成", nil]; 6 self.editButtonItem.title = @"编辑"; 7 self.navigationItem.leftBarButtonItem = self.editButtonItem; 8 } 9 10 - (void)setEditing:(BOOL)edit 阅读全文
posted @ 2012-11-13 19:12 SubmarineX 阅读(2006) 评论(0) 推荐(0) 编辑
摘要: 原文链接警告:不建议启用root。 如果可能的话,你应该总是尝试着用sudo来执行所有的管理任务。问题:我不能使用su命令来登入。怎么解决?默认情况下,在Ubuntu中,root 账户密码被锁住的。所以,当你使用 su - 的时候,你会得到如下所示的认证失败的错误信息。$ su -密码:su:认证失败在Ubuntu中启用超级用户账户密码首先,如下所示,为root用户设置一个密码。$ sudo passwd root[sudo] password for submarinex:输入新的 UNIX 密码:重新输入新的 UNIX 密码:passwd:已成功更新密码现在你可以使用 su 命令并使用新的 阅读全文
posted @ 2012-11-05 13:08 SubmarineX 阅读(309) 评论(0) 推荐(0) 编辑
摘要: 创建一个方法(处理异常并输出到控制台):1 void uncaughtExceptionHandler(NSException *exception) 2 {3 NSLog(@"CRASH: %@", exception);4 NSLog(@"Stack Trace: %@", [exception callStackSymbols]);5 // Internal error reporting6 }在 app delegate 中添加异常处理器(exception handler):1 - (BOOL)application:(UIApplicatio 阅读全文
posted @ 2012-10-27 09:13 SubmarineX 阅读(937) 评论(0) 推荐(0) 编辑
摘要: 在调试应用的时候,可以查看数据库里的数据。以下内容摘自《Pro.Core.Data.for.iOS. Second.Edition》。1、定位到模拟器的目录cd ~/Library/Application\ Support/iPhone\ Simulator2、查找文件名包含OrgChart.sqlite的文件,并打印路径find . -name "OrgChart.sqlite" –print输出:./5.0/Applications/E8654A34-8EC4-4EAF-B531-00A032DD5977/Documents/OrgChart.sqlite3、进入SQL 阅读全文
posted @ 2012-09-28 21:02 SubmarineX 阅读(3261) 评论(0) 推荐(0) 编辑
摘要: 1、reason: '[<CTXCourseDetailViewController 0x6db4010> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key tableview.'原因:删除了原来在Storyboard中的 Table View 在CTXCourseDetailViewController 中的Outlet ‘tableview’。2、在Storyboard中,在View Controller 中添加 Table View*** T 阅读全文
posted @ 2012-09-16 19:45 SubmarineX 阅读(2939) 评论(0) 推荐(0) 编辑
摘要: 最新修改(2012-11-17):两个segue都为Push,指向同一个View Controller,通过变量指定是新增一个对象还是修改原来对象。============================================================================只是为了试验下,所以代码和界面做地比较搓。通过点击1,进行一个Model 的 Segue,显示2;通过点击2的返回按钮,进行一个Push 的Segue,显示3。如图1图1类似于通讯录新增联系人。通过点击2-1中的+,显示2-2新增联系人并进行编辑;通过点击2-2的Done,显示2-3进行编辑或者返回 阅读全文
posted @ 2012-09-15 22:05 SubmarineX 阅读(609) 评论(0) 推荐(0) 编辑
摘要: Google Chrome 21.0.1180.89参考方法。右击浏览器地址栏,选择“修改搜索引擎”。添加新的搜索引擎,分别填写3个字段:Google www.google.comhttp://www.google.com/search?{google:RLZ}{google:acceptedSuggestion}{google:originalQueryForSuggestion}{google:searchFieldtrialParameter}{google:instantFieldTrialGroupParameter}sourceid=chrome... 阅读全文
posted @ 2012-09-15 15:23 SubmarineX 阅读(1301) 评论(0) 推荐(1) 编辑
摘要: 我还是菜鸟,写下的记录不一定完全正确。多找资料,多google吧。Xcode 4.3.21、添加Frameworks,或者看图2、找不到设置,可以在搜索栏里搜索关键字。比如设置自动引用计数(ARC),在右上方输入关键字“ARC”。3、添加输出口(Outlets)或响应事件的方法(Actions),可以直接控件拖到对应的视图控制器实例类文件中。4、在Storyboard中能否使用xib文件?A:见6。5、用Storyboard建的视图能否用在iOS4或更早的版本中?A:storyboards will run only on devices sporting iOS 5 and above.6、 阅读全文
posted @ 2012-09-14 15:04 SubmarineX 阅读(4336) 评论(0) 推荐(0) 编辑
摘要: UITableViewStyle:Grouped.UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];仅针对单一的cell,也就是只有一种Cell Identifier。MAR:对应 X section Y row 的 cell 的内存地址,取16进制的后四位。section-row MAR ↓ ↓ ↓ ↑0-0 7650 - - - -0-1 3b70 3b70 -... 阅读全文
posted @ 2012-09-14 12:27 SubmarineX 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 基础的配置Server:Client: 阅读全文
posted @ 2012-09-02 15:23 SubmarineX 阅读(405) 评论(0) 推荐(0) 编辑
摘要: 在persistentStoreCoordinator 1 - (NSPersistentStoreCoordinator *)persistentStoreCoordinator 2 { 3 if (__persistentStoreCoordinator != nil) { 4 return __persistentStoreCoordinator; 5 } 6 7 NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"Lo... 阅读全文
posted @ 2012-08-29 22:42 SubmarineX 阅读(3793) 评论(2) 推荐(0) 编辑
摘要: 无意间发现的一个站点Tenouk's C & C++ Site IndexBjarne Stroustrup's FAQ 阅读全文
posted @ 2012-08-23 11:57 SubmarineX 阅读(218) 评论(0) 推荐(0) 编辑
摘要: Q:@synthesize propertyname = _propertyname; 为什么要使用 _propertyname?什么时候用self.propertyname ,什么时候用_propertyname?A:当:@synthesize propertyname = _propertyname;An initialization method is one of two places in which you should not use accessor methods to access properties (the other place is in a dealloc me 阅读全文
posted @ 2012-08-10 10:29 SubmarineX 阅读(2256) 评论(0) 推荐(0) 编辑
摘要: Win7系统。猎豹浏览器:1 C:\Users\Submarine\AppData\Local\liebao\User Data\Default\User StyleSheets\Custom.css添加:1 html, body {background-color: #CCE8CC!important;}谷歌浏览器类似。参考自 该文。 阅读全文
posted @ 2012-08-06 09:23 SubmarineX 阅读(291) 评论(0) 推荐(0) 编辑
摘要: http://www.opensource.apple.com/iOS Developer LibraryXcode 4 User GuideThe Objective-C Programming LanguageiOS Human Interface GuidelinesTransitioning to ARC Release NotesAdvanced Memory Management Programming GuideUICatalogProperty List Programming GuidePreferences and Settings Programming GuideThr 阅读全文
posted @ 2012-08-01 12:18 SubmarineX 阅读(396) 评论(0) 推荐(0) 编辑
摘要: 1 2012-07-31 00:52:35.709 apress-16-3[2345:f803] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<ViewController 0x6a71920> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key latitudeLabel.'.xib 中的 Labe 控件链接到 .h 阅读全文
posted @ 2012-07-31 00:59 SubmarineX 阅读(4546) 评论(1) 推荐(0) 编辑
摘要: .摘自:《Beginning.iOS.5.Development.Exploring.the.iOS.SDK》1 #pragma mark -2 #pragma mark Picker Data Source Methods3 Any line of code that begins with #pragma is technically a compiler directive. More specifically, a #pragma marks a pragmatic, or compiler-specific, directive that won’t necessarily work 阅读全文
posted @ 2012-07-29 13:17 SubmarineX 阅读(449) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 10 下一页