1. I see.我明白了
2. I quit! 我不干了!
3. Let go! 放手!
4. Me too.我也是。
5. My god! 天哪!
6. No way! 不行!
7. Come on.來吧(趕快)
8. Hold on.等一等。
9. I agree。我同意。
10. Not bad.還不錯。
11. Not yet.還沒。
12. See you.再見。
13. Shut up! 閉嘴!
14. So long.再見。
15. Why not? 好呀! (為什麼不呢?)
16. Allow me.讓我來。
17. Be quiet! ...
类型
符号
Managed Boxes
@
Owned Boxes
~
Borrowed Pointers
&
Ruby可以通过source_location定位方法的定义位置
[7] pry(main)> require "open-uri"
=> false
[8] pry(main)> URI.method(:join).source_location
=> ["C:/Ruby193/lib/ruby/1.9.1/uri/common.rb", 784]
[9] pry(main)>
还是谷歌聪明,输入php show all included files,第一个搜索结果就是
get_included_files
无意中在新窗口中打开了firebug,却怎么也无法把它放回firefox底部了,设置Firebug界面位置也不管用。重置firebug设置以后终于把它请回了firefox底部。
解决办法:
点击Firebug窗口左上角的小瓢虫
选项 - 重置所有 Firebug 选项
跳出个确认窗口,点“确定”
关闭Firebug,然后按F12重开Firebug,已经恢复在firefox底部了
rails g rspec:controller ControllerName
比如
rails g rspec:controller users
出自:http://stackoverflow.com/questions/4235763/how-do-i-generate-specs-for-existing-controllers
vi .inputrc
set convert-meta on
'\M-h': backward-char
'\M-l': forward-char
'\M-j': next-history
'\M-k': previous-history
'\M-l': forward-char
'\C-h': beginning-of-line
'\C-l': end-of-line
ipython中ctrl+L默认是clear-screen,需要专门绑定为end-of-line:
ipython profile create
vi .conf...
很多人会用 Bash,但是很少有人知道 readline 是怎么回事。readline 是一个强大的库,只要使用了它的程序,都可以用同一个配置文件配置,而且用同样的方法操作命令行,让你可以方便的编辑命令行。
使用 readline 的程序现在主要有 Bash, GDB,ftp 等。readline 付予这些程序强大的 Emacs 似的命令行编辑方式,你可以随意绑定你的键盘。
术语解释
在下文中,我们经常提到 'C-x r' 这类键操作。'C-x r' 其实就是按Ctrl-x,然后按 r。同理 'C-M-@' 就是按
ctrl-alt-@(M表...
如果发布程序,不能去掉,要尊重作者的版权,这里所说的去掉仅仅是为了自己阅读examples代码的时候方便,ruby字符串处理比较方便,就用ruby了
#coding: utf-8
require 'find'
Find.find('/home/111/pyfiles/pyqt4_examples').to_a.keep_if{ |f| f.end_with?'.py' or f.end_with?'.pyw' }.each do |path|
str = File.read(path)
rstr = <<EOF
#####...
apt-get安装(快)
sudo apt-get install libxext6 libxext-dev libqt4-dev libqt4-gui libqt4-sql qt4-dev-tools qt4-doc qt4-designer qt4-qtconfig "python-qt4-*" python-qt4
编译安装(慢)
安装SIP
从 http://www.riverbankcomputing.co.u...
;!h::Send {Left}
;!l::Send {Right}
!j::Send {Down}
!k::Send {Up}
;^h::Send {Home}
;^l::Send {End}
;!c::
;Send +{End}
;Send {Delete}
;return
;!s::
;Send {Home}
;Send +{End}
;Send {Delete}
;return
;!i::
;Send ^{Left}
;Send ^+{Right}
;Send {Delete}
;Send {Space}
;Send {Left...
System - Preferences - Keyboard Shortcuts
点击下面的Add添加一个自定义快捷键,Command设置为:
gnome-terminal --geometry=76x11-33-24 --working-directory=~
安装Redis
wget http://redis.googlecode.com/files/redis-2.6.7.tar.gz
tar zxvf redis-.*
cd redis-*
make
make PREFIX=/usr/local/redis install
mkdir /etc/redis
cp redis.conf /etc/redis/redis.conf
mkdir /var/lib/redis
vi /etc/redi...
array_filter、array_map,两个array函数,一个是数组参数在前,callback参数在后,一个是callback参数在前,数组参数在后。每次用它们都得查手册。php这是在故意让人记混吗?混乱的语法,在php中随处可见
第一步
vi /etc/security/limits.conf
#加入下面四行
root soft nofile 655360
root hard nofile 655360
* soft nofile 655360
* hard nofile 655360
第二步
vi /etc/nginx/nginx.conf
# 设置
worker_rlimit_nofile 10240;
events {
worker_connections 10240;
}
#重启服务器
前几天还在为php没有类似python的locals()发愁,原来php也有相应的办法:get_defined_vars()
示例代码: https://www.bccn.net/paste/405/
godoc fmt Println
PACKAGE
package fmt
import "fmt"
FUNCTIONS
func Println(a ...interface{}) (n int, err error)
Println formats using the default formats for its operands and writes to
standard output. Spaces are always added between operands and a newline
is append...
runtime! debian.vim
call pathogen#infect()
if has("syntax")
syntax on
endif
set nu
set ts=4
set softtabstop=4
set shiftwidth=4
set expandtab
set autoindent
set hlsearch
colorscheme molokai
au BufNewFile,BufRead *.rb,*.html,*.htm,*.erb,*.yaml,*.yml,*.sass,*.scss set softtabs...
这些都是基础知识,不过有必要做深入了解。先简单介绍一下。
二者的定义:
当你在浏览网站的时候,WEB 服务器会先送一小小资料放在你的计算机上,Cookie 会帮你在网站上所打的文字或是一些选择,
都纪录下来。当下次你再光临同一个网站,WEB 服务器会先看看有没有它上次留下的 Cookie 资料,有的话,就会依据 Cookie
里的内容来判断使用者,送出特定的网页内容给你。 Cookie 的使用很普遍,许多有提供个人化服务的网站,都是利用 Cookie
来辨认使用者,以方便送出使用者量身...