GPHPER的菜地


  • 首页

  • 标签

  • 分类

  • 归档

Java开发工具

发表于 2022-05-08 | 分类于 Java

开发工具介绍

JDK

全拼:Java Development Kit

中文名:Java开发工具包

JDK = JRE + Java开发工具【java/javac等】

JRE [Java Runtime Environment]

java运行环境
JRE = JVM + Java的核心类库

安装目录

D:\Program Files\Java

阅读全文 »

Java基础(一)

发表于 2022-05-08 | 分类于 Java

1.文档注释

1
2
3
4
5
6
7
8
9
10
11
/**
* @author gphper
* @version 1.0
*/
public class Hello{

public static void main(String[] args){
System.out.println("hello world");
}

}

执行命令 javadoc -d ./tmp -verison -author Hello.java

阅读全文 »

VsCode 配置golang

发表于 2022-04-04 | 分类于 golang

配置代理

PROXY = https://proxy.cn

安装插件

ctrl+shift+p 输入 Go:install/update tools

替换setting.json文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
{
"editor.fontSize": 16,
"go.docsTool": "gogetdoc",
"go.formatTool": "goimports",
"go.autocompleteUnimportedPackages": true,
"explorer.confirmDelete": false,
"terminal.integrated.tabs.enabled": true,
"workbench.iconTheme": "eq-material-theme-icons-light",
"editor.fontFamily": "'JetBrains Mono',Consolas, 'Courier New', monospace",
"go.useLanguageServer": true,
"[go]": {
"editor.snippetSuggestions": "none",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true,
}
},
"gopls": {
"usePlaceholders": true, // add parameter placeholders when completing a function
// Experimental settings
"completeUnimported": true, // autocomplete unimported packages
// "watchFileChanges": true, // watch file changes outside of the editor
"deepCompletion": true, // enable deep completion
},
"files.eol": "\n",
"explorer.confirmDragAndDrop": false,
"workbench.colorTheme": "Material Theme Darker",
"workbench.colorCustomizations": {
"tab.activeBackground": "#018db8"
},
"security.workspace.trust.untrustedFiles": "open",
"vsicons.dontShowNewVersionMessage": true,
"go.toolsManagement.autoUpdate": true,
"leetcode.endpoint": "leetcode-cn",
"leetcode.hint.configWebviewMarkdown": false,
"leetcode.workspaceFolder": "C:\\Users\\hengda\\.leetcode",
"leetcode.defaultLanguage": "golang",
"leetcode.hint.commandShortcut": false,
"go.testTags": "",
"go.testFlags": [
"-v"
],
"editor.quickSuggestions": {
"strings": true
},
"editor.codeActionsOnSave": {
},
// 头部注释
"fileheader.customMade": {
// Author字段是文件的创建者 可以在specialOptions中更改特殊属性
// 公司项目和个人项目可以配置不同的用户名与邮箱 搜索: gitconfig includeIf 比如: https://ayase.moe/2021/03/09/customized-git-config/
// 自动提取当前git config中的: 用户名、邮箱
"Author": "GPHPER", // 同时获取用户名与邮箱
// "Author": "git config user.name", // 仅获取用户名
// "Author": "git config user.email", // 仅获取邮箱
// "Author": "OBKoro1", // 写死的固定值 不从git config中获取
"Date": "Do not edit", // 文件创建时间(不变)
// LastEditors、LastEditTime、FilePath将会自动更新 如果觉得时间更新的太频繁可以使用throttleTime(默认为1分钟)配置更改更新时间。
//"LastEditors": "git config user.name && git config user.email", // 文件最后编辑者 与Author字段一致
// 由于编辑文件就会变更最后编辑时间,多人协作中合并的时候会导致merge
// 可以将时间颗粒度改为周、或者月,这样冲突就减少很多。搜索变更时间格式: dateFormat
"Github":"https://github.com/gphper",
"LastEditTime": "Do not edit", // 文件最后编辑时间
// 输出相对路径,类似: /文件夹名称/src/index.js
"FilePath": "Do not edit", // 文件在项目中的相对路径 自动更新
// 插件会自动将光标移动到Description选项中 方便输入 Description字段可以在specialOptions更改
"Description": "", // 介绍文件的作用、文件的入参、出参。
// custom_string_obkoro1~custom_string_obkoro100都可以输出自定义信息
// 可以设置多条自定义信息 设置个性签名、留下QQ、微信联系方式、输入空行等
//"custom_string_obkoro1": "",
// 版权声明 保留文件所有权利 自动替换年份 获取git配置的用户名和邮箱
// 版权声明获取git配置, 与Author字段一致: ${git_name} ${git_email} ${git_name_email}
//"custom_string_obkoro1_copyright": "Copyright (c) ${now_year} by ${git_name_email}, All Rights Reserved. "
// "custom_string_obkoro1_copyright": "Copyright (c) ${now_year} by 写死的公司名/用户名, All Rights Reserved. "
},
// 函数注释
"fileheader.cursorMode": {
"description": "", // 函数注释生成之后,光标移动到这里
"param": "", // param 开启函数参数自动提取 需要将光标放在函数行或者函数上方的空白行
"return": "",
},
"fileheader.configObj": {
"autoAdd": false,
"language": {
// 普通后缀文件
"go": {
"head": "/**",
"middle": " * @",
"end": " */",
// 函数自定义注释符号:如果有此配置 会默认使用
"functionSymbol": {
"head": "//", // 统一增加几个*号
"middle": "// @",
"end": "//"
}
},
},
"customHasHeadEnd": {
"go": "cancel function",
}
}
}
  • 添加注释

    安装扩展 koroFileHeader

    ctrl + win + i 生成文件注释

    ctrl + win + t 生成函数注释

<1…34

33 日志
6 分类
12 标签
© 2024 GPHPER
由 Hexo 强力驱动
|
主题 — NexT.Mist v5.1.4