Freedman, Statistics (4th version), p234
Author: oopus
-
在 javascript 中显示未 encode 字符的原始状态
var a = ‘aaaaa\r\nbbbbbb’;
console.log(JSON.stringify(a));
console.log(a);From: https://segmentfault.com/q/1010000011005586
-
node.js 无法访问 server.js
在 node.js 的基础教程里面,一开始总是会教大家来写 server.js
绝大多数情况下,这个例子会让大家觉得“yeah,写服务器好简单”。但是在某些 linux 虚拟主机下,这个简单的例子会无法实现。
其实原因非常简单,防火墙过滤掉了 createServer 的 listen 端口。
这时候只要把 listen 端口绑在常用的
-
The only corrected tutorial of connecting points to lines in CartoDB
https://groups.google.com/forum/#!msg/cartodb/PHKbPWKvMmc/NKe18KSt-pUJ
Hi Amanda,
Are you doing the tutorial but with your own data? Did you get the tutorial to work just on its own first? It might help to run through it as is first so you can get a hang of what it does.To do it with the table map_1, I would just run this query,SELECT 0 as cartodb_id, ST_MakeLine(the_geom_webmercator) the_geom_webmercator FROM map_1 UNION ALLSELECT cartodb_id, the_geom_webmercator FROM map_1The first half (before the UNION) makes a line from all your points. The second (after the UNION), just selects the points as is.Next, on your map you are probably only going to see points. That is because there is no style set for drawing a line. So I would use the following CSS,#map_1 {//points[mapnik-geometry-type=point] {marker-fill: #FF6600;marker-opacity: 1;marker-width: 12;marker-line-color: white;marker-line-width: 3;marker-line-opacity: 0.9;marker-placement: point;marker-type: ellipse;marker-allow-overlap: true;}//lines[mapnik-geometry-type=linestring] { line-color: #FF6600;line-width: 2;line-opacity: 0.7;}}hope that helps!Andrew -
对贝叶斯定理二中择一形式的定理化解释
二中择一形式见下图“范例”中P(D|+)的第二个等式。
P(B|A) 为在0.5% 范围内(受A 0.5% 影响下)的检出率,即在吸毒者人群内的检出率,为99%;
P(A)为在公司内(不限定条件)的吸毒者概率0.5%;
P(B)为在公司内(不限定条件)所有人的吸毒检出率,为1.49%;
P(A|B)为在1.49%的被检出吸毒人数中真正吸毒者的概率,为 33.22%
-
二次查询时 jQuery 失灵的问题
一个透过 .prepend 或者 .text 做更新的页面中,有时候在检索第二次的时候 $(‘#fool’) 选择器 会提示:
“TypeError: undefined is not a function”
此问题通常是由于引用多个 js 库相互冲突导致的,解决的办法是把 $(‘#fool’) 换成 jQuery(‘#fool’) 。




