• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
孙龙 程序员
少时总觉为人易,华年方知立业难
博客园    首页    新随笔    联系   管理    订阅  订阅
上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 75 下一页
2019年7月13日
golang interface
摘要: package main import ( "fmt" ) //声明/定义一个接口 type Usb interface { //声明了两个没有实现的方法 Start() Stop() } //声明/定义一个接口 type Usb2 interface { //声明了两个没有实现的方法 Start() Stop(... 阅读全文
posted @ 2019-07-13 14:39 孙龙-程序员 阅读(341) 评论(0) 推荐(0)
go struct 继承
摘要: 阅读全文
posted @ 2019-07-13 14:35 孙龙-程序员 阅读(654) 评论(0) 推荐(0)
go strcut 封装
摘要: package model import "fmt" type person struct { Name string age int //其它包不能直接访问.. sal float64 } //写一个工厂模式的函数,相当于构造函数 func NewPerson(name string) *pers 阅读全文
posted @ 2019-07-13 14:20 孙龙-程序员 阅读(156) 评论(0) 推荐(0)
go struct 抽象
摘要: package main import ( "fmt" ) //定义一个结构体Account type Account struct { AccountNo string Pwd string Balance float64 } //方法 //1. 存款 func (account *Account 阅读全文
posted @ 2019-07-13 14:12 孙龙-程序员 阅读(263) 评论(0) 推荐(0)
go struct 工厂
摘要: 阅读全文
posted @ 2019-07-13 14:05 孙龙-程序员 阅读(203) 评论(0) 推荐(0)
2019年7月11日
nohup和&后台运行,进程查看及终止
摘要: 1.nohup 用途:不挂断地运行命令。 语法:nohup Command [ Arg … ] [ & ] 无论是否将 nohup 命令的输出重定向到终端,输出都将附加到当前目录的 nohup.out 文件中。 如果当前目录的 nohup.out 文件不可写,输出重定向到 $HOME/nohup.o 阅读全文
posted @ 2019-07-11 15:19 孙龙-程序员 阅读(349) 评论(0) 推荐(0)
2019年7月10日
golang struct
摘要: package main import "fmt" type Cat struct{ Name string Age int Color string Hobby string } func main(){ var cat1 Cat cat1.Name = "小白" cat1.Age = 3 cat1.Color ... 阅读全文
posted @ 2019-07-10 19:23 孙龙-程序员 阅读(183) 评论(0) 推荐(0)
2019年7月6日
golang map
摘要: 阅读全文
posted @ 2019-07-06 15:34 孙龙-程序员 阅读(139) 评论(0) 推荐(0)
golang数组 排序和查找
摘要: package main import "fmt" func BubbleSort(arr *[5]int){ fmt.Println("排序前arr=",(*arr)) temp := 0 for i := 0;i (*arr)[j+1]){ temp = (*arr)[j] (*arr)[j] = (*arr)[j+1]... 阅读全文
posted @ 2019-07-06 14:19 孙龙-程序员 阅读(9251) 评论(0) 推荐(0)
2019年7月4日
golang数组与切片
摘要: package main import "fmt" func fbn(n int) ([]uint64... 阅读全文
posted @ 2019-07-04 22:18 孙龙-程序员 阅读(227) 评论(0) 推荐(0)
上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 75 下一页
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3