const mocks = [];function getJsonFiles(jsonPath) {function findJsonFile(path) {let files = fs.readdirSync(path);files.forEach(function(item) {let fPath = join(path, item);let stat = fs.statSync(fPath);if (stat.isDirectory() === true) {findJsonFile(fP…
node环境下:node_modules里面的文件 package.json来制定名单,需要哪些npm包来参与到项目中来,npm install命令根据这个配置文件增减来管理本地的安装包. dependencies(项目依赖库):在安装时使用--save则写入到dependencies 和devDependencies(开发依赖库):在安装时使用--save-dev将写入到devDependencies node_modules文件里的依赖全部安装:npm install node_module…
参考:http://www.liaoxuefeng.com/wiki/001434446689867b27157e896e74d51a89c25cc8b43bdb3000/001434502419592fd80bbb0613a42118ccab9435af408fd000 1.node环境下的模块(module)概念:一个name.js文件就是一个模块,name是模块名称,模块中的函数方法称之为变量. 2.模块变量的调用:A.js中输出变量module.exports=函数名称; B.js引入模…
.net环境下ckeditor与ckfinder中文文件链接乱码的问题 将ckfinder.js中的getUrl:function(){return this.folder.getUrl()+encodeURIComponent(this.name);}改为:getUrl:function(){return this.folder.getUrl()+this.name;}…
Windows环境下用C#编程将文件上传至阿里云OSS笔记 本系列文章由ex_net(张建波)编写,转载请注明出处. http://blog.csdn.net/ex_net/article/details/24962567 作者:张建波 邮箱: 281451020@qq.com  欢迎来信交流! 第1步: 下载阿里云OSS的SDK包,因为笔者的环境是PHP服务,所下面载的是PHP的SDK包 http://help.aliyun.com/view/13438816.html 第2步:将代码整合进你…
Linux环境下使用VSCode编译makefile文件的注意事项 首先安装C/C++的两个依赖 在debug,launch会自动的生成下方的launch.json launch.json { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.…
linux环境下删除包含特殊字符的文件或目录 ls -liUse find command as follows to delete the file if the file has inode number 4063242: $ find . -inum 4063242 -deleteOR$ find . -inum 4063242 -exec rm -i {} \;…
零.前置 已经安装 node 环境. 一.代码片段 var http = require('http'); var path = require('path'); var fs = require('fs'); var url = require('url'); var server = http.createServer((req, res) => { var staticPath = path.join(__dirname, ''); var pathObj = url.parse(req.…
写在前面 Tomcat作为最常用的Java Web服务器,随着并发量越来越高,Tomcat的性能会急剧下降,那有没有什么方法来优化Tomcat在高并发环境下的性能呢? Tomcat运行模式 Tomcat的运行模式有3种. 1.bio模式 默认的模式,性能非常低下,没有经过任何优化处理和支持. 2.nio模式 利用java的异步io护理技术,noblocking IO技术.要想运行在该模式下,则直接修改server.xml里的Connector节点,修改protocol为如下配置. protoco…
今天发现maven在windows环境下加载的settings.xml文件是c:下的,就算修改conf下的settings.xml里的<localRepository>给他明确指向也没用.…