上一页 1 2 3 4 5 6 7 8 9 10 ··· 17 下一页

2008年9月9日

Javascript 中的decodeURI和 asp.net HttpUtility.UrlEncode之间的乱码解决方案

摘要: client端不动:server: public class HttpTools{ public HttpTools() { // // TODO: Add constructor logic here // } public static string EzUrlEncode(string str) { if (string.IsNullOrEmpty(str)) return string.Empty; byte[] bytes = Encoding.UTF8.GetBytes(str); byte[] data = UrlEncodeBytesToBytesInternal(bytes, 阅读全文

posted @ 2008-09-09 10:56 老代哥哥 阅读(426) 评论(0) 推荐(0) 编辑

2008年8月29日

JSON用法2

摘要: var TSubjects = { items: [{id:1, name:"法学理论", chl:26 },{id:2, name:"经济法", chl:26 },{id:3, name:"卷二", chl:26 },{id:4, name:"卷三", chl:26 },{id:5, name:"卷四", chl:26 },{id:6, name:"卷一", chl:26 },{id:7, name:"民法", chl:26 },{id:8, name: 阅读全文

posted @ 2008-08-29 16:13 老代哥哥 阅读(128) 评论(0) 推荐(0) 编辑

JSON用法

摘要: function readNews(newsIdx){ http.open("GET","readNews4Edit.aspx?ID="+newsIdx,false ); http.send(""); var data=http.responseText; if(data.charAt(0)=='1'&& data.charAt(1)==':'){ alert(data ); } else { /*"{typeId:0,author:/"/",chl:0,c 阅读全文

posted @ 2008-08-29 16:09 老代哥哥 阅读(446) 评论(0) 推荐(0) 编辑

部分JS

摘要: //注册 studyez命名空间var studyez=studyez ? studyez:{};//注册工具类命名空间studyez.tool=studyez.tool ? studyez.tool:{};//常用的工具类//注:本接口适合用提供工具类studyez.tool.helper=studyez.tool.helper ? studyez.tool.helper: { //注意:属性或是方法名之前不要加 this version: "1.0.0", $:function(id){ return document.getElementById(id); }, ad 阅读全文

posted @ 2008-08-29 16:07 老代哥哥 阅读(146) 评论(0) 推荐(0) 编辑

2008年7月25日

C#下的进程间的通讯 -- 共享内存篇

摘要: 【摘要】这篇文章早就想发了,可是一直没有时间整理,今天总算发上来了。上次发了利用发消息实现的C#进程间的通讯,这次又使用共享内存了,他们应用范围是不同的,共享内存适用于共享大量数据的情况。本文章利用了前面的一篇.net 1.1 下实现的信号量的类,在.net 1.1 下实现,如果在.net 2.0 下实现的话就用不到我的那个信号量的类了,因为这个类在.net 2.0是提供的。【全文】首先还是定义非托管调用,如下:constintINVALID_HANDLE_VALUE=-1;constintPAGE_READWRITE=0x04;//共享内存[DllImport("Kernel32. 阅读全文

posted @ 2008-07-25 11:11 老代哥哥 阅读(472) 评论(0) 推荐(0) 编辑

C# HttpWebRequest人异步访问

摘要: ----------------------------Un Test-------------------------using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Net;using System.Threading;using System.IO;namespace WebReqHtml{ internal class WebReqState { public byte[] Buffer; public MemoryStream ms; publi 阅读全文

posted @ 2008-07-25 10:54 老代哥哥 阅读(613) 评论(0) 推荐(0) 编辑

C# 信号量的使用

摘要: -------------------未经测试-------------- /// <summary> /// 可用请求数,和最大请求数 /// </summary> static Semaphore sk = new Semaphore(3, 3); static void Begin() { ///等待有信号 sk.WaitOne(); Console.WriteLine("enter:{0} {1} ", DateTime.Now, Thread.CurrentThread.ManagedThreadId); Thread.Sleep(2000 阅读全文

posted @ 2008-07-25 10:52 老代哥哥 阅读(1170) 评论(0) 推荐(0) 编辑

2008年7月16日

Design Patten 的原则

摘要: 1:单一职责原则 不相干的方法不要放在同一个类里面。 2:开放--封闭原则 对修改封闭,对扩展开放。方便添加新的接口。 3:依赖倒置原则。 实现依赖于抽象,而不是依赖于细节。 4:接口隔离原则 不要强迫客户使用他们不使用的方法。 5:替换原则 子类可以替换父类。 阅读全文

posted @ 2008-07-16 10:33 老代哥哥 阅读(136) 评论(0) 推荐(0) 编辑

2008年7月14日

都不知道在干什么。

摘要: 都不知道最近在干些什么?MMD 阅读全文

posted @ 2008-07-14 10:37 老代哥哥 阅读(142) 评论(0) 推荐(0) 编辑

2008年7月12日

Anjuta IDE 的DEBUG 菜单哪里去了??

摘要: 在 Ubuntu 8.04 LTS 里安装了 Anjuta IDE ,Complier ,Build ,Build Project ,Exectue Program 都可以 ,可是却没有 DEBUG 菜单了? where is DebubItem ???? 阅读全文

posted @ 2008-07-12 15:10 老代哥哥 阅读(274) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 9 10 ··· 17 下一页

导航