09 2014 档案
摘要:接收推送消息部分我们通过ZeroMQ实现,可以参考http://www.cnblogs.com/ilovewindy/p/3984283.html。首先是开机自启动的功能实现,代码如下:1. AndroidManifest.xml中添加如下代码: 1 2 3 4 5 ….. 6 10...
阅读全文
摘要:通过ZeroMQ的pub/sub模式,我们可以实现发送推送消息的功能。以下为示例代码(入门可参考此文:http://www.cnblogs.com/ilovewindy/p/3984269.html): 1 (def ctx (ZMQ/context 1)) 2 3 (def msg-list (...
阅读全文
摘要:DEMO说明一切: 1 // this is the id of the form 2 $("#idForm").submit(function() { 3 4 var url = "path/to/your/script.php"; // the script where you han...
阅读全文
摘要:这里我们将给出一个subscribe模式的客户端示例程序,如下: 1 private class ZeroMQMessageTask extends AsyncTask { 2 private String message = ""; 3 4 public ZeroMQMessag...
阅读全文
摘要:假设你已经知道什么是ZeroMQ(不知道的话可以看这个:http://zh.wikipedia.org/wiki/%C3%98MQ),以下就给出在Clojure中如何使用ZeroMQ(感谢此文作者:http://patternhatch.com/2013/06/12/messaging-using-...
阅读全文
摘要:感谢控件作者:https://github.com/SocialObjects-Software/AMSlideMenu首先上效果图:这里我们使用AMSlideMenu来实现左右侧滑菜单的效果。控件支持单独左侧滑、单独右侧滑和左右侧滑。同时支持Storyboard和xib两种开发模式。这里介绍第二种...
阅读全文
摘要:From google: If your app uses a custom image as the background of the bar, you'll need to provide a “taller” image so that it extends up behind the st...
阅读全文
摘要:要改变UITableViewCell选中时的背景色,需要在-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)方法中添加如下代码:// 设置cell选中的背景色UIVi...
阅读全文
摘要:要去除UITableView在运行时显示的多余空白行,只需要将TableView的Style从Plain改为Grouped即可。
阅读全文
摘要:想在mac下安装oh my zsh,按照https://github.com/robbyrussell/oh-my-zsh上的文档,执行下面这条命令安装:curl -L http://install.ohmyz.sh | sh结果老是会报chsh: /usr/local/bin/zsh: non-s...
阅读全文
摘要:在OnCreate函数中添加:getActionBar().hide();
阅读全文
摘要:Scrollview定义中添加一行:android:isScrollContainer="false"
阅读全文
摘要:android:background="@null"
阅读全文