冒泡排序代码:
#include
#include
using namespace std;
template
void bubbleSort(ItemType theArray[], int n)
{
bool sorted = false; // False when swaps occur
int pass = 1;
while (!sorted && (pass...
分类:
其他好文 时间:
2014-07-22 00:32:35
阅读次数:
363
Activity When you are creating a new instance of Activity via Intent, you can pass some extra data to the Activity. Data are stored in Bundle and can be retrieved by calling?getIntent().getExtras...
分类:
移动开发 时间:
2014-07-21 10:11:31
阅读次数:
272
Using cron seems
to add another entry point into your application, while Quartz would
integrate into it. So you would be forced to deal with some inter-process communication if you wanted to pass...
分类:
其他好文 时间:
2014-07-19 11:11:44
阅读次数:
373
struts2支持一种stream类型的Result,这种类型的Result可以直接向客户端浏览器响应二进制,文本等,
我们可以再action里面生成文本响应,然后在客户端页面动态加载该响应即可。
直接看例子:
public class LoginAction {
private String user;
private String pass;
private ...
分类:
其他好文 时间:
2014-07-18 18:10:54
阅读次数:
311
A relational database, like mysql, provides transactions to wrap several operations in one unit, make them all pass or all fail. All isolation levels ...
分类:
其他好文 时间:
2014-07-18 17:21:39
阅读次数:
287
在配置中加上location ~ .*\.(php|php5)?$ {fastcgi_pass 127.0.0.1:9000;fastcgi_read_timeout 700;fastcgi_index index.php;include fastcgi.conf;}
分类:
Web程序 时间:
2014-07-18 15:17:43
阅读次数:
335
即使resource_limit = false, password的 资源限制也会生效...
分类:
其他好文 时间:
2014-07-18 14:09:03
阅读次数:
185
Reverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn= 4,return1->4->3->2->5->NULL.No...
分类:
其他好文 时间:
2014-07-18 00:32:24
阅读次数:
271
mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost' -> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;mysql> GRANT ALL PRIVILEGES ON *.* TO ...
分类:
数据库 时间:
2014-07-17 22:04:27
阅读次数:
317
管理服务startstopstatusrestart启动脚本namememcachedprogram/usr/bin/memcachedpidfileargs#参数-u-p-m-cwork-dirpython-mSimpleHTTPServer#启动一个小型的web服务函数pass占位脚本名称+num直接进入num行pidofmemcached查看进程num读成字典lines列表变成字典dict([i.strip..
分类:
编程语言 时间:
2014-07-17 08:06:49
阅读次数:
312