`
prevention
  • 浏览: 71150 次
社区版块
存档分类
最新评论
文章列表
iOS Dev (3) HelloWorld with codes 作者:爱欧艾斯鸟 删除 删除 HelloWorldViewController.xib文件 删除 HelloWorldViewController.m 中的 viewDidLoad 添加 添加 loadView 到 HelloWorldViewController.m - (void)loadView { UIView *view = [[UIView alloc] initWithFrame: [UIScreen mainScreen].applicationFrame]; self. ...
iOS Dev (2) HelloWorld with .xib 作者:爱欧艾斯鸟 创建工程 Cmd + Shift + N 选择 Single View Application; 填写options Class Prefix可以填HelloWorld Product Name也可以填HelloWorld company.identifier填com.xxx Devices选iPhone Use Storyboards、User Automatic Reference Counting、Include Unit Tests不选 看下项目结构 HelloWorldAppDeleg ...
这是一种典型的大并发访问同一个不存在的cache的情形, 因此对于可预先知道的缓存,可以采取在程序启动的时候就生成。 对于这种无法预知key的,以论坛帖子列表为例,可以采取两种策略, 1.第一个发现cache中没有缓存对象时,先放入一个空的临时对象, 比如返回List,可以先生成一个长度为0的ArrayList,同时将生成缓存的操作放到队列中或者由当前线程完成,再将生成的数据替换刚才的临时缓存对象。 这种做法的缺点是,如果生成缓存的时间较长,那么会有一部分请求得到的不是实际数据,影响部分用户体验。且如果当前生成缓存的时候出现异常,需要等刚才的临时缓存失效之后,才会再次触发生成缓存的请求 ...
1、序列化 // json object to json string void test_serialize() { Json::Value root; Json::FastWriter writer; Json::Value object1; Json::Value object2; object1["id"] = 1; object2["name"] = "hello"; root.append(object1); root.append(object2); ...
转自:http://www.ittomato.com/?p=45 Anatomy of a watcher 假如我要等待STDIN是否可读,你可以createy一个ev_io的watcher,例如
/* * a simple server use libev * libev.c * 一个简单的服务器,采用libev:客户端发来的数据,服务端响应"this is a libev server!" 字符串 * compile:gcc -o libev -g libev.c -lev * usage: 服务端: ./libev 客户端(在同一台机器上)用nc工具连接服务端:nc 127.0.0.1 8003 */ #include <stdio.h> #include <string.h> #include <stdlib.h> #i ...
Often you'll see enum { SOMETHING = 2232; } (like that; unnamed enum with one value only) instead of const int SOMETHING = 2232;. It's because enum never gets any storage while const variable is still a variable and will get (static) storage if the compiler can't proove it won't need one, which it o ...
what { width: 500px; /* for example*/ height: 400px;/* for example*/ position: absolute; left: 50%; top: 50%; margin-top: -200px; margin-left: -250px; }
package test.xmpp.smack; import org.jivesoftware.smack.Chat; import org.jivesoftware.smack.Connection; import org.jivesoftware.smack.MessageListener; import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.packet.Message; public class ...
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '密码' WITH GRANT OPTION; mysql> flush privileges;
原文:http://os.chinaunix.net/a2006/0914/1003/000001003478.shtml 安装MediaWiki之后,发现权限设置是完全开放的,需要做一些设置,例如禁止匿名用户编辑内容等等,但程序上却没有提供设置选项。网上查询了一下, 却发现设置方法各有各的说法,没法,只有突破万难,到官方网站上查询一下,发现这MediaWiki的确是管理功能各方面多有不足。 希望设置MediaWiki的用户权限,对匿名用户的设置可以从修改LocalSettings.php入手,下载该文件,然后按照希 望设置的用户权限,在文件中插入对应的设置语句,存储后再上传回 ...
修改LocalSettings.php文件,加入如下一句: $wgGroupPermissions['*' ]['createaccount'] = false;
http://www.bitbug.net
Ref: http://blog.csdn.net/shencaifeixia1/article/details/8139522 ubuntu下mysql无法启动Couldn't find MySQL server (/usr/bin/mysqld_safe)” Fix: rm/etc/mysql/my.cnf
Global site tag (gtag.js) - Google Analytics