isNaN()不能判断一个变量是否为数字类型,isNaN(123)值为false,isNaN('123')值也为false。isNaN() 的实际作用跟它的名字isNaN并不一致,isNaN(NaN)值为true,isNaN(Number("xyz"))值为true,isNaN("abc")值为tr...
分类:
编程语言 时间:
2015-01-07 18:12:00
阅读次数:
210
原题如下;
Given inorder and postorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates do not exist in the tree.
题意很简单:根据中序遍历和后序遍历的序列生成树
思路很简单:根据后序遍历的序列确定根节点,在中序遍历中找到根节点,将原来的序列分为左右两个部分,递归解决左右两个部分就可以解决这个问题。
Java代码如下:
publ...
分类:
其他好文 时间:
2015-01-07 01:52:25
阅读次数:
160
tr 可以对来自标准输入的字符进行替换,删除,以及压缩。它可以将一组字符变成另一组字符,因而通常也被称为转换命令。调用格式为: tr [option] set1 set2将来自stdin的输入字符从set1映射到set2,并将其输出写入stdout, set1 和 set2 是字符类或字符集。 如果...
分类:
其他好文 时间:
2015-01-07 00:26:33
阅读次数:
244
1 2 3 4 " onclick='Tr_Click(tr_)'> 5 姓名 6 学号 7 ...
分类:
Web程序 时间:
2015-01-06 17:46:39
阅读次数:
139
<!DOCTYPE?HTML?PUBLIC?"-//W3C//DTD?HTML?4.01//EN"?"http://www.w3.org/TR/html4/strict.dtd">
<html>
??<head>
????<title>Javascript语法</title>
??</head>
??
??<body>
???? <!--
...
分类:
编程语言 时间:
2015-01-05 00:41:35
阅读次数:
176
Given an index k, return the kth row of the Pascal's triangle.
For example, given k = 3,
Return [1,3,3,1].
Note:
Could you optimize your algorithm to use only O(k) extra space?
与Pascal's Tr...
分类:
其他好文 时间:
2015-01-04 17:18:04
阅读次数:
169
#!/bin/bash
XY=(1?1)
OP=(1?1)
YR=(2?0?1?5)
get_window_size()?{
??echo?-ne?"\e[2J"
??SZ=($(stty?-a?|?tr?‘;‘?‘\n‘?|?awk?‘/rows|columns/{print?$2}‘))
}
echo?-ne?"\e[?1049h\e[...
分类:
其他好文 时间:
2015-01-04 15:27:21
阅读次数:
191
$("table tr").live({mouseenter:function(){//todo},mouseleave:function(){//todo}});$('ul li').live('mouseenter',function(){ $('#tips').show();}).live('...
分类:
Web程序 时间:
2015-01-04 15:17:41
阅读次数:
158
- 为何需要微数据 长篇加累版牍,不好理解 微标记来标注其中内容,让其容易识辨- RDFa Resource Description Framework http://www.w3.org/TR/microdata http://www.whatwg.org/specs/web-apps/...
分类:
Web程序 时间:
2015-01-04 15:04:40
阅读次数:
152
一、TraceView简单介绍 TraceView是AndroidSDK里面自带的工具,用于对Android的应用程序以及Framework层的代码进行性能分析。 TraceView是图形化的工具,终于它会产生一个图表,用于对性能分析进行说明。 TraceView能够跟踪到详细的Method二、Tr...
分类:
其他好文 时间:
2015-01-04 11:50:31
阅读次数:
156