正则表达式是一个描述字符模式的对象。 JavaScript的RegExp对象和String对象定义了使用正则表达式来执行强大的模式匹配和文本检索与替换函数的方法. ''*********************** '' \\JavaScript// '' ''*******************...
分类:
编程语言 时间:
2014-12-30 00:24:50
阅读次数:
305
/// /// 执行SQL语句,返回影响的记录数 /// /// SQL语句 /// 影响的记录数 public static int ExecuteSql(string SQLString, params OleDbPara...
分类:
数据库 时间:
2014-12-30 00:21:53
阅读次数:
173
c-str()的功能:当程序用到atoi()、strcpy()这类的C函数时,就要将string类字符串转换成char型字符串;(string是个类,char是个常规类型)c_str()的实现: 1 #include 2 using namespace std; 3 4 //定义一个简易的str.....
分类:
其他好文 时间:
2014-12-30 00:19:06
阅读次数:
129
Gson 是 Google 提供的用来在 Java 对象和 JSON 数据之间进行映射的 Java 类库。
比如:
public class Order {
public String id;
public String OrderName;
@Override
public String toString() {
return "id:"+id+",OrderName:"+Or...
分类:
移动开发 时间:
2014-12-29 23:07:59
阅读次数:
509
一、函数1、什么事函数?程序里的函数是能完成一个独立功能的代码块。数学里的都是高度抽象的函数。2、函数的四要素:static void Main(string[] args){};static 返回类型 函数名 (输入参数列表){函数体};(1)、函数名 Main是函数名 (2)、输入 str...
分类:
其他好文 时间:
2014-12-29 22:59:15
阅读次数:
215
Letter Combinations of a Phone NumberGiven a digit string, return all possible letter combinations that the number could represent.A mapping of digit ...
分类:
其他好文 时间:
2014-12-29 22:56:03
阅读次数:
231
typeof可以告诉我们它的操作数是一个字符串(string)、数值(number)、函数(function)、布尔值(boolean)或对象(object)。1.字符串(string)alert(typeof("asss"))、alert(typeof("123"))等。此时警告框显示的是stri...
分类:
编程语言 时间:
2014-12-29 22:54:49
阅读次数:
191
题目:
解决方法:
public class Solution {
public int lengthOfLastWord(String s) {
if (s.trim().length() == 0) {
return 0;
}
String[] str = s.split(" ");
r...
分类:
其他好文 时间:
2014-12-29 21:29:47
阅读次数:
153
在break后紧跟一个标签,这个标签用于标识一个外层循环。Java中的标签只有放在循环语句之前才有作用。public class BreakTest2{ public static void main(String[] args) { //外层循环,outer作为标识符 ...
分类:
其他好文 时间:
2014-12-29 21:24:46
阅读次数:
200
http://acm.hdu.edu.cn/showproblem.php?pid=3973
Problem Description
You are given some words {Wi}. Then our stupid AC will give you a very long string S. AC is stupid and always wants to know w...
分类:
其他好文 时间:
2014-12-29 20:04:34
阅读次数:
259