out 关键字会导致参数通过引用来传递。这与 ref 关键字类似,不同之处在于 ref 要求变量必须在传递之前进行初始化。若要使用 out 参数,方法定义和调用方法都必须显式使用 out 关键字 比如类Apublic class A{public void Function(ref string p...
整理了几条对开发可能用到概率高的1、swicth支持对String的判断:(以前只能支持Int及以下的)switch (s) { case "1": break; case "2": break; case "3": break...
分类:
其他好文 时间:
2015-03-17 17:29:30
阅读次数:
191
url: 要求为String类型的参数,(默认为当前页地址)发送请求的地址。type: 要求为String类型的参数,请求方式(post或get)默认为get。注意其他http请求方法,例如put和delete也可以使用,但仅部分浏览器支持。timeout: 要求为Number类型的参数,设置请求超...
分类:
Web程序 时间:
2015-03-17 17:28:02
阅读次数:
116
首先把问题摆出来,先看这个代码? String?a?=?"ab";?
String?b?=?"a"?+?"b";?
System.out.println((a?==?b)); 打印结果会是什么?类似这样的问题,有人考过我,我也拿来考过别人(蛮好玩的,大家也可...
分类:
编程语言 时间:
2015-03-17 16:09:18
阅读次数:
198
网络编程:
端口:
物理端口:
逻辑端口:用于标识进程的逻辑地址,不同进程的标识;有效端口:0~65535,其中0~1024系统使用或保留端口。java 中ip对象:InetAddress.import java.net.*;
class IPDemo{
public static void main(String[] args) throws UnknownHostExceptio...
分类:
其他好文 时间:
2015-03-17 16:01:30
阅读次数:
204
problem:
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this:
(you may want to display this pattern in a fixed font for better legibility)
P A H N
A...
分类:
其他好文 时间:
2015-03-17 15:59:47
阅读次数:
129
13.vector和string优先于动态分配的数组
使用vector和string和数组相比,减少了管理内存的工作量。可以使用begin,end,size等函数vector和string拥有iterator,value_type等类型定义。注意事项:string可能使用引用计数,在多线程环境下同步可能会导致性能变差。
14.使用reserve来避免不必要的内存分配
vector超过容量...
分类:
其他好文 时间:
2015-03-17 15:57:44
阅读次数:
119
1. 题目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 defi...
分类:
其他好文 时间:
2015-03-17 15:52:52
阅读次数:
131
指向方法的指针。 代理与它指向的方法,往往不是一个人写出来的。 委托的四大步骤: 1.声明代理类型 public delegate void xyDelegate(string r); 2.定义代理变量 public event xyDelegate xy;//event 3.将代理挂载到相应的方法...
分类:
其他好文 时间:
2015-03-17 15:33:32
阅读次数:
163