pu369com

05 2020 档案

Golang 爬虫系列一 goquery
摘要:主要参考原文在https://www.jianshu.com/p/ae172d60c431 主要想练习一下goquery,首先是实践一把 使用goquery爬取豆瓣电影top250 从原文最后复制代码,编译运行。输入一堆err 调试了一下,返回Http错误代码418,应该是反爬虫了。 好吧,我们不应 阅读全文

posted @ 2020-05-27 17:25 pu369com 阅读(555) 评论(0) 推荐(0) 编辑

PowerShell使用教程
摘要:1、打开powershell 不说了 2、 获取帮助: get-help (所有命令都是cmdlet格式,help也不例外) 3、查看有哪些命令: get-command (可看到命令类型有:Alias别名、Cmdlet命令、Function函数) 4、查看以 get开头的命令: get-comma 阅读全文

posted @ 2020-05-21 19:42 pu369com 阅读(648) 评论(0) 推荐(0) 编辑

Go 语言显示下载文件进度/分段读取 io.TeeReader()
摘要:想用go下载文件,代码: package main import ( "fmt" "io" "net/http" "os" "strings" ) // WriteCounter counts the number of bytes written to it. It implements to t 阅读全文

posted @ 2020-05-21 18:03 pu369com 阅读(890) 评论(0) 推荐(0) 编辑

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

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

安卓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 阅读(132) 评论(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 阅读(759) 评论(0) 推荐(0) 编辑

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

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

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 阅读(867) 评论(0) 推荐(0) 编辑

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 阅读(1550) 评论(0) 推荐(0) 编辑

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 阅读(310) 评论(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 阅读(367) 评论(0) 推荐(0) 编辑

用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 阅读(620) 评论(0) 推荐(0) 编辑

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

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

试验go rod 及更改chrome浏览器缓存位置
摘要:发现一个新的go语言库,例子在这里https://github.com/ysmood/rod/blob/master/examples_test.go 打算运行以下代码 package main import ( "fmt" "github.com/ysmood/rod" "github.com/y 阅读全文

posted @ 2020-05-07 15:43 pu369com 阅读(1115) 评论(0) 推荐(0) 编辑

今日重新安装go和liteide,记录一下过程
摘要:win10 1、下载go和liteide go:https://dl.google.com/go/go1.14.2.windows-amd64.msi liteidex:https://sourceforge.net/projects/liteide/ 苦B边疆地区,两个站点直接都下载不了;百度PA 阅读全文

posted @ 2020-05-07 10:33 pu369com 阅读(845) 评论(0) 推荐(0) 编辑

Vue UI 步骤
摘要:环境 win10 一、下载安装nvm 1 从 https://github.com/coreybutler/nvm-windows/releases nvm-noinstall.zip 2 解压到一个地方,比如: C:\dev\nvm 3 双击 install.cmd,直接回车,成功后,会在C盘的根 阅读全文

posted @ 2020-05-06 15:30 pu369com 阅读(532) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示