public static void main(String[] args){ Map map = new HashMap(){ { put("zhang","xinxin"); put("wnag", "jinfeng"); put("li", "xuemei"); put("zhao", "xi...
分类:
其他好文 时间:
2014-09-29 13:28:40
阅读次数:
216
#配置项目路径mkdir hellovi hello/HelloWorld.java#HelloWorld.java代码如下:package hello;public class HelloWorld { public static void main(String[] args) {...
分类:
其他好文 时间:
2014-09-29 13:21:00
阅读次数:
187
richedit 常见使用问题 一.常见问题 a.可以编译,不能执行的在需要在相应的对话框中加上InitInstance(void)函数中添加AfxInitRichEdit();b.升级默认的Riched版本(默认的有一些bug),如 可在InitInstance中添加 LoadLibrary("R...
分类:
其他好文 时间:
2014-09-29 12:36:10
阅读次数:
367
写一个函数交换两个变量的值。C:错误的实现:void swap(int i, int j) { int t = i; i = j; j = t;}因为C语言的函数参数是以值来传递的(pass by value),参数传递时被copy了,所以函数中交换的是复制后的值。正确的实现:指针版:v...
分类:
编程语言 时间:
2014-09-29 11:50:37
阅读次数:
239
FixedBatchSpout 继承自 IBatchSpout IBatchSpout 方法public interface IBatchSpout extends Serializable { void open(Map conf, TopologyContext context); ...
分类:
数据库 时间:
2014-09-29 11:23:20
阅读次数:
282
拖动操作void drag (float fromX, float toX, float fromY, float toY, int stepCount)选定两个位置,进行拖动操作(这里的拖动操作只会记录你的起点和终点,而不会理会你的运动路径)参数:fromX-起始位置的X坐标toX-终点的X坐标f...
1.void COSGObject::addLabel() 中设置字体样式,添加如下代码:textStyle->encoding()=osgEarth::Symbology::TextSymbol::ENCODING_UTF8;运行,没有显示出来字符,只有国旗,说明osgearth没有支持,如果想要...
分类:
其他好文 时间:
2014-09-29 11:05:37
阅读次数:
194
public class MyCustomerFilterAttribute : ActionFilterAttribute { public string Message { get; set; } public override void OnActionExe...
分类:
Web程序 时间:
2014-09-29 10:31:17
阅读次数:
173
委托的声明public delegate void MyDelegate(string str); 注 1.委托的定义和方法的定义类似,只是在前面加了一个delegate,但委托不是方法,它是一种类型。是一种特殊的类型,看成是一种新的对象类型比较好理解。用于对与该委托有相同签名的方法调用。 2.委托...
分类:
其他好文 时间:
2014-09-29 10:18:37
阅读次数:
187
voidGetMemory1(char*p){p=(char*)malloc(100);}voidTest1(void){char*str=NULL;GetMemory(str);//把str传进去,str是一个指针strcpy(str,"helloworld");printf(str);}char*GetMemory2(void){charp[]="helloworld";returnp;}voidTest2(void){char*str=NULL;str=GetMemory2();pr..
分类:
其他好文 时间:
2014-09-29 04:06:27
阅读次数:
268