05 2013 档案

摘要://构造DataTable DataTable dt=new DataTable("demo"); dt.Columns.Add("pkid",typeof(System.Int32)).Caption="序号"; dt.Columns.Add("user_name", typeof(System.String)).Caption="用户名"; dt.Columns.Add("passwd",typeof(System.String)).Caption="密码&qu 阅读全文
posted @ 2013-05-23 14:19 婴年早肥 阅读(554) 评论(0) 推荐(0)
摘要:namespace Project1{ using System; using System.Collections.Generic; using System.Text; using System.IO; using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; //连接CE设备 public class RAPIInit { public void RapiInit() { int ret = CeR... 阅读全文
posted @ 2013-05-23 14:18 婴年早肥 阅读(526) 评论(0) 推荐(0)
摘要:meta是用来在HTML文档中模拟HTTP协议的响应头报文。meta 标签用于网页的<head>与</head>中,meta 标签的用处很多。meta 的属性有两种:name和http-equiv。name属性主要用于描述网页,对应于content(网页内容),以便于搜索引擎机器人查找、分类(目前几乎所有的搜索引擎都使用网上机器人自动查找meta值来给网页分类)。这其中最重要的是description(站点在搜索引擎上的描述)和keywords(分类关键词),所以应该给每页加一个meta值。比较常用的有以下几个: name 属性 1、<meta name=&quo 阅读全文
posted @ 2013-05-23 13:57 婴年早肥 阅读(111) 评论(0) 推荐(0)
摘要:<div> <mce:script language="javascript" type="text/javascript"><!--function convertCurrency(currencyDigits) {// Constants:var MAXIMUM_NUMBER = 99999999999.99;// Predefine the radix characters and currency symbols for output:var CN_ZERO = "零";var CN_ONE = 阅读全文
posted @ 2013-05-23 13:56 婴年早肥 阅读(236) 评论(0) 推荐(0)
摘要:/// <summary> /// 转换数字金额主函数(包括小数) /// </summary> /// <param name="str">数字字符串</param> /// <returns>转换成中文大写后的字符串或者出错信息提示字符串</returns> public string ConvertSum(string str) { if (!IsPositveDecimal(str)) return "格式错误!"; if (Double.Parse(str) > 99 阅读全文
posted @ 2013-05-23 13:54 婴年早肥 阅读(385) 评论(0) 推荐(0)
摘要:在页面添加<metahttp-equiv="PRAGMA"content="NO-CACHE"><basetarget="_self"/> 阅读全文
posted @ 2013-05-23 13:53 婴年早肥 阅读(107) 评论(0) 推荐(0)
摘要:/* Ext中文字体修正补丁。 ajaxjs.com Ext中文网*/.x-window-header-text, x-panel-header-text{ font-size:9pt!important;}.x-panel-header-text, .x-window-header-text{ font-size:9pt!important;}/* -------End-----Ext 4.0 中文字体修正补丁。----*/ 阅读全文
posted @ 2013-05-23 13:52 婴年早肥 阅读(206) 评论(0) 推荐(0)
摘要:获取PC上的绝对路径string appPath =Application.StartupPath;//获取路径INIFile ini = new INIFile(appPath + @"\config.ini");获取移动设备开发中的绝对路径string appPath =System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);//获取路径INIFile ini = new INIFile(appPath + @"\ 阅读全文
posted @ 2013-05-23 13:51 婴年早肥 阅读(153) 评论(0) 推荐(0)
摘要:select tablename, ltrim(max(sys_connect_by_path(fieldname, ',')), ',') as fields from (select tablename, fieldname, rnFirst, lead(rnFirst) over(partition by tablename order by ordernumber asc) rnNext from (select a.tablename, ... 阅读全文
posted @ 2013-05-23 13:43 婴年早肥 阅读(175) 评论(0) 推荐(0)
摘要:遇到的第一个问题:iis7管理介面,在设置主机头时,报告如下错误:文件名:xx\xx\xxx\web.config行号:133错误:无法读取配置节"system.web.extensions",因为它缺少节声明上网查了,老外也遇到这样的问题:Line number: 154Error: The configuration section 'system.web.extensions' cannot be read because it is missing a section declaratiohttp://our.umbraco.org/forum/ge 阅读全文
posted @ 2013-05-23 13:42 婴年早肥 阅读(1363) 评论(0) 推荐(0)
摘要:--在数据量非常大的表中快速删除记录的方法:--设置每次删除100条记录:SET ROWCOUNT 100WHILE 1 = 1BEGIN DELETE FROM [需要删除的表名称] WHERE [删除条件] IF @@rowcount < 100 BREAKENDSET ROWCOUNT 0--收缩数据库(如果需要):DBCC SHRINKDATABASE (数据库名称)--最好把数据库->属性->选项中的故障还原模型设为[简单] 阅读全文
posted @ 2013-05-23 13:41 婴年早肥 阅读(629) 评论(0) 推荐(0)
摘要:1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。2.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如:select id from t where num is null可以在num上设置默认值0,确保表中num列没有null值,然后这样查询:select id from t where num=03.应尽量避免在 where 子句中使用!=或<>操作符,否则将引擎放弃使用索引而进行全表扫描。4.应尽量避免在 where 子句中使用 or 来连接条件,否则将导致引擎 阅读全文
posted @ 2013-05-23 13:36 婴年早肥 阅读(112) 评论(0) 推荐(0)
摘要:1.document.formName.item("itemName") 问题说 明:IE下,可以使用document.formName.item("itemName")或document.formName.elements ["elementName"];Firefox下,只能使用document.formName.elements["elementName"].解决方法:统一使用document.formName.elements["elementName"].2.集合类对象问题说明:IE下 阅读全文
posted @ 2013-05-23 13:35 婴年早肥 阅读(103) 评论(0) 推荐(0)
摘要:在某些情况下,有些浏览器会把多个XMLHttpRequest请求的结果缓存在同一个URL。如果对第个请求的响应不同,这就会带来不好的结果。把当前时间戳追加到URL的最后,就能确保URL的唯一性,从而避免浏览器缓存结果。 阅读全文
posted @ 2013-05-23 13:33 婴年早肥 阅读(167) 评论(0) 推荐(0)