Auto-updated 2013-04-26 16:41.
R: The R Project for Statistical Computing
ROPERTIES:
:type: KnowledgeBase_Cloud_Language
:END:
| Num |
Name |
Summary |
| 1 |
mean(x) |
算向量均值,即数学期望 |
| 2 |
median(x) |
算向量最频值 |
| 3 |
var(x) |
求方差 |
| 4 |
sd(x) |
标准偏差 |
| 5 |
quantile(x) |
算向量的四分位数 |
| 6 |
rev(x) |
向量的逆 |
| 7 |
rank(x) |
向量的秩 |
| 8 |
t(x) |
转置向量 |
| 9 |
x %*% y |
算两向量的乘积 |
| 10 |
hist(x) |
绘制出数据的频率分布直方图 |
阅读全文…
Auto-updated 2013-04-26 16:41.
数据分析 — Data analysis & Big Data
ROPERTIES:
:type: KnowledgeBase_Cloud_BI
:END:
| Name |
Priority |
Scenario |
| 决策树分类器(Decision Tree Classifier) |
P0 |
从数据中提取规则集,按规则的优化级,组织成一棵分支判定树 |
| 多维缩放(Multidimensional Scaling) |
P1 |
将多维数据降维,同时尽可能保证距离值与原数据集相近 |
| 遗传算法(Genetic Algorithms) |
P1 |
先随机生成一组解,然后做多轮变异. 当结果足够好或变异无改进时,结束 |
| K-最近邻(K-Nearest Neighbors) |
P1 |
如何针对一组给定的样本来构造价格预测模型. 其中k指用于求均值的最佳匹配数 |
| 非负矩阵因式分解(Non-Negative Matrix Factorization) |
P1 |
|
| 贝叶斯分类(Bayesian Classifier) |
P0 |
|
| 线性回归 |
P0 |
|
| 神经网络(Neural Networks) |
P1 |
|
| 支持向量机(Support-Vector Machines) |
P1 |
|
| 模拟退火(Simulated Annealing) |
P1 |
|
| 欧几里德距离 |
P0 |
表示多维变量的空间距离 |
阅读全文…
Auto-updated 2013-04-26 16:41.
Objective-C
ROPERTIES:
:type: KnowledgeBase_Cloud_Language
:END:
| Name |
summary |
Sample |
| 减号 |
减号表示一个函数、或者方法、或者消息的开始 |
-(void) hello:(BOOL)ishello… |
| 加号 |
它表示其他函数可以直接调用这个类中的这个函数,而不用创建这个类的实例 |
instance 方法以-开头,class level方法以+开关 |
| 中括号 |
调用函数 |
[self hello:YES] [foo bar:2] |
| 函数调用多个参数 |
第一个参数没有名字,其它的参数都有名字 |
|
| 异构数组 |
同一个数组可以保存不同的对象 |
|
| 不支持命名空间 |
需要开发者在定义时,自己去加前缀,才示区别 |
|
| OO权限 |
Object-C里没有private的概念,可认为全是public. 即只有类方法和实例方法 |
|
| 不支持多重继承 |
|
|
| 不支持运算符重载 |
|
|
| id |
指针数据类型 |
|
| BOOL |
使用8位存储。而YES定义为1,NO定义为0. 注意:大于1不为YES |
|
| @ |
|
|
| Name |
Summary |
| printf |
NSLog (@”%d”,myInt); |
| [object method:para] |
相当于C++的object->method(para) |
| [[[MyClass alloc] init:[foo bar]] autorelease]; |
MyClass.alloc().init(foo.bar()).autorelease(); |
| [obj method: param1 label1: param2 label2: param3 label3: param4] |
obj->method(param1, param2, param3,param4) |
| Name |
Summary |
| NSLog |
|
| NSString |
|
| NSInteger |
|
| NSURL |
|
| NSImage |
|
| IBOutlet |
如果要在Interface Builder中能看到这个控件对象,那么在对象前加IBOutlet |
| IBAction |
如果要在Interface Builder中能控制某个对象招待某些动作,那么在方法前加IBAction |
| CFStringTokenizer |
分词的东东. CF: Core Foundation |
| CALayer |
Core Animation的层. CA: Core Animation |
| CGPoint |
这表示一个点. CG: Core Graphics |
| UIImage |
这表示iPhone里面的图片 |
阅读全文…
Auto-updated 2013-05-20 10:37.
[#A] mac
ROPERTIES:
:type: KnowledgeBase_OS
:END:
| Name |
Comment |
| terminal 分屏 |
command + d |
| 恢复terminal分屏的效果 |
command + shift+ d |
| 锁屏幕 |
control + shift + power/eject |
| mac通过快捷键最大化 |
control + command + f |
| 类似“右键”的效果 |
触摸板是同时两个手指按下 |
| 快捷键回到桌面 |
在非全屏下,按F11 |
| 打开文件管理器 |
command + o |
| 打开文件 |
command + o |
| 快捷键打开一个finder界面 |
option + command + space |
| 在finder界面中输入路径名 |
command + shift + g |
| 截屏, 截全屏, 截后生成图片放在硬盘中 |
command+shift+ 3 |
| 截屏,截区域, 截后生成图片放在硬盘中 |
command+shift+ 4 |
| 截屏,截全屏, 截后生成图片放在内存中 |
control+command+shift+ 3 |
| 截屏,截区域, 截后生成图片放在内存中 |
control+command+shift+ 4 |
| 对于当前程序打开一个新的实例 |
command + n |
| Turn off/on Dock Hiding |
command + option + d |
| 强制退出应用程序 |
command+option+esc |
| 在相同应用程序的不同窗口间切换 |
Command + ~ |
| 查看多张图片 |
Command + a全选, Command +o 打开 |
| mac finder跳到上一层目录 |
点击右下方的路径 |
| Name |
Comment |
| 画图工具OmniGraffle |
画图神器 |
| QuickTime player |
屏幕录制,视频录制, etc |
| CleanMyMac |
系统清理工具 |
| Name |
Comment |
| Safari Reopen Closed Tabs |
Command + z |
| 强制清空磁盘和内存的缓存 |
purge |
| 禁用或启用Time machine |
sudo tmutil disablelocal/enablelocal |
| 数据库的GUI连接工具 |
navicat preimum |
| e-books tool |
calibre |
| Name |
Comment |
| brew安装指定版本的package |
brew install msmtp1.4.10 |
阅读全文…
Auto-updated 2013-03-03 10:06.
[#B] Google Go
ROPERTIES:
:type: KnowledgeBase_Cloud_Language
:END:
| Name |
Comment |
| 编译运行 |
go run ./test.go |
| 编译 |
go build ./test.go |
| 编译、链接和运行 |
6g hello.go && 6l hello.6 && ./6.out |
| Name |
Comment |
| 输出 |
fmt.Print(pos_start) |
| 数据类型转换 |
strconv.Itoa(rand.Intn(1000)) |
| string转成int |
int: i, _ := strconv.Atoi(“39038″) |
| string转成16进制int |
strconv.ParseUint(“987e”, 16, 0) |
| Name |
Comment |
| strconv |
字符串和基本数据类型间的转换 |
| fmt |
格式化的IO输出 |
| io |
原始的IO操作 |
| bufio |
实现缓冲的IO操作 |
| sort |
对数组和集合的排序 |
| os |
操作系统接口包 |
| sync |
同步包 |
| flag |
命令行解析 |
| templete |
数据模板 |
| http |
HTTP服务实现包 |
| reflect |
反射包 |
| exec |
执行外部命令包 |
阅读全文…
Auto-updated 2013-04-18 21:50.
[#A] linux systemtap
ROPERTIES:
:type: KnowledgeBase_Linux_Question_Systemtap
:END:
- SystemTap allows users to trace/probe system’s activities easily, especially kernel operations
- compile .stap to .c, then load as a kernel module
| Item |
Summary |
| Check whether current kernel supports systemtap |
sudo stap -ve ‘probe begin { log(“hello world”) exit() }’ |
| man stapfuncs |
documentation of systemtap built-in functions |
| stap -l ‘kernel.function(“*”)’ |
list all available probe points matching given pattern |
| man probe::socket.send |
|
| man stapprobes |
|
| man stap |
|
| /usr/share/doc/systemtap-doc/examples |
systemtap examples |
| probe kernel.function(“sys_mkdir”).call { log (“enter”) } |
|
| probe kernel.function(“sys_mkdir”).return { log (“exit”) } |
|
| stap –help |
|
| ls -lt /usr/man/man3/probe::* |
|
| Function |
Summary |
| pid() |
which process is this? |
| uid() |
which user is running this? |
| execname() |
what is the name of this process? |
| tid() |
which thread is this? |
| gettimeofday_s() |
epoch time in seconds |
| probefunc() |
what function are we in? |
| print_backtrace() |
figure out how we ended up here |
| argst |
argument for syscall |
阅读全文…