线程用Thread类来创建, 通过ThreadStart委托来指明方法从哪里开始运行。ThreadStart的声明如下: public delegate void ThreadStart(); 调用Start方法后,线程开始运行,直到它所调用的方法返回后结束。class ThreadTest ...
分类:
编程语言 时间:
2015-05-17 00:42:13
阅读次数:
213
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).
The robot can only move either down or right at any point in time. The robot is trying to reach the ...
分类:
其他好文 时间:
2015-05-16 20:38:51
阅读次数:
145
shell排序是插入排序的改进方法,但是不稳定#include
using namespace std;
void insertDxSort(int *data,int start,int end,int dx)
{ //以增量dx进行增量排序
int key=0;
int j=0;
for(int i=start+dx;i<=end;i+=dx)
{...
分类:
编程语言 时间:
2015-05-16 20:38:30
阅读次数:
109
list[start:stop:step]>>> a_list=['hito','bb','cc','dd','ee','ff']>>> a_list[::-1] #'-'号逆序,start 默认为list最后一位,start 默认为list的第一位['ff', 'ee', ...
分类:
编程语言 时间:
2015-05-16 17:57:16
阅读次数:
152
本题木的特点是数组初始有序,然后循环移位了。
由于是循环移位,所以数组前一半或后一半至少有一半元素是有序的,而找到其中一半有序的元素正式本题的题眼。
1.初始start=0,end=len-1
2.mid=(start+end)/2;如果arr[mid]==target,找到元素
3.如果arr[start]<arr[mid],则前半部分有序,如果arr[start]<=targetarr[mid],则targe...
分类:
其他好文 时间:
2015-05-16 10:31:37
阅读次数:
141
1. 在storage中创建xhprof的domain2.在xhprof中,给对应的版本应用开启调试3.在版本内的代码加入sae_xhprof_start();// 需要调优的代码// ...sae_xhprof_end();4.在xhprof中,查看调优的代码,排前面的方法花费约多时间,具体函数可...
分类:
其他好文 时间:
2015-05-16 10:29:54
阅读次数:
149
# 下载tomcat http://tomcat.apache.org/index.html # 修改$TOMCAT_HOME/conf/server.xml ``` ``` # 修改$TOMCAT_HOME/conf/tomcat-users.xml ``` ``` # 启动tomcat ``` $TOMCAT_HOME/bin/catalina.sh start $TO...
分类:
其他好文 时间:
2015-05-16 09:18:15
阅读次数:
124
第一步:下载cutimage.exe(http://download.csdn.net/detail/ilipan/8705037)
第二步:在代码中添加: System.Diagnostics.Process.Start("cutimage.exe");...
1.where is sublime CLI/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl2. run sublime CLI from terminalopen "/Applications/Sublime Text.a...
分类:
系统相关 时间:
2015-05-16 06:43:59
阅读次数:
188
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).The robot can only move either down or right at any po...
分类:
编程语言 时间:
2015-05-15 22:41:05
阅读次数:
173