自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

原创 spring boot自定义参数注解

@Retention(RetentionPolicy.RUNTIME)@Target({ElementType.PARAMETER,ElementType.METHOD})public @interface Test {}@Configurationpublic class TestConfig implements WebMvcConfigurer { @Override public void addArgumentResolvers(List<HandlerMet.

2020-07-27 19:08:51 24

原创 Spring线程中使用@Autowired

@Componentpublic class ApplicationContextUtil implements ApplicationContextAware { private static ApplicationContext applicationContext = null; @Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansE.

2020-06-29 20:11:32 69

原创 Newtonsoft.Json忽略empty

class ContractResolver : CamelCasePropertyNamesContractResolver{ protected override JsonProperty CreateProperty(MemberInfo member, MemberSerialization memberSerialization) { var a = ...

2020-04-18 08:50:48 36

原创 graphviz快速生成流程图

安装graphviz设置环境变量path=C:\Program Files (x86)\Graphviz2.38\bin命令:dot -T png d:/test.txt -o d:/test.png文档https://graphviz.gitlab.io/documentation/下载地址https://graphviz.gitlab.io/_pages/Download/Downl...

2020-03-30 18:30:48 154

原创 python http server

from aiohttp import webimport osimport timeasync def index_Handle(request): fp=open(os.path.abspath('./index.html'),'r',encoding="utf-8") text=fp.read() fp.close() return web.Resp...

2020-03-28 23:52:08 27

原创 windows查看进程命令行

wmic process get caption,commandline,processid /valuewmic process where caption="java.exe" get caption,commandline,processid /valuewmic process where processid=9764 get /format:value

2020-03-23 18:24:38 540

原创 python设置win10壁纸

import osimport win32gui,win32conimport randomfrom PIL import Imageimport reds=[{"paths":["e:/壁纸/"],"isPart":False},{"paths":["e:/醒来/"],"isPart":True}];wallpaper="e:/壁纸/wallpaper.jpg";wid...

2020-02-10 19:30:04 203

原创 sqlserver分区

创建文件组alter database dbname add filegroup fq_01alter database dbname add file(name = 'fq_01',filename = 'f:\database\fq_01.mdf',size = 1mb,filegrowth = 1mb)to filegroup fq_01...创建分区函数create parti...

2020-01-20 14:40:06 39

原创 sqlserver获取时间

年月日select year(current_timestamp),month(current_timestamp),day(current_timestamp),convert(varchar(10), getdate(),120)时分秒 毫秒select datepart(hh,getdate()),datepart(mi,getdate()),datepart(ss,getdate...

2020-01-09 11:16:54 43

原创 A component is changing an uncontrolled input of type undefined to be controlled

A component is changing an uncontrolled input of type undefined to be controlled. Input elements should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or...

2020-01-02 12:30:58 188

原创 javascript计算时间差

class ts { constructor() { this._ms = ['Month', 'Date', 'Hours', 'Minutes', 'Seconds', 'Milliseconds']; } _f(a, b, r, i) { var m = this._ms; for (; i < m.length; i++) { ...

2019-11-22 09:37:08 37

原创 log4net使用环境变量

Environment.SetEnvironmentVariable("log_home", @"d:/log");ILoggerRepository repository = LogManager.CreateRepository("Repository");XmlConfigurator.Configure(repository, configFileInfo);ILog log = L...

2019-10-13 11:21:12 141

原创 条件拼接

class CL { constructor(conditions) { this._conditions = conditions; } toString() { this._depth = 0; this._index = 0; this._curr = this._conditions[0]; ...

2019-10-05 09:49:43 37

原创 表单提交另类阻止方式

<div onsubmit="return alert('???'),false"><form><input type="submit"/></form></div>

2019-09-25 22:25:37 30

原创 vue拦截表单提交

<form id="app" v-if="isReady" @submit.prevent="submit"> <input type="text" name="name" v-model.trim.lazy="model.name" /> <input type="number" name="num" v-model.number="model.nu...

2019-09-24 19:08:35 186

原创 c#执行js

using (var js = new JavaScriptEngineSwitcher.ChakraCore.ChakraCoreJsEngine()){ js.EmbedHostObject("console", new { log = new Action<object>(p => Console.WriteLine(p)) }); js.Execute(...

2019-09-21 15:57:12 236

原创 node-canvas使用自定义字体

const fs = require('fs');const { createCanvas, registerFont } = require('canvas');registerFont(env.url('iconfont/iconfont.ttf'), { family: 'iconfont' });for (let v of (await env.file.readAllText('i...

2019-09-12 20:32:02 158

原创 nginx反向代理

include abc.com.conf;abc.com.conf:upstream abc_com { server 192.168.0.5:1111 weight=1; ...}upstream any_abc_com { server 192.168.0.6:1111weight=1; ...}server{ ... ...

2019-09-09 22:23:44 40

原创 nodejs执行命令

async function exec(a) { return new Promise((resolve, reject) => { try { var end = 0; var http = require("http").createServer(function (req, res) { ...

2019-08-19 10:03:40 444

原创 上传图转base64

<script>function readAsDataURL(file, callback) { var reader = new FileReader(); reader.onload = function (e) { callback({ name: file.name, base64Url: e.target.result }); };...

2019-08-15 12:43:54 22

原创 python调dotnet

import clrimport timeimport osimport sysos.system("title job"+sys.argv[1])clr.AddReference('library')from library import *method=Sync.Instance.GetType().GetMethod(sys.argv[1])last=0while Tru...

2019-08-13 20:06:42 66

原创 nodejs+react动态调用jsx

var React = require("react");var ReactDOMServer = require("react-dom/server");var jsx = `<div> <a href={this.props.href}>{this.props.text}</a> <div dangerouslySetInnerH...

2019-08-03 22:12:07 323 1

原创 JavaScript在原型上定义属性

Object.defineProperties(Number.prototype, { obj: { get: function () { return { add: p => this + p } } }, add: { value: function (p) { return this + p } }});console.log((1).obj...

2019-07-31 09:43:19 90

原创 使用html2canvas将html保存为图片

<div>使用html2canvas将html保存为图片</div><a download="使用html2canvas将html保存为图片.png"><img/></a><style>div { position:fixed; top:200%; background: -webkit-lin...

2019-06-29 11:38:22 43

原创 Scaffold-DbContext "Build failed"

Scaffold-DbContext "Build failed" 解决方法:确保项目可以无错误地构建安装EntityFrameworkCore:Scaffold-DbContext "server=.;database=test;uid=test;pwd=test;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models -For...

2019-06-24 17:16:49 2249

转载 Uncaught TypeError: $.handleError is not a function

if (!jQuery.handleError) jQuery.extend({ handleError: function (s, xhr, status, e) { if (s.error) { s.error.call(s.context || s, xhr, status, e); }...

2019-06-14 10:26:56 174

原创 linux安装.net core

mkdir /home/admin/dotnetwget -O /home/admin/dotnet/temp https://............sdk.gztar zxf /home/admin/dotnet/temp -C /home/admin/dotnetrm /home/admin/dotnet/tempsudo ln -s /home/admin/dotnet/dotne...

2019-06-12 09:25:39 323

原创 mssql刷新视图

create proc 刷新视图asdeclare @name nvarchar(max)DECLARE vcursor CURSOR FOR SELECT name from sys.views order by create_date ascOPEN vcursorFETCH NEXT FROM vcursor INTO @nameWHILE @@FETCH_STATUS = ...

2019-05-28 13:26:07 203

原创 IIS 查询参数过长的解决办法

<system.web> <httpRuntime maxQueryStringLength="2097151"/> </system.web> <system.webServer> <security> <requestFiltering> <requestLim...

2019-05-22 09:00:23 248

原创 foobar2000提取音频

分割文件和FAQ歌曲信息乱码可尝试选择其它输出格式编码器:http://www.foobar2000.org/encoderpackAPE解码器:http://www.foobar2000.org/components/view/foo_input_monkey

2019-04-23 18:10:20 441

原创 命令行删除windows凭据

cmdkey /delete:Domain:target=TERMSRV/192.168.0.71开机启动目录:shell:startup

2019-03-23 11:31:55 3595

原创 html5表单验证自定义提示

<form novalidate="novalidate" onsubmit="return validity.call(this)"> <input type="text" name="t" required pattern="^\d+$" data-validity-valueMissing="提示1" data-validity-patternMismatch="提...

2019-03-22 12:43:23 402

原创 c# windows服务启动GUI进程

Start("\"e:/test.exe\"", true);public static void Start(string commandLine, bool showWindow){ IntPtr hToken; IntPtr hTokenDup; const int TOKEN_ALL_ACCESS = 268435456; const int Tok...

2019-03-16 08:48:45 323 1

原创 jsonp+cookie实现数据跨域共享

var t = new CookieStorage('http://abc.com/path');t.set('name', '123', function () { });//设置t.get('name', alert);//获取t.remove('name', function () { });//删除function CookieStorage(url) { this.url =...

2019-03-05 22:39:14 530

原创 Elasticsearch 常用查询配置

{ "from": 0,"size" : 100,//分页用(只统计数量将size设为0) "query" : { "bool" : { "filter" : [ {"term" : {"field" : 123}},//精确匹配 {"terms" : {"field" : [123,345]}},//相当于in...

2019-02-25 17:55:45 653

原创 ReactJS双向绑定

<form id="rd"></form><script type="text/babel">var data ={title:123,items:[ {a:1,b:2}, {a:4,b:3} ]};var DOM=React.createClass({ getInitialState:function(){ ...

2019-02-23 14:39:27 253

原创 javascript Eval扩展正则替换

function func(s, m, r) { m = s.match(m); var t = { func: (a, b) => parseInt(a) * parseInt(b), match: m.groups }; return r.replace(/\{.+?\}/g, p => eval('(functio...

2019-02-22 16:43:56 192

原创 css3 夜间模式

var ts = [ 'img', 'video', 'iframe', 'embed', 'object', '[style*="background:url"]', '[style*="background-image:url"]', '[style*="background: url"]', '[style*="bac...

2019-02-22 13:50:21 858

原创 SQL获取表结构

mysqlselect a.table_name,a.COLUMN_NAME name,a.DATA_TYPE type,a.COLUMN_DEFAULT defaultValue,b.table_comment table_description,a.COLUMN_COMMENT description,a.CHARACTER_MAXIMUM_LENGTH as length,a.NU...

2018-11-27 14:43:11 455

原创 SQL调优-统计信息未及时更新导致查询缓慢

默认情况下,查询优化器已根据需要更新统计信息以改进查询计划;但在某些情况下,您可以通过使用 UPDATE STATISTICS 或存储过程 sp_updatestats 来比默认更新更频繁地更新统计信息,提高查询性能。UPDATE STATISTICS性能优化——统计信息——SQLServer自动更新和自动创建统计信息选项...

2018-07-06 19:27:23 821

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