1、首先需要了解哪些占位符分别代表什么 这些是死知识,把常用的记住,不常用的直接查表就行了 golang 的fmt 包实现了格式化I/O函数,类似于C的 printf 和 scanf。 定义示例类型和变量 type Human struct { Name string } var people = ...
分类:
编程语言 时间:
2020-07-20 15:24:23
阅读次数:
75
package main import ( "golang.org/x/tour/pic" "image/color" "image" ) type Image struct{} func (i Image) ColorModel() color.Model { return color.RGBAM ...
分类:
其他好文 时间:
2020-07-20 13:17:01
阅读次数:
57
参考资料:https://github.com/koding/multiconfig 测试代码: package main import ( "fmt" "github.com/koding/multiconfig" ) type Server struct { Demo DemoConfig } ...
分类:
其他好文 时间:
2020-07-20 13:14:30
阅读次数:
59
PE头在进程装载的时候使用格式比较固定,从中找到需要的信息后不必过多关注,只需要找到还原后的节区体即可。 从文件中的EntryPoint找到进程入口: 占用不需要的元素,其在节区如下区域中插入代码: 蓝色框中是可选头所占区域,其余的到16F为多余的区域。 这条命令将ESI所指的区域中的27个Dwor ...
分类:
其他好文 时间:
2020-07-19 23:57:50
阅读次数:
107
#include<stdio.h> #include<stdlib.h> #include<malloc.h> typedef struct LNode{ int data; struct LNode* next; //next是一个指向结构体类型的指针, LNode* 是一个指针数据类型类似int ...
分类:
编程语言 时间:
2020-07-19 23:54:49
阅读次数:
96
#include<stdio.h> #include<stdlib.h> #include<malloc.h> typedef struct LNode{ int data; struct LNode* next; }LNode,*LinkList; LinkList List_TailInsert ...
分类:
编程语言 时间:
2020-07-19 23:53:50
阅读次数:
108
1.面向对象 1.1匿名字段 package main import "fmt" type Person struct { name string sex string age int } type Student struct { Person id int addr string } func ...
分类:
编程语言 时间:
2020-07-19 23:44:14
阅读次数:
77
2.接口 接口定义了一个对象的行为规范。 2.1接口 2.1.1接口类型 Go语言中接口是一种类型,一种抽象类型。 interface是一组methods的集合。 2.1.2为什么要用接口 package main import "fmt" type Cat struct{} func (c Cat ...
分类:
编程语言 时间:
2020-07-19 23:43:38
阅读次数:
86
1.装箱 基本类型直接赋值一个引用类型 Integer I = 10; 拆箱 int i = I; 实际为 Integer I = Integer.valueOf(10); int i = I.intValue(); 2.枚举(enum) 简单情况下,与其他语言的enum相似 enum Light ...
分类:
编程语言 时间:
2020-07-19 23:33:12
阅读次数:
65
用了kuangbin大佬的板子 一.二维计算几何模板 1.点 struct Point { double x, y; Point() {} Point(double _x, double _y) { x = _x; y = _y; } void input() { scanf("%lf%lf", & ...
分类:
其他好文 时间:
2020-07-19 23:32:16
阅读次数:
67