1. 题目:找出前100个素数。2.
要求:将前100个素数找出并显示值,要求每行显示5个素数。先列出求100以内素数的C++代码然后根据C++代码写汇编代码,相对来说比较容易。 1 //The
program is to find the primes from 1 to 100 with C++...
分类:
编程语言 时间:
2014-05-24 04:23:06
阅读次数:
450
安装libsvm的时候用到了mex -setup,有的会报 Could not find
the 64-bit compiler. This may indicate that the "X64 Compilers and Tools" or the
Microsoft Windo...
分类:
其他好文 时间:
2014-05-24 03:59:31
阅读次数:
387
使用Docker一段时间之后,准备在公司内部使用Docker +
Hadoop(HDFS)组件内部一个私有云,统一管理公司和产品/项目组内部的代码、文档。我选择先从文档管理开始,在底层架子搭建好之后,需要给内部人员提供一个好的“门面”,在没有这个门面之前,我们大量使用SSH+Command方式操作,...
分类:
其他好文 时间:
2014-05-24 03:44:10
阅读次数:
1071
题目链接Given a string, find the length of the
longest substring without repeating characters. For example, the longest
substring without repeating letter...
分类:
其他好文 时间:
2014-05-24 02:15:57
阅读次数:
291
Given a binary tree, find its maximum depth.The
maximum depth is the number of nodes along the longest path from the root node
down to the farthest le...
分类:
其他好文 时间:
2014-05-23 11:54:10
阅读次数:
317
如何一气呵成地,on the fly地操作DOM元素呢?
例如顺序执行【创建】-> 【修改】-> 【添加】三个动作。
由于jQuery支持链式操作,其实就是设计模式的builder模式,所以我们可以把三个操作串在一起来执行。
首先创建一个p元素,内容包含一个a元素。
$('jQuery')
然后为a元素添加一个href属性
$('jQuery').find('a').a...
分类:
Web程序 时间:
2014-05-22 12:54:21
阅读次数:
278
当我们使用Destructive Method对wrapper set进行选择、过滤之后会产生一个新的结果集。例如:
html
$lt;div$gt;
$lt;p$gt;Paragraph$lt;/p$gt;
$lt;p$gt;Paragraph$lt;/p$gt;
$lt;/div$gt;
对于上面的DOM Tree,当然可以使用
$('div').find('p')
来获取所...
分类:
Web程序 时间:
2014-05-22 10:41:21
阅读次数:
430
题目:
链接:点击打开链接
算法:
赤裸裸的并查集。
代码:
#include
#include
#include
using namespace std;
int n,m;
int root[1010];
int find(int x)
{
int r = x;
while(root[r] != r)
r = root[r];
...
分类:
其他好文 时间:
2014-05-22 10:36:30
阅读次数:
219
题目:
Given an array of integers, every element appears
three times except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implem...
分类:
其他好文 时间:
2014-05-20 16:22:52
阅读次数:
241
当浏览器向Web服务器发出请求时,它向服务器传递了一个数据块,也就是请求信息,HTTP请求信息由3部分组成:l请求方法URI协议/版本l请求头(Request
Header)l请求正文下面是一个HTTP请求的例子:GET/sample.jspHTTP/1.1Accept:image/gif.imag...
分类:
其他好文 时间:
2014-05-20 10:38:05
阅读次数:
324