摘要: import "fmt" type A struct { a string } func NewA(aa string) *A { return &A{aa} } func (a *A) Print() { fmt.Printf("%T\n", a) } type B struct { *A } func NewB(aa string) *B { ... 阅读全文
posted @ 2017-11-09 15:46 代码会说话 阅读(599) 评论(0) 推荐(0) 编辑
摘要: golang其interface类型, 实现了动态绑定. 输出结果是: 尤其注意, main函数中, print(&A), 如果传入A, 返回错误: "method has pointer receiver" 这里面的差别, 可以参考 http://blog.csdn.net/timemachine 阅读全文
posted @ 2017-11-09 15:43 代码会说话 阅读(1402) 评论(0) 推荐(0) 编辑
摘要: 安装 homebrewruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"brew search brew install nginxinstall rails under ... 阅读全文
posted @ 2015-03-17 19:52 代码会说话 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 配置参考:xmpp, html5客户端: xmpp是一种聊天协议. 基于该协议, 所有支持该协议的聊天工具, 均可以互相聊天. rfc: http://www.ietf.org/rfc/rfc3920.txtphp example: http://www.ibm.com/developerworks... 阅读全文
posted @ 2015-03-17 19:50 代码会说话 阅读(454) 评论(0) 推荐(0) 编辑
摘要: strophe + nginx + openfire got 504 (Gateway Time-out) then 404 (Invalid SID.)modify nginx.conf , add 3 red lines belowlocation /http-bind/ { pr... 阅读全文
posted @ 2015-03-17 18:35 代码会说话 阅读(774) 评论(1) 推荐(0) 编辑
摘要: 完整参照http://blog.csdn.net/afgasdg/article/details/39250139 可以成功安装4.10solr参照如上文档, 重启tomcat, webapps/solr目录便会被删除.原因: tomcat是解压安装. 某些地方又问题.这个英文版本. 全命令下来毫无... 阅读全文
posted @ 2014-12-17 18:12 代码会说话 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 1. 主要可以参考 :http://www.showerlee.com/archives/548其中 修改 /etc/profile文件有误, 参照如下:export JAVA_HOME=/usr/local/java#export JAVA_HOMEexport PATH=$JAVA_HOME/b... 阅读全文
posted @ 2014-12-16 17:46 代码会说话 阅读(117) 评论(0) 推荐(0) 编辑
摘要: vagrant教程连接:http://coolestguidesontheplanet.com/getting-started-vagrant-os-osx-10-9-mavericks/包含了基本的vagrant配置.如果需要安装多个 box 有2种方式:1. 开多个文件夹. 每个文件夹一个box... 阅读全文
posted @ 2014-12-16 17:42 代码会说话 阅读(152) 评论(0) 推荐(0) 编辑
摘要: java下得环境安装就是个字, f*ck. 经过几日的折腾. 终于算是略懂如何安装openfire.0. 如果你已经安装过了 openfire# 卸载已知环境. rm /Library/LaunchDaemons/org.jivesoftware.openfire.plistrm -r /usr/l... 阅读全文
posted @ 2014-11-05 16:11 代码会说话 阅读(299) 评论(0) 推荐(0) 编辑
摘要: mac下进行web开发, mysql算是必备程序了.1. 如何安装mysql?brew install mysql2. 如何启动mysql?mysqld &mysql.server start3. 如何让mysql开机自启动mkdir -p ~/Library/LaunchAgentscp `bre... 阅读全文
posted @ 2014-11-05 13:10 代码会说话 阅读(195) 评论(0) 推荐(0) 编辑