1. string------>int 1.1 “123”-----> 1 ,2 ,3 方法1:String s =new String();s="123";int i=Integer.parseInt(s.substring(0,2))// int i=123int i=Integer...
分类:
编程语言 时间:
2014-12-19 15:45:09
阅读次数:
198
public DataTable GetCsvData(string filePath, string fileName = "Shipping") { string path = Path.Combine(filePath, fileName + ".csv...
分类:
其他好文 时间:
2014-12-19 15:44:33
阅读次数:
145
最近看了一下学习资料,感觉进制转换其实还是挺有意思的,尤其是对于负数这一方面。下面和大家分享一下,这里只写了十进制到二进制的转换,其实都是同样的道理 1 public class Test1 { 2 3 public static void main(String[] args) { 4 ...
分类:
编程语言 时间:
2014-12-19 15:40:01
阅读次数:
151
如下:string fullpath = context.Server.MapPath("hello.htm"); //得到hello.htm的全路径string content = System.IO.File.ReadAllText(); //读入文件内容context.Re...
分类:
Web程序 时间:
2014-12-19 15:39:55
阅读次数:
125
标 题:C++ 提取网页内容系列之四作 者:itdef链 接:http://www.cnblogs.com/itdef/p/4173833.html欢迎转帖 请保持文本完整并注明出处将网页内容下载后存入字符串string 或者本地文件后 我们开始进行搜索和查询 获取信息这里使用正则式使用vs2008...
分类:
编程语言 时间:
2014-12-19 15:33:31
阅读次数:
251
Given a roman numeral, convert it to an integer.
Input is guaranteed to be within the range from 1 to 3999.
class Solution {
public:
int romanToInt(string s) {
int weight[26];
...
分类:
其他好文 时间:
2014-12-19 14:30:53
阅读次数:
160
调用取静态变量的值时,如果要初始化的话,得在静态块或调用该值方法那边初始化静态块初始化:public class StaticDemo {private static String str; //定义的静态变量 static{ str = "静态块命名"; } public stati...
分类:
其他好文 时间:
2014-12-19 14:29:01
阅读次数:
282
Model类中可以添加的验证标记:1.必填字段[Required]public string FirstName { get; set; }2.字段长度至多n位:[StringLength(160)]public string FirstName { get; set; }要求至少n位:[Strin...
分类:
Web程序 时间:
2014-12-19 14:27:18
阅读次数:
164
问题一:Response.Write 后连接Response.Redirect ,则Response.Write无法显示,直接跳转入Response.Redirect 的页面。解决方案:Response.Write("");假设,script内容中含有变量,那么解决方法是:string a=当前的记...
分类:
其他好文 时间:
2014-12-19 14:25:06
阅读次数:
149
题目链接:http://acm.bnu.edu.cn/bnuoj/problem_show.php?pid=34985We define a kind of strings as elegant string: among all the substrings of an elegant strin...
分类:
其他好文 时间:
2014-12-19 14:21:52
阅读次数:
228