上一页 1 2 3 4 5 6 7 8 ··· 198 下一页
摘要: Anaconda要装3.5.2,对应python3.6版本,无外网推荐用清华源镜像 链接 https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/ OpenCV装3.4.1.15 指令:pip install -i https://pypi.tun 阅读全文
posted @ 2021-12-08 20:16 brady-wang 阅读(573) 评论(0) 推荐(0) 编辑
摘要: str1 := "Golang"str2 := "Go语言"fmt.Println(reflect.TypeOf(str2[2]).Kind()) // uint8 阅读全文
posted @ 2021-12-07 18:10 brady-wang 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 我周围的人几乎都认为二分查找很简单,但事实真的如此吗?二分查找真的很简单吗?并不简单。看看 Knuth 大佬(发明 KMP 算法的那位)怎么说的: Although the basic idea of binary search is comparatively straightforward, t 阅读全文
posted @ 2021-12-02 11:20 brady-wang 阅读(149) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2021-11-29 07:45 brady-wang 阅读(0) 评论(0) 推荐(0) 编辑
摘要: import os import random import re import time import lxml.etree import requests import faker fake = faker.Faker() uaList = [] for i in range(0, 10): u 阅读全文
posted @ 2021-11-27 10:41 brady-wang 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 解决Rust -- update crates.io过慢的问题 在经过一系列操作,科,学,上,网等方法之后亲测无效,想到更改rust的文件源来加快速度 首先进入电脑的cargo目录,MAC OS 默认安装在 ~/.cargo下: cd ~/.cargo 创建一个config文件,这里使用vim编辑器 阅读全文
posted @ 2021-11-26 15:23 brady-wang 阅读(681) 评论(0) 推荐(0) 编辑
摘要: package main import ( "fmt" "github.com/antchfx/htmlquery" "net/http" ) func main() { var url string = "https://www.baidu.com/" client := &http.Client 阅读全文
posted @ 2021-11-23 16:23 brady-wang 阅读(62) 评论(0) 推荐(0) 编辑
摘要: 普通的get请求 package main import ( "io/ioutil" "fmt" "net/http" ) func main() { res,_ :=http.Get("https://www.baidu.com/") defer res.Body.Close() body,_ : 阅读全文
posted @ 2021-11-23 16:16 brady-wang 阅读(543) 评论(0) 推荐(0) 编辑
摘要: 从切片中删除元素 Go语言中并没有删除切片元素的专用方法,我们可以使用切片本身的特性来删除元素。 代码如下: func main() { // 从切片中删除元素 a := []int{30, 31, 32, 33, 34, 35, 36, 37} // 要删除索引为2的元素 a = append(a 阅读全文
posted @ 2021-11-23 13:48 brady-wang 阅读(470) 评论(0) 推荐(0) 编辑
摘要: 2. 工厂方法模式 此模式中,通过定义一个抽象的核心工厂类,并定义创建产品对象的接口,创建具体产品实例的工作延迟到其工厂子类去完成。这样做的好处是核心类只关注工厂类的接口定义,而具体的产品实例交给具体的工厂子类去创建。当系统需要新增一个产品是,无需修改现有系统代码,只需要添加一个具体产品类和其对应的 阅读全文
posted @ 2021-11-22 18:14 brady-wang 阅读(481) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 198 下一页