03 2018 档案
摘要:背景 因为使用的是sudo安装docker,所以会导致一个问题。以普通用户登录的状况下,在使用docker images时必须添加sudo,那么如何让docker免sudo依然可用呢?于是开始搜索解决方案。 理清楚问题 当以普通用户身份去使用docker images时,出现以下错误: Got pe
阅读全文
摘要:server { listen 80 default_server; listen [::]:80 default_server; index index.html index.htm index.nginx-debian.html; server_name _; location / { # Fi
阅读全文
摘要:先说一下接口,Go 语言中的接口很简单,在 Go 语言的 io 包中有这样一个函数: func ReadFull(r Reader, buf []byte) (n int, err error) 这个函数可以把对象 r 中的数据读出来,然后存入一个缓冲区 buf 中,以便其它代码可以处理 buf 中的数据。 这里有个问题,ReadFull 函数究竟可以读取哪些对象的数据?可以读文件中...
阅读全文
摘要:第一个DLL函数,第一个参数,要求传入一个指针,直接指向[]byte类型,注意,是直接指向;第2个参数为[]byte长度;第三个参数为一个直接指向string类型指针;返回一个整数,标识调用成功或失败。 最折磨我的就是直接指向某种类型的指针传递问题,查了N多资料,都是类似下面这样: 我开始也这样用,
阅读全文
摘要:package main import ( "syscall" "unsafe" ) func main(){ h, err := syscall.LoadLibrary("DllTest.dll") if err != nil { abort("LoadLibrary", err) } defe...
阅读全文
摘要:1 2 3 4 5 6 7 8 9 func rootViewCon() -> UIViewController { var topVC = UIApplication.shared.keyWindow?.rootViewController while topVC?.presentedViewCo
阅读全文
摘要:https://cloud.tencent.com/developer/article/1041849
阅读全文
摘要:sudo apt-get install g++-multilib
阅读全文
摘要:ok开始安装 1.安装gcc工具,因为golang有些功能是使用c写 sudo apt-get install bison gawk gcc libc6-dev make 2.安装Mercurial(若是用安装包可以忽略这步) 由于Go的源码是通过Mercurial进行管理的, 所以需要先安装Mer
阅读全文
摘要:sqlite数据库的update多表关联更新语句,和其他数据库有点小不一样 比如:在sql server中: 用table1的 id 和 table2的 pid,关联table1 和 table2 ,将table2的num字段的值赋给table1的num字段 很容易就关联起来了 sqlite却不支持
阅读全文
摘要:insert into encoder_config (name,value,chengji,parents) select name,value,chengji,parents from media_config where 16<=ID and ID<38
阅读全文
摘要:1、支持多表连接,例如 select * from student,class where student.cid=class.id; 2、支持左外连接(left outer join) 例如: select * from foods left outer join food_types on fo
阅读全文