10 2022 档案
摘要:https://www.zhihu.com/question/37751951/answer/73425339 https://www.zhihu.com/question/28966220
阅读全文
摘要:小知识,大挑战!本文正在参与“程序员必备小知识”创作活动。 引言 实现高内聚,低耦合、结构清晰不臃肿、可读性高、数据冗余性低、高复用、易扩展的代码,并非易事。上到设计模式,下到某个类、方法、函数的构造。在这里我分享一下我自己的代码设计、编写风格,让我们互相学习。 Python代码风格 首先我们要以
阅读全文
摘要:Manage Nodes and Clouds Number of executors Jenkins 可以在此节点上执行并发构建的最大数目。 在开始的时候,使用节点的 CPU 个数作为该值是一个不错的选择。一个较大的值将会使每个构建花费更多的时间, 但是却有可能增加系统整体的吞吐量。例如,一个构建
阅读全文
摘要:安装Jenkins [root@hub ~]# docker pull jenkins/jenkins Using default tag: latest latest: Pulling from jenkins/jenkins Digest: sha256:3c34c0703e9bb2b82ca5
阅读全文
摘要:在实际的工作中,我们总是会有遇见生产环境出问题的时候。一旦出现问题。并且业务十分重要的时候。业务要求在最短时间内让系统恢复正常,这就会给人带来很大的压力。在这种重压之下有可能会让我乱了分寸茫了大脑。那我们要怎样快速的有针对性的进行故障排错,解决故障呢?问题是无穷的,个人觉得只有掌握了:故障排错的思想
阅读全文
摘要:代码 var myPromise = new Promise(function (resolve, reject) { console.log('do sth.'); setTimeout(() => { console.log('~~~~~'); resolve('ok'); // reject(
阅读全文
摘要:代码 var myPromise = new Promise(function (resolve, reject) { console.log('do sth.'); setTimeout(() => { console.log('~~~~~'); // resolve('ok'); reject(
阅读全文
摘要:代码 var A = new Promise(function (resolve, reject) { console.log('do sth.'); setTimeout(() => { console.log('~~~~~'); resolve('ok'); // reject('error *
阅读全文
摘要:代码 var A = new Promise(function (resolve, reject) { console.log('do sth.'); setTimeout(() => { console.log('~~~~~'); // resolve('ok'); reject('error *
阅读全文
摘要:只处理成功 var A = new Promise(function (resolve, reject) { console.log('do sth.'); setTimeout(() => { console.log('~~~~~'); resolve('ok'); // reject('erro
阅读全文
摘要:mod.js // 缺省导出类 export default class { constructor(x) { this.x = x; } show(){ console.log(this.x); } } // 命名导出 函数 export function foo(){ console.log('
阅读全文
摘要://a.js let b=333; export {b}; //index.js import {b} from './a' //终端 node index.js //终端提示 Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'E:\Thousand
阅读全文
摘要:问题今天刷leetcode的时候,发现有些函数老是重复书写,于是单独写了一个uitls.js模块,通过import的方式导入,没想到居然报错了。 解决方案错误警告其实已经给出了解决方案,在package.json文件中设置"type": "module"。 所以执行一下下面的命令,默认所有配置为‘y
阅读全文

浙公网安备 33010602011771号