这是一本NodeJS新手入门教程,涵盖了使用NodeJS开发各种程序所必要的知识,请点击以下链接阅读。
另外,如果愿意协助完善这篇教程的话,您可能需要用到天书这个小工具。
七天学会NodeJS
License: MIT License
这是一本NodeJS新手入门教程,涵盖了使用NodeJS开发各种程序所必要的知识,请点击以下链接阅读。
另外,如果愿意协助完善这篇教程的话,您可能需要用到天书这个小工具。
it seems the argv has updated the method join.
In line 486 of index.html, argv.join(' ') should be argv.run().targets.join(' ').
Correct me if my fault.
能否来个6寸pdf来适应kindle
:)
非常感谢作者对开源社区的贡献。您的文章已经被我收录到了免费的计算机编程类中文书籍,欢迎关注。
在第七课里的sample里 combineFiles方法里处理函数为什么要写成闭包,
这样写有什么好处?如果是习惯问题,为什么会有这样的习惯,谢谢啦
function combineFiles(pathnames, callback) {
var output = [];
(function next(i, len) {
if (i < len) {
fs.readFile(pathnames[i], function (err, data) {
if (err) {
callback(err);
} else {
output.push(data);
next(i + 1, len);
}
});
} else {
callback(null, Buffer.concat(output));
}
}(0, pathnames.length));
}
看了大佬的材料,受益匪浅,感谢大佬的分享。
我也分享一些我写的V8源码分析文档,欢迎大佬来踩,恳请大佬批评指正、提出宝贵意见。
文档地址:https://www.anquanke.com/member.html?memberId=161290
持续更新中,3~4天一篇。。。
《Chrome V8原理讲解》第十七篇 JS对象的内存布局与创建过程
《Chrome V8原理讲解》第十六篇 运行时辅助类,详解加载与调用过程
《Chrome V8原理讲解》第十五篇 运行时辅助类,给V8加钩子函数
《Chrome V8原理讲解》第十四篇 看V8如何表示JS的动态类型
《Chrome V8原理讲解》第十三篇 String类方法的源码分析
《Chrome V8原理讲解》第十二篇 JSFunction源码分析
《Chrome V8 原理讲解》第十一篇 字节码调度 Dispatch机制
《Chrome V8 原理讲解》第十篇 V8 Execution源码分析
《Chrome V8 原理讲解》第九篇 Builtin源码分析
《Chrome V8 原理讲解》第八篇 解释器Ignition
《Chrome V8 原理讲解》第七篇 V8堆栈框架 Stack Frame
《Chrome V8 原理讲解》第六篇 bytecode字节码生成
《Chrome V8 原理讲解》第五篇 V8语法分析器源码讲解
《Chrome V8 原理讲解》第四篇 V8词法分析源码讲解,Token字生成
《Chrome V8 原理讲解》第三篇 看V8编译流程,学习词法分析
《Chrome V8 原理讲解》第二篇 鸟瞰V8运行过程,形成大局观
《Chrome V8 原理讲解》第一篇:V8环境搭建
理解能力不是很好,文件操作>文本编码>单字节编码 那一part看得一头雾水,能否详细解释一下?
There is a description in your article .
And May be I can't agree with you about that so .
I think commonJS is not CMD.
CMD is the product ,which comes along with seaJS.
And commonJS standard is nodeJS follow on .
So I think your description will mislead learner .
Is it that right?
Feel free to contact me , to feature out my mistake.
Thank you.
[在3.2.1] 中
'' var bin = new Buffer([ 0x48, 0x65, 0x6c, 0x6c, 0x6c ]);
和
'' var str = bin.toString('utf-8'); // => "hello"
其中输入hello是错误的,应该是Helll,作者的意思应该是把第一行的最后一个 0x6c 改为 0x6f。
如题
http://nqdeng.github.io/7-days-nodejs/
http://itfan.github.io/7-days-nodejs(这个是我fork的)
http://itfan.github.io 这个可以打开
而且我发现你也没创建nqdeng.github.io 这个repo,到底创建github pages要遵循什么才能把repo当作普通网页访问呢? 谢谢
node_moudles should be node_modules
我照着你的写,但只能编译同一个目录下的一个文件,然后我在想可能没有循环,我认为应该类似这样的:
`function travel(dir,callback,finish){
//异步读取目录
fs.readdir(dir,function(err,files){
//将0传给next,开始递归
for(i=0;i<files.length;++i) {
(function next(i){
//如果当前未完成遍历
if (i<files.length){
//获取到路径文件名
var pathname = path.join(dir, files[i]);
//异步获取此路径文件名的文件状态
fs.stat(pathname,function(err,stats){
//如果此文件是目录
if (stats.isDirectory()){
//再次递归此目录
travel(pathname, callback, function () {
//如果此目录递归完了,继续检查上一层的下一个文件
next(i + 1);
});
}
//此文件是非目录
else {
//执行上层所需的callback函数,完成后继续递归此层的下一个文件
callback(pathname,function(){
next(i + 1);
})
}
})
}
//如果所有文件已经完成遍历
else{
//如果有完成回调函数,执行完成回调函数
finish && finish();
}
}(i))
}
})
}
travel("./",function(pathname){
console.log(pathname);
})`
我不清楚其它地区怎样,我在杭州,有部份github pages不用https是打不开的。你的7-days-nodejs也是,我点进README给出的网址,显示失败后把http改成https才能进去。建议把
http
://nqdeng.github.io/7-days-nodejs/
改成
https
://nqdeng.github.io/7-days-nodejs/
不然部份小白就真进不去了。
如题
进入项目根目录,通过tianshu index.tpl编译,查看index.html发现本来有内容的ul标签现在变为空了,如下图:
项目是最新的,没修改前便尝试编译。。
原因是什么呢?谢谢
请问在工程目录的事例代码中。main不该指向入口文件./bin/node-echo吗?怎么是api文件呢
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.