本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie
Same Tree
Total Accepted: 15922 Total
Submissions: 38418
Given two binary trees, write a function to check if they are equal o...
分类:
其他好文 时间:
2014-05-14 01:15:40
阅读次数:
293
对正则表达式练习器的改进,原贴ID901680
覆盖原execIt函数
修改后的execIt函数允许对多个正则表达式进行匹配(每个正则表达式一行),并对每一个匹配成分显示出是第几个正则表达式匹配的。
这可视为语法分析的雏形,只要对匹配产生相应的动作。
function execIt(form) {
var mode
if(form.chkmode.checked) mode = "gi...
分类:
其他好文 时间:
2014-05-13 23:28:10
阅读次数:
278
实现简单的二级级联
.body_tag{
width: 100%;
height: 100%;
}
/**
*
*/
function province()...
分类:
其他好文 时间:
2014-05-13 09:24:01
阅读次数:
243
atitit.自适应设计悬浮图片的大小and 位置
#--------最好使用relate定位..
中间,图片的大小和位置走能相对table, 没有遮罩左的或者哈面儿文本的问题,要悬浮,使用top:-15 负值,,
#--------悬浮位置top的问题,因为相对高度..
子能使用js解决,计算top负值..
function iniBonusPicPostion() {...
分类:
其他好文 时间:
2014-05-13 09:17:59
阅读次数:
232
思路分析:
遗憾不知道矩阵的构造。线段树上比较水的矩阵。。。
M[x] = [1 A[x]]
[1 0 ]
就有
[ F[R] ] = M[R] * M[R-1] * ... * M[L+2] * [F[L+1]]
[F[R-1]] ...
分类:
其他好文 时间:
2014-05-13 08:45:03
阅读次数:
270
//need to wait until onload so body is available
window.onload = function(){
function getWindowWidth(){
if (window.innerWidth){
ret...
分类:
Web程序 时间:
2014-05-13 07:37:26
阅读次数:
394
题目链接:点击打开链接
暴力出奇迹。
正解应该是最近点对,以i点为x轴,sum[i](前缀和)为y轴,求任意两点间的距离。
先来个科学的暴力代码:
#include
#include
#include
#include
#include
#include
using namespace std;
#define N 100050
#define ll __int64
ll a[N], su...
分类:
其他好文 时间:
2014-05-13 05:45:30
阅读次数:
283
document.write("**************一.指代当前对象**********************");
function print(str){
document.write(str+"");
};
/*
javascript里面的this可谓是所有语言里最让人费解的了,学习国java或者php的人
在学习javascript的时候会觉得非常莫名其妙,因为...
分类:
编程语言 时间:
2014-05-13 05:15:47
阅读次数:
387
ext4.2需求:清空store1的数据,并把store2的数据加载到store1中。速度太慢,需要优化。原始代码:varstart1=newDate().getTime();
anlyGridStore.removeAll();
varstart2=newDate().getTime();
console.log(start2-start1);//614
analyses.each(function(record){
data.push..
分类:
其他好文 时间:
2014-05-13 03:54:42
阅读次数:
255
本人在一个页面实现了两种右键菜单,当鼠标左键单击空白处时,右键菜单并不隐藏。于是,Google之,最后找到一种方法,将鼠标左键单击事件改为:$(document).click( function () {
}改为$(document).on('click touchstart', function () {
}问题解决。...
分类:
其他好文 时间:
2014-05-12 23:13:10
阅读次数:
328