2015-07-03 YongHao Hu
Hard Links, Junction Points and Symbolic Links都是windows系统的链接机制,链接文件,目录或者盘。 Hard Link 通常,一个hard link代表另一个文件(源文件),相当于它的复制品,但又不会复制这个文件。NTFS格式的硬盘都存储所有文件的属性和内容到inode上,还存储了一个ID,文件名指向那个inode。而hard link就是让文件名指向那个inode来达到不重复文件内容却等价。所以所有文件至少有一个hard link(文件本身就算是hard link),文件的属性里还有一个计数器,来记录有多少hard link链接到它那里,假如为0,系统则删除这个文件,ino 继续阅读 »
2017-06-18 MoreFreeze
上一篇 CH31 Basic Regular Expressions /和?,前者向后找,后者向前找 CH32 Case Study: Grep Operator, Part One :nnoremap g :grep -R .可以搜索,表示光标下的单词(包括连字符,比更大),之后可以用:cwindow查看quickfix窗口 以上还有一点要修改,如果光标在一个foo;ls下,使用后实际会执行ls命令,原理和SQL注入类似,所以需要用单引号保证字面值,:nnoremap g :grep -R '' . 但上面对于光标有单引号的不启作用,用:echom shellescape(expand(""))可以显示shellescap 继续阅读 »
2017-06-22 MoreFreeze
CH41 Creating a Full Plugin 看到这里你可以停了,因为前面的姿势足够你完善自己的~/.vimrc脚本,去修复别人脚本的bug了,绝无讽刺的意思 往下学之前,建议先玩下Potion语言,这是个很小的语言,使用它的目的是为了辅助我们写vim script CH42 Plugin Layout in the Dark Ages ~/.vim/colors/在这里的文件记录了vim的颜色主题,如果运行:color xxx就能看~/.vim/colors/xxx.vim的配色方案了,查看当前配色都有哪些用:hi ~/.vim/plugin/在这里的文件每次vim启动都会运行一次 ~/.vim/ftdetect/这 继续阅读 »
2017-06-12 MoreFreeze
vim
上一篇 CH13 Buffer-Local Abbreviations 这章就是说iabbrev也能用来修饰 你想记住某个新的snippet最好办法就是disable掉原来的命令,比如iabbrev return NOPENOPENOPE CH14 Autocommand Groups autocmd是不会替换原先的命令的,假如使用两次同样的命令,那触发autocmd时会进行两次命令 特别要注意在你source $MYVIMRC时,autocmd会再载入一次! 可以用augroup testgroup autocmd xxx augroup END,这时如果你运行下augroup testgroup autocmd yyy 继续阅读 »
2017-06-07 MoreFreeze
vim
CH02 布尔型变量可以用:set [no]number这样来设置,:set number!表示取反,:set number?获取当前状态(实际:set nonumber?也可以哟) 数值型用:set numberwidth=10来设置,同理:set numberwidth?获取当前值 relativenumber或者rnu用来显示相对行号,当前所在行显示绝对行号,两边分别从1,2,3开始显示 CH03 注释用"来标记 注意注释不要写在map后面,这样会当成命令去执行map a dd "comment CH04 map,nmap,vmap,imap都知道什么意思吧 继续阅读 »
2015-12-13 MoreFreeze
I have trained my algorithm on leetcode a period of time. Today, I will explain my solution about Minimum Height Trees. My solution beat ~95% against others but it is hard to explain what is I do. Please allow me to introduce the solution from easy to hard. If you only need the last solution, jump to 继续阅读 »
2017-06-06 MoreFreeze
趁着假期把《汐》通关了,先声明我是通过奶牛关的野蔷薇 获取的 key,所以我会把写一篇靠谱的评测作为自己的一个责任。 自己是一个 ACT 游戏玩家,会特别痴迷平台跳跃类游戏,玩过的 Super Meat Boy (后面简称 SMB) 可以说是这类游戏的神作以及标杆,所以后面会把《汐》和 SMB 作个比较。我玩的时候游戏版本是 1.0.5。 继续阅读 »
2014-06-26 Kun Ren
In recent years, non-relational data have attracted more and more attentions. Roughly speaking, all datasets that are hard to put into a rectangular table with rows and columns are non-relational datasets. 继续阅读 »
2017-05-04 YongHao Hu
go
Google Japan 第二次面试 面试官打来,寒暄了一两句,就说 should we start? 我以为像上次一样,直接一道 leetcode hard 难度拍过来,没想到竟然问基础知识! http://yonghaowu.github.io//2016/10/25/GoogleJapanInterview/ 继续阅读 »
2014-08-08 Kun Ren
(This post is rewritten to adapt to the latest release of pipeR) Pipeline is receiving increasing attention in R community these days. It is hard to tell when it begins but more people start to use it since the easy-and-fast dplyr package imports the magic operator %>% from magrittr, the pioneer package of pipeline op 继续阅读 »