blog
Here are 16,784 public repositories matching this topic...
防冲突
underscore 使用 _ 作为函数的挂载对象,如果页面中已经存在了 _
对象,underscore 就会覆盖该对象,举个例子:
var _ = {value: 1 }
// 引入 underscore 后
console.log(_.value); // undefined
所以 underscore 提供了 noConflict 功能,可以放弃 underscore 的控制变量 _
,返回 underscore 对象的引用。
var _ = {value: 1 }
// 引入 underscore 后
// 放弃 "_",使用 "$"
var $ = _.noConflict();
console.log(_.value); // 1
// 使用 underscore
-
Updated
May 3, 2020
反馈安全漏洞的朋友请阅读
请不要直接在 issues 提交安全漏洞报告,目前已有一部分人正在使用该系统,你的公开提交很可能影响到他们的资料安全。
所以拜托以后直接发送安全漏洞信息到 hi@halo.run 谢谢!
直播笔记整理
1、对于框架的使用没必要花太多时间,应该多研究一下三大框架背后的设计思想。
2、当一个程序员对算法、语言标准、底层、原生、英文文档这些词汇产生恐惧感的时候他的技术生命已经走到尽头。
3、前端架构主要解决的是高复用性,架构能力提升方向主要是组件库开发、前端框架实现等。
4、对于前端进阶这个问题,其实看书的作用和意义已经不太明显,需要寻找好的平台和合适的项目,在项目中不断克服难题并挑战自己,遇到问题再去查资料总结。如果只是闭门看书那很难成为高手,书只是基础而已,真正的应用还是在项目中。
5、寒冬中能做的只有提升自己,但是光靠技术是不行的。
6、推荐 TensorFlow
、可视化切图、PWA
、WebGL
1)
TensorFlow
可以了解使用并做点东西出来,原理很难但不影响使用。
-
Updated
Apr 19, 2019 - JavaScript
-
Updated
Feb 23, 2019 - JavaScript
I think this would be very useful.
The current template (actually not even a template) is meant to be deleted right after the document is created... Which makes create new document a little bit more complex than it should be.
Thanks
As the project grows, it would be easier to contribute if the project follows a specific javascript style guide.
These are what I use in my personal projects:
Linter: https://github.com/eslint/eslint
Config: https://www.npmjs.com/package/eslint-config-airbnb
But any other would work too
前言
最近在研究网站测速相关的主题,接触到一个概念:Firsr Meaningful Paint,简称 FMP,中文译名:首次有效绘制时间。今天我们来讲讲这个概念的来龙去脉。
衡量页面打开速度是一件复杂的事情
First Meaningful Paint(以下简称 FMP),是谷歌创造的一个概念,用来更好地衡量页面打开的速度。你可能会说,要衡量页面打开速度,不是已经有 [DOMContentLoaded Event](https://developer.mozilla.org/en-US/docs/Web/API/Window/DOMContent
I resolved by adding /all/ to the URL that was generated. Without it the incorrect page was displayed. This is probably the wrong way of sorting it but it resolved my issue..
`function search_next($text = 'Next', $default = '') {
$per_page = Config::meta('posts_per_page');
$page = Registry::get('page_offset');
$offset = ($page - 1) * $per_page;
$total = Registry::get('total_posts');
Nginx 上配置 HTTPS 环境
这是一篇纯粹的流水账笔记,本文涉及到的 certbot/certbot-auto 版本是 0.21,如果你用的是 0.22 或以上版本,可参考官网步骤来配置通配符
环境
- CentOS: 7.4
- Nginx: 1.12.2
- Python: 2.7.5
步骤
通过 yum install certbot
或者按照官方步骤,安装 certbot
之后,运行如下命令开始生成证书:
certbot certonly --email xxx@gmail.com --cert-name xxx --webroot -w /www/xxx/ -d xxxx.com -w /www/xxx2/ -d xxxx2.com
Describe the bug
GitHub provides a few options when configuring a new repo like: license, .gitignore file, a README.md, and the Rennovate plugin. If you want to install any of these by default, which I usually do, then you get an error about the remote having newer content.
To Reproduce
Steps to reproduce the behavior:
- Create a repo with a readme during the script
- See the er
git的快捷键 alias,加 oh-my-zsh应该是使用中比较实用的小技巧
在实际应用中,一遍一遍输入git status,git status,git commit -m 'xx'什么的确实挺繁琐,于是配置alias可以简化成 gst === git status,gcmsg 'xxx' === git commit -m 'xxx',gp === git push等等。。
大概是这样配置的
- alias gst='git status'
- alias gp='git push'
- alias gp='git push'
- …
而且还发现oh-my-zsh默认用的插件是git,查看oh-my-zsh的config
cat ~/.zshrc
其中有一条配置是
plugins=(git)
那么刨根问底拦不住,看看git插件的配置
`
Git
Babel的那些库
自从接触ES2015
开始,babel
就一直在用,每个项目都在用。每次初始化项目后,.babelrc
和@babel/core
、@babel/cli
、@babel/preset-env
、@babel/transform-runtime
等等信手拈来,但是每次想要区别core-js
、@babel/poly-fill
、@babel/runtime
、@babel/plugin-transform-runtime
、@babel/preset-env
,却又含糊不清,索性来一次整理。
我们都知道,ES的每次标准公布,都会有许多新的特性,而这些特性无非分为两部分,一部分是新语法
,如箭头函数
、解构赋值
、扩展运算符
、for...in
、for...of
、class
、async/await
等,另一部分是API扩展
,如`Promi
前言
ESLint 是目前最主流、最强大的 JS 代码校验工具。当我们的代码触发了 ESLint 的报警规则时,ESLint 就会提示错误。
本系列文章将详细讲解那些需要手工介入修复的 ESLint 规则,帮助你顺利地把既有代码迁移到 ESLint 的保护之中。
no-fallthrough
禁止在
switch
/case
语句中使用穿透特性。
我们在 JS(以及大多数类 C 语言)里写 switch/case 往往会踩的一个坑就是 “穿透”。简单解释一下,在 swithc 的执行过程中,匹配了一个 case 并执行完这个 case 的代码之后,如果没有遇到 break
语句,则会继续执行后续所有 case 的代码。
这是一个非常反直觉的设计,也是 bug 的温床。因此 ESLint 提供
-
Updated
May 18, 2020 - HTML
I really like Utterance! It is simply, hosted and doesn't force me to put my GitHub token on a page sent to a user's browser...
I have one enhancement proposal. Not all people like to authorize some GitHub apps to post on their bahalf. Seeing the form it is not clear (for people who didn't visit the project page before) and it is possible to click "2 comments" to comment directly on GitHub (ass
-
Updated
Mar 9, 2020 - JavaScript
After setup my blog (BlogEngine.net 3.3.8.0 on IIS 8.0) to use https I cannot publish anymore a post. Neither I cannot re-add my blog after remove it.
When I try to do, I receive this error
Open Live Writer
Can't connect to your blog service:
Network Connection Error - Error attempting to connect to blog at:
http://www.myDomain.com
Improve this page
Add a description, image, and links to the blog topic page so that developers can more easily learn about it.
Add this topic to your repo
To associate your repository with the blog topic, visit your repo's landing page and select "manage topics."
Summary
Enable the
heading-increment
rule to our remark-lint config.Followup of #21919
Motivation
Headings should only increase 1 level at a time for accessibility.
Steps