表A记录如下:aID aNum1 a200501112 a200501123
a200501134 a200501145 a20050115表B记录如下:bID bName1 20060324012 20060324023
20060324034 20060324048 2006032408创建这两...
分类:
数据库 时间:
2014-06-09 19:47:46
阅读次数:
248
多表查询时,mysql语句为:select a.*,b.* from 表A名 as a
left join 表B名 as b on a.字段名=b.字段名;当出现两个相同字段名字时,比如相同字段名为name,就可以a.name as
aname,b,name as bname;语句为:select ...
分类:
数据库 时间:
2014-06-09 19:11:03
阅读次数:
198
//定义二维平面上的点struct Point{ int x; int y;
Point(int a=0, int b=0):x(a),y(b){}};bool operator==(const Point& left,
const Point& right){ return...
分类:
其他好文 时间:
2014-06-08 22:26:17
阅读次数:
357
1.基本概念:sleep,join,yied,优先级.2.进程,线程:独立的内存空间,内存地址,不会相互影响。3.数据结构:(共享资源的软件模拟)-队列,4.并发控制:信号量机制(硬件机制原理),软件实现(锁机制-比如读写分离,基于二维的锁兼容性)5.障碍器,信号量,锁6.CPU密集型--计算,I/...
分类:
编程语言 时间:
2014-06-08 21:38:34
阅读次数:
498
1.一种并行计算的多线程编程模型2.开始--任务分割--多线程异步执行---任务合并--阻塞等待合并结果。(分治算法)3.work-stealing算法:
每个线程维护一个各自的双端的链表,有新任务时之间插入的前端优先执行,前端无任务时,窃取其他线程双端链表的任务加入到自己的尾端进行处理。 通常.....
分类:
其他好文 时间:
2014-06-08 21:28:47
阅读次数:
357
题目
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and alternate between).
For example:
G...
分类:
其他好文 时间:
2014-06-08 17:29:07
阅读次数:
315
题目
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).
For example:
Given binary tree {3,9,20,#,#,15,7},
3
/ \...
分类:
其他好文 时间:
2014-06-08 16:38:02
阅读次数:
194
Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified.
You should pack your words in a greedy approach; that i...
分类:
编程语言 时间:
2014-06-08 15:25:00
阅读次数:
282
题目
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).
For example:
Given binary tree {3,9,20...
分类:
其他好文 时间:
2014-06-08 09:23:34
阅读次数:
230
Rotating Sentences
In ``Rotating Sentences,'' you are asked to rotate a series of input sentences 90 degrees clockwise. So instead of displaying the input sentences from left to right and top to b...
分类:
其他好文 时间:
2014-06-08 04:51:34
阅读次数:
236