07 2016 档案

摘要:str="A B C D E F"; str = new System.Text.RegularExpressions.Regex("[\\s]+").Replace(str, " "); //结果 //# A B C D E F 阅读全文
posted @ 2016-07-26 13:39 游子善心 阅读(10) 评论(0) 推荐(0)
摘要:DirectoryInfo TheFolder=new DirectoryInfo(folderFullName); //遍历文件夹 foreach(DirectoryInfo NextFolder in TheFolder.GetDirectories()) this.listBox1.Items 阅读全文
posted @ 2016-07-25 20:33 游子善心 阅读(24) 评论(0) 推荐(0)
摘要:方式一: AttributeRouting(第三方) 主要是实现Web Api Attribute路由的功能 对应的还有 Mvc 版。 AttributeRouting for GitHub 参考(不是很好): http://www.cnblogs.com/n-pei/archive/2012/07 阅读全文
posted @ 2016-07-22 14:29 游子善心 阅读(7) 评论(0) 推荐(0)
摘要:public async Task<HttpResponseMessage> Images() { // 检查是否是 multipart/form-data if (!Request.Content.IsMimeMultipartContent("form-data")) throw new Htt 阅读全文
posted @ 2016-07-20 15:03 游子善心 阅读(12) 评论(0) 推荐(0)
摘要:Adding a website to the Start menu by using the pinned sites APIs Use the window.external.msAddSiteMode() method to add a site to the Start menu. The 阅读全文
posted @ 2016-07-20 09:37 游子善心 阅读(11) 评论(0) 推荐(0)
摘要:nuget (一定是看好了,是WebApi2) Install-Package Autofac.WebApi2 -Version 3.4.0 Application_Start //Autofac var builder = new ContainerBuilder(); // Get your H 阅读全文
posted @ 2016-07-19 12:04 游子善心 阅读(6) 评论(0) 推荐(0)
摘要:不知道为什么,Window Server 时间没有同步,导致 RequestVerificationToke 验证不通过。 原来是 IIS Web 服务器的时间未同步,导致。 谢谢 阅读全文
posted @ 2016-07-18 19:54 游子善心 阅读(6) 评论(0) 推荐(0)
摘要:##JDK 也可参考 http://my.oschina.net/topeagle/blog/484363 wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-coo 阅读全文
posted @ 2016-07-13 18:52 游子善心 阅读(8) 评论(0) 推荐(0)
摘要:确保elasticsearch version 2.x 苦逼的等了几年 POST http://localhost:9200/_reindex { "source": { "index": "index_test_001" }, "dest": { "index": "new_index_test_ 阅读全文
posted @ 2016-07-13 15:44 游子善心 阅读(30) 评论(0) 推荐(0)
摘要:LEN : 1、长度不计算后空格,则计算前空格的长度 2、Unicode 格式不强制计算为双字节,即:select N'ss' //2 DATALENGTH: 1、长度计算前后空格 2、Unicode 格式强制计算为双字节(包括空格也会计算为2个字节),即:select N'ss' //4 阅读全文
posted @ 2016-07-12 17:45 游子善心 阅读(31) 评论(0) 推荐(0)
摘要:只需要在web.config的 system.webServer 添加一下代码即可 <httpProtocol> <customHeaders> <add name="Access-Control-Allow-Origin" value="*" /> <add name="Access-Contro 阅读全文
posted @ 2016-07-12 10:24 游子善心 阅读(6) 评论(0) 推荐(0)
摘要:In Global.asax add the line Application_Start() class: GlobalConfiguration.Configuration.Formatters.XmlFormatter.SupportedMediaTypes.Clear(); In the W 阅读全文
posted @ 2016-07-11 13:24 游子善心 阅读(7) 评论(0) 推荐(0)
摘要:错误信息:未在本地计算机上注册“microsoft.ACE.oledb.12.0”提供程序。 解决办法: 立即下载。然后安装就行了。 阅读全文
posted @ 2016-07-11 09:58 游子善心 阅读(12) 评论(0) 推荐(0)
摘要:1.应尽量避免在 where 子句中使用!=或<>操作符,否则将引擎放弃使用索引而进行全表扫描。 2.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。 3.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引 阅读全文
posted @ 2016-07-08 13:05 游子善心 阅读(33) 评论(0) 推荐(0)
摘要:验证任何一个字符串是否包含QQ号码。 规则: 连续数据,大于4位的,就任何是。 返回值:string //12345,543210,5485654 public static string IgetNumber(string strQq) { var result = string.Empty; c 阅读全文
posted @ 2016-07-07 11:05 游子善心 阅读(4) 评论(0) 推荐(0)
摘要:经典 http://files.cnblogs.com/files/xupng/IoC%E5%AE%B9%E5%99%A8%E5%92%8CDependencyInjection%E6%A8%A1%E5%BC%8F.pdf 阅读全文
posted @ 2016-07-07 09:46 游子善心 阅读(4) 评论(0) 推荐(0)
摘要:ejs-mate NodeJs Express 的一个母版页模块,可以方便的把页面公共部分放入ejs-mate设定的母版页内,代码公用。 官网: Github 安装 ejs-mate: $ npm install ejs-mate --save 在你的任何一个内容页中,比如 index.ejs 内容 阅读全文
posted @ 2016-07-03 22:49 游子善心 阅读(22) 评论(0) 推荐(0)
摘要:下面代码保存 .bat 格式即可 @echo off color 0a title 修改Windows 2003/2008远程桌面服务端口号 echo ******************************************************************* echo * 阅读全文
posted @ 2016-07-01 14:48 游子善心 阅读(14) 评论(0) 推荐(0)