会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
看一百次夜空里的深蓝
博客园
首页
新随笔
管理
上一页
1
2
3
4
5
6
7
8
9
···
18
下一页
2023年9月14日
Golang map集合丶struct结构体丶继承
摘要: 一.map集合 1 // map键值对集合 2 func testMap() { 3 // Map的定义: var 变量名 map[keytType]valueType 4 // 细节: 5 // 1.key唯一 6 // 2.map是引用 7 // 3.直接遍历map是无序的 8 // 4.map
阅读全文
posted @ 2023-09-14 08:19 看一百次夜空里的深蓝
阅读(253)
评论(0)
推荐(0)
2023年9月13日
Glang 数组的排序和查找:快速丶希尔丶堆丶选择丶冒泡...
摘要: 一.数组的排序与查找 1 // 数组的排序和查找 2 func testArrSort() { 3 // 内部排序:将需要处理的所有数据都加载到内部存储器中进行排序(交换式排序法、选择式排序法、插入式排序) 4 5 // 交换式排序法-冒泡排序:递归将最大或最小值冒泡到数组尾 6 BubbleSor
阅读全文
posted @ 2023-09-13 12:08 看一百次夜空里的深蓝
阅读(50)
评论(0)
推荐(0)
2023年9月12日
Golang 错误处理丶数组丶切片丶随机数
摘要: 一.错误处理 1 // 错误处理 2 func testError() { 3 errorExec := func() { 4 err := recover() // recover是内置函数,可以捕获异常 5 if err != nil { // 说明捕获到错误 6 fmt.Println("er
阅读全文
posted @ 2023-09-12 09:30 看一百次夜空里的深蓝
阅读(85)
评论(0)
推荐(0)
2023年9月11日
Golang 日期处理丶函数执行耗时丶内置函数
摘要: 一.日期处理 1 func testDate() { 2 // 获取当前时间 3 now := time.Now() 4 fmt.Printf("当前时间:%v , 时间的类型:%T \n", now, now) 5 fmt.Printf("当前时间的年=%v月=%v日=%v时=%v分=%v秒=%v
阅读全文
posted @ 2023-09-11 10:50 看一百次夜空里的深蓝
阅读(105)
评论(0)
推荐(0)
2023年9月10日
Golang 初识: 函数调用与定义丶字符串处理丶Json的处理
摘要: 一.基本函数调用与定义 1 package main 2 3 import ( 4 "encoding/json" 5 "errors" 6 "fmt" 7 "math/rand" 8 "mylib/pkg/student" 9 "mylib/pkg/utils" 10 "sort" 11 "str
阅读全文
posted @ 2023-09-10 17:50 看一百次夜空里的深蓝
阅读(56)
评论(0)
推荐(0)
2023年8月27日
Shell 遍历文件夹
摘要: 例1 1 #! /bin/bash 2 read_dir(){ 3 a=0 4 declare -a arr 5 for file in `ls $1` 6 do 7 a=$a+1 8 if [ -d $1"/"$file ] 9 then 10 arr[$a]=$1"/"$file 11 echo
阅读全文
posted @ 2023-08-27 19:59 看一百次夜空里的深蓝
阅读(589)
评论(0)
推荐(0)
2023年8月19日
Ubuntu 下安装配置Golang
摘要: 1.安装VS Code https://code.visualstudio.com/2.安装go https://golang.google.cn/3.配置go环境变量 export PATH=/home/chad/golang/go/bin:$PATH # GO环境的Bin目录 export GO
阅读全文
posted @ 2023-08-19 19:23 看一百次夜空里的深蓝
阅读(473)
评论(0)
推荐(0)
2023年8月7日
Scrapy: scrapy_redis
摘要: 1 # 安装 2 pip3 install scrapy_redis 3 # 源码 4 https://github.com/rmax/scrapy-redis.git 5 # 文档 6 https://github.com/rmax/scrapy-redis 7 8 # 配置说明: https:/
阅读全文
posted @ 2023-08-07 12:55 看一百次夜空里的深蓝
阅读(50)
评论(0)
推荐(0)
2023年8月2日
Scrapy中搭配Splash丶selenium
摘要: Splash的初识 1 # Splash类似Selenium模拟浏览器浏览网页来动态爬取网站 2 # 文档:https://splash.readthedocs.io/en/stable/ 3 # Splash 在docker中安装: https://splash.readthedocs.io/en
阅读全文
posted @ 2023-08-02 13:12 看一百次夜空里的深蓝
阅读(163)
评论(0)
推荐(0)
2023年8月1日
Scrapy
摘要: Scrapy 初识 1 Scrapy 编码流程 2 1.创建爬虫,也就是继承scrapy.Spider或scrapy.CrawlSpider 3 2.将要爬取的网页填写在start_urls中 4 3.实现parse解析网站的回调 5 4.在Items中编码规定数据对象 6 5.middleware
阅读全文
posted @ 2023-08-01 15:06 看一百次夜空里的深蓝
阅读(262)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
···
18
下一页
公告