06 2016 档案

摘要:C:\Program Files\Redis\redis-cli.exe 使用servicestack.redis class Program { static void Main(string[] args) { RedisClient client = new RedisClient("127. 阅读全文
posted @ 2016-06-30 17:11 zslm___ 阅读(146) 评论(0) 推荐(0) 编辑
摘要:目标框架必须是 4.5以上,最新MongoDb.Driver 是 2.2.4(与MongoDb.Driver 的1.x版本差别较大) 官方文档 http://mongodb.github.io/mongo-csharp-driver/2.2/ 1)MongoDbContext类 internal c 阅读全文
posted @ 2016-06-24 15:00 zslm___ 阅读(149) 评论(0) 推荐(0) 编辑
摘要:git tag -d v2016062101 删除本地tag git push origin --delete tag v2016062101 删除远程tag 阅读全文
posted @ 2016-06-23 19:16 zslm___ 阅读(246) 评论(0) 推荐(0) 编辑
摘要:Nugut安装 log4net 和 topShelf 1)ServiceRunner类 using log4net;using Topshelf; class ServiceRunner : ServiceControl//, ServiceSuspend { private Timer _time 阅读全文
posted @ 2016-06-23 18:33 zslm___ 阅读(330) 评论(0) 推荐(0) 编辑
摘要:using Autofac;using Autofac.Builder;using Autofac.Core; //实现Autofac扩展 public static AutofacRegisterWcf { public static IRegistrationBuilder<TServiceCo 阅读全文
posted @ 2016-06-23 11:23 zslm___ 阅读(1177) 评论(0) 推荐(0) 编辑
摘要:Controller里 [SendMessage] public Action SendSmsMessage() { var resultExtendInfo=new ResultExtendInfo(){Phone="13434343434"}; if(true) return new G2Jso 阅读全文
posted @ 2016-06-23 10:51 zslm___ 阅读(369) 评论(0) 推荐(0) 编辑
摘要:一种是类级别的插件开发,即给jquery添加新的全局函数,相当于给jquery类本身添加方法。如$.ajax()等,这就是用$.extend()实现 jquery的全局函数就是属于jquery命名空间的函数。另一种是对象级别的插件开发,即给jquery对象添加方法. 如$('#btn1').clic 阅读全文
posted @ 2016-06-22 14:40 zslm___ 阅读(198) 评论(0) 推荐(0) 编辑
摘要:<?xml version="1.0" encoding="UTF-8"?><job-scheduling-data xmlns="http://quartznet.sourceforge.net/JobSchedulingData" xmlns:xsi="http://www.w3.org/200 阅读全文
posted @ 2016-06-22 09:41 zslm___ 阅读(5169) 评论(0) 推荐(0) 编辑
摘要:public class UpLoad { int imgmaxheight = 0; int imgmaxwidth = 0; int thumbnailwidth = 200; int thumbnailheight = 200; int imgsize = 10240; int attachs 阅读全文
posted @ 2016-06-22 00:44 zslm___ 阅读(473) 评论(0) 推荐(0) 编辑
摘要:public class WaterMark { /// <summary> /// 图片水印 /// </summary> /// <param name="imgPath">服务器图片相对路径</param> /// <param name="filename">保存文件名</param> // 阅读全文
posted @ 2016-06-22 00:43 zslm___ 阅读(284) 评论(0) 推荐(0) 编辑
摘要:public class Thumbnail { private Image srcImage; private string srcFileName; /// <summary> /// 创建 /// </summary> /// <param name="FileName">原始图片路径</pa 阅读全文
posted @ 2016-06-22 00:42 zslm___ 阅读(337) 评论(0) 推荐(0) 编辑
摘要:public static class CacheHelper { static Cache _cache = HttpRuntime.Cache; /// <summary> /// 获取缓存 /// </summary> /// <param name="key"></param> /// <r 阅读全文
posted @ 2016-06-22 00:40 zslm___ 阅读(352) 评论(0) 推荐(0) 编辑
摘要:public static class CustomerConfigHelper { public static object _lockObject = new object(); private static string GetCustomConfigValue(string key) { s 阅读全文
posted @ 2016-06-22 00:39 zslm___ 阅读(225) 评论(0) 推荐(0) 编辑
摘要:public static class EnumHelper { /// <summary> /// 枚举转换为字典 /// </summary> /// <typeparam name="T"></typeparam> /// <returns></returns> public static D 阅读全文
posted @ 2016-06-22 00:38 zslm___ 阅读(792) 评论(0) 推荐(0) 编辑
摘要:public static class IpHelper { /// <summary> /// 获取Ip /// </summary> /// <returns></returns> public static string GetIp() { string[] IP_Ary; string st 阅读全文
posted @ 2016-06-22 00:37 zslm___ 阅读(242) 评论(0) 推荐(0) 编辑
摘要:public class LogHelper { private static string _logFielPrefix = string.Empty; private static string LogPath { get { return GetLogPath(@"/log/"); } } / 阅读全文
posted @ 2016-06-22 00:36 zslm___ 阅读(303) 评论(0) 推荐(0) 编辑
摘要:public sealed class TypeHelper { #region Int16 / short public static short ToInt16(object o, short _default) { try { return Convert.ToInt16(o); } catc 阅读全文
posted @ 2016-06-22 00:34 zslm___ 阅读(187) 评论(0) 推荐(0) 编辑
摘要:public class Utils { public static int StrToInt(string str) { return int.Parse(str); } #region MD5加密 public static string MD5(string pwd) { MD5 md5 = 阅读全文
posted @ 2016-06-22 00:32 zslm___ 阅读(388) 评论(0) 推荐(0) 编辑
摘要:前端: <script src="~/Scripts/swfupload/swfupload.js"></script> <script src="~/Scripts/swfupload/swfupload.queue.js"></script> <script src="~/Scripts/swf 阅读全文
posted @ 2016-06-22 00:30 zslm___ 阅读(533) 评论(0) 推荐(0) 编辑
摘要:using System;using System.Collections.Generic;using System.Text; namespace taobao{ class EncodingTransfer { static public string UnicodeToGB2312(strin 阅读全文
posted @ 2016-06-22 00:17 zslm___ 阅读(537) 评论(0) 推荐(0) 编辑
摘要:public static string GetGBKEncode(string unicodeString) { Encoding Gbk = Encoding.GetEncoding(936); //创建两个不同的encoding对象 Encoding unicode = Encoding.Un 阅读全文
posted @ 2016-06-22 00:16 zslm___ 阅读(3262) 评论(0) 推荐(0) 编辑
摘要:public static string GetPage(string url, string encoding) { PublicVariables.NetworkConnection = false; int browserTimeout = PublicVariables.BrowserTim 阅读全文
posted @ 2016-06-22 00:12 zslm___ 阅读(641) 评论(0) 推荐(0) 编辑
摘要:using System;using System.Collections;using System.Globalization;using System.IO;using System.Net;using System.Runtime.InteropServices;using System.Se 阅读全文
posted @ 2016-06-22 00:10 zslm___ 阅读(458) 评论(0) 推荐(0) 编辑
摘要:using System;using System.Collections;using System.Globalization;using System.IO;using System.Net;using System.Runtime.InteropServices;using System.Se 阅读全文
posted @ 2016-06-22 00:09 zslm___ 阅读(154) 评论(0) 推荐(0) 编辑
摘要:System.Text.RegularExpressions.Regex ___rx = new System.Text.RegularExpressions.Regex(@"""url"":""(?<zip>.*?)""", System.Text.RegularExpressions.Regex 阅读全文
posted @ 2016-06-22 00:07 zslm___ 阅读(141) 评论(0) 推荐(0) 编辑
摘要:internal class Program { private static void Main(string[] args) { var content = Read(@"E:\workspace\日志\2016-06-21.LOG2016-06-21.LOG"); Regex reg3 = n 阅读全文
posted @ 2016-06-21 14:00 zslm___ 阅读(1134) 评论(0) 推荐(0) 编辑
摘要:static public string Read(string path) { StreamReader sr = new StreamReader(path,Encoding.Default); String line; StringBuilder sb=new StringBuilder(); 阅读全文
posted @ 2016-06-21 12:22 zslm___ 阅读(279) 评论(0) 推荐(0) 编辑
摘要:服务端app.config <?xml version="1.0" encoding="utf-8" ?><configuration> <system.serviceModel> <services> <service name="WCFTest.GreetService" behaviorCon 阅读全文
posted @ 2016-06-17 16:59 zslm___ 阅读(194) 评论(0) 推荐(0) 编辑
摘要:添加System.ServiceModel 引用 Wcf 服务端 class Program { static void Main(string[] args) { ServiceHost host = new ServiceHost(typeof(GreetService), new Uri("h 阅读全文
posted @ 2016-06-17 15:46 zslm___ 阅读(193) 评论(0) 推荐(0) 编辑
摘要:sp_executesql 书写规则 exec sp_executesql @sql,N'参数1 类型1,参数2 类型2,参数3 类型3 OUTPUT',参数1,参数2,参数3 OUTPUT; 注意参数顺序必须对应好,习惯上把OUTPUT 参数放在最后 sp_executesql 比 之前的exec 阅读全文
posted @ 2016-06-16 17:48 zslm___ 阅读(150) 评论(0) 推荐(0) 编辑
摘要:1.创建唯一索引 create unique index activityConfigDetail_ConfigIdPageLocationon activityConfigDetail(ConfigId,PageLocation) 2.创建普通索引 create index activityCon 阅读全文
posted @ 2016-06-16 17:30 zslm___ 阅读(153) 评论(0) 推荐(0) 编辑
摘要:<script src="./jquery-1.7.1.min.js"></script><script>;(function($,undefined){ /*也可以用 $.fn.extend()方法 $.fn.extend({ cbacba:function() { console.log($(t 阅读全文
posted @ 2016-06-16 12:21 zslm___ 阅读(171) 评论(0) 推荐(0) 编辑
摘要:set statistics time on 阅读全文
posted @ 2016-06-16 11:04 zslm___ 阅读(140) 评论(0) 推荐(0) 编辑
摘要:Resharper 8.2 注册码 用户名:ronle注册码:ZoJzmeVBoAv9Sskw76emgksMMFiLn4NM 用户名:ronle注册码:ZoJzmeVBoAv9Sskw76emgksMMFiLn4NM 阅读全文
posted @ 2016-06-14 09:56 zslm___ 阅读(263) 评论(0) 推荐(0) 编辑
摘要:(function() { var myQuery=(function() { var _myQuery={}; _myQuery.queryElementById=function(id) { console.log('QueryElementById:'+id); }; ... 阅读全文
posted @ 2016-06-12 21:26 zslm___ 阅读(138) 评论(0) 推荐(0) 编辑
摘要:class Program { private readonly static string investRankingForAllUrl = "http://192.168.1.98:9000/"; private readonly static IRestClient _rForAllRestC 阅读全文
posted @ 2016-06-08 16:25 zslm___ 阅读(523) 评论(0) 推荐(0) 编辑
摘要://定义过滤器 public class LogAttribute : ActionFilterAttribute { /// <summary> /// 以逗号间隔 /// </summary> private readonly string _parameterNames; public Biz 阅读全文
posted @ 2016-06-03 19:38 zslm___ 阅读(458) 评论(0) 推荐(0) 编辑
摘要:以前总是ajax请求是这样的 data:"a=1&b=2&c=3..." 而Controller也总是这样的 Action(int a,int b,int c) 很丑!!! 现在可以这样了 <!doctype html> <html><head> <script src="~/Scripts/jqu 阅读全文
posted @ 2016-06-03 19:17 zslm___ 阅读(181) 评论(0) 推荐(0) 编辑
摘要:<select id="pagedListOrderOpen"> SELECT * FROM ( </select> <sql id="pagedListOrderClose"> ) PagedList <dynamic prepend="WHERE"> <isNotNull prepend="AN 阅读全文
posted @ 2016-06-01 17:13 zslm___ 阅读(174) 评论(0) 推荐(0) 编辑
摘要:<insert id="insOrderDetail" parameterClass="OrderDetail"> INSERT INTO OrderDetail (OrderId,PId,Quantity,Price) VALUES (#OrderId#,#PId#,#Quantity#,#Pri 阅读全文
posted @ 2016-06-01 15:34 zslm___ 阅读(204) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示