brew update
brew install rabbitmq
To see if rabbitmq is running after following the installation instructions:
launchctl list | grep rabbit
> 48303 - homebrew.mxcl.rabbitmq
| # -*- coding: utf-8 -*- | |
| from Crypto.Cipher import AES | |
| import os | |
| BS = AES.block_size | |
| pad = lambda s: s + (BS - len(s) % BS) * chr(BS - len(s) % BS) | |
| unpad = lambda s : s[0:-ord(s[-1])] | |
| key = os.urandom(16) # the length can be (16, 24, 32) | |
| text = 'to be encrypted' |
| 一. Android问题 | |
| 为适应多机型适配作出的努力。 | |
| 使用dip代替px。 | |
| 通过创建values-hdpi, values-mdpi, values-xhdpi分别为不同的屏幕大小的机型定制不同的布局。 | |
| 设置字体大小的时候通过TextAppearnce="@android:style/TextAppearance.[Large, Small, Medium]"来设置大小。 | |
| 设想我们要做一个app,这个app中间有一个登陆的逻辑。在用户完成登陆后需要改变其他activity的一些界面,这怎么做比较好? | |
| 如果他的描述中有"BroadcastReceive"就是正确答案. | |
| 有没有写过custom view. | |
| 有 |
| SPARK_MASTER_IP=192.168.0.xx ./start-all.sh |
| /* PASTE AT TOP OF FILE */ | |
| #include <stdio.h> /* flockfile, getc_unlocked, funlockfile */ | |
| #include <stdlib.h> /* malloc, realloc */ | |
| #include <errno.h> /* errno */ | |
| #include <unistd.h> /* ssize_t */ | |
| extern "C" ssize_t getline(char **lineptr, size_t *n, FILE *stream); | |
| /* PASTE REMAINDER AT BOTTOM OF FILE */ |
| # yum list \*openssl\* | |
| yum install -y openssl098e | |
| yum install -y zlib | |
| ln -s /usr/lib64/libssl.so.0.9.8e /usr/lib64/libssl.so.0.9.8 | |
| ln -s /usr/lib64/libcrypto.so.0.9.8e /usr/lib64/libcrypto.so.0.9.8 | |
| ln -s /lib64/libbz2.so.1 /lib64/libbz2.so.1.0 | |
| wget https://bitbucket.org/pypy/pypy/downloads/pypy-1.8-linux64.tar.bz2 | |
| tar -xf pypy-1.8-linux64.tar.bz2 | |
| cp -r pypy-1.8 /opt | |
| ln -s /opt/pypy-1.8/bin/pypy /usr/local/bin |
| xvfb 这个工具相当于一个wrapper, 给应用程序提供虚拟的 X server |
| 这2种方法经测试都已经通过。 | |
| 服务器版本是:ceontos5.4 64位系统。 | |
| 一、Xvfb + html2image | |
| yum install Xvfb | |
| yum install xorg-x11-fonts* | |
| wget http://www.ys250.com/src/html2image.x86_64.tar.gz | |
| #wget http://www.ys250.com/src/html2image.i386.tar.gz | |
| mv html2image /usr/local/ |
| http://www.wired.com/2011/01/linear-regression-with-pylab/ |
| http://jawher.net/2011/01/17/scala-development-environment-emacs-sbt-ensime/ |