myhubot> myhubot ping
myhubot> PONG
myhubot> myhubot pug me
myhubot> http://28.media.tumblr.com/tumblr_locinzasB91qzj3syo1_500.jpg
myhubot> myhubot help
myhubot> myhubot adapter - Reply with the adapter
myhubot animate me - The same thing as `image me`, except adds a few parameters to try to return an animated GIF instead.
myhubot echo - Reply back with
myhubot help - Displays all of the help commands that Hubot knows about.
myhubot help - Displays all help commands that match .
myhubot image me - The Original. Queries Google Images for and returns a random top result.
myhubot map me - Returns a map view of the area returned by `query`.
myhubot mustache me - Adds a mustache to the specified URL or query result.
myhubot ping - Reply with pong
myhubot pug bomb N - get N pugs
myhubot pug me - Receive a pug
myhubot the rules - Make sure hubot still knows the rules.
myhubot time - Reply with current time
myhubot translate me - Searches for a translation for the and then prints that bad boy out.
myhubot translate me from into - Translates from into . Both and are optional
ship it - Display a motivation squirrel
看到了吧!如果我们输入了特定的「输入」,机器人就会有反应啦!
当我们输入 myhubot help 的时候,返回的东东其实就是预定义的「输入」,这些预定义的「输入」只在 shell adapter 下有效哦!
Given a sorted linked list, delete all duplicates such that each element appear only once.
For example,Given 1->1->2, return 1->2.Given 1->1->2->3->3, return&
在JDK1.5之前的单例实现方式有两种(懒汉式和饿汉式并无设计上的区别故看做一种),两者同是私有构
造器,导出静态成员变量,以便调用者访问。
第一种
package singleton;
public class Singleton {
//导出全局成员
public final static Singleton INSTANCE = new S