![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
【C#】简单Demo实现
idays021
这个作者很懒,什么都没留下…
展开
-
C# 雪花算法
public class SnowflakeTool{ //机器ID 不同的机器存放不同的id 最大现在就是 -1L ^ -1L << workerIdBits; private static long nodeId; private static long twepoch = 687888001020L; //唯一时间,这是一个避免重复的随机量,自行设定不要大于当前时间戳 private static long sequence = 0L; pri.原创 2021-01-13 15:01:45 · 1510 阅读 · 1 评论 -
.net(c#)操作IIS大全
注意使用时要有服务器管理员权限 ,可在Web.config 添加 IISWorkerusing AppMain.model;using System;using System.Collections.Generic;using System.DirectoryServices;using System.Linq;using System.Net;usi翻译 2015-12-09 16:45:30 · 2088 阅读 · 0 评论 -
关于SQL中,C#监视某张表SqlDependency学习笔记
sqlDependency提供了这样一种能力:当被监测的数据库中的数据发生变化时,SqlDependency会自动触发OnChange事件来通知应用程序,从而达到让系统自动更新数据(或缓存)的目的.快速上手可参见园友的下列文章http://www.cnblogs.com/xrinehart/archive/2006/07/27/461106.html .NET 2.0 SqlD翻译 2015-11-05 13:57:41 · 3911 阅读 · 0 评论 -
C# .NET 发送邮件 代码
using Common.Log;using System;using System.Collections.Generic;using System.Linq;using System.Net;using System.Net.Mail;using System.Net.Security;using System.Text;using System.Threading.Tasks翻译 2015-09-28 16:01:50 · 551 阅读 · 0 评论 -
根据URL地址获取网页信息(GET/POST)
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Text;using System.Net;using System.IO;/// ///Class1 的摘要说明/// public class Class1{ public C翻译 2013-03-28 15:51:43 · 1564 阅读 · 0 评论 -
C#遍历访问Dictionary和HashTable
#region Dictionary Dictionary dictionary = new Dictionary(); dictionary.Add(1, "xiaowang"); dictionary.Add(21, "dsd"); dictionary.Add(33, "dsfdfd");翻译 2013-05-24 12:39:06 · 701 阅读 · 0 评论 -
C#HttpHelper类---苏飞版
C#HttpHelper实现了C#HttpWebRequest抓取时无视编码,无视证书,无视Cookie,并且实现的代理的功能,使用它您可以进行Get和Post请求,可以很方便 的设置Cookie,证书,代理,编码问题您不用管,因为类会自动为您识别网页的编码。 这个类是我以前写百度,和网络蜘蛛时使用的,经过上千万个网站的测试,上万个网站抓取的例子总结出来的,中间的方法也是我翻译 2013-03-28 16:04:26 · 3902 阅读 · 0 评论 -
ASP.NET中常用输出JS脚本的类(来自于周公博客)
using System;using System.Collections.Generic;using System.Text;using System.Web;using System.Web.UI;/// /// 一些常用的Js调用/// 采用ClientScript.RegisterStartupScript(string msg)的方式输出,不会改变xhtml的结构,//翻译 2012-08-09 16:14:22 · 676 阅读 · 0 评论 -
C#向前台页面中输出JS代码
//需要注意的是 //当向页面输出带有相同的Type和Key的的参数时可以避免重复输出------------------------------------------------------------------------------------------------------------------------------------------------ //在Updat翻译 2012-08-09 16:03:11 · 775 阅读 · 0 评论 -
DataTable的简单应用
//实例化DataTable DataTable data = new DataTable(); //创建一个名为"ID"的列,值类型为int DataColumn dc1 = new DataColumn("ID", typeof(int)); dc1.AllowDBNull = false;//不允许为空 dc1.翻译 2012-08-09 16:09:11 · 284 阅读 · 0 评论