会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
不吃肉的羊
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
···
10
下一页
2021年5月31日
GO 结构体基础
摘要: package main import "fmt" /* 结构体 type name struct 说明:struct是值传递所以 结构体1=结构体2 这是如果想通过结构体1修改结构体2那么在给结构体1赋值是就应该赋的是 &结构体2的地址值 */ //定义结构体就是PHP中的类 type Cat s
阅读全文
posted @ 2021-05-31 20:32 不吃肉的羊
阅读(56)
评论(0)
推荐(0)
2021年5月23日
GO map
摘要: package main import "fmt" /* map 是引用类型 var name = map[keyType]valueType map的key的类型: 可以是多种类型,比如 bool,数组,string,指针,channel(管道) 大部分都是int活着string类型 使用说明:
阅读全文
posted @ 2021-05-23 14:46 不吃肉的羊
阅读(65)
评论(0)
推荐(0)
2021年5月17日
GO 二维数组
摘要: package main import "fmt" /* 二维数组 方式一:var arr [2][6]int{{},{}} 方式二:arr :=[...][6]int{{},{}} */ func main() { //定义二维数组 var arr [4][6]int arr[1][2]=1 ar
阅读全文
posted @ 2021-05-17 21:42 不吃肉的羊
阅读(660)
评论(0)
推荐(0)
GO slice切片
摘要: package main import "fmt" /* 切片 切片是引用类型,所以当实参传递给func 在func中更改切片 会影响切片的实际值 */ func main() { //数组 var intArr = [...]int{11, 22, 33, 44, 55} fmt.Println(
阅读全文
posted @ 2021-05-17 21:21 不吃肉的羊
阅读(46)
评论(0)
推荐(0)
2021年5月12日
GO数组基础
摘要: package main import "fmt" /* 保留小数点两位 a:= fmt.Sprintf("%.2f",33.3/6)//返回的是string类型 */ func main() { //定义数组 var hens[6]float64 //赋值 hens[0]=3.0 hens[1]=
阅读全文
posted @ 2021-05-12 22:12 不吃肉的羊
阅读(30)
评论(0)
推荐(0)
GO error处理
摘要: package main import ( "errors" "fmt" "time" ) /* 错误处理机制 */ func test() { num1 := 10 num2 := 0 res := num1 / num2 fmt.Println(res) defer func() { //匿名函
阅读全文
posted @ 2021-05-12 19:48 不吃肉的羊
阅读(74)
评论(0)
推荐(0)
2021年5月10日
GO获取时间并处理
摘要: package main import ( "fmt" "strconv" "time" ) func test() { str := "" for i := 0; i < 100000; i++ { str += "hello" + strconv.Itoa(i) //将int转为字符串 } }
阅读全文
posted @ 2021-05-10 22:01 不吃肉的羊
阅读(244)
评论(0)
推荐(0)
2021年5月9日
Go字符串常用函数
摘要: package main import ( "fmt" "strconv" "strings" ) /* 系统内置的String常用的函数 */ func main() { str :="这是一个字符串" fmt.Println(len(str))//输出8中文是按照字节来输出 //遍历带中文的字符
阅读全文
posted @ 2021-05-09 21:53 不吃肉的羊
阅读(102)
评论(0)
推荐(0)
2021年4月14日
iview table嵌套table
摘要: HTML: 1 <!DOCTYPE html> 2 <html> 3 4 <head> 5 <meta charset="utf-8"> 6 <title>iview example</title> 7 <link rel="stylesheet" type="text/css" href="./i
阅读全文
posted @ 2021-04-14 16:44 不吃肉的羊
阅读(1523)
评论(0)
推荐(0)
2021年4月7日
php 利用socket发送HTTP请求(GET,POST)
摘要: 转:https://www.jb51.net/article/71448.htm 今天给大家带来的是如何利用socket发送GET,POST请求。我借用燕十八老师封装好的一个Http类给进行说明。 在日常编程中相信很多人和我一样大部分时间是利用浏览器向服务器提出GET,POST请求,那么可否利用其它
阅读全文
posted @ 2021-04-07 09:45 不吃肉的羊
阅读(534)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
···
10
下一页
公告