自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 收藏
  • 关注

转载 Convert Value type to Map in Golang

m := map[string]int{"foo": 1, "bar": 3}v := reflect.ValueOf(m)i := v.Interface()a := i.(map[string]int)println(a["foo"])

2016-07-11 19:47:30 392

原创 golang执行时不显示DOS窗口

Using Go Version 1.4.2 以上 go build -ldflags "-H windowsgui"

2016-06-29 19:50:33 3276

原创 ZeroICE 3.5.1绑定地址错误

使用IceGrig启动Server实例时报 IceInternal.Network.doBind(Network.java:251)                                        -jar                Server.jar

2016-05-31 20:08:00 486

转载 vim 匹配不包含某个字符串的行

\@!  Matches with zero width if the preceding atom does NOT match at the        current position. /zero-width {not in Vi}        Like "(?!pattern)" in Perl.        Example                 matche

2016-05-24 08:18:57 4587

转载 PHP to exe

转自 http://stackoverflow.com/questions/9046675/convert-a-php-script-into-a-stand-alone-windows-executablePhalangerhttp://www.php-compiler.net/http://wiki.php-compiler.net/Phalanger_Wikiht

2016-05-23 14:09:17 740

原创 Win32 API备忘

使用windows默认程序打开文件ShellExecute(0, 0, L"c:\\outfile.txt", 0, 0 , SW_SHOW );

2016-05-23 14:06:06 289

原创 Golang中struct同时用于bson json

type User struct { Name string `json:"name,omitempty" bson:"name,omitempty"` Secret string `json:"-,omitempty" bson:"secret,omitempty"`}

2016-05-18 11:31:38 5672 1

原创 golang redis demo code

package mainimport (    "fmt"    "github.com/garyburd/redigo/redis")func newConn() (redis.Conn, error) {    c, err := redis.Dial("tcp", "192.168.0.2:6379")    if err != nil {      

2016-05-07 08:35:13 785

原创 配置Bugzilla 5 用SMTP方式发送邮件

用具有administrator账号登陆点击上面的Administrator进入上面的页面, 然后点击Parameters点击上面页面上的Email,进入Email的配置页面。mail_delivery_method  SMTPmailfrom xxx@xxx.com    用来发送邮件的地址smtpserver smtp.xxx.com:25 邮箱的发送服务器

2016-04-28 11:03:08 1025

原创 DOS BAT中用echo显示一些保留字符

在写批处理程序时有时要显示一些属于批处理保留的字符,比如 "|",这时需要如下写:% = %%^ = ^^& = ^&> = ^>| = ^|! = ^^!例如: echo debug^|release > test.pro

2016-04-25 18:58:35 1687

原创 Qt 5中获取默认存储用户数据路径

同Qt 4不同,需要使用函数QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)。其他常用的还有:QStandardPaths::TempLocation, QStandardPaths::CacheLocation 等。

2016-04-25 18:56:52 1049

原创 Linux拷贝文件,略过某些文件或目录

在Linux下拷贝文件中,有时需要略过一些文件或目录,比如.svn等,可以采用如下命令:rsync -av --exclude="path_to_exclude_file_name" --exclude="path_name" source destination注意使用source和source/是不同的,加斜杠后表示将source下的内容拷贝到destination目录下。没有斜杠的话

2016-04-25 18:50:22 1111

原创 Qt debug release包含不同的lib

我们在编译程序时,有时需要跟debug和release配置来包含不同的库,可以在pro文件中如下定义:CONFIG(debug,debug|release) {    LIBS += xxxd.lib} else {    LIBS += xxx.lib}

2016-04-25 18:40:39 2505

转载 在Visual studio中使用跟踪断点

https://blogs.msdn.microsoft.com/visualstudioalm/2013/10/10/tracepoints/This blog post is part of a series on breakpoints in the Visual Studio debugger and has been updated to reflect the ex

2016-04-23 10:52:34 782

转载 使用supervisord管理进程

转自: http://www.linux-mac.com/archives/708Go 程序目前还不能作为daemon程序运行,比如:在 linux 不能使用./app【开机自启动】 go 程序,需要借助第三方程序实现开机启动;例如supervisord,当然还有其他的,本文以supervisord为例:1. 安装(需要 EPEL 源):CentOS 5 安装3

2016-04-23 09:49:10 455

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除