自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

weixin_41556165的博客

江某人的博客

  • 博客(118)
  • 收藏
  • 关注

转载 Web前端之iframe详解

Web前端之iframe详解iframe基本内涵通常我们使用iframe直接直接在页面嵌套iframe标签指定src就可以了。<iframe src="demo_iframe_sandbox.htm"></iframe>但是,有追求的我们,并不是想要这么low的iframe. 我们来看看在iframe中还可以设置些什么属性iframe常用属性:1....

2019-03-22 10:52:00 860

原创 webapi接口使用说明样式

1、UploadAndStoreDicom 接口名称 UploadAndStoreDicom 接口功能 上传文件并归档到服务器PACS 请求方式 Http POST 请求API /api/Image/UploadAndStoreDicom ...

2019-02-22 16:48:59 909

原创 读写wcf的契约数据

namespace DataContractAttributeExample{ // Set the Name and Namespace properties to new values. [DataContract(Name = "Customer", Namespace = "http://www.contoso.com")] class Person : IEx...

2019-02-22 16:46:41 242

原创 v-for的终极用法(配合路由使用)

:key是为vue的响应式渲染提供方法,在列表中单条数据改变的情况下,可以进行单独渲染,减少页面资源消耗。当前页面如果有列表渲染v-for,并且在v-for的循环标签中没有:key元素时,控制台会出现警告.在页面标签中使用&lt;ul class="letter_classify"&gt; &lt;li v-for="(value, key, index) in sortgroupc...

2019-01-17 15:52:31 1082

原创 vue路由的懒加载

const shopSafe = r =&gt; require.ensure([], () =&gt; r(require('../page/shop/children/children/shopSafe')), 'shopSafe')export default [{ path: '/', component: App, //顶层路由,对应index.html ch...

2019-01-16 19:28:14 247

原创 es6解构赋值

解构赋值允许按照一定模式,从数组和对象中提取值,并对变量进行赋值。数组解构let [a,b,c] = [1,2,3];-顺序对应对象解构let {foo,bar} = {foo:"qqqq" , bar:"eeee"}-key值对应为避免与其他变量重名:....console.log(left);let {left:L , top:T} = {left:...

2018-12-29 14:02:10 139

原创 Log的使用

step1:添加log4net的引用step2:添加配置文件log4netConfig.xmlstep3:启用日志private ILog Logger = null;string logconfigpath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "log4netConfig.xml"); ...

2018-12-29 14:00:49 309 1

转载 C#多线程之Parallel中 类似于for的continue,break的方法

C#多线程之Parallel中 类似于for的continue,break的方法好久没写东西了,终于找到点知识记录下。。。利用ParallelLoopState对象来控制Parallel.For函数的执行,ParallelLoopState对象是由运行时在后台创建的:Parallel.For(1, 100, (i, ParallelLoopState) =&gt;{...});这...

2018-12-27 12:37:27 1341

原创 es6使用let与const,简化tab栏

&lt;script&gt;$.ready(){ var buttons = document.querySelectorAll('button'); var ps = document.querySelectorAll('p'); for(var i=0; i&lt;buttons.length; i++){ buttons[i].index = i; buttons[i]....

2018-12-18 20:42:57 209

原创 Symbol实例

如何定义私有:即java与C#中的private ==&gt; 闭包实现&lt;script&gt;Var Person = (function(){ var _gender = ''; function P(name,gender){ this.name = name; //this.gender = gender; _...

2018-12-14 00:01:15 327

原创 C#使用SC命令,控制windows服务参数

查看服务:ServiceController[] services = ServiceController.GetServices();foreach (ServiceController sController in services){ Console.WriteLine(sController.ServiceName + " " + sController.Status...

2018-12-13 13:21:52 1254

转载 Razor语法下拉框的实现

Controller的数据绑定//公共的方法//在每次需要展示下拉框的时候,需要调用一下这个方法 【数据源是DB数据库】private void _ProductExtensions( BtDbContext _ctx ) { #region 商品分类 List&lt;SelectListItem&gt; listProduc...

2018-12-07 10:25:32 2838

原创 MVC过滤器总结

注册路由 using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Mvc;using System.Web.Routing; namespace FB.CMS.MvcSite{ public class RouteConfig ...

2018-12-06 09:28:39 178

原创 mysql数据库超时

1.改配置:修改mysql安装目录下的my.ini内部的参数:永久有效,但修改文件后需要重启服务table_cache=180 //表的缓存大小,缓存记录在内存中,读取快max_connections=100 //数据库最大连接数。链接数不够会超时MySQL查看最大连接数和修改最大连接数只在...

2018-12-04 13:05:08 422

原创 es6 -- Buffer

通过长度创建buffer:let buffer = Buffer.alloc(100);console.log(buffer)得到:&amp;amp;lt;buffer 00 00 00 00 00 00 00 00···&amp;amp;gt; 100个比较消耗性能:先将100字节清空再分配let buffer = Buffer.allocUnsafe(100);不清空,可能还有上一次的内容数组转bu...

2018-12-02 14:25:08 846

转载 es6 -- promisify

promise的简单使用(() =&amp;gt; new Promise((resolve, reject) =&amp;gt; setTimeout(() =&amp;gt; resolve('jianyong'), 2000)))().then(data =&amp;gt; console.log(data))上面一行恶心的代码等价于:function getName() { let p p = n...

2018-12-02 14:00:52 404

原创 node核心模块--Util

class child{}class parent{ constructor(){ } sleep(){console.log(&quot;i'm sleeping&quot;)}}//实现继承let child = new child();let parent = new parent();//原生写法: child.prototype.__proto__ = parent.prototype...

2018-11-29 19:19:15 137

转载 MVC4,四大筛选器AuthorizeFilter。。。

AuthorizeFilter筛选器 在Action的执行中包括两个重要的部分,一个是Action方法本身逻辑代码的执行,第二个就是Action方法的筛选器的执行。 MVC4中筛选器都是以AOP(面向方面编程)的方式来设计的,通过对Action方法上标注相应的Attribute标签来实现。MVC4提供了四种筛选器,分别为:AuthorizationFilter、ActionFilt...

2018-11-29 11:28:00 1617

原创 npm的简单安装用法

npm node package managerhttp-server anywherenpm库 帮我们将我们的包上传到网上第三方模块我们下载的模块 不需要加./ 引得是 module.paths安装 卸载 发布安装前npm init -y初始化前先关心当前文件夹 不能有中文 特殊字符串 不能用要安装的模块来命名初始化一个package.json 不能写注释 不能加标点如果...

2018-11-29 00:15:08 576

原创 node模块的引用过程

劲爆自定义模块:class cal{ constructor(){ this.a = 'wo hen shuai' } static tittle(){ return '标题'; } calc((...args)=&gt;{ return args.reduce((prev,next)=&gt;{ return prev + next; }); });}...

2018-11-28 00:28:11 235

原创 compile.js

class Compile{ constructor(el,vm){ this.el = this.IsElementNode(el)?el:document.querySelector(el); this.vm = vm; if(this.el){ //1. 将dom元素放进文档碎片中 let...

2018-11-27 00:25:53 458

原创 数据库实体转换的过程详解

如何应用反射设置实体的值首先需要创建实体的实例public class ConfigEntity { public string ConnectionStr { get; set; } public string Name{ get; set; } public string Age { get; set; } }然后设置过程...

2018-11-21 18:38:42 859

转载 WebApi跨域多种解决方案

关于WebAPI跨域踩到的一点坑最近在尝试前后端分离的WebAPI+AngularJS方案,在率先处理授权的时候,踩到了一点WebAPI跨域的坑,其实严格意义上来说也不算是坑吧,只是我自己对WebAPI不熟悉而已,这里我与大家分享一下。先说一下我这边遇到的情况:我是在做登录功能,使用的是微软的OWin提供的组件来实现对于WebAPI跨域,你如果去百度或者谷歌,基本上会有以下两种...

2018-11-13 15:02:05 550

原创 计算hash值

class 计算hash值 { //计算hash值需要引用系统包:using System.Security.Cryptography; //计算分两步: //1. 计算hash: MD5 calculator = MD5.Create(); // Byte[] buffer = calc...

2018-11-10 13:20:43 5030 1

原创 HTTP相关操作

1.检查网络连接状态public static bool HttpStatusIsOK(string url) { HttpWebRequest httpWebRequest = (HttpWebRequest)null; url = url.IndexOf("?", StringComparison.Ordinal) &lt;...

2018-11-10 13:12:53 197

原创 对WebApi的三种请求方式(以post上传为例):HttpClient,WebClient,HttpWebRequest

WebClientpublic void HttpUpload(string url){ byte[] bytes; using(FileStream fs = new FileStram(&amp;quot;filename&amp;quot;,FileMode.Open,FileAccess.Read)) { bytes = new byte[fs.Length]; fs.Read(bytes,0,bytes....

2018-11-05 20:13:33 2351

原创 WebApi的文件上传功能实现

 1.自主宿主HttpSelfHost的实现#region Web Api监听 Assembly.Load("Lind.DDD.TestApi"); //手工加载某个api程序集的controller var config = new HttpSelfHostConfiguration("http://localhost:3333...

2018-11-05 20:09:52 8422

翻译 HttpWebRequest使用post上传数据,webapi接收

 前端传一个json对象,后端用字典接收byte[] data = new byte[HttpContext.Current.Request.InputStream.Length]; HttpContext.Current.Request.InputStream.Read(data, 0, data.Length); string txt = ...

2018-11-01 20:00:39 5139

原创 WebApi的ajax调用以及HttpClient的跨域调用

WebApiusing System;using System.Collections.Generic;using System.Linq;using System.Net;using System.Net.Http;using System.Web.Http;using t3_Models;namespace t3_WebAPI.Controllers{ public...

2018-10-30 21:49:44 401

转载 Socket编程之TCP的简单实现

Clientimport java.io.*;import java.net.Inet4Address;import java.net.InetSocketAddress;import java.net.Socket;public class Client { public static void main(String[] args) throws IOException {...

2018-10-29 21:47:02 276

转载 CSDN-markdown编辑器

这里写自定义目录标题欢迎使用Markdown编辑器新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入欢迎使用Ma...

2018-10-29 21:44:01 86

转载 Display / Editor DropDownList

HtmlHelper – Display / Editor 模型元数据@Html.Editor / @Html.Display 可以通过读取特性值生成HTML: [DataType(DataType.MultilineText)] [DisplayName("备注")] public string Remark { get; set; }...

2018-10-18 23:06:38 102

转载 MYSQL优化系列

MySQL查询优化之explain的深入解析 mysql嵌套查询和联表查询优化方法 MySQL查询优化:LIMIT 1避免全表扫描提高查询效率 Mysql使用索引实现查询优化 mysql数据库查询优化 mysql效率 MySQL查询优化:连接查询排序浅谈 MySQL慢查询优化之慢查询日志分析的实例教程 mysql limit查询优化分析 php+mysql查询优化简单实例 MyS...

2018-10-13 00:17:56 200

转载 MySql事务

请看以下博客:https://blog.csdn.net/yerenyuan_pku/article/details/52215281

2018-10-13 00:00:18 85

原创 C#使用委托和事件实现发布订阅者模式

事件是C#中的高级概念,和js中的鼠标点击$("tag").click,悬停$("tag").hover或css元素样式的改变(onChanged)等事件,当事件触发才执行我们所委托的方法。步骤:1、创建一个委托;2、将创建的委托与特定事件关联;3、编写C#事件处理程序;4、利用编写的C#事件处理程序生成一个委托实例;5、把这个委托实例添加到产生事件对象的事件列表中去(+=),这个过...

2018-10-02 11:10:07 3078 1

转载 Settings.settings文件的用处

1、定义在Settings.settings文件中定义配置字段。把作用范围定义为:User则运行时可更改,Applicatiion则运行时不可更改。可以使用数据网格视图,很方便;2、读取配置值text1.text = Properties.Settings.Default.FieldName;//FieldName是你定义的字段3、修改和保存配置Properties.Sett...

2018-09-30 15:24:00 4176

原创 一小时看一次,每隔一天执行一次

_timer = new Timer(); _timer.Interval = 60 * 60 * 1000; //一个小时 _timer.Elapsed += new ElapsedEventHandler(_timer_Elapsed); _timer.Enabled = true; } ...

2018-09-20 11:00:35 1258

转载 byte[]读取与写入

FileStream fs1 = new FileStream(@"E:\tenp\doc\111.txt", FileMode.Open, FileAccess.Read, FileShare.Read);FileStream fs2 = new FileStream(@"E:\temp\doc\222.txt", FileMode.Create, FileAccess.Write, Fil...

2018-09-18 14:32:13 21952

转载 URL加随机数的作用

大家在系统开发中都可能会在js中用到ajax或者dwr,因为IE的缓存,使得我们在填入相同的值的时候总是使用IE缓存,为了解决这个问题一般可以用一下方法:        1:在ajax或者dwr提交的url后面加时间戳。        例如     http_request.onreadystatechange = funcName;     http_request.open("GET"...

2018-09-17 11:17:06 835

原创 单例模式

1.  防止多线程创建的多个对象争抢资源class myclass{ public myclass(){} public static myclass GetInstance { get { if (_instance == null) { ...

2018-09-14 11:25:06 95

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除