QQ可以使用xml的方式发送消息,以下为了方便描述统称为卡片。
通过机器人的API进行发送xml即可,但是如果选择发送xml,那么其他如[image=xxx]、[@xxx]这些命令就不可使用了。整个消息只有XML。
xml主要由msg,item,source这3部分组成
<?xml version='1.0' encoding='utf-8' standalone='yes'?>| static Lifecycle() => Debug.Log(Prefix + "Static Constructor"); | |
| [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] static void Subs() => Debug.Log(Prefix + "Subsystem Registration"); | |
| [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterAssembliesLoaded)] static void AfterAsm() => Debug.Log(Prefix + "AfterAssembliesLoaded"); | |
| [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSplashScreen)] static void BeforeSlash() => Debug.Log(Prefix + "Before Splash"); | |
| [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] static void BeforeScene() => Debug.Log(Prefix + "BeforeScene"); | |
| private void Awake() => Debug.Log(Prefix + "Awake"); | |
| private void OnEnable() => Debug.Log(Prefix + "OnEnable"); | |
| [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)] static void AfterScene() => Debug.Log(Prefix + "AfterSceneLoad"); | |
| [RuntimeInitializeOnLoadMethod] static void DefaultLog() => Debug.Log(Prefix + "RuntimeInit Default"); | |
| void Start() => Debug |
| Recently, I use JMXterm to collect info about Java JVM via JMX and MBeans. Here is a short note. | |
| - Download JMXterm | |
| https://sourceforge.net/projects/cyclops-group/files/jmxterm/1.0.0/jmxterm-1.0.0-uber.jar/download | |
| - Run JMXterm | |
| java -jar jmxterm-1.0.0-uber.jar --url localhost:<jmx listen port> | |
| - All MBeans from java.lang | |
| $>domain java.lang |
| # brew install nginx | |
| sudo ln -s /usr/local/opt/nginx/homebrew.mxcl.nginx.plist /Library/LaunchDaemons/ | |
| sudo chown root:wheel /usr/local/opt/nginx/homebrew.mxcl.nginx.plist | |
| sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.nginx.plist | |
| # Why do you need sudo? | |
| # If you want nginx to be able to bind to port 80, it will need superuser privileges |
| $wget https://github.com/google/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.bz2 | |
| $tar xvf protobuf-2.5.0.tar.bz2 | |
| $cd protobuf-2.5.0 | |
| $./configure CC=clang CXX=clang++ CXXFLAGS='-std=c++11 -stdlib=libc++ -O3 -g' LDFLAGS='-stdlib=libc++' LIBS="-lc++ -lc++abi" | |
| $make -j 4 | |
| $sudo make install | |
| $protoc --version |
| if _, err := os.Stat("/path/to/whatever"); os.IsNotExist(err) { | |
| // path/to/whatever does not exist | |
| } | |
| if _, err := os.Stat("/path/to/whatever"); !os.IsNotExist(err) { | |
| // path/to/whatever exists | |
| } |
#微博开源计划(Weibo Open Source Program)
微博工程师法则(Laws of Engineer in Weibo):
1. 工程师必须牛逼
2. 除非抵触法则1,否则不能吹牛逼
3. 除非抵触法则1和2,否则开源才牛逼
| body { | |
| font-family: Helvetica, arial, sans-serif; | |
| font-size: 14px; | |
| line-height: 1.6; | |
| padding-top: 10px; | |
| padding-bottom: 10px; | |
| background-color: white; | |
| padding: 30px; } | |
| body > *:first-child { |