`
CrackRen
  • 浏览: 168244 次
  • 性别: Icon_minigender_1
  • 来自: 西安
社区版块
存档分类
最新评论
文章列表
EditText 需要指定默认输入类型 加入android:inputType="number|phone",表示指定为数字或电话   inputtype类型如下:  //文本类型,多为大写、小写和数字符号。     android:inputType="none"     android:inputType="text"     android:inputType="textCapCharacters"     android:inputType="textCapWords" ...
UIKit开发  程序入口也是从main函数 然后调用UIApplicationMain转入UI应用开发 #import <UIKit/UIKit.h> int main(int argc, char *argv[]) { // 内存自动释放池 NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; int retVal = UIApplicationMa ...
     NSMutableArray *array1 = [NSMutableArrayarray];      .....      NSSortDescriptor *sorter = [[NSSortDescriptoralloc] initWithKey:@"priority"ascending:NO];       NSArray *array2 = [array1 sortedArrayUsingDescriptors:[NSArrayarrayWithObject:sorter]];   这样得到的array2 ascending为NO则是按照p ...
从 Scene 切换到 ViewController     TestViewController *viewController = [[[TestViewController alloc] init] autorelease];     [[CCDirector sharedDirector].navigationController pushViewController:viewController animated:YES];     // 显示导航栏     [[CCDirector sharedDirector].navigationController setNavig ...
  不小心把这个 "Show this window when Xcode launches" 勾去掉了,怎么都打不开欢迎界面了   可以使用  cammand+shift+1 打开 然后把勾再勾上  
一、java.net.URLEncoder.encoder()编码   在使用客户端Post  发送了一段数据 xHttp.post(szURL, “crackren+001” );    在服务端Servlet中收到的数据却变成了 "crackren 001" 把加号给我过滤了。   但是由于加密方式我又必须要用到这些符号, 所以在发送数据时最好使用java.net.URLEncoder.encoder();编码: xHttp.post(szURL, java.net.URLEncoder.encoder(“crackren+001”, “UTF-8 ...
lsof -n|awk '{print $2}' | sort|uniq -c |sort -nr|more  
写了一个SQL 脚本,中文数据,使用source数据导入数据库时中文全部乱码 解决办法,再打开数据库的时候就是用utf8的方法打开:   mysql -uroot -p --default-character-set=utf8 use dbName source newdata.sql   这样打开数据库再导入就好了
MySQL默认连接超时时间为28800 也就是8个小时,如果八个小时没有连接没有进行操作就会自动断掉,这样就会导致有时服务还在运行,但是就是操作不了   既然知道问题了修改配置文件,超时时间改为一年,就行了 vim etc/my.cnf  然后在 [mysqld] 后面添加下面三句 character-set-server=utf8 wait_timeout=315360000 interactive_timeout=315360000
查看开放端口  /etc/rc.d/init.d/iptables status      添加需要的端口号,例如mysql的3306  /sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT   保存并重启服务 /etc/rc.d/init.d/iptables save /etc/rc.d/init.d/iptables restart <!--EndFragment-->
一、权限添加修改 添加权限 grant 权限 on 数据库.表 to 用户名@'域' identified by '密码'; 删除权限 revoke 权限 on 数据库.表 from 用户名@'域'; 刷新 flush privileges;   数据库/数据表/数据列权限: Alter: 修改已存在的数据表(例如增加/删除列)和索引。 Create: 建立新的数据库或数据表。 Delete: 删除表的记录。 Drop: 删除数据表或数据库。 INDEX: 建立或删除索引。 Insert: 增加表的记录。 Select: 显示/搜索表的记录。 Update: ...
主机由于环境问题,时间有可能会莫名其妙的发生变化 最好开启ntp服务,自动同步时间, ntpdate也行不过ntpdate是立马同步,有时可能会造成问题, 而ntp是平滑同步,这里使用ntp简单的同步,ntp大概五分钟同步一次,具体用法baidu。 我是使用的CentOS 使用yum 命令安装 yum install ntp.x86_64   启动进程 service ntpd start  
要隐藏StatusBar, 在iOS7之前,只需要添加 [[UIApplication sharedApplication] setStatusBarHidden:YES]; 现在需要在plist文件中添加键值 UIStatusBarHidden:YES UIViewControllerBasedStatusBarAppearance:NO

IOS转入后台运行

在UIApplication中,applicationDidEnterBackground函数既是当程序被推送到后台的时候调用。 所以要设置后台继续运行,则在这个函数里面设置即可。   在applicationDidEnterBackground中加入一句 [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:nil]; 则可以叫程序在后台运行了。   当然当你设置为nil,也可以通过你程序里面自己实现哪一部分功能后台运行和哪一部分功能后台不运行。 这就需要用到[UIApplic ...
在 CentOS 中的修改方法如下: 1. root登陆,免得老是sudo 2. 打开/etc/inittab 文件     #vim /etc/inittab 3. 在默认的 run level 设置中,可以看到第一行书写如:      id:5:initdefault:(默认的 run level 等级为 5:即图形模式 3:即命令行模式)4. 将第一行的 5 修改为 3 即可。 5. 保存文件后重启系统你就可以看见是启动的文本界面了。
Global site tag (gtag.js) - Google Analytics