pu369com

上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 33 下一页

2020年5月20日

golang实现AES加密和解密-自已动手写个加解密软件

摘要: 补充:下面代码思路有问题,我后来重新写了个python版本的: https://www.cnblogs.com/pu369/p/15420768.html 目的:win10环境,当前目录下创建一个 解密的密码.txt ,写入一些内容 。用一个密码加解密,相应生成“加密的密码.txt”, 代码: pa 阅读全文

posted @ 2020-05-20 15:43 pu369com 阅读(1294) 评论(0) 推荐(0)

2020年5月15日

安卓hello wolrd【未成功】

摘要: 1 从https://developer.android.google.cn/training/basics/firstapp/creating-project 下载android studio ,一路next安装 2 启动时,提示设置proxy,因为准备用国内镜像,所以点取消。过一会弹出welco 阅读全文

posted @ 2020-05-15 19:15 pu369com 阅读(141) 评论(0) 推荐(0)

go template修改定界符Delims的坑

摘要: 直接上代码: go: package main import ( "fmt" "html/template" "net/http" ) type V struct { A string } func main() { Serve() } func Serve() { //静态文件服务 http.Ha 阅读全文

posted @ 2020-05-15 12:56 pu369com 阅读(779) 评论(0) 推荐(0)

解决liteIDE没有代码提示及跳转问题

摘要: win10系统, liteenv是win64 一开始仅重启liteide不行,后来重新解压liteide,再重启。正常了。 也没有修改环境变量,看了下golangpackage设置,go111MODULE还是on,goproxy还是https://goproxy.io,direct 使用系统gopa 阅读全文

posted @ 2020-05-15 11:10 pu369com 阅读(2229) 评论(0) 推荐(0)

2020年5月12日

go vue真是稀缺组合(cdn方式)

摘要: 要点:直接将vue模板文件(实际就是html,文件名和后缀可任意)放在go的模板目录即可。 1、首先在每个html文件的head部分按顺序加上(注意顺序) <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chal 阅读全文

posted @ 2020-05-12 12:57 pu369com 阅读(900) 评论(0) 推荐(0)

2020年5月11日

golang ---查看进程(Windows)

摘要: 代码:其实主要是调用tasklist和taskkill package main import ( "fmt" "log" "os/exec" ) func main() { var inputStr string for { fmt.Println(" ") fmt.Print("1->退出 ") 阅读全文

posted @ 2020-05-11 11:55 pu369com 阅读(1569) 评论(0) 推荐(0)

2020年5月9日

go 通过代理服务器获取网站内容

摘要: 代码: package main import ( "fmt" "io/ioutil" "net/http" "net/url" ) func main() { // 这里用简化的UA 访问百度自己 const ( uri = "https://2020.ip138.com/" userAgent 阅读全文

posted @ 2020-05-09 17:36 pu369com 阅读(324) 评论(0) 推荐(0)

go 不要通过共享内存来通信,相反,应该通过通信来共享内存

摘要: 例子1: 5个学生交作业,老师收到一个,批改一个,并公布分数 package main import ( "crypto/rand" "fmt" "math/big" ) func 交作业(ch chan int64) { n, _ := rand.Int(rand.Reader, big.NewI 阅读全文

posted @ 2020-05-09 12:59 pu369com 阅读(382) 评论(0) 推荐(0)

2020年5月7日

用rod获取百度搜索结果的例子

摘要: package main import ( "fmt" "time" "github.com/ysmood/rod" "github.com/ysmood/rod/lib/input" "github.com/ysmood/rod/lib/launcher" ) func Example_reuse 阅读全文

posted @ 2020-05-07 18:57 pu369com 阅读(654) 评论(0) 推荐(0)

win10关联未知的文件扩展名和应用

摘要: 新建 a.go文件,本想默认以liteide打开 然而,win10竟然不提示“始终使用此应用打开”的选项。 原因是注册表中根本没有.go 于是运行regedit 在 计算机\HKEY_CLASSES_ROOT下直接新建项 并重命名为 .go(注意前面有个点),关闭regedit 现在,在开始菜单上点 阅读全文

posted @ 2020-05-07 16:08 pu369com 阅读(502) 评论(0) 推荐(0)

上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 33 下一页

导航