public string HttpPost(string postDataStr) { try { HttpWebRequest request = (HttpWebRequest)System.Net.WebReq...
有时候为图方便,会直接用sqlhelper文件进行相关操作,会出现如下的类: public static object ExecuteScalar(string sqlStr, params SqlParameter[] parameters) { using (...
分类:
数据库 时间:
2015-02-06 20:11:56
阅读次数:
179
Given a string s consists of upper/lower-case alphabets and empty space characters ’ ‘, return the length of last word in the string.If the last word does not exist, return 0.Note: A word is defined...
分类:
其他好文 时间:
2015-02-06 18:53:14
阅读次数:
146
一:直接看程序
{CSDN:CODE:599457}
二:源码分析
(1)在Teacher中将作为联合主键的属性都加上@id注解
@Id
private int id;
@Id
private String name;
(2)在Teacher类,加上注解@IdClass(value = TeacherPK.class)置顶联合主键类
(3)Teache...
分类:
Web程序 时间:
2015-02-06 18:52:23
阅读次数:
116
Dim table_Name$Sub JugeData()Dim i%, Cnum%, dt$, arry1 () As String, arry2 () As String, arry3 () As String, cnn As Object, rst As Objectcdt = Format(...
分类:
数据库 时间:
2015-02-06 18:33:36
阅读次数:
233
在业务层AMImpl对VO进行查询主要有两种方式:1、设计时附上where子句设计时在VO视图的edit query窗口,输入where子句,设置bind variabs2、运行时附加where子句String whereClause = ”name = :bind_name";//查询子句调用VO...
分类:
其他好文 时间:
2015-02-06 18:32:46
阅读次数:
146
判断两个字符串的编辑距离是不是1.两个字符串距离是1的可能性:1)两个字符串长度相等:s="abc",t="aec";2)两个字符串长度相差1(两种情况):s="abc",t="abce";或s="abc",t="aebc";bool isOneEditDistance(string s, stri...
分类:
其他好文 时间:
2015-02-06 18:32:01
阅读次数:
128
文件的读取:public static void duqu(String path) throws IOException { File file=new File(path); FileInputStream fis=new FileInputStream(file); InputStre...
分类:
编程语言 时间:
2015-02-06 18:30:29
阅读次数:
160
// 清除两边的空格 String.prototype.trim = function() { return this.replace(/(^\s*)|(\s*$)/g, ''); }; // 合并多个空白为一个空白 String.prototype.ResetBlank = fu...
分类:
Web程序 时间:
2015-02-06 18:25:34
阅读次数:
172
char *strcpy(char *s1,const char *s2);把s2指向的字符串,包括空字符复制到s1指向的位置,返回值是s1.char *strncpy(char *s1,const char *s2,size_t n);把s2指向的字符串复制n个字符到s1指向的位置,返回值为s1....
分类:
其他好文 时间:
2015-02-06 18:25:06
阅读次数:
120