#region 判断远程文件是否存在
///
/// 判断远程文件是否存在
///
///
///
public static bool RemoteFileExists(string fileUrl)
{
HttpWebRequest re = null...
#region 移除字符串末尾指定字符
///
/// 移除字符串末尾指定字符
///
/// 需要移除的字符串
/// 指定字符
/// 移除后的字符串
public static string RemoveLastChar(string str, string val...
#region 字符串中多个连续空格转为一个空格
///
/// 字符串中多个连续空格转为一个空格
///
/// 待处理的字符串
/// 合并空格后的字符串
public static string MergeSpace(string str)
{
if (...
#region 移除数组中重复数据
///
/// 移除数组中重复数据
///
/// 需要除重的数组
/// 不重复数组
public static string[] DelRepeatData(string[] array)
{
return array....
分类:
编程语言 时间:
2015-06-17 09:33:06
阅读次数:
148
String 类的两种实例化方式
A.直接赋值
public class Stringlei
{
public static void main(String args[]){
String name="张三";
System.out.println("姓名:"+name);
}
}
B.通过关键字new
public class Stringlei
{
public s...
分类:
编程语言 时间:
2015-06-17 09:32:59
阅读次数:
198
原始字符串字面量(raw string literal)是可以横跨多行代码的字符串字面量,不需要转义嵌入的双引号,像\t和\n这种转义序列不按照转义序列的方式处理,而是按照普通文本的方式处理。如果像下面这样编写普通的字符串字面量,那么会收到一个编译器错误,因为字符串包含了未转义的引号:string str = "Hello "World"!"; // Error! 对于普通的字符串,必须转义双...
分类:
其他好文 时间:
2015-06-17 09:28:29
阅读次数:
100
使用JDBC时,会有这么一个错误:java.sql.SQLException: 索引中丢失 IN或OUT 参数::x如下示例中insertLog.execute();这行会抛出这个异常:String logSQL = "insert into tbl_obj(id, obj, type, cont, proposer, operator, date, remark) "...
分类:
数据库 时间:
2015-06-17 09:28:09
阅读次数:
146
//图片上传到阿里云 [AcceptVerbs(HttpVerbs.Post)] public JsonResult Upload(HttpPostedFileBase fileData, string tupianming) { i...
分类:
Web程序 时间:
2015-06-17 09:25:29
阅读次数:
200
循环标签跳出循环public class GotoTest { public static void main(String[] args) { int[][] array={ {1,20,3}, {28,90,10},...
分类:
其他好文 时间:
2015-06-17 09:22:25
阅读次数:
79
\n";}echo$string;returntrue;}$cache_filename='css-'.md5($_SERVER['SCRIPT_NAME'].$part).'.css';if(!file_exists(SC_ROOT.$cache_filename)){$file_content=...
分类:
Web程序 时间:
2015-06-17 09:17:51
阅读次数:
129