首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
上一页 1 ··· 4 5 6 7 8 9 10 11 下一页

2010年5月21日

摘要: <script>function Preview(){ var TestWin=open(''); TestWin.document.write(code.value);}</script><textarea id=code cols=60 rows=15><!--示范:可以换成随意JS--><!--根据连接速度选择地址访问--><script>i=1var autourl=new Array()autourl[1]="http://www.cnblogs.com/dachie" < 阅读全文

posted @ 2010-05-21 16:14 达奇 阅读(227) 评论(0) 推荐(1) 编辑

摘要: 实用JS代码大全事件源对象 event.srcElement.tagName event.srcElement.type 捕获释放 event.srcElement.setCapture(); event.srcElement.releaseCapture(); 事件按键 event.keyCode event.shiftKey event.altKey event.ctrlKey 事件返回值 event.returnValue 鼠标位置 event.x event.y 窗体活动元素 document.activeElement 绑定事件 document.captureEvents(E... 阅读全文

posted @ 2010-05-21 15:53 达奇 阅读(528) 评论(0) 推荐(1) 编辑

摘要: 操作系统进程描述system process进程文件: [system process] or [system process]进程名称: Windows内存处理系统进程描述: Windows页面内存管理进程,拥有0级优先。是否为系统进程: 是alg.exe进程文件: alg or alg.exe进程名称: 应用层网关服务描述: 这是一个应用层网关服务用于网络共享。是否为系统进程: 是csrss.exe进程文件: csrss or csrss.exe进程名称: Client/Server Runtime Server Subsystem描述: 客户端服务子系统,用以控制Windows图形相关子 阅读全文

posted @ 2010-05-21 15:49 达奇 阅读(289) 评论(0) 推荐(0) 编辑

摘要: Base64加密解密using System;using System.Collections.Generic;using System.Text;namespace Dachie{ class Program { static void Main(string[] args) { string temp = "我是中国人"; string jiami = EncodeBase64(temp); string jiemi = DecodeBase64(jiami); ... 阅读全文

posted @ 2010-05-21 13:27 达奇 阅读(273) 评论(0) 推荐(0) 编辑

摘要: 下列语句部分是Mssql语句,不可以在access中使用。SQL分类: DDL—数据定义语言(CREATE,ALTER,DROP,DECLARE) DML—数据操纵语言(SELECT,DELETE,UPDATE,INSERT) DCL—数据控制语言(GRANT,REVOKE,COMMIT,ROLLBACK)首先,简要介绍基础语句:1、说明:创建数据库CREATE DATABASE database-name 2、说明:删除数据库drop database dbname3、说明:备份sql server--- 创建 备份数据的 deviceUSE masterEXEC sp_addumpdevi 阅读全文

posted @ 2010-05-21 09:20 达奇 阅读(205) 评论(0) 推荐(1) 编辑

摘要: C#生成缩略图 /// <summary> /// 生成缩略图 /// </summary> /// <param name="originalImagePath">源图路径(物理路径)</param> /// <param name="thumbnailPath">缩略图路径(物理路径)</param> /// <param name="width">缩略图宽度</param> /// <param name="heigh 阅读全文

posted @ 2010-05-21 09:17 达奇 阅读(315) 评论(0) 推荐(1) 编辑

2010年5月20日

摘要: ASP.NET验证码(非常好用)using System;using System.Collections.Generic;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Drawing;using System.Drawing.Drawing2D;using System.IO;using System.Drawing.Imaging;namespace Dachie{ public partial class _Default : System.Web.UI.Page ... 阅读全文

posted @ 2010-05-20 14:27 达奇 阅读(430) 评论(1) 推荐(2) 编辑

摘要: C#测试代码效率的方法using System;using System.Threading;class Dachie{ [System.Runtime.InteropServices.DllImport("Kernel32.dll")] static extern bool QueryPerformanceCounter(ref long count); [System.Runtime.InteropServices.DllImport("Kernel32.dll")] static extern bool QueryPerformanceFreque 阅读全文

posted @ 2010-05-20 13:55 达奇 阅读(425) 评论(0) 推荐(1) 编辑

摘要: C#复制整个目录using System;using System.Collections.Generic;using System.Text;using System.IO;namespace Dachie{ class Program { static void Main(string[] args) { DirectoryCopy(@"C:\Users\Administrator\Desktop\EditGridviewCells", @"C:\Users\Administrator\Desktop\新建文件夹", true)... 阅读全文

posted @ 2010-05-20 13:10 达奇 阅读(661) 评论(0) 推荐(2) 编辑

摘要: 这三个对象我们在开发Asp.net程序时经常会用到,似乎很熟悉,但有时候又不太确定。本文通过一个简单的例子来直观的比较一下这三个对象的使用。HttpModule:Http模块,可以在页面处理前后、应用程序初始化、出错等时候加入自己的事件处理程序HttpHandler:Http处理程序,处理页面请求HttpHandlerFactory:用来创建Http处理程序,创建的同时可以附加自己的事件处理程序例子很简单,就是在每个页面的头部加入一个版权声明。一、HttpModule这个对象我们经常用来进行统一的权限判断、日志等处理。例子代码: public class MyModule : IHttpMod 阅读全文

posted @ 2010-05-20 12:49 达奇 阅读(283) 评论(0) 推荐(2) 编辑

摘要: datagridview某列格式化成两位小数.............................................................................................................................................................datagridView.columns[i]/defaultCellStyle.Format='f";------------------------------------------------------------ 阅读全文

posted @ 2010-05-20 12:42 达奇 阅读(1808) 评论(0) 推荐(1) 编辑

2010年5月19日

摘要: ASP.NET探针获取IP Request.ServerVariables["LOCAL_ADDR"].ToString() 获取域名 Request.ServerVariables["SERVER_NAME"].ToString() 获取语言 Request.ServerVariables["HTTP_ACCEPT_LANGUAGE"].ToString() 获取端口 Request.ServerVariables["SERVER_PORT"].ToString() IIS版本 Request.ServerVar 阅读全文

posted @ 2010-05-19 18:07 达奇 阅读(301) 评论(0) 推荐(1) 编辑

摘要: 操作Cookie/// <summary> /// 保存一个Cookie /// </summary> /// <param name="CookieName">Cookie名称</param> /// <param name="CookieValue">Cookie值</param> /// <param name="CookieTime">Cookie过期时间(小时),0为关闭页面失效</param> public void SaveC 阅读全文

posted @ 2010-05-19 17:47 达奇 阅读(299) 评论(0) 推荐(1) 编辑

摘要: 在数据库编程中我们经常用到连接字符串,针对不同的数据库有不同的连接字符串方法1.新建一个文本文件,把后缀名改成*.udl,双击打开按照提示完成里面的操作,然后测试连接,成功后关闭,在用记事本打开,呵呵,里面就有连接字符2.http://www.connectionstrings.com/ 阅读全文

posted @ 2010-05-19 17:46 达奇 阅读(231) 评论(0) 推荐(1) 编辑

摘要: 开始---运行---键入 regedit 注册表打开后,展开至 HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\TrayNotify 在右边的窗格中把 IconStreams 和 PastIconsStream 的值删除。 然后同时按下DEL+ALT+CTRL键,或或者右击任务栏/任务管理器,打开任务管理器,在进程标签中选择结束EXPLORER进程。 然后,单击任务管理器的应用程序标签,点击新建任务按钮,在出来的对话框中输入EXPLORER,确定既可。重新打开 customize notifiction 阅读全文

posted @ 2010-05-19 17:36 达奇 阅读(853) 评论(0) 推荐(1) 编辑

摘要: 比较两个DataSet,并产生增量数据/// <summary> /// 比较两个DataSet,并产生增量数据 /// </summary> /// <param name="oldDataSet">原始DataSet</param> /// <param name="nowDataSet">现有DataSet</param> /// <param name="primaryKey">原始DataSet和现有DataSet Tables[0]的主键& 阅读全文

posted @ 2010-05-19 17:34 达奇 阅读(574) 评论(2) 推荐(2) 编辑

摘要: 查询数据库所有表名并插入XML #region 把查出来的表存起来 try { conn.Open(); SqlCommand comm = new SqlCommand("select name from sysobjects where type='U'", conn); dr = comm.ExecuteReader(); for (int i = 0; i < j; i++) { while (dr.Rea... 阅读全文

posted @ 2010-05-19 17:33 达奇 阅读(217) 评论(0) 推荐(1) 编辑

摘要: 网页复制保留版权JSdocument.body.oncopy=function(){ event.returnValue=false; var t=document.selection.createRange().text; var s="\r\n本文来源于 达奇-方向比努力更重要 http://dachie.cnblogs.com \r\n 转载请保留版权"; clipboardData.setData('Text','\r\n'+t+'\r\n'+s+'\r\n');}把以上javascript代码 放到一 阅读全文

posted @ 2010-05-19 17:29 达奇 阅读(278) 评论(0) 推荐(1) 编辑

摘要: 算法归纳递归法转换整数为字符void convert(int n){int t;if((t=n/10)!=0)convert(t);putch(n%10+'0');}判断素数int isPrime(int n){int i;for(i=2;i<n/2;i++)if(n%i==0) return 0;return 1;}求闰年if((year%4==0&year%100!=0)||(year%400)==0)printf("%d is a leap year",year);elseprintf("%d is not a leap yea 阅读全文

posted @ 2010-05-19 17:26 达奇 阅读(195) 评论(0) 推荐(1) 编辑

摘要: C#操作注册表using Microsoft.Win32; public void SetStartPage(string StartPage) { RegistryKey rk0 = Registry.CurrentUser; RegistryKey rk1 = rk0.OpenSubKey("Software", true); RegistryKey rk2 = rk1.OpenSubKey("Microsoft", true); RegistryKey rk3 = rk2.OpenSubKey("Internet Exp... 阅读全文

posted @ 2010-05-19 17:26 达奇 阅读(204) 评论(0) 推荐(1) 编辑

上一页 1 ··· 4 5 6 7 8 9 10 11 下一页