字符串初始化 1、初始化 let someString = "Some string literalvalue"
let wiseWords = "\"Imagination is moreimportant than knowledge\" -Einstein" let dollarSign = "\x24"...
分类:
其他好文 时间:
2014-06-18 12:30:29
阅读次数:
257
这个算法也很简单,定义两个栈m_aStack、m_bStack,m_aStack负责push()数据,m_bStack负责front()数据。思路:每一次front()取数据都会检查一下m_bStack是否为空,为空则把m_aStack的所有数据pop()出来push()到m_bStack中。因为S...
分类:
其他好文 时间:
2014-06-18 10:56:23
阅读次数:
190
childIDs 数组cid 要插入的对象int index = Collections.binarySearch(childIDs, cid);if (index < 0) {childIDs.insertElementAt(cid, (index + 1) * -1);stack.push(ci...
分类:
其他好文 时间:
2014-06-18 10:28:08
阅读次数:
206
JDK1.2引入最有争议性的改变是将集合类默认为不是Thread安全性的。
一、Collection Class的概述
1. 具有Threadsafe 的Collection Class:
java.util.Vector(List) 列表集合,通过索引操作。
java.util.Stack(List) 继承自Vector,提供LIFO的顺序操作push进入,pop出元素。
ja...
分类:
编程语言 时间:
2014-06-18 08:07:54
阅读次数:
262
Problem Description
You are given N positive integers, denoted as x0, x1 ... xN-1. Then give you some intervals [l, r]. For each interval, you need to find a number x to make
as small as possible!
...
分类:
其他好文 时间:
2014-06-18 00:58:54
阅读次数:
276
Reverse digits of an integer.Example1: x = 123, return 321 Example2: x = -123, return -321Have you thought about this?Here are some good questions to ...
分类:
其他好文 时间:
2014-06-17 20:06:14
阅读次数:
205
NFS客户端配置为开机自动挂载时,系统启动报错。报错信息类似:mount:mount:mounttoNFSserver‘172.16.1.254‘failed:mount:SystemError:Noroutetohost.原因:网络启动后需要对网络内路由表进行“学习”。在未完成路由表学习之前启动netfs服务会报错。解决方法:延后netfs启动时..
分类:
其他好文 时间:
2014-06-17 18:42:04
阅读次数:
214
/*容器做参数*/voidfunc(vector<int>&vecTest){for(inti=0;i<10;i++)vecTest.push_back(i);}
分类:
其他好文 时间:
2014-06-17 16:52:17
阅读次数:
241
题目
Determine whether an integer is a palindrome. Do this without extra space.
Some hints:
Could negative integers be palindromes? (ie, -1)
If you are thinking of converting the integer to ...
分类:
其他好文 时间:
2014-06-17 16:12:39
阅读次数:
226
Cold weather is coming and in some northern states is already here. That means it’s time to winterize your car. Vehicle maintenance is something we do...
分类:
其他好文 时间:
2014-06-17 14:39:34
阅读次数:
255