码迷,mamicode.com
首页 >  
搜索关键字:self    ( 14215个结果
django admin 扩展
添加自定义动作:例子,添加一个方法,批量更新文章,代码如下:from django.contrib import adminfrom myapp.models import Articledef make_published(self, request, queryset): rows_upd...
分类:其他好文   时间:2014-09-16 21:56:01    阅读次数:289
Exercise : Self-Taught Learning
First, you will train your sparse autoencoder on an "unlabeled" training dataset of handwritten digits. This produces feature that are penstroke-like....
分类:其他好文   时间:2014-09-16 17:20:10    阅读次数:557
salt的api学习记录---salt-cp命令的执行过程
最近重新看了下salt-cp实现的过程,源代码逻辑相对简单,明白了salt-cp为什么只能针对文本文件、配置文件的拷贝。现在就来看看对应的代码吧源代码文件:salt/cli/cp.pyclassSaltCP(object): def__init__(self,opts): self.opts=opts #读取文件内容,返回单元素字典:文件名--&g..
分类:Windows程序   时间:2014-09-16 16:08:11    阅读次数:395
ios-密码判断
我们经常在项目时有涉及到用户或是手机号登录,这时一般会配合密码才能登录成功。下面发一些关于手机和密码形式的判断: 1 - (void)registButtonClick:(id)sender 2 { 3 if (self.phoneTextField.text.length != 11 )/...
分类:移动开发   时间:2014-09-16 15:55:20    阅读次数:149
ios7 导航控制器切换影响UIScrollView布局的问题
在 iOS 7 中,如果某个 UIViewController 的 self.view 第一个子视图是 UIScollView, 同时当这个 UIViewController 被 push 或 initWithRootController 成为 UINavigationController控制的Controller时,这个 UIViewController的 view 的子视图 UIScollVi...
分类:移动开发   时间:2014-09-16 14:19:50    阅读次数:193
Chapter 5 带颜色的同心圆
一、重写 DrwaRect-(void)drawRect:(CGRect)rect{ CGRect bounds = self.bounds; CGPoint center; center.x = bounds.origin.x + bounds.size.width / ...
分类:其他好文   时间:2014-09-16 14:12:50    阅读次数:200
修改状态条颜色 (补充)
第一种方法:在NavigationController.m文件中执行方法-(UIStatusBarStyle)preferredStatusBarStyle{returnUIStatusBarStyleLightContent;}第二种方法:在ViewController.m文件中先将自身的NavigationController的navigationBar隐藏self.navigationController.navigationBarHidden..
分类:其他好文   时间:2014-09-16 02:50:20    阅读次数:168
数据持久化,简单对象写入本地,复杂对象写入本地
#import"MainViewController.h" #import"Student.h" @interfaceMainViewController() @end @implementationMainViewController -(id)initWithNibName:(NSString*)nibNameOrNilbundle:(NSBundle*)nibBundleOrNil { self=[superinitWithNibName:nibNameOrNilbundle:nibBundleOrN..
分类:其他好文   时间:2014-09-16 02:50:00    阅读次数:181
tableView 重载数据/ 刷新cell
tableView重载数据/刷新cell[self.tableViewreloadData];异步POST/GET(多线程)的情况下,数据不能及时获取,tableView的cell上无法显示数据,可以暂时给定一个title,待数据获取后刷新cell使用reloadData.
分类:其他好文   时间:2014-09-15 19:56:29    阅读次数:177
tableVIew/scrollVIew,点击按钮滑倒最下/最上.
//scrollVIew1 //跳到最前2 [_scrollView scrollRectToVisible:CGRectMake(0, 0, self.view.frame.size.width, 10) animated:YES];3 //跳到最后4 [_scrollView scrollRec...
分类:其他好文   时间:2014-09-15 19:06:29    阅读次数:154
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!