ESLint是一个前端、Node领域中流行的代码规范检查工具,使用起来很方便。
之前为了强制推行代码规范,我在CI任务中加入了ESLint检查。保障了规范的同时,也引入了痛点:CI的时长延长了2~3分钟左右。因为现在开发的工程体量比较大,ESLint会占用很多的内存、CPU资源,且运行时间较长。
[Unit] | |
Description=Redis persistent key-value storage | |
After=network.target | |
[Service] | |
Type=notify | |
ExecStart=/usr/bin/redis-server /etc/redis.conf --supervised systemd --daemonize no | |
ExecStop=/usr/bin/redis-cli -p 6379 shutdown | |
ExecReload=/bin/kill -USR2 $MAINPID | |
Restart=always |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#!/usr/bin/python3 | |
import asyncio | |
import time | |
import socket | |
import argparse | |
import aiohttp | |
class MyConnector(aiohttp.TCPConnector): |
For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.
After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft
--- Actions --- | |
$Copy <M-C> | |
$Cut <M-X> <S-Del> | |
$Delete <Del> <BS> <M-BS> | |
$LRU | |
$Paste <M-V> | |
$Redo <M-S-Z> <A-S-BS> | |
$SearchWeb <A-S-G> | |
$SelectAll <M-A> | |
$Undo <M-Z> |
https://www.hackerrank.com/contests/w23/challenges/sasha-and-swaps-ii | |
感谢ftiasch老师教导,参考了 https://async.icpc-camp.org/d/408-fft 和其他一些地方的东西 | |
P = 1e9+7 | |
Q = ceil(sqrt(P)) | |
a, b为两个向量 | |
c = convolution(a, b) | |
c系数取值为 [0, n*(P-1)^2] 的整数,若n*(P-1)^2的表示需要超过53 bits(double mantissa)则很可能会出错 |