#include
#include
using namespace std;
//constexpr keyword
constexpr int sqare(int tmp)
{
return tmp*tmp;
}
int main()
{
int myArray[sqare(2)]={1,2,3,4};
//Range-bas...
分类:
编程语言 时间:
2014-11-05 00:29:02
阅读次数:
217
Java中continue比C语言多了一个continue loop;写法,基本上和goto差不多。
但是需要注意的是,loop书写的位置:
1、只能是continue上面
2、必须是当前for循环外面
3、必须紧挨着for循环...
分类:
编程语言 时间:
2014-11-05 00:26:32
阅读次数:
208
1.1环境准备1.2 Nested Loops Join从上面的试验来看,nested loop jion基本上是没有限制的,可以支持所有的运算。1.3 Hash Join1.4 Merge Sort Join待续。。。。。
分类:
数据库 时间:
2014-11-02 22:18:28
阅读次数:
179
#include
#include
#include >
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char** argv) {
ofstream ...
分类:
编程语言 时间:
2014-11-01 23:14:37
阅读次数:
277
1. 循环
shell循环,不断执行某段程序,直到符合条件。
循环分为4种, while循环,until循环,for固定处理, for数值处理。
2. while循环
while循环是一直执行,直到条件不符合,才停止。
3. until循环
until循环和while相反,当条件condition成立时,终止循环。
4. for固定循环
for为已知次数的循环。...
分类:
系统相关 时间:
2014-11-01 14:58:02
阅读次数:
186
android 的service和activity是运行在UI主线程的。在android线程中,只有主线程即UI线程有自己的默认的消息队列。子线程需要创建自己的消息队列,并把消息发给队列,并循环起来,发给handler处理。
1、Looper.prepare();给子线程创建消息队列。
2、Looper.loop();把消息放入消息队列并循环起来。
如下是一个通过activity的oncre...
分类:
移动开发 时间:
2014-10-31 15:51:01
阅读次数:
186
前言多线程的价值无需赘述,对于App性能和用户体验都有着至关重要的意义,在iOS开发中,Apple提供了不同的技术支持多线程编程,除了跨平台的pthread之外,还提供了NSThread、NSOperationQueue、GCD等多线程技术,从本篇Blog开始介绍这几种多线程技术的细节。对于pthr...
分类:
移动开发 时间:
2014-10-30 14:50:21
阅读次数:
339
标签,它是成对出现的标签,首标签和尾标签之间的内容就是滚动内容。标签的属性主要有behavior、bgcolor、direction、width、height、hspace、vspace、loop、scrollamount、scrolldelay等,它们都是可选的。behavior属性behavio...
分类:
Web程序 时间:
2014-10-30 10:51:37
阅读次数:
268
分为几个模块 EventLoop、TcpServer、Acceptor、TcpConnection、Channel等
对于EventLoop来说:
他只关注里面的主驱动力,EventLoop中只关注poll,这类系统调用使得其成为Reactor模式,EventLoop中有属于这个loop的所有Channel,这个loop属于哪一个Server.
几个类存在的意义:
从应用层使用的角度...
分类:
其他好文 时间:
2014-10-30 00:27:40
阅读次数:
325