码迷,mamicode.com
首页 >  
搜索关键字:self    ( 14215个结果
weddriver处理富文本框
通过运行js,这种方法能处理各种疑难问题.代码如下://设置js的运行方法definput_content(self,content):js="document.getElementById(‘content_ifr‘).contentWindow.document.body.innerText=‘admin‘"//contentWindow对firefox最新版本支持不好returnself.dr.execute_script(js..
分类:其他好文   时间:2015-04-09 12:13:40    阅读次数:153
iOS中UIAlertView的使用方法
UIAlertView * alertView=[[UIAlertView alloc]initWithTitle:nil                                                   message:@"真的要退出?"                                                  delegate:self ...
分类:移动开发   时间:2015-04-09 10:35:20    阅读次数:235
SocketServer简单实现实时查看网站pv,uv
代码:#!/usr/bin/envpython #__*__coding:utf8__*__ importSocketServer importos classMyServer(SocketServer.BaseRequestHandler): logname="/opt/nginx/logs/www.xxx.com_access.log" defhandle(self): self.pv=os.popen("awk‘{print$1}‘%s|wc-l"%self.logname).read() se..
分类:Web程序   时间:2015-04-08 19:58:20    阅读次数:165
Quartz2D截屏
#import "ViewController.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; self.view.bac...
分类:其他好文   时间:2015-04-08 19:50:32    阅读次数:96
27个iOS开发小技巧
1、不想让TableView显示无用的Cell分割线怎么办? ? 1 self.tableView.tableFooterView = [[UIView alloc] init]; 2、自定义了leftBarbuttonItem左滑返回手势失效了怎么办? ? 1 2 3 4 5 6 self.navigationItem.leftBarButtonItem = [[UIBarButtonItem ...
分类:移动开发   时间:2015-04-08 18:17:59    阅读次数:209
如何让 UITableView 的 headerView跟随 cell一起滚动
将UIView设置为  整个tableView的headerView,而不是 section 0的headerView self.tableView.tableHeaderView=header; 这样,就可以完美的满足 headerView跟随cell的内容一起滚动的要求拉。 结论:设置 UIView为  tableView的tableHeaderView即可实现 headerView跟随t...
分类:其他好文   时间:2015-04-08 16:33:19    阅读次数:614
判断银行账号是否输入正确
不多说 直接贴代码 随便输入银行卡号就可以进行判断- (void)viewDidLoad { [super viewDidLoad]; NSString *str = @"6226820011200783033"; BOOL isRight = [self checkCardNo:str]; if (!isRight) { U...
分类:其他好文   时间:2015-04-08 13:17:50    阅读次数:220
(转)UIColor 的使用
os开发-UIColor的使用。在ios开发中,经常遇到对UIColor的相关操作。比如这样 self.backgroundColor = [UIColorredColor];这里的redColor是UIColor定义好的颜色。可以直接使用。相同的,还有这样几种。UIColor bla...
分类:其他好文   时间:2015-04-08 13:03:16    阅读次数:104
将Session写入Memcache
通过session_set_save_handler()方法自定义Session写入Memcache 1 get(self::session_key($PHPSESSID));37 38 if($val===false || $val==null){3...
分类:系统相关   时间:2015-04-08 12:39:08    阅读次数:131
Linux内核源代码情景分析-特殊文件系统/proc-对/proc/self/cwd的访问
继上篇文章Linux内核源代码情景分析-特殊文件系统/proc,我们对/proc/loadavg访问后,这篇文章是对/proc/self/cwd的访问。int __user_walk(const char *name, unsigned flags, struct nameidata *nd) { char *tmp; int err; tmp = getname(name);//在系统空...
分类:系统相关   时间:2015-04-08 11:01:42    阅读次数:1849
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!