- 实词:名词、动词、形容词、状态词、区别词、数词、量词、代词
- 虚词:副词、介词、连词、助词、拟声词、叹词。
n 名词
nr 人名
小红帽是tp的一大利器。在ubuntu下速度慢。 | |
先查看一下设备的属性: | |
udevadm test /sys/devices/platform/i8042/serio1/serio2 | |
在最后有: | |
ACTION=add | |
DEVPATH=/devices/platform/i8042/serio1/serio2 | |
DRIVER=psmouse | |
MODALIAS=serio:ty05pr00id00ex00 | |
SERIO_EXTRA=00 | |
SERIO_ID=00 |
在win下如何使用goagent,google看看。哦,对了,百度查吧,用google搜索会断开链接! | |
在ubuntu下,使用goagent,下面的过程不是在win下都需要的。当然也需要google的appid。 | |
首先在 http://appengine.google.com 注册Google App Engine账号(Gmail账号通用)。 | |
然后创建Google App Engine的ID,顺利登录后,点击Creat an Application。 | |
Ubuntu需要下载并安装goagent和Google AppEngine SDK。 | |
goagent下载地址:http://code.google.com/p/goagent/ | |
Google AppEngine SDK下载地址:https://code.google.com/intl/zh-CN/appengine/downloads.html | |
下载Google AppEngine SDK for Python版本(linux)。 | |
然后,goagent解压goagent到google_appengine目录下。 |
I answered it on stackoverflow.com: | |
http://stackoverflow.com/questions/2213340/what-is-daemon-thread-in-java/18428894#18428894 | |
Java has a special kind of thread called daemon thread. | |
Very low priority. | |
Only executes when no other thread of the same program is running. | |
JVM ends the program finishing these threads, when daemon threads are the only threads running in a program. | |
What does daemon thread used for? |
Scala pattern matching 太强大了,但是想匹配一个 list 的最后一个元素,有些蛋疼。 本来想尝试 case (List(_* ,last)) => ... 但是居然编译都报错,原来 _* 只能扔到最后去。 如果用
(1 to 9).toList match {
case _ :: 9 :: Nil=> "no way"
}
func getIp() (net.IP, error) { | |
interfaces, e := net.Interfaces() | |
if e != nil { | |
return nil, errors.New("get Interfaces error") | |
} | |
for _, i := range interfaces { | |
// the flags value maybe 'pointtopoint', it also has a ip, filter it. | |
if !strings.Contains(i.Flags.String(), "broadcast") { | |
continue | |
} |
// Camelcase to underscore style. | |
func ToUnderScore(name string) string { | |
l := len(name) | |
ss := strings.Split(name, "") | |
// we just care about the key of idx map, | |
// the value of map is meaningless | |
idx := make(map[int]int, 1) | |
var rs []rune |
package main | |
import ( | |
"fmt" | |
"net/url" | |
) | |
func main() { | |
fmt.Println("Path参数中对空格的转义:"+url.PathEscape("hello world")) | |
fmt.Println("Query参数中对空格的转义:"+url.QueryEscape("hello world")) |
on El Capitan, after installing the brew...
$ brew update
$ brew tap caskroom/cask
$ brew install Caskroom/cask/java
And Java 8 will be installed at /Library/Java/JavaVirtualMachines/jdk1.8.xxx.jdk/
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
# show all scala versions | |
brew search scala | |
# install specific version, maybe scala 2.11 | |
brew install scala@2.11 | |
# unlink current scala version | |
brew unlink scala | |
# link new scala version |