当光标放在一个括号上时,如何跳转到配对括号.很高兴在emacs -nw工作.
就像Vim中的%.
;;从@Lindy,@ Francesco得到提示之后,我发现了更多:
C-M-f Move forward over a balanced expression
C-M-b Move backward over a balanced expression
C-M-k Kill balanced expression forward
C-M-SPC put the mark at the end of the sexp.
C-M-n Move forward over a parenthetical group
C-M-p Move backward over a parenthetical group
;; C-M key binding can also be done by --> ESC Control-key
;;And put this to .emacs, it will highlight opening/closing parens:
(show-paren-mode 1)
Run Code Online (Sandbox Code Playgroud) 我正在做(使用coreutils_8.5-1ubuntu6_amd64):
du -sch `find ./ -maxdepth 1 -type d`
Run Code Online (Sandbox Code Playgroud)
我正在寻找一种简单的方法(较短的cmd)来查找子目录的大小.谢谢.
对于SQLAlchemy的,谁可以轻轻地得到的简单的例子SQL
类似功能sum
,average
,min
,max
,对于一个柱(score
在作为示例的以下).
至于这个映射器:
class Score(Base):
#...
name = Column(String)
score= Column(Integer)
#...
Run Code Online (Sandbox Code Playgroud) 在Linux上制作它.使用多个版本的Vim的原因是因为一个版本会被严重攻击,因为Lisp作业.我想分开它并使它使用它自己的.vimrc文件.
/usr/bin/vim use -> ~/.vimrc
/my/vim use -> ..../another_vimrc
Run Code Online (Sandbox Code Playgroud) 我们越来越多地使用链式函数调用:
value = get_row_data(original_parameters).refine_data(leval=3).transfer_to_style_c()
Run Code Online (Sandbox Code Playgroud)
它可能很长.要保存代码中的长行,这是首选?
value = get_row_data(
original_parameters).refine_data(
leval=3).transfer_to_style_c()
Run Code Online (Sandbox Code Playgroud)
要么:
value = get_row_data(original_parameters)\
.refine_data(leval=3)\
.transfer_to_style_c()
Run Code Online (Sandbox Code Playgroud)
我觉得使用反斜杠很好\
,并把它放到.function
新的一行.这使得每个函数调用都有自己的行,它很容易阅读.但这听起来不是很多人喜欢的.当代码发生微妙的错误时,当它很难调试时,我总是开始担心它可能是一个空格或之后的东西backslash (\)
.
引用Python
样式指南:
通过将表达式包装在括号中,可以在多行中分割长行.这些应该优先使用反斜杠来继续行.确保适当缩进续行.打破二元运算符的首选位置是运算符之后,而不是它之前.
如果可能的话,需要重新设计java编译器的哪个部分有一个"import as"语句,所以代码看起来像这样:
import java.util.Date;
import mypackage.Date as MyDate;
//...
javaDate = new Date();
myDate = new MyDate();
Run Code Online (Sandbox Code Playgroud)
更重要的是,需要获得这种语法:
import java.util.Date;
import path.to.mypackage as MP;
//...
javaDate2 = new Date();
myDate2 = new MP.Date();
Run Code Online (Sandbox Code Playgroud)
它会给现有代码带来什么麻烦?
node-mongodb-native node.js 客户端在 时挂起MongoClient.connect(...)
,但mongodb-client (shell command line)
在终端上工作。有什么线索吗?
var MongoClient = require('mongodb').MongoClient;
MongoClient.connect(
'mongodb://my.mongo.db.server.ip:27017/test',
function(err, db) {
if(err) throw err;
console.log("shows during connect call back");
});
// When load into node shell, it hangs forever
Run Code Online (Sandbox Code Playgroud) 它在npm
用于安装node.js
应用程序的依赖项时停止.但在中国境外没有任何问题.谁知道如何让它在旁边工作VPN/SSH channel
.
$ npm install
npm http GET https://registry.npmjs.org/jade
npm http GET https://registry.npmjs.org/formidable
# ... ... halt for hours and hours ... march 2014
# ... ... halts times after times ...
Run Code Online (Sandbox Code Playgroud) 默认情况下,vundle将vim插件安装到linux机器上的〜/ .vim/bundle /.
如何让它安装插件到:
~/here/please/vundle/install/all/plugins/
Run Code Online (Sandbox Code Playgroud) 要获得介于(0,9999)之间的range_key,我可以这样做吗?
conn = boto.connect_dynamodb()
table = conn.get_table("mytable")
...
result = table.query(
hash_key = "66",
range_key_condition = {"0":"GE", "9999":"LE"}
)
Run Code Online (Sandbox Code Playgroud)
编辑:这是另一个错误示例:
In [218]: qa = taa.query(hash_key = "1")
In [219]: qa.next()
Out[219]: {u'attra': u'this is attra', u'key': u'1', u'range': 1.1}
Run Code Online (Sandbox Code Playgroud)
In [220]: qa = taa.query(hash_key = "1", range_key_condition = {0.1: "GE"})
In [221]: qa.next()
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
/home/user/python/enva/<ipython-input-221-dba0a498b6e1> in <module>()
----> 1 qa.next()
/home/user/python/enva/local/lib/python2.7/site-packages/boto-2.2.2_dev-py2.7.egg/boto/dynamodb/layer2.pyc
in query(self, table, hash_key, range_key_condition,
attributes_to_get, request_limit, max_results, consistent_read,
scan_index_forward, …
Run Code Online (Sandbox Code Playgroud) python ×3
linux ×2
node.js ×2
vim ×2
boto ×1
command-line ×1
emacs ×1
java ×1
javascript ×1
mongodb ×1
networking ×1
npm ×1
sql ×1
sqlalchemy ×1
styles ×1
syntax ×1
ubuntu ×1