(1)cs:public string SayHello()//返回类型是string { return "大家好"+DateTime.Now.ToString(); } protected void ShowType()//返回类型是void { Response.Wri...
分类:
Web程序 时间:
2015-04-23 13:07:21
阅读次数:
165
Given two integers representing the numerator and denominator of a fraction, return the fraction in string format.If the fractional part is repeating,...
分类:
其他好文 时间:
2015-04-23 13:07:06
阅读次数:
133
简单介绍:1.String类:String的值是不可变的,导致每次对String的操作都会生成新的String对象,不仅效率低下,而且浪费内存空间。2.StringBuffer:StringBuffer的值是可变的,任何对它指向的字符串的操作都不会产生新的对象。3.StringBuilder:和St...
分类:
其他好文 时间:
2015-04-23 13:00:59
阅读次数:
122
1.将资源文件的属性改成“嵌入资源”2.1 string assembleName = this.GetType().Assembly.GetName().Name;//本程序集名2 Stream stream = Assembly.GetExecutingAssemb...
1.Invoke(string methodName,float time)在一定时间调用methodName函数using UnityEngine;using System.Collections; public class example : MonoBehaviour { publ...
分类:
其他好文 时间:
2015-04-23 12:31:21
阅读次数:
150
对字符串对象进行比较不能简单地使用比较运算符“==”,因为比较运算符比较的是两个字符串的地址是否相同。即使两个字符串内容相同,两个对象的内存地址也是不同的。如图所示:String tom=new String("I am a student");String jerry=new String("I ...
分类:
其他好文 时间:
2015-04-23 12:23:27
阅读次数:
150
JAVA String.format 方法使用介绍 1.对整数进行格式化:%[index$][标识][最小宽度]转换方式 ??????? 我们可以看到,格式化字符串由4部分组成,其中%[index$]的含义我们上面已经讲过,[最小宽度]的含义也很...
分类:
编程语言 时间:
2015-04-23 11:17:13
阅读次数:
100
这里提供了一个函数,用来过滤用户输入的内容!使用POST传值的时候,可以调用这个函数进行过滤! ????/**
?????*?过滤参数
?????*?@param?string?$str?接受的参数
?????*?@return?str...
分类:
数据库 时间:
2015-04-23 11:15:51
阅读次数:
176
题目:Write a function to find the longest common prefix string amongst an array of strings.
翻译:求一个字符串数组中 共同的最长前缀。
思路:以第一个串为基准,逐个位置遍历,并遍历字符串数组,如果出现某个字符串长度小于当前位置,或者出现当前位置的字符不相同,返回字串strs[0].substring(0,p...
分类:
其他好文 时间:
2015-04-23 11:05:31
阅读次数:
108
1.打开服务器
int CHTTP::CreateConnect(const string & HTTPServer,const string & UserName,const string &Password,const int nPort)
{
DWORD err;
m_Session = NULL;
m_Connect...
分类:
Web程序 时间:
2015-04-23 11:03:43
阅读次数:
159