Given two binary strings, return their sum
(also a binary string).For example,a ="11"b
="1"Return"100".classSolution{public:stringaddBinary(stringa,st...
分类:
其他好文 时间:
2014-06-04 19:23:09
阅读次数:
235
Given a string S and a string T, find the
minimum window in S which will contain all the characters in T in complexity
O(n).For example,S="ADOBECODEBA...
json数据类型格式:[{id:"1",code:"1",description:"博士"},{id:"2",code:"2",description:"硕士"},{id:"3",code:"3",description:"学士"}]//参考代码
public string DataTable...
分类:
Web程序 时间:
2014-06-04 19:05:38
阅读次数:
237
两种方式:1.IP+SID方式
2.配置链接方式1..IP+SID方式DbHelperOracle.connectionString = string.Format(@"Data
Source=(DESCRIPTION = ...
分类:
数据库 时间:
2014-06-04 18:20:09
阅读次数:
343
Given a string containing only digits, restore
it by returning all possible valid IP address combinations.For
example:Given"25525511135",return["255.2...
分类:
其他好文 时间:
2014-06-03 14:06:24
阅读次数:
271
1、Ruby中正则表达式的写法主要有三种在//之间,要进行转义在%r{}内,不用进行转义Regexp.new()内,不用进行转义/mm\/dd/,Regexp.new(“mm/dd”),%r{mm/dd}三者效果相同,实质都是新建了一个Regexp的类。2、匹配的两种方法=~肯定匹配,
!~否定匹配...
分类:
其他好文 时间:
2014-06-03 13:46:13
阅读次数:
407
该错误一般是编码带来的问题,比如在请求post的时候,使用了application/x-www-form-urlencoded的content
type那么请求传过来的string则需要用urlDecoder进行decode。否则就会报上述错误body =
java.net.URLDecoder.d...
分类:
数据库 时间:
2014-05-30 21:52:15
阅读次数:
237
题目链接判断字符串是否为回文串。附上代码: 1 class Solution { 2 public:
3 bool isPalindrome(string s) { 4 if (s.empty()) return true; // consider empty
string ...
分类:
其他好文 时间:
2014-05-30 21:48:12
阅读次数:
347
24小时制时间显示:public class Datetime { public static
void main(String args[]){ java.util.Date current=new java.util.Date();
java.text....
分类:
编程语言 时间:
2014-05-30 20:21:37
阅读次数:
357
import java.util.ArrayList;import
java.util.Iterator;import java.util.List;public class IteratorTest{ public
static void main(String[] args) { ...
分类:
其他好文 时间:
2014-05-30 18:48:31
阅读次数:
446