1、实现多线程方法:其实就是多个线程同时调用io_service::run for (int i = 0; i != m_nThreads; ++i) { boost::shared_ptr pTh(new boost::thread( boost::bind(&...
分类:
编程语言 时间:
2014-08-12 00:34:33
阅读次数:
1592
[plain]view plaincopyprint?- (id)init {self = [super init]; // Call a designated initializer here.if (self != nil) {// 省略其他细节}return self;}容易让人困惑的地方在于...
分类:
其他好文 时间:
2014-08-12 00:29:23
阅读次数:
236
修改 /etc/mysql/my.cnf 把 bind-address =127.0.0.1 注释掉然后1.设置远程访问将相应用户数据表中的host字段改成'%';use mysqlmysql> select host, user from user;+-----------+------+| ho...
分类:
数据库 时间:
2014-08-11 17:39:12
阅读次数:
442
When we are focusing on solving problems, we usually prefer to stay in front of computers rather than go out for lunch. At this time, we may call for food delivery.
Suppose there are N people living ...
分类:
其他好文 时间:
2014-08-11 15:02:22
阅读次数:
333
一、简介 RPC是Remote Procedure Call的缩写,翻译成中文为:远程方法调用。它是一种在本地机器上调用远端机器上的一个过程(方法)的技术,这个过程也被大家称为“分布式计算”,是为了提高各个分立机器的“互操作性”而发明出来的技术。 XML-RPC的全称是XML Remote Pr.....
分类:
编程语言 时间:
2014-08-11 11:41:12
阅读次数:
200
命题 当service经常被远程调用时,我们经常常使用到aidl来定一个接口供service和client来使用,这个事实上就是使用Binder机制的IPC通信。当client bind service成功之后,系统AM会调用回调函数onServiceConnected将service的IBind....
分类:
其他好文 时间:
2014-08-11 11:31:12
阅读次数:
205
测试环境VMware虚拟机环境,linux平台centos6.5,ip网段172.16.26.1-6安装dns服务器提供dns服务安装bind(named)测试环境centos6.5平台,ip地址172.16.26.3/etc/named.conf==>主要配置文件options{//listen-onport53{127.0.0.1;};监听的端口和地址,只为自己服务,咋行呢?//liste..
分类:
其他好文 时间:
2014-08-11 03:06:03
阅读次数:
857
In this post, I’ll detail how to catch specific key presses and why this can be useful. This is another in my series of “requested” tutorials. There r...
分类:
编程语言 时间:
2014-08-11 02:46:11
阅读次数:
467
JavaScript中,apply()与call()的含义一样,均为改变调用函数中的this指向。其中apply()与call()的第一个参数表示所要指向的对象,若调用函数无参数可不写,则默认为window。第一个参数后的参数表示调用函数的参数,其中apply()第一个参数后面的参数为一个数组,ca...
分类:
移动开发 时间:
2014-08-11 02:38:21
阅读次数:
294
DNS原理概述及使用===============================DNS原理Bind的安装配置及正反向解析主从复制子域授权及转发Acl及view===============================一、DNS原理每个IP地址都可以有一个主机名,主机名由一个或多个字符串组成,字符串之间用小数点隔开。有了主机名,就不要..
分类:
其他好文 时间:
2014-08-10 18:56:51
阅读次数:
301