前端老生

日拱一卒無有盡,功不唐捐終入海

千羊之皮,不如一狐之腋;千人之诺诺,不如一士之谔谔

某二维码追溯系统

继续阅读

macOS 使用 shadowsocks 为 Github(Gitlab) 设置代理(HTTP/SSH)

macOS 使用 shadowsocks 为 Github(Gitlab) 设置代理(HTTP/SSH) brew install socat    Host github.com    User root    IdentityFile ~/.ssh/id_rsa_gitlab    ProxyCommand socat - PROXY:127.0.0.1:%h:%p,proxyport=1087对于Windows用户,要使用socks5代理却没有 nc 的,可以将ProxyCommand nc -v 继续阅读

JavaScript 数组中Map和ForEach的区别

1. forEach 是一个普通迭代函数执行里面的逻辑2. map会迭代完成后 根据迭代内容的返回值 生成新的数组对象let arr = [1, 2, 3, 4, 5];let doubled1 = [];arr.forEach(num => {   doubled1.push(num * 2);});let doubled2 = arr.map(num => {   return num * 2;}); 继续阅读

umijs 提示: eslint assignment to property of function parameter 'state'. (no-param-reassign)

eslint assignment to property of function parameter 'state'. (no-param-reassign) 使用umijs 创建项目 yarn create @umijs/umi-app更新 state 时提示eslintjjijiajianjian c监测报错   eslint assignment to property of function parameter 'state'. (no-param-reassign)addUser(state: any, action: any) {  sta 继续阅读

javascript声明函数的三种方式

js函数声明方式的三种方式/** * 1:直接声明方式 */function function1(a, b, c) {    console.log(a + b + c);}function1(1, 2, 3); //6/** * 2:函数表达式 */var function2 = function (a, b, c) {    console.log(a + b + c);};function2(1, 2, 3); //6/**  * 3:通过构造函数方式 * 支持创建动态函数,动态 继续阅读

How to load a small css background image before lots of other images (html element in .css file)?

https://stackoverflow.com/questions/21255349/how-to-load-a-small-css-background-image-before-lots-of-other-images-html-elemehttps://stackoverflow.com/questions/7883281/preloading-background-image-on-homepagehttps://stackoverflow.com/questions/1373142/preloading-css-images 继续阅读