Follow up for problem "Populating Next Right Pointers in Each Node".What if the given tree could be any binary tree? Would your previous solution stil...
分类:
其他好文 时间:
2014-08-04 13:32:57
阅读次数:
184
1、设置value为pxx的项选中
$(".selector").val("pxx");
2、设置text为pxx的项选中
$(".selector").find("option[text='pxx']").attr("selected",true);
这里有一个中括号的用法,中括号里的等号的前面是属性名称,不用加引号。很多时候,中括号的运用可以使得逻辑变得很简单...
分类:
Web程序 时间:
2014-08-04 11:05:27
阅读次数:
216
Smith Numbershttp://poj.org/problem?id=1142 1 #include 2 int fac[128]; 3 int find_fac(int n){//对n分解质因数,返回质因数个数 4 int cnt=0; 5 for(int i=2;i*i1...
分类:
其他好文 时间:
2014-08-04 10:52:07
阅读次数:
295
题目:Follow up for problem "Populating Next Right Pointers in Each Node".What if the given tree could be any binary tree? Would your previous solution ....
分类:
编程语言 时间:
2014-08-04 10:31:57
阅读次数:
239
###-*-coding:cp936-*-###<ahref="http://home.51cto.com"target="_blank">家园</a>##importurllib##str0=‘<ahref="http://home.51cto.com"target="_blank">家园</a>‘##href=str0.find(‘<ahref‘)##printhref##com=str0.find(‘.com"‘)##printcom##ur..
分类:
Web程序 时间:
2014-08-04 08:21:17
阅读次数:
263
不相交集合 故名思意就是一种含有多个不相交集合的数据结构。典型的应用是确定无向图中连通子图的个数。其基本操作包括:Make-Set(x):建立一个新的集合,集合的成员是x;Union(x,y): 将包含x和y的集合合并为一个集合;Find-Set(x): 返回指向包含x的集合的指针;下面是一个例子,...
分类:
其他好文 时间:
2014-08-04 06:13:46
阅读次数:
218
新建工程由于使用固件库开发的高效便捷,我选择了使用STM32F4标准外设库。开发板的芯片为STM32F429XX,其他的可根据相关情况进行变化。在标准固件库中,存在在CMSIS和STM32F4xx_StdPeriph_Driver两个文件夹。在工程中新建一个文件夹Drivers,在此目录中再新建两个...
分类:
其他好文 时间:
2014-08-04 04:10:36
阅读次数:
267
题目:Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique lo....
分类:
编程语言 时间:
2014-08-04 04:10:26
阅读次数:
374
题目:Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes....
分类:
编程语言 时间:
2014-08-04 04:09:56
阅读次数:
339
shell是个好东西,极大的方便了查询工作,之前遇到一个问题,查询包含有特定字段的特定文件,经过查询,命令如下:1 find . -type f -name '*.cpp' print|xargs grep -r '#include' -l 上述命令的意思是查询包含有 '#include' 字...
分类:
系统相关 时间:
2014-08-04 01:59:36
阅读次数:
230