- 博客(1201)
- 资源 (6)
- 收藏
- 关注
原创 在CSDN写博客12年了,提几点建议
从2020开始到现在一年多没有更新了,一方面是在工作中burn out了,其次是站在程序员的视角,CSDN的变化我认为一些地方有待改进。先说首页。头条/热点内容有待提高。之前的首页内容有很多“纯技术的内容”,例如Hadoop,spark大数据实践,云架构模式,开源框架推荐等等。个人认为比现在的内容更好一些,对程序员这个群体而言。现在的首页资讯部分有点过于公司类的新闻(除了log4j以外和技术相关),不知道其他程序员是否有兴趣,至少对我个人而言兴趣不是很大。个人建议这部分新闻类可以放在不太显眼的位置
2022-01-08 11:30:11 1237 2
原创 使用sphinx生成python项目文档
#1pip install sphinx#2sphinx-quickstart#3修改 conf.pyimport osimport syssys.path.insert(0, os.path.abspath('../..'))html_theme = 'classic'#4为模块生成rstsphinx-apidoc -f -o source/ ../{module_name}/Edit index.rst.. toctree:: :maxde..
2020-08-08 22:01:33 995
原创 windows 生成self-sign证书
打开powershell - 管理员身份运行New-SelfSignedCertificate -CertStoreLocation Cert:\LocalMachine\My -DnsName "mysite.local" -FriendlyName "MySiteCert" -NotAfter (Get-Date).AddYears(50)
2020-06-18 17:07:31 1351
原创 vmware-workstation-and-device-credential-guard-are-not-compatible
1. off hyper-v feature2.bcdedit /set hypervisorlaunchtype off
2020-06-18 17:06:19 806
原创 windows配置tensorflow python object detection 环境
option 1: pip install <binary>pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whloption 2 : use anaconda1.https://www.anaconda.com/d...
2020-03-14 16:01:00 762
原创 python 修改ip地址
安装包pip install wmipip install pywin32实现import wmi# Obtain network adaptors configurationsnic_configs = wmi.WMI().Win32_NetworkAdapterConfiguration(IPEnabled=True)print(nic_configs);# ...
2020-03-14 15:57:29 7871 1
原创 windows enable long environment path
windows-> gpedit.msc -> enterEdit Group Policy -> Local Computer Policy > Computer Configuration > Administrative Templates > System > Filesystem->NTFS -> double click
2020-03-14 15:55:01 908
原创 部署IIS后dll not found
问题:Could not load file or assembly 'XX' or one of its dependencies. An attempt was made to load a program with an incorrect format.解决:IIS->application pool -> advanced settings ->Ena...
2020-03-14 15:52:41 877
原创 powershell 遍历数据库表导出为csv
Write-Output 0$server = ".\"$database = "dbname"$tablequery = "SELECT schemas.name as schemaName, tables.name as tableName from sys.tables inner join sys.schemas ON tables.schema_id = schemas.sche...
2020-02-25 12:18:30 1639
原创 windows 关闭占用端口的进程
1. netstat -ano | findstr :yourPortNumber2. taskkill /PID typeyourPIDhere /F
2020-02-25 12:17:21 748
原创 在windows配置 cygwin 和 gcc
1. install cygwinhttps://www.cygwin.com/2.copy the setup.exe under cygwin64 folder and runC:\cygwin64>setup-x86_64.exe -q -P wget -P gcc-g++ -P make -P diffutils -P libmpfr-devel -P libgmp-d...
2020-02-25 12:16:26 972
原创 MDF does not reside in a read-only database or filegroup
错误信息“The file "MDF" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.”解决:1. C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL2....
2019-07-24 22:26:51 910
原创 ffmpeg常用命令
1.rtsp into mp4ffmpeg.exe -i "rtsp://username:password@192.168.1.183:554" -f mp4 -r 25 -an 640x480 -ss 600 -t 600 -s "test.mp4"2.rtsp or video to imagesffmpeg -rtsp_transport tcp -i rtsp://.. ...
2019-07-24 22:25:34 850
原创 c# RabbitMQ 和 ActiveMQ windows环境的配置和使用
c# RabbitMQ 和 ActiveMQ windows环境的配置和使用RabbitMQ1. 下载配置 erlang确保 'ERLANG_HOME' 在环境变量中配置2. 下载安装 rabbit mq3. 激活 management portal 插件:cd C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.3....
2019-07-24 22:22:39 971
原创 C# 解码smtp协议报文中的QuotedPrintable格式
C# 解码smtp协议报文中的QuotedPrintable格式private static string DecodeQuotedPrintables(string input, string charSet) { if (string.IsNullOrEmpty(charSet)) { var...
2019-07-24 22:18:13 1013
原创 c# digest身份验证
c# digest身份验证1. digest http request 类public class DigestHttpWebRequest { private string _user; private string _password; private string _realm; private string _n...
2019-07-24 22:17:31 3003 2
原创 c# topshelf 编写windows service
使用topself写windows service1. 在console程序的program.cs main函数中注册服务信息(安装服务时会调用)...static void Main(string[] args) { log4net.Config.XmlConfigurator.Configure(); log.Inf...
2019-03-30 22:39:30 1073
原创 使用C# 发送不同信息格式的http请求
1.最常见的post jsonvar jsonObject = JsonConvert.SerializeObject(model);... var str = new StringContent(jsonObject, Encoding.UTF8, "application/json");...2.url encoded con...
2019-03-30 22:37:18 1421
原创 ubuntu 开机自动执行脚本
$ crontab -e@reboot ( sleep 30 ; bash /path/to/your/script.sh )
2019-03-30 22:32:09 3093
原创 yolo+ ubuntu完成视频分析
使用yolo ubuntu完成视频分析下载源码并编译git clone https://github.com/pjreddie/darknetcd darknetmake下载训练好的模型wget https://pjreddie.com/media/files/yolov3.weights使用命令预测图片./darknet detect cfg/yolov3.cfg...
2019-02-16 22:07:33 1742
原创 使用POSTMAN 测试firebase
使用postman测试google firebase 消息通知1. urlhttps://fcm.googleapis.com/fcm/send2. Header :Authorization key={your api key}Content-Type application/json3. body :{ "to" : "{device refresh token...
2019-02-16 22:06:23 1802
原创 ubuntu 配置opencv 3.4环境
ubuntu install opencv-3.4 cd ~/mkdir opencvcd ~/opencvsudo apt-get updatesudo apt-get install -y build-essential cmakesudo apt-get install -y qt5-default libvtk6-devsudo apt-get install -y zl...
2019-02-16 22:05:22 1249
原创 Javascript 从ES5到ES7 - 20高阶函数
1. bind value into 'this'const area = function() { return this.width * this.height;}; const boundArea = area.bind( { width: 2, height: 3 } );boundArea();2. format currency函数const forma...
2019-02-05 15:48:36 499
原创 Javascript 从ES5到ES7 - 19 map,reduce,filter
1. mapconst numbers = [2, 4, 8, 10];const halves = numbers.map(x => x / 2);2. filterconst words = ["spray", "limit", "elite", "exuberant", "destruction", "present"];const longWords
2019-02-05 15:47:23 532
原创 Javascript 从ES5到ES7 - 18 __proto__
1. this vs prototypefunction Fn() {}Fn.prototype.print = function() { console.log("Calling Fn.prototype's print method");};var obj = new Fn();obj.print(); // -> Calling Fn.prototype's pri...
2019-02-05 15:46:55 348
原创 Javascript 从ES5到ES7 - 17 Object.keys 和Object.entries进行集合遍历
array.includes:var arr = [1,2,3,4,5]arr.indexOf(3) >=0 //trueequalsarr.includes(3) //trueObject.values:var obj = {a:1,b:"2",c:3.0}console.log(Object.values(obj));//[1,"2",3.0]using Obj...
2019-02-05 15:45:49 496
原创 Javascript 从ES5到ES7 - 16 使用requestAnimationFrame代替setInterval完成动画效果
var globalID;function repeatOften() { $("<div />").appendTo("body"); globalID = requestAnimationFrame(repeatOften);}$("#start").on("click", function() { globalID = requestAnimationFr...
2019-02-05 15:44:45 683
原创 Javascript 从ES5到ES7 - 15 浏览器api与调用栈
实例1function main(){ console.log('A'); setTimeout( function display(){ console.log('B'); } ,0); console.log('C');}main();// Output// A// C// B1.main 函数进入调用栈,console....
2019-02-05 15:42:32 433
原创 Javascript 从ES5到ES7 - 14 类型运算
1. 数字,字符串,数组,布尔混合操作的几种情况3 * "3" //91 + "2" + 1 //121true + true //210 - true //9const foo = { valueOf: () => 2}3 + foo // 54 * foo // 8const bar = { toString: () => " promise ...
2019-02-05 15:37:58 359
原创 Javascript 从ES5到ES7 - 13 Call, apply , bind
Call :var obj = {name:"Niladri"};var greeting = function(a,b,c){ return "welcome "+this.name+" to "+a+" "+b+" in "+c;};console.log(greeting.call(obj,"Newtown","KOLKATA","
2019-02-05 15:37:00 365
原创 Javascript 从ES5到ES7 - 12 Promise.All
Promise.all([GetResource1(),GetResource2()]) .then([json1,json2])=>{ //process json1 //process json2 } var promise1 = Promise.resolve(3);var promise2 = 42;var promise3 = n...
2019-02-05 15:36:23 498
原创 Javascript 从ES5到ES7 - 11 fetch
fetch('http://example.com/movies.json') .then(function(response) { return response.json(); }) .then(function(myJson) { console.log(JSON.stringify(myJson)); });
2019-02-05 15:35:38 628
原创 Javascript 从ES5到ES7 - 10 函数闭包
/*Closure*/var createPet = function(name) { var sex; return { setName: function(newName) { name = newName; }, getName: function() { return name; }, ...
2019-02-05 15:34:45 425
原创 Javascript 从ES5到ES7 - 9 object factory
function createNewPerson(name) { var obj = {}; obj.name = name; obj.greeting = function() { alert('Hi! I\'m ' + this.name + '.'); }; return obj;}var salva = createNewPerson('Salva');...
2019-02-05 15:32:53 529
原创 Javascript 从ES5到ES7 - 8 export和import
export function (export.js):export function addTextToBody(text) { const div = document.createElement('div'); div.textContent = text; document.body.appendChild(div);}Export object (export-o...
2019-02-05 15:31:34 830
原创 Javascript 从ES5到ES7 - 7 类和继承
/*the old way*/function Person(first, last, age, gender, interests) { this.name = { 'first': first, 'last' : last }; this.age = age; this.gender = gender; this.interests = intere...
2019-02-05 15:28:16 706
原创 Javascript 从ES5到ES7 - 6 async await
1. sample load avatarasync function showAvatar() { // read our JSON let response = await fetch('/article/promise-chaining/user.json'); let user = await response.json(); // read github use...
2019-02-05 15:25:00 885
原创 Javascript 从ES5到ES7 - 5 Promise与aync await
/_ ES6 _/const isMomHappy = true;// Promiseconst willIGetNewPhone = new Promise( (resolve, reject) => { // fat arrow if (isMomHappy) { const phone = { b...
2019-02-05 15:23:26 403
原创 Javascript 从ES5到ES7总结 - 4-promise与callback chain
function doSomething1(){ return new Promise((resolve, reject) => { if (Math.random() > 0.05) { resolve("step1 success"); } else { reject("step1 fail"); } })}fun...
2019-02-05 15:22:06 449
原创 Javascript 从ES5到ES7总结 - 3 array-set-map-2
array :var arr = [{id: 1, name: "one"}, {id: 2, name: "two" }]array.find(object => object.id === 2); // {id:2, name:"two"}-sorting const arr = [ "sex", "age", "job"];arr.sort(); //re
2019-02-05 15:21:14 384
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人