- 博客(15)
- 资源 (51)
- 收藏
- 关注
原创 golang生成二维码
获取: github地址:https://github.com/skip2/go-qrcodepackage mainimport qrcode "github.com/skip2/go-qrcode"import "fmt"func main() { err := qrcode.WriteFile("http://blog.csdn.net/wangshubo1989", q...
2019-04-30 15:23:58 1510
原创 beego热更新
package mainimport ( "log" "net/http" "os" "strconv" "github.com/astaxie/beego/grace")func handler(w http.ResponseWriter, r *http.Request) { w.Write([]byte("WORLD!")) w.Write([]byte("ospi...
2019-04-30 11:24:32 2258
原创 golang中rpc
package http_rpcimport ( "log")type Arith inttype Args struct { A, B int}func (t *Arith) Multiply(args Args, result *int) error { log.Printf("Multiply %d with %d\n", args.A, args.B) *res...
2019-04-30 10:44:51 195
原创 beego表单验证
package adminimport ( "fmt" "regexp" "github.com/astaxie/beego" "github.com/astaxie/beego/validation")type UserController struct { beego.Controller}func (this *UserController) Index() {...
2019-04-19 17:55:41 967
原创 golang配置https
在beego项目中在app.conf中加入以下内容EnableHTTPS=trueEnableHttpTLS = trueHttpsPort = 443HTTPSCertFile = “1529917066791.pem” #证书解压后,找到对应后缀HTTPSKeyFile = “1529917066791.key” #证书解压后,找到对应后缀就可以了。注意删除上面的注释...
2019-04-19 17:04:27 793
原创 nats
nats 官网 https://nats.io/documentation/server/gnatsd-intro/使用go get拉取go get github.com/nats-io/gnatsd
2019-04-15 23:35:09 259
原创 pyhon中返回的网页为中文乱码
import requestsresponse = requests.post('https://www.suimeng.com/modules/article/search.php?searchkey={}'.format('全球高武'))print('status_code:',response.status_code)if response.status_code == 200: ...
2019-04-13 15:33:18 386
原创 python中\u编码
from urllib.parse import quotes=‘images.dmzj.com/m/\u5192\u9669\u738b\u6bd4\u7279/56_1548733081/JOJO_000.png’s=s.replace(’/’,’/’)print(’:::’,quote(s))::: images.dmzj.com/m/冒险王比特/56_1548733081/JOJ...
2019-04-12 01:16:46 4373
原创 Url编码/解码
foo://example.com:8042/over/there?name=ferret#nose \_/ \______________/ \________/\_________/ \__/ | | | | | scheme ...
2019-04-12 00:52:04 362
原创 shell复杂操作
1.将一天前的数据移动到另外一个文件夹中 for i in `ls`; do echo $i; day=`ls -al $i | awk '{print $7}'`; if [ $day -lt 10 ]; then mv $i ../chapters_bak/ ; fi ; done
2019-04-10 15:44:17 210
原创 beego中cache缓存模块redis
注意加上 _ “github.com/astaxie/beego/cache/redis” 这样一句话package mainimport ( "encoding/json" "fmt" "github.com/astaxie/beego" "github.com/astaxie/beego/cache" _ "github.com/astaxie/beego...
2019-04-08 10:16:44 5684
原创 python中URL常见的header
user_agent = ["Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50","Mozilla/5.0 (Windows; U; Windows NT 6.1; en-us) AppleWebKit...
2019-04-07 17:45:06 3344
原创 Centos7另外安装python3
首先下载Python3的相关依赖yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc makewget https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tar.xz解压...
2019-04-04 20:33:38 213
原创 python文件切割
fopen = open('cleandingdian.csv', 'r')diff_line = fopen.readlines()line_list = []for line in diff_line: line_list.append(line[:len(line)-1])print(line_list)diff_match_split = [line_list[i:i...
2019-04-01 10:49:14 889
couchdb-2.3.0.msi
2018-12-16
protobuf-all-3.6.1.zip
2018-12-06
采用windows IME 机制编写拼音输入法C语言源码
2018-10-19
mac下redis desktop manager 0.9.3.29.zip
2020-01-02
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人