刘sir

春不是叫出来的,是真刀实枪干出来的!

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2013年8月1日

摘要: CSS 格式化ProCSSor - http://procssor.com/CSS 压缩CSS Compressor - http://www.cssdrive.com/index.php/main/csscompressorHTML 格式化Tabifier - http://tools.arantius.com/tabifierHTML 压缩Compress HTML - http://www.textfixer.com/html/compress-html-compression.phpJavascript 格式化Online javascript beautifier - http:// 阅读全文
posted @ 2013-08-01 10:44 刘sir~ 阅读(288) 评论(0) 推荐(0) 编辑

2013年7月29日

摘要: ctrl+shift+x 转为大写 ctrl+shift+y 转为小写 阅读全文
posted @ 2013-07-29 10:24 刘sir~ 阅读(597) 评论(0) 推荐(0) 编辑

2013年7月24日

摘要: 当IE浏览器遇到脚本错误时浏览器,左下角会出现一个黄色图标,点击可以查看脚本错误的详细信息,并不会有弹出的错误信息框。当我们使用 WebBrowser控件时有错误信息框弹出,这样程序显的很不友好,而且会让一些自动执行的程序暂停。我看到有人采取的解决方案是做一个窗体杀手程序来关闭弹出的窗体。今天探讨的方法是从控件解决问题。1、SHDocVw.dll在COM时代我们使用的WebBrowser控件是SHDocVw.dll。屏蔽错误信息的方法很简单使用下面的一句就可以搞定。WebBrowser1.Silent = true; 2、.Net中在.Net中提供了托管的WebBrowser可供我们使用,当. 阅读全文
posted @ 2013-07-24 17:42 刘sir~ 阅读(453) 评论(1) 推荐(0) 编辑

摘要: var iframes=document.getElementsByTagName("iframe"); for(var i=0;i<iframes.length;i++) { alert(iframes[i].id); } 阅读全文
posted @ 2013-07-24 11:13 刘sir~ 阅读(4354) 评论(0) 推荐(0) 编辑

2013年7月23日

摘要: public static class WebBrowserExtensions { public static void SuppressScriptErrors(this WebBrowser webBrowser, bool hide) { FieldInfo fiComWebBrowser = typeof(WebBrowser).GetField("_axIWebBrowser2", BindingFlags.Instance | BindingFlags.NonPublic); if (fiComWebB... 阅读全文
posted @ 2013-07-23 16:57 刘sir~ 阅读(331) 评论(0) 推荐(0) 编辑

2013年7月21日

摘要: 最简单的办法:string version = Assembly.GetExecutingAssembly().GetName().Version.ToString();方法一:public void GetFileVersion() {FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo(Path路径字符串);string AssmblyVersion=myFileVersionInfo.FileVersion;}方法二:[assembly: AssemblyTitle("")][assemb 阅读全文
posted @ 2013-07-21 18:05 刘sir~ 阅读(1847) 评论(0) 推荐(0) 编辑

摘要: // Get Stream of the filefileReader = new StreamReader(File.Open(this.FileName, FileMode.Open));FileInfo fileInfo = new FileInfo(this.FileName);long bytesRead = 0;// Change the 75 for performance. Find a number that suits your application bestint bufferLength = 1024 * 75;while (!fileReader.EndOfStr. 阅读全文
posted @ 2013-07-21 14:11 刘sir~ 阅读(440) 评论(0) 推荐(0) 编辑

摘要: 次线程不能直接修改主线程UI的界面,需要使用以下方法this.Dispatcher.Invoke(DispatcherPriority.Normal,new Action(() =>{ //调用主线程UI的的代码 }));如:void LoadFile() { try { if (string.IsNullOrEmpty(filename)) { //加载建设中 return; ... 阅读全文
posted @ 2013-07-21 12:59 刘sir~ 阅读(776) 评论(0) 推荐(0) 编辑

2013年7月20日

摘要: 乱码问题关键代码:先转成gb2312,最后再转回$name=iconv("UTF-8","gb2312", $name);move_uploaded_file($tmpname, $this->final_file_path);$name=iconv("gb2312","UTF-8", $name); 阅读全文
posted @ 2013-07-20 23:13 刘sir~ 阅读(171) 评论(0) 推荐(0) 编辑

2013年7月3日

摘要: function generateRandomString($length = 10) { $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $randomString = ''; for ($i = 0; $i < $length; $i++) { $randomString .= $characters[rand(0, strlen($characters) - 1)]; } return $randomString;}function ... 阅读全文
posted @ 2013-07-03 10:49 刘sir~ 阅读(492) 评论(0) 推荐(0) 编辑