如何在jQuery中使用 setInterval,setTimeout
摘要:当遇到setInterval,setTimeout与jquery混用的问题 时,直接按JavaScript中的语法写并不起作用,有以下两种解决方法。方法1. 直接在ready中调用其他方法,会提示缺少对象的错误,应用jQuery的扩展可以解决这个问题。$(document).ready(function(){$.extend({ show:function(){ alert("ready"); }});setInterval("$.show()",3000);});方法2. 指定定时执行的函数时不要使用引号和括号。function show(){ ale
阅读全文
posted @
2011-06-15 14:11
西湖浪子
阅读(298)
推荐(0)
C# WebRequest发起Http Post请求模拟登陆并cookie处理示例
摘要:CookieContainer cc=new CookieContainer();string url = “http://mailbeta.263.net/xmweb”;HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);request.Method = “POST”;request.ContentType = “application/x-www-form-urlencoded”;request.CookieContainer=cc;string user=”user”; //用户名string pass=”pas
阅读全文
posted @
2011-06-11 11:06
西湖浪子
阅读(696)
推荐(0)
GridView添加统计行.net
摘要:前提:设置属性ShowFooter="True"方法一:使用SQL查询统计出合计值,在绑定GridView时让其结果赋于一个DataTable(全局变量),然后在RowDataBound事件中程序代码:if (e.Row.RowType == DataControlRowType.Footer){e.Row.Cells[0].Text = "合计";e.Row.Cells[3].Text = dtSum.Rows[0][0].ToString();e.Row.Cells[4].Text = dtSum.Rows[0][1].ToString();e.Ro
阅读全文
posted @
2011-06-08 10:43
西湖浪子
阅读(186)
推荐(0)
解决window.showModalDialog在Firefox无法支持
摘要:在网页程序中,有时我们会希望使用者按下按钮后开启一个保持在原窗口前方的子窗口,而在IE中,我们可以使用showModalDialog来达成,语法如下 :vReturnValue = window.showModalDialog(sURL [, vArguments] [, sFeatures]) 范例:window.showModalDialog("openwin.html","Arguments","dialogHeight: 200px; dialogWidth: 200px; dialogTop: 10px; dialogLeft: 10
阅读全文
posted @
2011-05-30 11:20
西湖浪子
阅读(309)
推荐(0)
分享一些我在开发过程中用过的资源 (转)
摘要:以下所提到的控件/组件均为开源或免费的。1,ComboBox控件: Upgrade Your Select Element to a ComboBox2,DateTimePicker控件: GrayMetterSoft3,TabStrip控件: A simple ASP.NET Web TabStrip User Control4,Grid控件: XGrid5,数据结构Tree: A Generic Tree Collection6,csv文件<->DataTable: CSV file parser and writer in C#7,邮件发送: DotNetOpenMail8,
阅读全文
posted @
2011-05-14 00:23
西湖浪子
阅读(217)
推荐(0)
C# Mail POP
摘要:最近在郵件發送失敗率的統計,要從GMail中抓取郵件發送失敗信息;在網上找了一段C#代碼就是抓不到數據using System;using System.Net.Sockets;using System.Net;using System.Security.Cryptography;using System.IO;using System.Data;namespace GetMail{ /// <summary> /// 获取邮件(的)类 /// zgke@sina.com /// qq:116149 /// </summary> public class POP3 {
阅读全文
posted @
2011-05-14 00:02
西湖浪子
阅读(380)
推荐(0)
c#实现动态创建二级域名,比如当用户注册成功后就会给他一个网址http://name.site.com,博客网站上都有这种功能.
摘要:第一步:把域名设置成泛解析. 就是把*.域名 解析到你的主机,是否支持泛解析,请查看你的域名商说明. 第二步:IIS设成的时候不要绑定域名.注意一台服务器里只能有一个站点不绑定域名 就是*.域名的默认访问页. 第三步:默认页里加入以下代码:关键部分如下: string sURL=context.Request.ServerVariables[ "HTTP_HOST "].ToLower(); sURL就是获取的域名部分 . xxx.域名 对应的xxx就是用户名.然后查库里的记录,如xxx对应的是www.csd.net那就就把 它转向到www.csdn.net 或者写一个框架
阅读全文
posted @
2011-04-14 16:20
西湖浪子
阅读(604)
推荐(0)
C#验证码识别类
摘要:usingSystem; usingSystem.Collections.Generic; usingSystem.Text; usingSystem.Collections; usingSystem.Drawing; usingSystem.Drawing.Imaging; usingSystem.Runtime.InteropServices; namespaceBallotAiying2 ...{ classUnCodebase ...{ publicBitmapbmpobj; publicUnCodebase(Bitmappic) ...{ bmpobj=newBitmap(pic);
阅读全文
posted @
2011-04-06 17:05
西湖浪子
阅读(572)
推荐(0)
CSS实现网页内容分页打印
摘要:在需要分页的地方加上“page-break-before:always”或“page-break-after:always”即可,相应的,有两种代码:利用“page-break-before:always”:第一页的内容<p style="page-break-before:always;">第二页的内容</p><p style="page-break-before:always;">第三页的内容</p>利用“page-break-after:alwaysR
阅读全文
posted @
2011-02-18 12:49
西湖浪子
阅读(217)
推荐(1)
sql 还能这样写
摘要:with o as (select orderid,ISNULL(UTaxRate,0) AS UTaxRatefrom [order] (nolock)where sourceid not in (21,22)), l as (select o.orderid,oit.orderlineitemid,cast(o.UTaxRate as decimal(10,8)) as UTaxRate,cast(ISNULL(oit.TaxRate,0) as decimal(10,8)) as LineRatefrom ojoin dbo.Order_Line_Item oi (nolock)on o
阅读全文
posted @
2011-02-17 11:04
西湖浪子
阅读(138)
推荐(0)
安装sql2000: 出现 A previous program installation created pending file operations on the installation machine. You must ....
摘要:安装sql2000: 出现 A previous program installation created pending file operations on the installation machine. You must restart the computer before running setup 在安装sql2000会出现这个错误提示. 解决方法: 删除注册表信息: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\ 在右边的窗口中,把PendingFileRenameOperations
阅读全文
posted @
2010-12-20 11:15
西湖浪子
阅读(237)
推荐(0)
ajax的updatepanel 和timer造成的問題
摘要:請問使用ajax的updatepanel 和timer在timer_tick時有時會出現藍色視窗error,內容為...Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server.The status code re...
阅读全文
posted @
2010-10-01 11:00
西湖浪子
阅读(268)
推荐(0)
将文件反序列化为对象
摘要:/// <summary> ///将文件反序列化为对象 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="saveKey"></param> /// <param name="appRoot"></param> //...
阅读全文
posted @
2010-07-07 06:48
西湖浪子
阅读(177)
推荐(0)
Windows API函数大全四
摘要:10. API之硬件与系统函数 ActivateKeyboardLayout 激活一个新的键盘布局。键盘布局定义了按键在一种物理性键盘上的位置与含义 Beep 用于生成简单的声音 CharToOem 将一个字串从ANSI字符集转换到OEM字符集 ClipCursor 将指针限制到指定区域 ConvertDefaultLocale 将一个特殊的地方标识符转换成真实的地方ID CreateCaret ...
阅读全文
posted @
2010-06-27 11:13
西湖浪子
阅读(321)
推荐(0)
Windows API函数大全三
摘要:7. API之位图、图标和光栅运算函数 BitBlt 将一幅位图从一个设备场景复制到另一个 CopyIcon 制作指定图标或鼠标指针的一个副本。这个副本从属于发出调用的应用程序 CopyImage 复制位图、图标或指针,同时在复制过程中进行一些转换工作 CreateBitmap 按照规定的格式创建一幅与设备有关位图 CreateBitmapIndirect 创建一幅与设备有关位图 CreateCo...
阅读全文
posted @
2010-06-27 11:12
西湖浪子
阅读(162)
推荐(0)
Windows API函数大全二
摘要:4. API之打印函数 AbortDoc 取消一份文档的打印 AbortPrinter 删除与一台打印机关联在一起的缓冲文件 AddForm 为打印机的表单列表添加一个新表单 AddJob 用于获取一个有效的路径名,以便用它为作业创建一个后台打印文件。它也会为作业分配一个作业编号 AddMonitor 为系统添加一个打印机监视器 AddPort 启动"添加端口"对话框,允许用户在系统可用端口列表中...
阅读全文
posted @
2010-06-27 11:11
西湖浪子
阅读(231)
推荐(0)
Windows API函数大全一
摘要:1. API之网络函数 WNetAddConnection 创建同一个网络资源的永久性连接 WNetAddConnection2 创建同一个网络资源的连接 WNetAddConnection3 创建同一个网络资源的连接 WNetCancelConnection 结束一个网络连接 WNetCancelConnection2 结束一个网络连接 WNetCloseEnum 结束一次枚举操作 ...
阅读全文
posted @
2010-06-27 11:09
西湖浪子
阅读(183)
推荐(0)
windows锁屏API
摘要:新近找到了windows锁屏API:LockWorkStation于是乎把之前的关屏API整合了一下,弄了个可以选择自动锁屏+关屏的东东。如下代码片段:[代码]需要指出的是,在退出程序时使用Environment.Exit( 0 );而非Application.Exit();否则会出错哦~~提示类似:“***遇到错误,需要关闭”。还有就是修改一下Main:[代码]..如此即...
阅读全文
posted @
2010-06-27 11:01
西湖浪子
阅读(1020)
推荐(0)
RSA Encryption in C#
摘要:What is Encryption?Encryption is the process of converting a string of characters into another such that the original characters cannot be deciphered upon examination. This process is performed with t...
阅读全文
posted @
2010-05-07 16:09
西湖浪子
阅读(501)
推荐(0)
SessionHelper
摘要:这个看介绍,感觉还是一个很不错的类,可是在使用上,我感觉还是有所保留,特别是对于旧项目中要引用这个类,对项目的改动还是会大了些。不管怎么样,以后新的项目可以试试这个类的使用,到时在来详细的介绍一个类如果你想用了解更多的SessionHelper介绍,请点击 using System;using System.Collections.Generic;using System.Web;using S...
阅读全文
posted @
2010-05-06 18:03
西湖浪子
阅读(2299)
推荐(0)