自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(126)
  • 资源 (1)
  • 收藏
  • 关注

原创 正则表达式 平衡组

讲解:http://blog.csdn.net/zm2714/article/details/79464371.匹配嵌套的div:div[^>]*>[^]*(((?'Open'div[^>]*>)[^]*)+((?'-Open'div>)[^]*)+)*(?(Open)(?!))div>2.匹配类似这么的jsonhttp://rate.taobao.com/feed

2013-09-24 16:03:23 1235

原创 外部表不是预期的格式 解决方案

抓取网站的数据 导出到excel中,刚开始还是运行的还顺畅的,但是由于数据过多,开始出现这个错误---“外部表不是预期的格式”百度了下,发现这个是Excel版本问题,我的运行环境是:win7+Office2007using System.Data.OleDb;using System.Data; public void ReadExcelFiless() {

2013-07-19 17:11:43 26959

转载 C#重写WebBrowser组件,禁止跳转到IE新窗口、脚本错误

http://blog.chinaunix.net/uid-16242888-id-146885.html 刚从delphi转到c#,一切重头开始。上来先做个myBrowser,结果发现无法解决跳转到新窗口问题。从网上找到奇客力大侠的《C# webBrowser禁止在新窗口打开,强制在本窗口打开》文章(http://blog.163.com/da7_1@126/blog/static/104072

2013-07-18 14:00:46 4547

原创 获取网站中response.Headers["location"],找到抓取页面

private static string getPageContent(string tastKeyword) { string htmlcontent = ""; HttpWebRequest request = null; HttpWebResponse response = null;

2013-07-13 21:01:59 22582 1

原创 网页内容若使用gzip压缩--获得页面源码

if (String.IsNullOrEmpty(strUrl)) { return "抓取地址为空!"; } HttpWebRequest req = null; HttpWebResponse resp = null; Stream strea

2013-07-08 16:05:16 880

原创 抓取网页中需要的信息,并导出到Excel中

using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Net;using System.IO;using System.Text;using S

2013-06-28 12:12:25 3799 1

原创 div中的文字垂直水平居中

.wrap{ background: #000; width: 500px; height: 500px; color: #fff; display:table-cell; vertical-align: middle; float:right;}.verticalWrap{ position: relative; top: 50%; +top: 100%;}.ver

2013-05-16 11:35:52 1240

原创 CSS控制的内容超过容器宽度后显示省略号

li {width:50px;white-space:nowrap;text-overflow:ellipsis;overflow: hidden;}注:“white-space:nowrap”是强制在一行内显示所有文本,不回行。text-overflow是CSS3新增的属性,IE6以上版本支持。它可以带2个参数:clip [不显示省略标记(...),而是简单的裁切],ell

2013-05-16 10:48:39 643

原创 css继承

前沿教室 welcome everyone 你可以在这里学习到 Html css css初级css中级

2013-05-10 15:22:28 637

原创 jquery1.8.2 在线中文手册

jquery1.8.2 手册 偶然间看到的 觉得不错

2013-04-12 14:39:34 913

原创 用jQuery控制checkbox

<!-- function countChecked() { var n = $("input[type=checkbox]:checked").length; $("span.checked_cnt").text(n + "项已选"); if(n>=2){ $("input[type=checkbox]").each(function(

2013-03-27 15:40:27 685

转载 iBATIS.net调用存储过程

iBATIS.net调用存储过程

2013-03-25 09:04:12 536

转载 收集的材料 关于数据库和抓取器方面的

同事 的博客 里面有很多 不错的东西 值得 我这个水平不高的人学习顺便给他涨个人气 抓取器:C#.NET GB2312编码转化为中文c#验证码下载正则表达式替换---lamda表达式(UniCode编码)去除截取对象中的html代码人人网抓取demodiscuz论坛的抓取玩玩小爬虫——抓取时的几个小细节获取页面源码(自动获取页面的

2013-03-22 15:42:13 545

转载 过滤ilist中的重复数据

using System;using System.Collections.Generic;using System.Linq;using System.Text;/// /// 可以根据字段过滤重复的数据/// /// public class Comparint : IEqualityComparer where T : class, new(){ private

2013-03-19 14:48:43 2617 1

原创 post数据小例

private string getPageContent(string tastKeyword) { string htmlcontent = ""; HttpWebRequest request = null; HttpWebResponse response = null; str

2012-09-29 15:26:10 740

原创 去除字符串中的html标记

正则表达式匹配下html标记 public static string DeleteHTMLElement(string html) { html = Regex.Replace(html, "]*>{1}", "", RegexOptions.IgnoreCase); html = html.Replace("\n", " ");

2012-09-21 10:35:58 556

转载 DOTA中的设计模式

http://www.cnblogs.com/Traxex/archive/2012/07/17/2587916.html

2012-07-31 09:46:44 436

转载 一段最短的代码,用上js所有关键字

newfunction() { dobreak;while(typeofdeletethis); for(vara;void 0;) continue if(null) with(0) try{ switch(1 in1 instanceof1) { casefal

2012-07-30 17:58:22 456

原创 模拟登录(一次自动调转)

class Class3 { public static void A() { HttpWebRequest request = null; HttpWebResponse response = null; string gethost = string.Empty;

2012-07-30 17:27:45 686

原创 抓取网址中的信息(需要解码的)

/// /// 根据任务生成抓取要素 /// protected override void initCrawlerModel(IwomTask taskItem) { crawlerModel = new CrawlerModel(); crawlerModel.Keyword =

2012-07-25 13:59:43 713

原创 调用谷歌的方法输出图表,运行中的结果

报告详情 google.load('visualization', '1', { packages: ['corechart'] }); function drawChart(){ drawColumn('ZChart',['负面','中立','正面'],'一周信息量比较',['#FF0000' ,'#ADADAD' , '#2828FF']

2012-07-24 17:03:24 3944

转载 NHibernate操作多个数据库

http://www.codeproject.com/Articles/14846/Using-NHibernate-with-Multiple-DatabasesNHibernate操作多个数据库的

2012-07-24 16:58:41 944

原创 sql中删除多张表的数据

insert a.id into #kkk select a.id from a,b where a.id=b.iddelete from a where a.id in(select id from #kkk)delete from b where b.id in(select id from #kkk)-------------------------第一句得到两个表里的相同记录并插

2012-07-24 10:36:09 8533

原创 调用 google方法生成饼图、条形图、表格

报告详情 google.load('visualization', '1', { packages: ['corechart']}); function drawChart(){ var bid=document.getElementById("");

2012-07-23 13:45:10 3915 1

原创 NHibernate映射配置

在用NHibernate的时候,当有表中的主键是数据库自动生成的时候(即设置的自增)将使用native。而当是自己填写的时候则需要改为assigned。否则将会出现异常! 以上是映射文件的配置中需要注意的

2012-07-13 17:15:54 436

转载 正则表达式

入门学习正则表达式的最好方法是从例子开始,理解例子之后再自己对例子进行修改,实验。下面给出了不少简单的例子,并对它们作了详细的说明。假设你在一篇英文小说里查找hi,你可以使用正则表达式hi。这几乎是最简单的正则表达式了,它可以精确匹配这样的字符串:由两个字符组成,前一个字符是h,后一个是i。通常,处理正则表达式的工具会提供一个忽略大小写的选项,如果选中了这个选项,它可以匹配hi,HI,

2012-06-28 15:18:35 788

原创 统计网站当天的访问量

///         /// 今日访问人数        ///        public  static int todayCount;        ///         /// 更新今日访问数的标志        ///         static DateTime lastCleanUp;        ///         /// 锁对象

2012-06-13 09:34:19 755

原创 C#中AppDomain.CurrentDomain.BaseDirectory与Application.StartupPath的区别

// 获取程序的基目录。System.AppDomain.CurrentDomain.BaseDirectory// 获取模块的完整路径。System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName// 获取和设置当前目录(该进程从中启动的目录)的完全限定目录。System.Environment.Curr

2012-06-13 09:32:04 21831 1

原创 在线人数统计和总访问量统计

1.新建网站,添加几个窗体。webForm1.aspx ,ViewStateForm.aspx2.在网站的根目录下添加全局应用程序类“Global.aspx” 。(重要)3.在“Global.aspx” 有固有的格式和会话信息结构。4.在“Global.aspx”中各个函数中添加处理代码。详细如下:        void Application_Start(objec

2012-06-12 17:08:23 5623

原创 强类型--验证用户登录次数

static int errorcount = 0;        protected void Button1_Click(object sender, EventArgs e)        {            T_UserTableAdapter adapter = new T_UserTableAdapter();            string name = t

2012-05-22 21:50:40 1229

原创 gridview排序

private void GetDataTablefenye()        {            string srotexp = string.Empty;            if (ViewState["sortexp"] != null)            {                Dictionary dic = (Dictionary)View

2012-04-27 13:57:51 428

原创 javascript window对象

window对象window对象表示整个浏览器窗口,但不必表示内容窗口操作移动或调整浏览器窗口的大小 moveBy(dx,dy):移动x,y个位置  //调整窗体距离屏幕的位置 moveTo(x,y):移动到x,y的位置     //指定窗体距离屏幕的位置 resizeBy(dw,dh):调整dw,dh大小 //调整窗体的大小 reziseTo(

2012-04-19 21:48:28 450

原创 treeview动态绑定

using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Configuration;using System.Data.SqlClient;usin

2012-04-13 14:49:42 378

原创 gridview 中实现的一些常见的功能

using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Data;using System.Data.SqlClient;using System.

2012-04-12 19:53:55 379

原创 jquery 表单验证

.style1 { width: 100%; } function checkidcard(num){ var len = num.length, re; if (len == 15) re = new RegExp(/^(\d{6})(

2012-04-11 21:13:56 421

原创 递归实现treview的数据绑定

using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Data;using System.Data.SqlClient;using System.

2012-04-10 17:48:38 657

原创 数据库导出到xml中

using (SqlConnection sqlCnn = new SqlConnection(str)) { using (SqlCommand sqlCmm = sqlCnn.CreateCommand()) { sqlCmm.CommandText = "select t

2012-04-09 20:43:16 2307

原创 通过AJAX调用页面后台代码方法实现省级三级联动效果 (简单练习)前台

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/1999/xhtml">                     $(function () {         $("#ProvinceList").bind("keyup change", function (e) {

2012-04-07 18:12:59 3338

原创 无刷新页面验证用户是否存在

WebService.cs[WebMethod]    public string SelectUser(string strUser)    {        SqlConnection conn = new SqlConnection(strcon);        SqlCommand cmd = conn.CreateCommand();        cmd.Co

2012-04-06 21:25:49 512

原创 ajak timer

DateTime dt_Sports = Convert.ToDateTime("2012 - 12 - 21");        lblDate.Text = dt_Sports.Subtract(DateTime.Now).ToString();        string[] dd = lblDate.Text.Split('.');        lblDate.Text =

2012-03-23 15:50:02 507

页面的刷新

还可以吧,这是我总结出来的 private void Button1_Click( object sender, System.EventArgs e ) { Response.Redirect( Request.Url.ToString( ) ); }

2011-09-21

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除