摘要: 系统版本:[root@localhost~]#lsb_release-aLSBVersion: :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarchDistributorID: CentOSDescription: CentOSrelease5.5(Final)Release: 5.5Codename: Final1.下载sphinx[root@localhost~]#cd/usr/local/srcwgethttp://www.sphinxsearch.com/downloads/sphinx-0.9.9.t 阅读全文
posted @ 2012-10-24 11:58 Rhythmk 阅读(2540) 评论(1) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Diagnostics;using System.Linq;using System.ServiceProcess;using System.Text;using System.Threading.Tasks;using System.IO;using System.Timers;namespace Rhyhtmk.WindowsService{ /* @ blogs: ... 阅读全文
posted @ 2012-10-15 16:36 Rhythmk 阅读(242) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>jQuery中终止Ajax请求</title><meta http-equiv="Content-Type&q 阅读全文
posted @ 2012-10-09 10:13 Rhythmk 阅读(7151) 评论(0) 推荐(0) 编辑
摘要: BookmarksBookmarksWCFWCF理论到实践系列C#ASP.NETSQLmysql ndb集群备份数据库和还原数据库的方法VS测试VS2010自动化测试ORMSmark分布式分布式文件系统及其部署测试如何在LoadRunner测试场景中添加资源监控器MSDN 压力测试MVCASP.NET MVCPro ASP.NET MVC3.0银光Silverlight学习清晰SilverlightMSDN SilverlightWindowPhonewp7有约一起学WP7[MSDN]WP7 开发Silverlight for Windows Phone开发在看起来不错Nokia 文档Wind 阅读全文
posted @ 2012-09-27 10:04 Rhythmk 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 一个cron表达式有至少6个(也可能7个)有空格分隔的时间元素。按顺序依次为秒(0~59)分钟(0~59)小时(0~23)天(月)(0~31,但是你需要考虑你月的天数)月(0~11)天(星期)(1~7 1=SUN 或 SUN,MON,TUE,WED,THU,FRI,SAT)7.年份(1970-2099)其中每个元素可以是一个值(如6),一个连续区间(9-12),一个间隔时间(8-18/4)(/表示每隔4小时),一个列表(1,3,5),通配符。由于"月份中的日期"和"星期中的日期"这两个元素互斥的,必须要对其中一个设置?.0 0 10,14,16 * * 阅读全文
posted @ 2012-09-25 14:56 Rhythmk 阅读(345) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;namespace MoreThread{ internal class Program { private static void Main(string[] args) { TestParallelFor t1 = new TestParallelFor(); t1.DoSomeThing(); ... 阅读全文
posted @ 2012-09-24 17:43 Rhythmk 阅读(167) 评论(0) 推荐(0) 编辑
摘要: public object Clone() { BinaryFormatter Formatter = new BinaryFormatter(null, new StreamingContext(StreamingContextStates.Clone)); MemoryStream stream = new MemoryStream(); Formatter.Serialize(stream, this); stream.Position = 0; object ... 阅读全文
posted @ 2012-09-22 14:02 Rhythmk 阅读(168) 评论(0) 推荐(0) 编辑
摘要: public static class ControllerExtensions { private static readonly Regex m_regex = new Regex(@"(?<=[^])\t{2,}|(?<=[>])\s{2,}(?=[<])|(?<=[>])\s{2,11}(?=[<])|(?=[\n])\s{2,}"); public static string RenderView(this Controller controller, string viewName, object model, stri 阅读全文
posted @ 2012-07-02 14:23 Rhythmk 阅读(1363) 评论(0) 推荐(0) 编辑
摘要: C:\Users\Administrator>net use 会记录新的网络连接。列表是空的。C:\Users\Administrator>net use \\192.168.1.61\ipc$ wangkun /user:wangkun 命令成功完成。 阅读全文
posted @ 2012-06-04 09:18 Rhythmk 阅读(227) 评论(0) 推荐(0) 编辑
摘要: usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Threading;namespaceParallelComputing{publicclassMoreThread{privateclassManualResetEventObj{publicManualResetEventresetEvent{get;set;}publicObjectobj{get;set;}}privateList<int>list;ManualResetEventauto;lon 阅读全文
posted @ 2012-06-01 11:28 Rhythmk 阅读(151) 评论(2) 推荐(0) 编辑
摘要: ///<summary>///通过单利模式实现数据程序缓存///DataInstanct.GetInstan().Add(0)[写入数据]///DataInstanct.GetInstan().Clear()[清空数据存储]///</summary>publicclassDataInstance{///<summary>///数据仓库///</summary>publicstaticList<int>dataWarehouse=newList<int>();privatereadonlystaticDataInstanct 阅读全文
posted @ 2012-05-31 17:05 Rhythmk 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 1.Get请求cs:privatevoidDownload(){stringurl="http://localhost:13936/GetData.aspx?id=getwangk";WebClientclient=newWebClient();client.DownloadStringCompleted+=newDownloadStringCompletedEventHandler(DownloadBind);client.DownloadStringAsync(newUri(url));}privatevoidDownloadBind(objectsender,Down 阅读全文
posted @ 2012-05-31 11:17 Rhythmk 阅读(2091) 评论(2) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2012-05-27 17:54 Rhythmk 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 代码格式化工具 CodeMaid 阅读全文
posted @ 2012-05-19 17:11 Rhythmk 阅读(495) 评论(0) 推荐(0) 编辑
摘要: //性能SETSTATISTICSIOon;SETSTATISTICSTIMEon;//Mysql 切分字符串CREATEPROCEDUREproc_split(inputstringVARCHAR(1000),delimCHAR(1))BEGINDECLAREstrlenINT;DECLARElast_indexINT;DECLAREcur_indexINT;DECLAREcur_charVARCHAR(200);DECLARElenINT;SETcur_index=1;SETlast_index=0;SETstrlen=LENGTH(inputstring);DROPTABLEIFEXIS 阅读全文
posted @ 2012-05-14 10:21 Rhythmk 阅读(522) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/zhangking/article/details/5670070 MySQL 群集是 MySQL 适合于分布式计算环境的高可用、高冗余版本。它采用了 NDB Cluster 存储引擎,允许在 1 个群集中运行多个 MySQL 服务器。在 MySQL 5.0 及以上的二进制版本中,以及与最新的 Linux 版本兼容的 RPM 包中提供了该存储引擎。 MySQL 群集是一种技术,该技术允许在无共享的系统中部署“内存中”和“磁盘中”数据库的 Cluster 。通过无共享体系结构,系统能够使用廉价的硬件,而且对软硬件无特殊要求。此外,由于每个组件有自... 阅读全文
posted @ 2012-05-10 11:18 Rhythmk 阅读(12464) 评论(3) 推荐(4) 编辑
摘要: EventLoglog=newEventLog("Wodongni.Com");//首先应判断日志来源是否存在,一个日志来源只能同时与一个事件绑定sif(!EventLog.SourceExists("NewApplication1"))EventLog.CreateEventSource("New... 阅读全文
posted @ 2012-05-09 13:06 Rhythmk 阅读(224) 评论(0) 推荐(0) 编辑
摘要: publicstaticDataTableToDataTable<T>(thisIList<T>data){PropertyDescriptorCollectionprops=TypeDescriptor.GetProperties(typeof(T));DataTabletable=newDataTable();for(inti=0;i<props.Count;i++){PropertyDescriptorprop=props[i];table.Columns.Add(prop.Name,prop.PropertyType);}object[]values=ne 阅读全文
posted @ 2012-05-08 17:23 Rhythmk 阅读(327) 评论(0) 推荐(0) 编辑
摘要: 搜索 VersionControl.configwindows 7 路径如下:C:\Users\Administrator\AppData\Local\Microsoft\Team Foundation\3.0\Cache\VersionControl.config删除其中无用节点 .大致如下: <MappedPaths> <MappedPath path="项目路径" /> </MappedPaths> 阅读全文
posted @ 2012-05-08 09:29 Rhythmk 阅读(1035) 评论(0) 推荐(0) 编辑
摘要: 第一步 : 实现 IHttpHandler 接口 namespaceWebHotlinkProtection{publicclassHotlinkProtectionHandler:IHttpHandler{publicboolIsReusable{get{thrownewNotImplementedException();}}publicvoidProcessRequest(HttpContextcontext){//监听是否本站发起的请求if(!context.Request.UrlReferrer.Host.StartsWith("localhost")){conte 阅读全文
posted @ 2012-04-29 15:05 Rhythmk 阅读(421) 评论(0) 推荐(0) 编辑
摘要: Visual Studio 2010 单元测试共分七个部分:普通单元测试、顺序单元测试、压力测试,Generic测试、数据库测试、UI界面测试和Web性能测试。Visual Studio 2010 单元测试之一---普通单元测试:http://blog.csdn.net/tjvictor/archive/2011/02/09/6175362.aspxVisual Studio 2010 单元测试之二---顺序单元测试:http://blog.csdn.net/tjvictor/archive/2011/02/09/6175472.aspxVisual Studio 2010 单元测试之三--- 阅读全文
posted @ 2012-04-20 09:52 Rhythmk 阅读(19890) 评论(1) 推荐(8) 编辑
摘要: 服务-> SQL SERVER (MSSQLSERVER) 启动 如果无法启动 则选择该服务属性。 登录选项卡 ->设置成本地系统账户然后启动即可. 阅读全文
posted @ 2012-04-13 17:29 Rhythmk 阅读(922) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/kaixun001/archive/2011/10/27/2226589.html环境: 2台电脑,操作系统均为windows server 2003,单网卡。2台电脑经路由器连接,路由器连猫拨号上网。路由地址:192.168.0.1,在路由器设置80端口映射到192.168.0.10 电脑A手动设置ip 192.168.0.100,电脑B手动设置ip 192.168.0.101 每台电脑上建一测试网站。网站的ip地址绑定为192.168.0.10(与后面设置的集群ip相同) A电脑上网站放上一个内容为192.168.0.100 的... 阅读全文
posted @ 2012-03-31 15:25 Rhythmk 阅读(235) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><title>Tmpl</title><meta name="keywords" content="Tmpl" /><scr 阅读全文
posted @ 2012-03-25 22:28 Rhythmk 阅读(3654) 评论(1) 推荐(0) 编辑
摘要: 环境: 2台电脑,操作系统均为windows server 2003,单网卡。2台电脑经路由器连接,路由器连猫拨号上网。路由地址:192.168.0.1,在路由器设置80端口映射到192.168.0.10 电脑A手动设置ip 192.168.0.100,电脑B手动设置ip 192.168.0.101 每台电脑上建一测试网站。网站的ip地址绑定为192.168.0.10(与后面设置的集群ip相同) A电脑上网站放上一个内容为192.168.0.100 的index.html B电脑上网站放上一个内容为192.168.0.101 的index.html第一步,先设置电脑A确认后... 阅读全文
posted @ 2012-03-25 20:49 Rhythmk 阅读(192) 评论(0) 推荐(0) 编辑
摘要: MySQL 集群http://database.51cto.com/art/201008/218326.htmhttp://2878502.blog.51cto.com/2868502/523669使用Sqlserver事务发布实现数据同步http://www.cnblogs.com/xumingxiang/archive/2012/02/25/2367870.html 阅读全文
posted @ 2012-03-22 12:12 Rhythmk 阅读(122) 评论(0) 推荐(0) 编辑
摘要: public static string ToSafeHtmlString(string content) { if (content == null) { return string.Empty; } if (string.IsNullOrWhiteSpace(content)) { return content; } content = Regex.Replace... 阅读全文
posted @ 2012-03-22 09:19 Rhythmk 阅读(484) 评论(0) 推荐(0) 编辑
摘要: <script type="text/javascript"> function JsonToStr(o) { var r = []; if (typeof o == "string" || o == null) { return o; } if (typeof o == "object") { if (!o.sort) { r[0] = "{" fo... 阅读全文
posted @ 2012-03-19 20:10 Rhythmk 阅读(1132) 评论(1) 推荐(0) 编辑
摘要: 1.返回指定字段生成实体 List<Product> q = db.Product.Where(a => a.ProductName == "a ") .Select(a => new { ProductName = a.ProductName, AddTime = a.AddTime }).ToList() // ToList() 将数据读取到内存中 然后转化成SQL .Select(a => new Product() { ProductName = a.ProductName, AddT... 阅读全文
posted @ 2012-03-15 23:13 Rhythmk 阅读(207) 评论(0) 推荐(0) 编辑
摘要: cmd启动mongodbD:\mongodb\bin\mongod.exe --bind_ip 127.0.0.1 --dbpath D:\mongodb\data --port 27017 --directoryperdb --logpath D:\mongodb\logs\db.txt --logappend上面的cmd不要关,新开个cmd进入mongodbD:\mongodb\bin\mongo.exe为了避免每次都启动mongo,可以将mongo加入windows服务D:\mongodb\bin\mongod.exe --bind_ip 127.0.0.1 --dbpath D:\mo 阅读全文
posted @ 2012-03-14 22:47 Rhythmk 阅读(459) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using Autofac.Builder;using Autofac.Configuration;using Autofac;/// by rhythmknamespace AutofacApp{ class Program { static void Main(string[] args) { var builder = new ContainerBuilder()... 阅读全文
posted @ 2012-03-13 21:15 Rhythmk 阅读(776) 评论(1) 推荐(0) 编辑
摘要: 1. 申请合作伙伴ID (PID),Key (PKey)2. 发送请求 https://graph.qq.com/oauth2.0/authorize?response_type=code&client_id=100000353&redirect_uri=http://www.wodongni.com/loginReturn.aspx redirect_uri:回传URL client_id: 合作伙伴ID (PID) 返回: string code = Request.QueryString["code"];3. https://graph.qq.com/ 阅读全文
posted @ 2011-12-23 14:43 Rhythmk 阅读(3542) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace TheStoryOfCat{ class Program { static void Main(string[] args) { Cat cat = new Cat() { Name = "Petal" }; Mouse mouse = new Mouse() { Name = "Jack" }; cat.C... 阅读全文
posted @ 2011-12-14 15:21 Rhythmk 阅读(409) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Net;using System.Net.Sockets;using System.IO;namespace ConsoleAppHttpListener{ /// <summary> /// 监听HTTP 请求 By Rhythmk /// </summary> class Program { static void Main(string[] args) ... 阅读全文
posted @ 2011-12-12 12:30 Rhythmk 阅读(6345) 评论(1) 推荐(0) 编辑
摘要: using Aspose.Words; string tmppath = Server.MapPath("~/TestWord.doc"); Document doc = new Document(tmppath); //载入模板 if (doc.Range.Bookmarks["Rhythmk"] != null) { Bookmark mark = doc.Range.Bookmarks["Rhythmk"]; mark.Text = "张三公司"; } doc.... 阅读全文
posted @ 2011-12-05 12:43 Rhythmk 阅读(31419) 评论(8) 推荐(3) 编辑
摘要: ---------SQL SERVER -------------------- 获取用户表select id,name from sysobjects where xtype='U'and name<>'dtproperties' order by name---- 获取用户存储过程select id,name from sysobjects where xtype='P'and name<>'dtproperties' order by name--- 获取用户视图select id,name from 阅读全文
posted @ 2011-12-05 10:58 Rhythmk 阅读(271) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Linq.Expressions;using System.Collections;using System.Data.Common;using System.Data;using System.Data.Linq;using System.Reflection;using System.Diagnostics;namespace ConsoleApp{ public class Boy { ... 阅读全文
posted @ 2011-11-08 23:03 Rhythmk 阅读(823) 评论(0) 推荐(0) 编辑
摘要: public static class StaticClass { ///<summary> /// 批量删除 ///</summary> ///<typeparam name="T"></typeparam> ///<param name="table"></param> ///<param name="predicate"></param> ///<returns></returns> public static 阅读全文
posted @ 2011-10-30 21:34 Rhythmk 阅读(919) 评论(1) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Linq.Expressions;using System.Collections;namespace ConsoleApp{ /// <summary> /// By Rhythmk Expression 学习 /// 参考:http://rednaxelafx.iteye.com/blog/247270 /// </summary> class Program ... 阅读全文
posted @ 2011-10-23 22:59 Rhythmk 阅读(487) 评论(1) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using System.Data.SqlClient;using System.Reflection;using System.Collections;namespace SQLBulkInsertTest{ /// <summary> /// 测试数据批量插入 By RhythmK /// </summary> /* -------------数据库表脚本------. 阅读全文
posted @ 2011-10-08 13:29 Rhythmk 阅读(275) 评论(0) 推荐(0) 编辑
Rhythmk 个人笔记