摘要: MySQL一窍不通啊,今天工作上需要用到,请教了别人,做以备忘 DROP PROCEDURE test_insert ; DELIMITER ;; CREATE PROCEDURE test_insert () BEGIN DECLARE i INT DEFAULT 0; WHILE i<10 DO INSERT INTO CMS.CMS_Module ( ModuleType, Mod... 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(6724) 评论(0) 推荐(0) 编辑
摘要: Set ExcelApp = CreateObject("Excel.Application") Set ExcelSheet = createobject("Excel.Sheet") ExcelSheet.ActiveSheet.Cells(1,1).Value = "My Vbscript" ExcelSheet.SaveAs("C:\111.XLS") ExcelSheet.Applica... 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(337) 评论(0) 推荐(0) 编辑
摘要: 将DLL合并到exe中 需要用到 ILmerge.exe(600K) 软件 微软出品 下载地址:http://www.microsoft.com/downloads/en/details.aspx?FamilyID=22914587-B4AD-4EAE-87CF-B14AE6A939B0&displaylang=en 注意:语法要将exe文件放在前面 C:\Program Files (x... 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(408) 评论(1) 推荐(0) 编辑
摘要: Emit就是快啊,我有做测试 30000条数据,直接发射的话7秒多,Emit1.2秒左右 先记下来,有空了研究 public static class NewClas { public static List<T> ToList<T>(DataTable dt) { List<T> list = new List<T>(); if (dt =... 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(731) 评论(0) 推荐(0) 编辑
摘要: 一直对正则匹配替换稀里糊涂的,这次做了一个测试,把问题搞明白 记录一下 string regexString = "(匹配)"; string regexContent = "做一个测试,匹配三次,匹配的是'匹配'两个字本身'"; public void Main() { Regex regex = new Regex(regexString, RegexOptions.Singleli... 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(234) 评论(0) 推荐(0) 编辑
摘要: (function () { var resolution = "分辨率:" + window.screen.width + "*" + window.screen.height; alert(resolution); })(); (function () { var ua = window.navigator.userAgent; var osVersion = ua.split(";"... 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(378) 评论(0) 推荐(0) 编辑
摘要: 前一篇IEnumerable和IEnumerator的理解[原]介绍了这两个接口用来实现foreach 其实还可以用yield return 直接上代码和结果 一下为摘录的一部分,yield return对比前一篇 1。代码很简洁。其实这里多了一个yield return 语句,由于yield return 并不对应多余的il指令。所以编译器就会在编译的时候,生成一个实现Ienumator接口的类... 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(527) 评论(0) 推荐(0) 编辑
摘要: 其实本质上就是把远程的图片Stream流下载到本地,用pictureBox展示出来而已 带上cookie,这样就可以肉眼识别 代码很简单,直接上了 前台也就是一个pictureBox控件 AutoLoginHelper autoLoginHelper=new AutoLoginHelper(Encoding.UTF8); CookieContainer cc=new CookieContaine... 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 在现实应用中,对于集合以及枚举这些集合的需求非常普遍, 因此在.NET中集合所依赖的接口被设计为公共的。想要实现对象的枚举就必须继承IEnumerable接口。 public interface IEnumerable { public IEnumerator GetEnumerator(); } 它只有一个成员:GetEnumerator方法。该方法返回一个世纪的枚举器(enumerator)... 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(348) 评论(0) 推荐(0) 编辑
摘要: 扩展方法是C# 3.0中新加入的特性。MSDN中对扩展方法的定义是:扩展方法使您能够向现有类型“添加”方法,而无需创建新的派生类型、重新 编译或以其他方式修改原始类型。 扩展方法是静态方法~并且第一个参数要用this修饰~这个方法将作为第一个参数也就是带this参数的类的一个扩展方法~ 定义如下 调用方法如下,就跟调用本身方法一样 显示结果如下 下面是对编写扩展方法要注意的几个原则(当然,仁者见仁... 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(176) 评论(0) 推荐(0) 编辑
摘要: <!--转载地址:http://www.cnblogs.com/bluedream2009/archive/2010/07/03/1770578.html--> <!doctype html public "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&g... 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(307) 评论(0) 推荐(0) 编辑
摘要: 首先讲一下UNION的工作原理,当使用UNION语句时,它的功能与在结果集上SELECT DISTINCT类似,也就是说使用UNION时它会首先合并两个结果集,然后执行一个类似于SELECT DISTINCT的操作,以避免重复行的出现。 这个过程在两上结果集没有任何重复行的情况下也会进行DISTINCT处理,所以如果我们确认在UNION的两个结果集确实存在重复行,并且要消除重复行的出现时,就可以... 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(193) 评论(0) 推荐(0) 编辑
摘要: var Tools = { BrowserInfo: function() { var Sys = {}; var ua = navigator.userAgent.toLowerCase(); var s; (s = ua.match(/msie ([\d.]+)/)) ? Sys.ie = s[1] : (s = ua.match(/firefox\/([\d.]+)/)) ? S... 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(212) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Diagnostics; using System.Collections; using System.IO; using System.Net; na... 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(173) 评论(0) 推荐(0) 编辑
摘要: <regex name="Iphone Home Page"><![CDATA[{'OriginalPrice'\:'(?<OriginalPrice>.*?)','FinalPrice'\:'(?<FinalPrice>.*?)','SoldOut'\:'(?<SoldOut>.*?)','DailyDealTotalOriginalPric... 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(335) 评论(0) 推荐(0) 编辑
摘要: 为了达到某种特殊的效果我们需要用Javascript动态的去更改某一个标签的Css属性。比如:鼠标经过一个图片时我们让图片加一个边框,代码可能是这样: JavaScript代码 <script type="text/javascript"> function imageOver(e) { e.style.border="1px solid red"; } function im... 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(214) 评论(1) 推荐(0) 编辑
摘要: 电脑修改了hosts文件,但是就是不管用,好不容易解决了,记录一下 根据微软的相关文档, hosts文件必须是ascii编码方式, 如果你存为unicode格式将不会被正确读取。 回到今天的主话题,修改hosts将域名指向新的ip是总是无法生效, 试过很多办法,问题却依然存在, 于是上微软的网站寻找答案, 最终发现时一个“DNS Client” 服务的问题, “DNS CLient”服务是缓存d... 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(1951) 评论(2) 推荐(0) 编辑
摘要: 很简单,直接上代码 using System; using System.Collections.Generic; using System.Text; using Newtonsoft.Json; namespace TestJson { class Program { static void Main(string[] args) { string json = "{\"a\":\"s... 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(1616) 评论(0) 推荐(0) 编辑
摘要: em这个单位,国人对这个还不太清楚, 这里简要介绍一下. 在国内网站中,包括三大门户,以及“引领”中国网站设计潮流的蓝色理想,ChinaUI等都是使用了px作为字体单位。只有百度好歹做了个可调的表率。而在大洋彼岸,几乎所有的主流站点都使用em作为字体单位,也就是可调的。没错,px比em更加容易使用,大部分读者不知道em为何物或者它相当于多少px。国外人士如此重视网站易用性(Accessibilit... 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(248) 评论(0) 推荐(0) 编辑
摘要: SELECT * from a left join b on a.id=b.id select * from a right join b on a.id=b.id select * from a inner join b on a.id=b.id select * from b inner join a on a.id=b.id select * from a,b where a.id=b.id 阅读全文
posted @ 2010-10-11 14:31 双击 阅读(190) 评论(0) 推荐(0) 编辑