This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### SCALA LANGUAGE ##### | |
1) Can someone tell me why this does not work? | |
case class XY(enum: MyEnum) | |
object MyEnum extends Enumeration { | |
val OP1, OP2 = Value | |
} | |
Error: not found: type MyEnum |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C#: | |
1) output debug info in console: | |
System.Diagnostics; | |
... | |
Debug.WriteLine(""); | |
2) a regex that matchs html link: | |
var regEx = new Regex( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java compile error: illegal character: \65279 | |
save file without BOM can fix this problem. | |
in emacs, just open the file and run: M-x set-buffer-file-coding-system, and save the file. | |
thrift | |
1) download thrift | |
2) cd $thrift-home | |
3) ./configure --with-ruby=no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######### ubuntu linux ######### | |
1) host file: | |
127.0.0.1 localhost | |
127.0.1.1 zhongkongliang-desktop | |
# The following lines are desirable for IPv6 capable hosts | |
::1 localhost ip6-localhost ip6-loopback | |
fe00::0 ip6-localnet | |
ff00::0 ip6-mcastprefix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### EMACS TIPS #### | |
### cscope: ### | |
;; * Keybindings: | |
;; | |
;; All keybindings use the "C-c s" prefix, but are usable only while | |
;; editing a source file, or in the cscope results buffer: | |
;; | |
;; C-c s s Find symbol. | |
;; C-c s d Find global definition. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############### mongodb: ################ | |
1) not master and slaveok=false | |
在写多读少的应用中,使用Replica Sets来实现读写分离。通过在连接时指定或者在主库指定slaveOk,由Secondary来分担读的压力,Primary只承担写操作。 | |
对于replica set 中的secondary 节点默认是不可读的, | |
[mongodb@rac4 bin]$ mongo 127.0.0.1:28019 | |
MongoDB shell version: 2.0.1 | |
connecting to: 127.0.0.1:28019/test | |
SECONDARY> | |
SECONDARY> | |
SECONDARY> db.yql.find() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### github related ##### | |
---- emacs gist ---- | |
git://github.com/defunkt/gist.el.git | |
# What's new in 1.0 ? | |
gist.el now maintains a local cache so as to not go to the gist server every now and then. | |
multi-files gist support (indicated by a '+' in the gist list) | |
improved gist-list buffer, based on tabulated-list.el (same codebase as package.el) New keybindings: | |
g : reload the gist list from server | |
e : edit current gist description |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
J2EE STUFF | |
=== JMX === | |
=========== | |
=== MAVEN === | |
1. use plugin short name: | |
add following content in ~/.m2/settings.xml: | |
<profile> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Docker ### | |
1) hello world: | |
sudo docker run ubuntu:14.04 /bin/echo "hello, world!" | |
2) interactive: | |
sudo docker run -t -i ubuntu:14.04 /bin/bash | |
3) daemonized hello world: | |
sudo docker run -d ubuntu:14.04 /bin/bash -c "while true; do echo hello world; sleep 1; done" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright 2017 Loopring Project Ltd (Loopring Foundation). | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
OlderNewer