- 博客(18)
- 资源 (4)
- 收藏
- 关注
转载 SAF 中缓存服务的实现
我们经常需要在应用程序中缓存一些常用数据供全局使用以提升性能。如果需要缓存的对象类型和数目是固定的,我们可能会直接将其声明为static;如果我们需要缓存的对象类型和数目是不定的,我们可能会借助一个static Hashtable来实现。但是Hashtable有个缺陷:它没有层次结构,它总是以键/值的形式来存储数据,一个Key对应一个Value,如果我们想获取相关联的一组数据就会比较困难了。
2009-03-12 14:15:00
496
原创 简单圆角·····
style>....spiffy{...}{display:block} .spiffy *{...}{ display:block; height:1px; overflow:hidden; font-size:.01em; background:#CC0000} .spiffy1{...}{ margin-left:3
2008-02-02 17:20:00
391
原创 .net 远程关机代码
System.Management.ConnectionOptions options = new System.Management.ConnectionOptions (); options.Username = "administrator"; //用户名 options.Password ="mx"; //用户口令 try ..
2008-02-02 14:49:00
1391
2
原创 正则 简单学习
那个黑框白心 是 /b /**//// /// 日期转换匹配 /// public static void Main() ...{ //匹配字符串 例如 1/30/2008 String ZipRegex = @"(?d{1,2})/(?d{1,2})/(?d{4})"
2008-01-30 11:06:00
428
原创 Remoting 简单应用
听说 Remoting可以让服务器主动发出事件······搞了好久· 偶还不懂···· 继续努力····不多还是稍微学到了一点服务其端 using System;using LiTianPing.DBUtility;using System.Runtime.Remoting;using System.Runtime.Remoting.Channels;using System
2008-01-27 16:33:00
436
原创 委托 事件 代码理解
理解 事件委托后 直接写的简单代码··using System;/// /// 事件 委托 简单应用/// public class key:EventArgs{ private string _name; public key(string name) { this._name = name; } public string Nam
2008-01-27 15:44:00
470
原创 设计模式-----观察者模式
//观察者 如果增加观察者只要 实现接口IObserver 然后注册Register() 你要增加的观察者即可以···· 不需要的时候注销即可UnRegister()`````//被观察者 要实现接口 IObservable 然后增加 遍历通知注册的观察者即可NotifyObservers()//“观察者”接口 public interface IObserver...{ voi
2008-01-27 15:39:00
392
原创 设计模式-----抽象工厂
// 抽象工厂设计模式 如果有新的餐厅的加入 只需要在新建个Restaurant继承 的方法及他们的子类方法·using System;using System.Reflection;//简单抽象工厂模式 namespace Jurassic.Training.AbstractFactory...{ /**//// /// 餐厅类抽象工厂 ///
2008-01-27 15:34:00
391
原创 设计模式-----简单工厂
在网上看到的资料 ····· ··收集下//根据需求 的变化只要在 NameFactory中添加相应的属性,然后添加他的一个子类;然后更改Factory中的方法;客户直接调用 不用了解其中的变化using System;using System.Collections.Generic;using System.Text;//简单工厂=======================
2008-01-27 15:28:00
363
原创 注册 用户名字的验证````
protected bool checkzhanhao(string zhanghao) ...{ bool va = true; if (zhanghao.Length == 0) ...{ Response.Write("不能为空"); va = false; } else
2007-12-08 15:36:00
908
原创 一般身份证验证
using System.Text;/**//// /// personcard 的摘要说明/// public class personcard...{ public personcard() ...{ // // TODO: 在此处添加构造函数逻辑 // } public iddataclass checkcidinfo(s
2007-12-08 15:32:00
672
原创 省市二级联动 和省市县三级联动
省市二级联动 html页script language="javascript" src="js/city.js">script> 省 select id="province" name="province" onchange="select()"> select> 城市 select name="city
2007-11-16 17:43:00
30969
2
原创 投票系统--自己写很失败,遭大多数人鄙视。
这个投票系统 看上去很严密 实际用了 我才知道它是不堪一击的 投票也加了验证码但是还是很失败 public string toupiao(int id) ...{ DateTime d = (DateTime)LiTianPing.DBUtility.DbHelperSQL.GetSingle("select max(datatime) from per_ip_te
2007-11-14 15:26:00
804
原创 自己认为比较好的分页
前台代码 htmlscript type="text/javascript">function pager(fullUrl,currentPage,maxPage) ...{ document.write(""); if (currentPage==1)...{ document.write("9 "); do
2007-11-14 11:16:00
513
原创 小偷程序--火车票和天气预报
火车票protected void Button1_Click(object sender, EventArgs e) ...{ WebRequest req = WebRequest.Create("http://search.huochepiao.com/chaxun/result.asp?txtChuFa=" + Server.UrlEncode(TextBox1
2007-11-13 20:48:00
598
原创 人老了 记性不好了
1img src="hello.gif" alt="hello" onerror="this.src=error.gif" />技巧:图片使网站丰富起来,但有的时候不是所有图片都能正常显示的。这个时候会出现一个或多个红叉叉,这个技巧是告诉你如何处理的。2. 限制ie后退 javascript:window.history.forward(1); //-
2007-11-13 09:57:00
570
转载 验证码--汉字
using System.Drawing;using System.IO;using System.Text;public partial class check : System.Web.UI.Page...{ private void Page_Load(object sender, System.EventArgs e) ...{ //获取GB2312编码页(表
2007-11-13 09:41:00
632
原创 验证码--数字和英文
哪别人的 呵呵 类文件using System;using System.Web;using System.IO;using System.Drawing;/**//**//**//// /// VerifyCode 的摘要说明。/// public class VerifyCode...{ // Properties 验证码长度(默认4个验证码的长度)#region
2007-11-13 09:38:00
1024
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人