上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页
摘要: MongoDB的官网是:http://www.mongodb.org/MongoDB最新版本下载在官网的DownLoad菜单下:http://www.mongodb.org/downloads1:解压下在的mongodb数据库2:在bin目录下创建data文件夹,并在data文件夹下创建db和logs文件夹3:启动mongodb服务 进入cmd命令行,切换到bin目录下,执行如下命令 mongod --dbpath=data\db --logpath=data\logs\mongodb.log --port=40031--serviceName "MongoDB" 命令启动 阅读全文
posted @ 2014-01-25 15:07 ajunfly 阅读(231) 评论(0) 推荐(0) 编辑
摘要: mysql -h localhost -u root -p 123456 < F:/hello world/niuzi.sql 阅读全文
posted @ 2013-08-14 17:07 ajunfly 阅读(386) 评论(0) 推荐(0) 编辑
摘要: 1:调整where子句中的连接顺序 a:将子查询的放到条件的最前面 b:过滤数据的条件有多到少排列2:避免使用 * 进行全表查询3:尽量将多条SQL语句压缩到一句SQL中4:用Where子句替换Having子句5:在表连接查询的时候使用表的别名6:用Exists代替In7:用表连接代替Exists8:避免在索引上使用计算9:用Union all 代替 Union 阅读全文
posted @ 2013-05-21 17:51 ajunfly 阅读(134) 评论(0) 推荐(0) 编辑
摘要: declare @path varchar(800) declare @name varchar(100) set @name = 'DatabaseName'; set @path = 'D:\DataBaseBack\' + @name + '_' + convert(varchar(50),getdate(),112)+'.bak' backup database @name to disk = @path with noinit,nounload,noskip,stats=10,noformat 阅读全文
posted @ 2013-05-17 14:08 ajunfly 阅读(124) 评论(0) 推荐(0) 编辑
摘要: <%@ WebHandler Language="C#" class="mergeHandler" %>using System; using System.Web; using System.IO; using System.Text;public class mergeHandler : IHttpHandler { private const string CacheKeyFormt = "CacheKey_{0}_{1}_"; public void ProcessRequest(HttpContext conte 阅读全文
posted @ 2013-05-06 13:59 ajunfly 阅读(332) 评论(0) 推荐(0) 编辑
摘要: public void SetValue() { SqlConnection connection = new SqlConnection("ConnectionString"); connection.Open(); SqlTransaction tran = new SqlTransaction(); SqlCommand command = new SqlCommand(); command.Connection = connection; command.Transaction = tran; try { command.CommandText = "in 阅读全文
posted @ 2013-03-20 17:10 ajunfly 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 判断缓存是否存在 if (HttpRuntime.Cache[key] == null) { }插入缓存 缓存过期时间为2个小时NoAbsoluteExpiration:相对过期时间,生成缓存后若在没有过期的时间段被取,则过期时间后推10分钟,例如:11:1分钟时生成的 在11:5分钟时被取了,则过期时间为11:15分钟HttpRuntime.Cache.Insert(key.ToUpper(), dic, null,System.Web.Caching.Cache.NoAbsoluteExpiration,TimeSpan.FromMinutes(10));NoSlidingExpirat. 阅读全文
posted @ 2013-02-19 18:34 ajunfly 阅读(212) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// dataTable转换成Json格式 /// </summary> /// <param name="dt"></param> /// <returns></returns> public static string ToJson(DataTable dt) { if (dt != null && dt.Rows.Count > 0) { StringBuilder jsonBuilder = new StringBuilder(); jsonB 阅读全文
posted @ 2013-02-17 09:41 ajunfly 阅读(2101) 评论(0) 推荐(0) 编辑
摘要: static string str = "|add|and|exec|insert|select|delete|update|chr|mid|master|or|truncate|char|declare|join|"; public static bool DataVerify() { string type = HttpContext.Current.Request.RequestType.ToLower(); bool flag = true; if (type == "post") { for (int i = 0; i < HttpCon 阅读全文
posted @ 2013-02-16 17:58 ajunfly 阅读(334) 评论(0) 推荐(0) 编辑
摘要: public static object Invokewebservice(string url, string @namespace, string classname, string methodname, object[] args) { try { WebClient wc = new WebClient(); Stream stream = wc.OpenRead(url + "?wsdl"); ServiceDescription sd = ServiceDescription.Read(stream); ServiceDescriptionImporter s 阅读全文
posted @ 2013-02-05 18:13 ajunfly 阅读(230) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页