会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
JerryChen
代码干货,拿来即用
博客园
首页
新随笔
管理
上一页
1
···
4
5
6
7
8
9
10
11
下一页
2016年9月23日
c#同步锁Monitor.Enter(T)
摘要: protected static object MObjLock = new object();//同步锁 public string GetData(int mId) { Monitor.Enter(MObjLock);//lock string data = string.Empty; ...
阅读全文
posted @ 2016-09-23 10:59 chenjingchun
阅读(703)
评论(0)
推荐(0)
2016年8月23日
省市区三级联动 最新县及县以上行政区划代码 来源:国家统计局
摘要: 方法一:国家统计局行政区代码 http://www.stats.gov.cn/tjsj/tjbz/ 方法二:腾讯QQ地址本地库 \Tencent\QQ\I18N\2052\LocList.xml 方法三:高德api http://lbs.amap.com/api/webservice/guide/a
阅读全文
posted @ 2016-08-23 15:34 chenjingchun
阅读(813)
评论(0)
推荐(0)
2016年8月18日
css单双行样式
摘要: #random_box li:nth-child(odd) {//双行 background: #fff5c4; } #random_box li:nth-child(even) {//单行 background: #ffeb8c; }
阅读全文
posted @ 2016-08-18 18:30 chenjingchun
阅读(3809)
评论(1)
推荐(0)
2016年8月16日
来源页面地址 上一页面url
摘要: Uri uri = Request.UrlReferrer;
阅读全文
posted @ 2016-08-16 16:20 chenjingchun
阅读(279)
评论(0)
推荐(0)
2016年8月15日
C#抽奖算法
摘要: 摘自网络 static void Main(string[] args) { //各物品的概率保存在数组里 float[] area = new float[4]{ 0.5f, 0.5f, 0, ...
阅读全文
posted @ 2016-08-15 17:10 chenjingchun
阅读(4366)
评论(0)
推荐(0)
2016年7月20日
NET MVC FileResult 导出/下载 文件/Excel
摘要: 参考http://www.cnblogs.com/ldp615/archive/2010/09/17/asp-net-mvc-file-result.html 1.引入NPOI 2.代码 3.页面请求
阅读全文
posted @ 2016-07-20 09:40 chenjingchun
阅读(4716)
评论(0)
推荐(1)
2016年6月29日
sql 当月天数
摘要: SELECT 32-DAY(getdate()+32-DAY(getdate()))
阅读全文
posted @ 2016-06-29 14:23 chenjingchun
阅读(191)
评论(0)
推荐(0)
2016年6月24日
NPOI导出Excel
摘要: 一般应用程序: using Newtonsoft.Json; using NPOI.HSSF.UserModel; using NPOI.SS.UserModel; using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Web; namespac...
阅读全文
posted @ 2016-06-24 14:49 chenjingchun
阅读(332)
评论(0)
推荐(0)
2016年6月21日
LINQ to Entities 不识别方法“System.Nullable`1[System.Int32] DiffDays(System.Nullable`1[System.DateTime], System.Nullable`1[System.DateTime])”,因此该方法无法转换为存储表达式。
摘要: 解决方案: db.table.Where(m=>System.Data.Objects.EntityFunctions.DiffDays(m.CreateTime, DateTime.Now) == 0)
阅读全文
posted @ 2016-06-21 17:27 chenjingchun
阅读(3125)
评论(0)
推荐(0)
2016年6月7日
递归删除List元素
摘要: public List DeleteList(List list) { foreach (var item in list) { if (删除条件) { list.Remove(item); ...
阅读全文
posted @ 2016-06-07 14:41 chenjingchun
阅读(481)
评论(0)
推荐(0)
上一页
1
···
4
5
6
7
8
9
10
11
下一页
公告