- 博客(7)
- 收藏
- 关注
原创 GO的第四天二叉树和连接数据库
type TreeNode struct { Val int Left *TreeNode Right *TreeNode }func isBalanced(root *TreeNode) bool { return chs(root)!=-1}func chs(root *TreeNode)int { if root==nil{ return 0 } l:=chs(root.Left) if -1 == l {.
2021-12-24 17:24:06
715
原创 GO的第三天 汉诺塔问题
func hanota(A []int, B []int, C []int) []int { move(len(A),&A,&B,&C) return C}func move(n int,a *[]int, b *[]int, c *[]int) { if n==1 { *c = append(*c, (*a)[len(*a)-1])// 将编b号为1的圆盘从A移到C *a = (*a)[:len(*a)-1] retur.
2021-12-22 18:08:33
546
原创 GO的第二天hello world
进行了些简单的运用package mainimport ( "fmt" s "gotest/sumjs")func main() { b := 3 a := s.SumAdd(1,2) c := s.Sub(a,b) fmt.Println("hello world!",a,b,c) slice := []int{10, 20, 30, 40, 50} newSlice := slice[1:3:3] newSlice = a...
2021-12-21 17:02:51
95
原创 get和post请求
Get 请求URL realUrl = new URL(accessToken_URL + "?appid=" + accessToken_AppId+"&appsecret="+accessToken_appSecret);logger.info("执行获取token的url:"+accessToken_URL + "?appid=" + accessToken_AppId+"&appsecret="+accessToken_appSecret);// 打开和URL之间的连接.
2021-04-09 10:04:47
120
原创 C#笨的全屏获取方式
[DllImport("SHELL32", CallingConvention = CallingConvention.StdCall)] public static extern uint SHAppBarMessage(int dwMessage, ref APPBARDATA pData); [DllImport("User32.dll", Cha...
2018-03-27 16:50:32
355
原创 C# Windows7锁屏设置图片路径 修改注册表
DirectoryInfo dir = new DirectoryInfo(url); if (!dir.Exists) { msg = "锁屏资源不存在!"; return false; } FileInfo[] fis = dir.GetFile...
2018-03-20 15:05:07
454
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人