自己简单版:namespace ConsoleApplication25{ class Program { struct player { public string name; public int hp,...
分类:
其他好文 时间:
2015-04-19 17:29:43
阅读次数:
121
一种方式是通过调用ClientGlobal类的初始化方法对配置文件进行加载,另一种是通过调用API逐一设置配置参数。后一种方式对于使用Zookeeper等加载属性的方式很方便。1. 加载配置文件:1 String configFileName = "conf/dfs-client.conf"; 2....
namespace ConsoleApplication1{ class Program { struct huiyuan { public string name; public string password; ...
分类:
其他好文 时间:
2015-04-19 17:25:10
阅读次数:
160
调用的API为:String[] upload_file(String group_name,//组名,不指定则可设为nulllong file_size,//文件大小,必须制定UploadCallback callback,//回调String file_ext_name,NameValuePai...
static void Main(string[] args) { while (true) { /* string x; Console.WriteLine("请随便输入:"); ...
分类:
其他好文 时间:
2015-04-19 15:59:50
阅读次数:
132
一、引子在正式说委托前,我先给一个例子,然后引出后面要说的委托。很简单,就是一个机器人打招呼的。代码清单1.1: class Robot { public void GreetByChinese(string name) { Consol...
分类:
其他好文 时间:
2015-04-19 15:54:09
阅读次数:
141
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2015-04-19 15:49:13
阅读次数:
98
我们可以借助SA写一个小工具来dump下StringTable中所有的oop(SA真是个好东西哇:)...
分类:
其他好文 时间:
2015-04-19 14:44:53
阅读次数:
301
一、参数传递 Java中的变量类型分为基本数据类型和引用数据类型。引用数据类型存放的是对象实例的地址,一个对象可以有多个引用,即这些引用存放的都是该对象的地址。(基本类型变量和引用类型变量存放在栈(stack)中,对象存放在堆(heap)中) 在进行参数传递时,不管参数是基本类型还是引用类型,形.....
分类:
其他好文 时间:
2015-04-19 14:36:51
阅读次数:
196
staticvoidMain(string[]args){while(true){inta;Randomr=newRandom();a=r.Next(0,24);Console.WriteLine(a);if(a>=0&&a=6&&a=12&&a=18&&a<=24){Console.WriteLi...