- 博客(34)
- 收藏
- 关注
转载 js算法练习--二叉树
class Node { constructor(key) { this.key = key; this.left = null; this.right = null; } } class B...
2019-08-08 08:52:00
163
转载 js算法练习--双向链表
class Node{ constructor(element){ this.element=element; this.pre=null; this.next=null; } } ...
2019-08-08 08:52:00
166
转载 js算法练习--链表
class Node{ constructor(element){ this.element=element; this.next=null; } } class Linked{ ...
2019-08-08 08:51:00
198
转载 js算法练习--队
//一般队列 class queue { constructor() { this.list = []; } //入队 EnQueue(item) { this.list.push(item...
2019-08-08 08:50:00
130
转载 js算法练习--栈
class stack{ constructor (){ this.list=[]; } //入栈 Push(item){ this.list.push(item); } ...
2019-08-08 08:49:00
133
转载 VSCode开发.NetCore
1.安装.net core ,vscode 以及相关扩展支持,具体安装工具,从官网上下载2.VSCode里面安装C#的相关扩展3.用vsCode打开开发文件夹4.Ctrl+Shift+`,打开VSCode的终端5.用命令行创建一个控制台程序:dotnet new console --name First6.打开Pr...
2019-07-06 18:43:00
619
转载 js 表达式与语句
表达式与语句1.例子: 1. function (){} //Uncaught SyntaxError: Unexpected token ( 2. (function(){}) //ƒ (){} 3. function f(x){return x+1}() //Uncaught SyntaxError: Unexpected t...
2019-05-09 11:04:00
302
转载 js map, reduce, filter 等高阶函数
1. JavaScript的函数其实都指向某个变量。既然变量可以指向函数,函数的参数能接收变量,那么一个函数就可以接收另一个函数作为参数,这种函数就称之为高阶函数。 function add(x, y, f) { return f(x) + f(y); } add(-3,4,Math.abs);//72. forEach:让数组的每一项...
2019-05-08 09:15:00
122
转载 js 函数作用域, 块级作用域和词法作用域
函数作用域, 块级作用域和词法作用域0 作用域: 0.1 作用域是程序源代码中定义变量的区域。 0.2 作用域规定了如何查找变量,也就是确定当前执行代码对变量的访问权限。 0.3 ECMAScript6之前只有全局作用域和函数作用域。 0.4 JavaScript采用词法作用域(lexical scoping),也就是静态作用域。 ...
2019-05-03 15:27:00
382
转载 js this, call, apply 和 bind
this, call, apply 和 bind1 this:它是函数运行时,在函数体内部自动生成的一个对象,只能在函数体内部使用。 1.1 纯粹的函数调用:属于全局性调用,因此this就代表全局对象。 var name='kenn'; function hi(){ console.log(this.name);}...
2019-05-03 10:20:00
66
转载 JS == vs ===, typeof vs instanceof
== vs ===, typeof vs instanceof1 ===:全等操作符比较两个值是否相等,两个被比较的值在比较前都不进行隐式转换。如果两个被比较的值具有不同的类型,这两个值是不全等的。否则,如果两个被比较的值类型相同,值也相同,并且都不是 number 类型时,两个值全等。最后,如果两个值都是 number 类型,当两个都不是 NaN,并且数值相同,或是两个值分别为 ...
2019-05-03 09:19:00
81
转载 JS 隐式, 显式, 名义和鸭子类型
隐式, 显式, 名义和鸭子类型1.类型转换 1.1 ECMAScript 的 Boolean 值、数字和字符串的原始值的有趣之处在于它们是伪对象,这意味着它们实际上具有属性和方法。 1.2 ECMAScript 定义所有对象都有 toString() 方法,无论它是伪对象,还是真对象 1.2.1 Boolean 类型的 toString()...
2019-05-02 18:25:00
346
转载 JS 值类型和引用类型
值类型与引用类型1 ECMAScript 引用类型:引用类型通常叫做类(class),也就是说,遇到引用值,所处理的就是对象。从传统意义上来说,ECMAScript 并不真正具有类。事实上,除了说明不存在类,在 ECMA-262 中根本没有出现“类”这个词。ECMAScript 定义了“对象定义”,逻辑上等价于其他程序设计语言中的类。 1.1 对象是由 new 运算符加...
2019-05-02 15:41:00
110
转载 JS 调用栈
JS 是一门单线程语言javascript事件循环1.既然js是单线程,那就像只有一个窗口的银行,客户需要排队一个一个办理业务,同理js任务也要一个一个顺序执行。如果一个任务耗时过长,那么后一个任务也必须等着。那么问题来了,假如我们想浏览新闻,但是新闻包含的超清图片加载很慢,难道我们的网页要一直卡着直到图片完全显示出来?因此聪明的程序员将任务分为两类:同步任务和异步任务执...
2019-05-01 20:23:00
141
转载 SoapHttpClientProtocol动态调用webservice
1.参考连接:https://docs.microsoft.com/zh-cn/dotnet/api/system.web.services.protocols.soaphttpclientprotocol?view=netframework-4.7.22.webservicenamespace WS{ /// <summary> /// ...
2018-11-19 15:36:00
1656
转载 EF 首次加载很慢
1.Code First第一次启动会对比程序中的Model与数据库表(database initializer ),生成Model与数据库的映射视图。使用ef6的情况下,在Application_Start里面添加using (var dbcontext = new NCContext()) { var objectCo...
2018-08-10 14:37:00
344
转载 Topshelf +Quartz.net windows服务调度
1.Topshelf安装windows服务。2.Quartz.net调度windows服务。3.install-package Topshelf install-package TopShelf.Log4Net install-package Quartz注意:当Quartz是3+的版本时,许多原来包含在quartz类库中的功能现在被单独剥离出来成为了独...
2018-05-15 10:49:00
204
转载 Topshelf 安装 WCF Windows宿主服务
1.wcf写应用服务。[ServiceContract] public interface IService1 { [OperationContract] string GetData(int value); [OperationContract] string GetUserName...
2018-04-03 11:13:00
210
转载 动态调用webservice
public class WebServiceHelper { #region 动态调用WebService动态调用地址 /// < summary> /// 动态调用web服务 /// </summary> ...
2018-04-02 15:52:00
64
转载 nodejs express 调用外部API
1.需要添加request依赖2.var express=require('express');var router=express.Router();var request=require('request');router.get('/',function(req,res,next){ res.send("hello world");})...
2018-03-28 15:34:00
4081
转载 nodejs express学习
1.安装全局express,rexpress-generatornpm install -g expressnpm install -gexpress-generator2.生成项目框架express xxx,如果想用ejs 则express -e xxxx3.创建项目文件夹,下载项目基本模块: cd xxxx npm install...
2018-03-27 15:17:00
105
转载 搭建webapi相关配置
1.创建一个空的WebApi项目2.安装help文档:install-package Microsoft.AspNet.WebApi.HelpPage3.注册help:Global.asax==>AreaRegistration.RegisterAllAreas();4.启用SetDocumentationProvider:WebApplica...
2017-08-23 14:55:00
154
转载 JS定义命名空间
var Common = Common || {};Common.defineNS = function (nsString) { var parts = nsString.split('.'), parent = Common, i; if (parts[0] === "Common") { parts ...
2016-08-19 10:46:00
150
转载 上传附件加水印
/// <summary> /// 会产生graphics异常的PixelFormat /// </summary> private static PixelFormat[] indexedPixelFormats = { PixelFormat.Undefined, PixelFormat.DontCar...
2016-08-15 13:45:00
237
转载 ABP框架学习笔记
ABP是“ASP.NET Boilerplate Project (ASP.NET样板项目)”的简称。ASP.NET Boilerplate是一个用最佳实践和流行技术开发现代WEB应用程序的新起点,它旨在成为一个通用的WEB应用程序框架和项目模板。官网:http://www.aspnetboilerplate.com1.代码使用的是 2.生成的代码结构是...
2016-04-30 20:37:00
224
转载 IIS上部署ASP.NET5程序
由于发布后的文件下面wwwroot下面web.config里面是通过httpPlatform来运行的,所有要安装HttpPlatformHandler<httpPlatform processPath="..\approot\web.cmd" arguments="" stdoutLogEnabled="false" stdoutLogFile="..\logs\stdout....
2016-04-25 19:29:00
978
转载 sql辅助操作
1.查询表的基本信息SELECT *FROM sys.extended_properties ds LEFT JOIN sysobjects tbs ON ds.major_id=tbs.id WHERE ds.minor_id=0 and tbs.name='T_Test';--表名 2.查询表字段的说明信息 SELECT t.[...
2016-04-13 12:42:00
110
转载 XML解析
1.解析代码 添加引用, using System.Xml.Linq; using System.Xml; using System.Xml.Serialization;public class SerializerUtil<T> where T : class { public readonly string RootPath = P...
2016-02-17 17:25:00
72
转载 判断身份证是否合法
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace Common{ public static class IdentityCardHelper {...
2016-02-17 17:01:00
121
转载 JsonpResult
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Web.Mvc;namespace Common{ public class JsonpResu...
2016-02-17 17:00:00
110
转载 HttpUtil
using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Net;using System.Text;using System.Threading.Tasks;using System.Web;namespace Comm...
2016-02-17 16:54:00
127
转载 通用
using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Security.Cryptography;using System.Text;using System.Text.RegularExpressions;using Sys...
2016-02-17 16:51:00
248
转载 MVC文件上传
简单的文件上传1.View (文件上传用的是 multipart/form-data 格式)<div> @using (Html.BeginForm("SmallUpload", "Home", FormMethod.Post, new { enctype = "multipart/form-data" })) { <inp...
2016-02-17 15:59:00
93
转载 参考连接
EF --->Code First:http://www.cnblogs.com/Gyoung/archive/2013/01/17/2863145.htmlWCF --->http://www.cnblogs.com/iamlilinfeng/archive/2012/09/25/2700049.htmlMVC --->http://www.cnblog...
2016-02-16 10:04:00
113
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人