在一次做开发的时候,遇到需要将数据表的字段类型由number改成varchar,可是该字段又有值,用 alter table t-name modify cname newType;会报错。话说,当时在网上没找到合适的解决办法,很苦恼!今天在博客园看到解决这个问题的办法,很nice,分享!当要修改的...
分类:
数据库 时间:
2014-07-31 19:42:07
阅读次数:
227
本篇主要讲解$http(config)的config中的timeout项:$http({ timeout: number})数值,从发出请求开始计算,等待的毫秒数,超过这个数还没有响应,则返回错误demo:html: 18.4 $http(2) {{data}}js:var js...
分类:
其他好文 时间:
2014-07-31 19:34:27
阅读次数:
9782
和快速排序有点类似,利用快速排序的划分算法,
划分算法见http://blog.csdn.net/buyingfei8888/article/details/8997803
根据int partition(int number[],int start,int end);返回值为数组下标,大小为index,index左边值均小于number【index】,右边均大于number【index】,若...
分类:
其他好文 时间:
2014-07-31 17:05:16
阅读次数:
191
replace 函数用法如下:replace('将要更改的字符串','被替换掉的字符串','替换字符串')oracle 中chr()函数CHR() --将ASCII码转换为字符 语法CHR(number_code)示例select CHR(116) from dual; --返回't'几个常用的ch...
分类:
数据库 时间:
2014-07-31 16:22:07
阅读次数:
415
1 public int singleNumber(int[] A) {2 int s=0;3 for(int i=0;i<A.length;i++){4 s=s^A[i];5 } 6 return...
分类:
其他好文 时间:
2014-07-31 16:13:26
阅读次数:
184
/*
* php递归函数的用法
* 你玩过吗?
* 下面开始玩一玩
*/
//自己调自己就是回调 实现了一个垒加2垒减2的效果
class digui{
public function index($number){
if($number>0) {
echo $number," ";
...
分类:
其他好文 时间:
2014-07-31 13:32:26
阅读次数:
142
Description
The inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i aj.
For a given sequence of numbers a1, a2, ..., an, if we move the ...
分类:
其他好文 时间:
2014-07-31 13:31:46
阅读次数:
229
2^x mod n = 1
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 11658 Accepted Submission(s): 3634
Problem Description
Give a number n...
分类:
其他好文 时间:
2014-07-31 13:31:17
阅读次数:
193
搜索+剪枝如此水的一个题,居然搞了一上午出错在bfs与dfs时共用了一个vis数组,导致bfs完后返回dfs应该能访问到的点访问不到自己想怎么剪枝,想了几个剪枝方法,又证明,又推翻,再想,再证明,再推翻用了好长时间T T自己还是水的不行啊两个剪枝:1.若,当前求出来的解now的长度+当前状态下能访问...
分类:
其他好文 时间:
2014-07-31 13:15:16
阅读次数:
492
思路:统计每位出现的次数,mod3;对于k同样适用 1 class Solution { 2 public: 3 int singleNumber(int A[], int n) { 4 int a[32] = {0}; 5 int i = 0; 6 ...
分类:
其他好文 时间:
2014-07-31 13:14:46
阅读次数:
140