Yorkie Makoto
Yorkie Makoto
### typify-json 今天完成了一个新库:https://github.com/weflex/typify-json ,创造这个库的原因起于 Fibula.js 的开发过程中,我使用了如下的代码: ``` js const exec = require('child_process').execSync; exec(`mongo --eval "db.foo.insert(${JSON.stringify(input)})"`); ``` 如果`input`的值包含有`Date`这样的值,那么`JSON.stringify`的时候就会默认地把`Date`转换成字符串再插入数据库中了,这个不是我们想要的结果。 因此,typify-json 使用了与`JSON`类似的 API: ``` js const typifyJSON = require('typify-json'); const exec = require('child_process').execSync;...
VC Dimension: - 关键点在于**超平面**(hyperplane),即对于二维空间中,给定的数据集合,没有数据点都有正向(Positive)和负向(Negative)之分,然后我们需要用一条直线(hyperplane)把数据按正/负划分开,所以当数据集呈现为一个矩形,并且正负正好位于对角线位置时,是不可能用一条直线把数据分类的,不过对于只有三个点的数据集时,我们总是有办法用一条直线进行切割。 - 上一条是例子,所以对于VC维来说,有两个变量,一个是数据集S,另一个是散列函数H,上例中的H是一条直线(二维空间的超平面),对于四个点,当然也可以用一个瘦椭圆来作为H值,此时VC(S, H) = 4。 在知道了如何计算VC维之后,我开始学习这个数值是用来做什么的,于是我参考了[这个Quora答案](https://www.quora.com/Explain-VC-dimension-and-shattering-in-lucid-Way): > This is where the VC dimension comes in - it enables you to conduct your search in a principled...
How to push a Docker: - DockerHub 并不存你的源代码,所以需要先`docker build`,这里最好用`--tag`指定名字 - 然后执行`docker login` - 最后运行`docker push [tag-name]`就可以啦
Docker: - `RUN` 是运行在`docker build`时,所以一般运行的是安装、设置的脚本 - `CMD` 则是在运行`docker run`时,用来启动容器本身的一些脚本 关于日记:在这里我将会记录每天所得所感,也会记录一些个人的想法,当作待做列表来管理,同步在 Github 与微信公众号中。
Hi, my readers, I shall do share a little experience about a debugging tip with you. As you have seen, what I want to tell you about is core dump....
In last week, I was starting a new task for [Fireball](https://github.com/fireball-x) team, there are a bundle of new needs for YUIDoc from other team members like the following: - we...
I was working on chrome plugin for GMail in this week, and at first I'm assigned to make a tooltip that's shown when an email address is mouse over, and...
The programming keyword `let` is basic and useful, but very fallible, the reason I’ll show you later. ## How it works in JavaScript? In Javascript, we use `var` to define...
This is not a travel-related note, and this doesn’t cover any about the loopback address 127.0.0.1(if you know this), and this is not covering any aspect of the web framework...
> Note: This is another proven case to use Node.js properly. Because of working with loopback, which uses bcrypt as its algorithm to encrypt user’s password, in these recent weeks....