barretlee / node-daily-practice Goto Github PK
View Code? Open in Web Editor NEW每天写个小程序。
Home Page: https://github.com/barretlee/Node-Daily-Practice/issues
License: MIT License
每天写个小程序。
Home Page: https://github.com/barretlee/Node-Daily-Practice/issues
License: MIT License
**需求:**读取 log 日志,分析 category 为自定义类型的数据,产出报表。
**场景:**log 日志的接口有两个参数,startTime 和 endTime,分别表示收集日志的起始时间和结束时间,接口每次最多吐出 1w 条数据。
**问题:**数据至少有 1 亿条,不使用数据库,拿到 category 为 A B C 的每日数量,监控每日增量,增量过大则邮件警报。
问题:使用 NodeJS 抓取 http://www.alloyteam.com/ 页面上的文章列表,以如下格式保存到 article.md
文件中。
[文章名字1](文章链接1)
> 文章简介1
[文章名字2](文章链接2)
> 文章简介2
先只考虑首页的爬虫,后续思考:
问题:遍历某个目录下所有的 json 文件,将这些文件的文件名和文件目录保存到指定的位置。
后续思考:
对于数据库这块,了解的实在是不怎么深入。除了基本的增删改查和一点查询技巧之外,知之甚少。相信这些也都是很多前端工程师的软肋。
定时跑一个程序,这个程序会发送很多网络请求,挂掉的可能性是很大的,如果只是在程序内做些容错控制,内存会暴涨,也不方便对错误做梳理。
现打算,使用 Master 来控制多个 Child,Child 进程挂了之后,Master 重新启动,Child 不做过多的错误处理,出了问题就重来,大的任务分解成小任务,通过 Master 来分发管理。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.