工程是一门科学,科学是严谨的。
摘要: # By default Redis does not run as a daemon. Use 'yes' if you need it.# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.#Redis默认不是以守护进程的方式运行,可以通过该配置项修改,使用yes启用守护进程daemonize no# When running daemonized, Redis writes a pid file in /var/run/redis.pid by# default. You 阅读全文
posted @ 2014-04-10 17:54 大圣的笑 阅读(3045) 评论(0) 推荐(1) 编辑
摘要: function getvl(name) {var reg = new RegExp("(^|\\?|&)"+ name +"=([^&]*)(\\s|&|$)", "i");if (reg.test(location.href)) return unescape(RegExp.$2.replace(/\+/g, " "));return "";}; 阅读全文
posted @ 2014-03-13 16:47 大圣的笑 阅读(219) 评论(0) 推荐(0) 编辑
摘要: select distinct pipeId=substring(a.PipeIn,b.number,charindex(',',a.PipeIn+',',b.number)-b.number)from B_PipeSet_Info ajoin master..spt_values b on b.type='P'where charindex(',',','+a.PipeIn,b.number)=b.number 阅读全文
posted @ 2014-03-05 11:57 大圣的笑 阅读(1021) 评论(0) 推荐(0) 编辑
摘要: /// /// 读取Excel表每一行第一列的字符串集合 /// /// 文件路径 /// private string[] ExcelReader(string filePath) { List result = new List(); string connStr = "Provider=Microsoft.Ace.OleDb.12.0;data source=" + filePath + ";Extended Properties='Excel ... 阅读全文
posted @ 2014-02-08 17:38 大圣的笑 阅读(876) 评论(0) 推荐(0) 编辑
摘要: public class WaveHelper { /// /// 数据流 /// private Stream m_WaveData; private bool m_WaveBool = false; private RIFF_WAVE_Chunk _Header = new RIFF_WAVE_Chunk(); private Format_Chunk _Format = new Format_Chunk(); private Fact_Chunk _Fac... 阅读全文
posted @ 2013-12-26 20:43 大圣的笑 阅读(1545) 评论(0) 推荐(0) 编辑
摘要: Date.prototype.format = function(format){ var o = { "M+" : this.getMonth()+1, //month "d+" : this.getDate(), //day "h+" : this.getHours(), //hour "m+" : this.getMinutes(), //minute "s+" : this.getSeconds(), //second "q+" : Math.floor((this. 阅读全文
posted @ 2013-12-13 09:45 大圣的笑 阅读(216) 评论(0) 推荐(0) 编辑
摘要: /// /// GB2312转换成UTF8 /// /// /// public static string gb2312_utf8(string text) { //声明字符集 System.Text.Encoding utf8, gb2312; //gb2312 gb2312 = System.Text.Encoding.GetEncoding("gb2312"); /... 阅读全文
posted @ 2013-12-10 15:15 大圣的笑 阅读(48264) 评论(0) 推荐(5) 编辑
摘要: namespace mynamespace { public delegate void methodDelegate(object o); public class TimerHandler { private static methodDelegate _method; private static methodDelegate method { get { return _method; } } private static Timer _timer = null; ... 阅读全文
posted @ 2013-10-30 11:07 大圣的笑 阅读(241) 评论(0) 推荐(0) 编辑
摘要: SQL Server:create function fun_getPY(@str nvarchar(4000))returns nvarchar(4000)asbegindeclare @word nchar(1),@PY nvarchar(4000)set @PY=''while len(@st... 阅读全文
posted @ 2013-10-18 18:15 大圣的笑 阅读(2087) 评论(0) 推荐(0) 编辑
摘要: 1 /// 2 /// 扩展类 3 /// 4 public static class Extend 5 { 6 /// 7 /// 扩展Join方法 8 /// 把数组分割 9 /// 截取最后一位10 /// 11 /// 12 /// 间隔符号13 /// 数组14 /// 15 public static string E_Join(this string [] value,string... 阅读全文
posted @ 2013-08-19 14:50 大圣的笑 阅读(313) 评论(0) 推荐(0) 编辑