public class PrototypeManager { /** *
用来记录原型的编号和原型实例的对应关系 */ private static Map map = new HashMap(); /** *
私有化构造方法,避免外部创建实例 *...
分类:
其他好文 时间:
2014-05-01 15:02:37
阅读次数:
307
假设我们有一个enum:public enum Role{ User = 0, Admin =
1024 }我们想要实现如此效果:因为enum本身并没有IEnumerable接口,所以不能直接使用new
SelectList(Role);来将之填充DropDownList。但是我们可以写一个静态方法...
分类:
Web程序 时间:
2014-05-01 14:48:25
阅读次数:
383
public DateTime? StatusDateTime =
null;脑子便也出现个问号,这是什么意思呢?网上搜下,总结如下:1.
可空类型修饰符(?):引用类型可以使用空引用表示一个不存在的值,而值类型通常不能表示为空。例如:string str=null; 是正确的,int
i=null...
分类:
其他好文 时间:
2014-05-01 14:46:33
阅读次数:
347
private void ToConvert_Click(object sender,
EventArgs e) { string strPath = System.Windows.Forms.Application.StartupPath;
...
分类:
其他好文 时间:
2014-05-01 14:44:33
阅读次数:
346
1.RootViewController.m#import
"RootViewController.h"#define URL
@"http://localhost:8080/TestOne/upload3.jsp"@implementation RootViewController-
(void)...
分类:
Web程序 时间:
2014-05-01 14:43:52
阅读次数:
541
#region -- 流操作 /// /// 复制流 /// public static
MemoryStream CopyStream(Stream stream) { MemoryStream ms...
分类:
其他好文 时间:
2014-05-01 14:34:47
阅读次数:
285
#include "stdio.h"/*int* set(int a,int *c){int
*b;b=malloc(sizeof(int)*3);c[0]=a;c[1]=1+a;c[2]=2+a;b[0]=13;b[1]=14;b[2]=15;return
b;}*/char *set(void)...
分类:
编程语言 时间:
2014-05-01 13:56:31
阅读次数:
306
知识这个东西,真是知道的越多就不知道的越多,C/C++这塘水得多深啊,哈哈。看下面3个片段:1void fun(char a[100])
{2fprintf(stderr, "%s\n", a);3}45int main(void) {6char aa[200] =
"abcdef";7fun(aa...
分类:
其他好文 时间:
2014-05-01 01:44:36
阅读次数:
292
帮助函数封装一些代码,方便我们在应用程序中重用,MVC内建很多帮助函数,可以很方便的生成HTML标记。首先列出后面示例中用到的数据模型类定义:namespace
HelperMethods.Models { public partial class Person { public...
分类:
Web程序 时间:
2014-05-01 00:54:17
阅读次数:
531
创建方法//动态调用web服务 public static object
InvokeWebSer(string url,string @namespace, string classname, string methodname,
object[] args) { ...
分类:
Web程序 时间:
2014-05-01 00:53:13
阅读次数:
386