- 博客(46)
- 资源 (1)
- 收藏
- 关注
翻译 Go中处理数据库中NULL值的方法
如果你在Golang中处理过SQL,你就会知道处理NULL值并不容易。接口已经通过使用Go的nil来支持NULL值,但语言的设计不允许将nil分配给string或int变量。这篇文章将提供一些方案。
2022-10-13 19:36:13
2513
原创 命令行使用指引中的[中括号]和<尖括号>
git clone [--template=<template_directory>] [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror] [-o <name>] [-b <name>] [-u <upload-pack>] [--re
2022-04-08 11:14:23
866
1
原创 Certificate verification failed: The certificate is NOT trusted...
症状:Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate. Could not handshake: Error in the certificate verification.解决方案:sudo sed 's/https/http/' /etc/apt/sources.list -isudo apt updatesudo
2021-10-29 10:57:06
972
原创 Lubuntu 截图
不同于Ubuntu保存截图的位置。按下键盘上的Prt Sc键,Lubuntu 18.04会将截图保存在用户目录下。foo@bar:~/any$ cd && ls2021-09-25-173517_1440x900_scrot.png Desktop 公共的 模板 视频 图片 文档 下载 音乐 桌面foo@bar:~$...
2021-09-25 17:42:04
236
原创 # runtime/cgo _cgo_export.c:3:10: fatal error: stdlib.h: 没有那个文件或目录
场景复现:在Ubuntu下的GoLand中以Debug模式运行程序。报错信息:# runtime/cgo_cgo_export.c:3:10: fatal error: stdlib.h: 没有那个文件或目录 3 | #include <stdlib.h> | ^~~~~~~~~~compilation terminated.Compilation finished with exit code 2解决方法:sudo apt-get in
2021-07-31 22:43:46
4631
1
原创 @NotBlank不生效?自定义的参数校验注解不生效?
使用Maven管理的项目请检查以下依赖:<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-validation</artifactId></dependency>或者:<dependency> <groupId>org.hibernate</gro
2021-05-08 10:32:42
951
转载 如何从 GitHub 上下载单个文件夹?
用SVN即可。举例说明:例如这个项目: Mooophy/Cpp-Primer · GitHub, 我只想看 ch03 文件夹的代码怎么办? 先打开 ch03, 其 URL 为:https://github.com/Mooophy/Cpp-Primer/tree/master/ch03将 /tree/master/ 换成 /trunk/:https://github.com/Mooophy/Cpp-Primer/trunk/ch03然后输入:svn checkout https://gith
2021-04-30 11:31:31
310
1
原创 用Ubuntu20.04开热点
连接网线 -> 打开设置 -> 打开WiFi但不要连接无线网络 -> 点击右上角的三个点 -> 点击打开WiFi热点 -> 设置密码 -> 点击打开
2021-04-23 09:23:27
2811
1
原创 Spring入门笔记
@RequestBody@RestControllerpublic class EmployeeController { @Autowired private EmployeeService employeeService; @PostMapping("/emp") public Employee save(@RequestBody Employee emp) { return employeeService.saveEmp(emp); }.
2021-04-21 17:02:53
116
原创 斐讯N1安装armbian后无法连接WiFi
解决办法:将img文件写入U盘后不要修改dtb文件,直接插入斐讯N1通电启动dd iifiiiifiifiiiiiifiiiifiifiiiArmbianiifiiiifiifiiiiiifiiiifiifiiiifiiiiiifiiiifiifiiiArmbianiifiiiifiifiiiiiifiiiifiifiiiArmbiaArmbian.77_Aml-s905_Ubuntu_bionic_default_5.0.2_20190401.img...
2021-04-21 00:39:47
4279
原创 tail命令的 -f 和 -F 参数
--retry 即使目标文件不可访问依然重复试图打开-f, --follow[={name|descriptor}] 随文件增长即时输出新增数据; 若未给定选项参数,则默认使用 'descriptor' -F 和 --follow=name --retry 相同--follow=descriptor文件移动或改名后,还可以继续正常监视文件。--follow=name按照文件名监视文件的变化。--follow=na...
2021-03-19 21:11:33
1194
原创 卸载WPS安装office后docx,xlsx等文件图标异常
修改注册表的办法太麻烦这里是另一种办法:from:https://www.jianshu.com/p/57a42c830da61、重新安装WPS,在开始菜单中找到WPS的“配置工具”并打开。2、打开配置工具后,点击“高级”按钮。3、取消勾选以WPS默认为指定文件的打开方式。4、完成以上设置后,可以发现失去关联的图标又恢复正常显示了。...
2019-07-20 21:16:55
2779
1
原创 Golang连接MySQL8发生的this authentication plugin is not supported问题
https://www.pixelstech.net/article/1531316568-Fix-this-authentication-plugin-is-not-supported-issue-while-using-Go-to-connect-MySQL-8
2019-07-02 21:28:27
1051
原创 git clone很慢怎么办(亲测有效)
修改hosts https://blog.youkuaiyun.com/DlMmU/article/details/79562021重新配置密钥 https://www.cnblogs.com/lz0925/p/10725010.html
2019-06-29 13:25:32
14605
4
原创 iCloud-find-由于“地图”不可用,您设备的位置无法显示。
貌似iCloud的查找设备功能使用的是谷歌地图,需要FQ才能看到自己设备的所在位置。
2019-02-23 00:07:11
6876
原创 Python基础知识
Pythonpython 切片的三个参数slice[beg:end:step]若 step > 0, 则表示从左向右进行切片。此时,beg必须小于end才有结果,否则为空。若 step < 0, 则表示从右向左进行切片。 此时,beg必须大于end才有结果,否则为空。当step(步长值)小 于0,此时列表切片的默认值为beg=-1,end=-len(slice).举例...
2019-01-06 22:23:16
175
原创 CPP
map.count(key) key存在,返回1 不存在,返回0 vector:vector是一个能够存放任意类型的动态数组C语言中double这个类型有一点特殊,在scanf和printf里面的表达方式是不一样的。 在scanf里面需要用%lf表达,在printf里面需要用%f表达sort(begin,end)对vector< string >的排...
2018-04-12 20:41:05
174
原创 golang !=EOF
C程序:/* AOJ0001 List of Top 3 Hills */ #include <stdio.h> #include <limits.h> int main(void) { int a, max1, max2, max3, temp; max1 = max2 = max3 = INT_MIN; ...
2018-03-23 16:06:27
2779
原创 git bash输入ipconfig结果乱码
https://www.cnblogs.com/a-ray-of-sunshine/p/4973836.html https://jingyan.baidu.com/article/9faa72318fd5a3473d28cb58.html
2018-03-02 00:38:51
1720
1
原创 macOS终端配色
https://linux.cn/article-8711-1.html http://blog.chinaunix.net/uid-28295089-id-3877993.html vim .bash_profileexport TERM="xterm-color"PS1="\[\033[0;33;1m\]\t\[\033[m\]-\[\033[0;36;1m\]\u\[\033[...
2018-02-28 22:24:35
246
原创 Ubuntu17.10root登录图形界面
我是两个都做完才生效的 https://jingyan.baidu.com/article/3c48dd34a5162be10be358bd.html https://www.linuxidc.com/Linux/2017-01/139094.htm
2018-02-28 00:02:37
839
转载 ubuntu执行su之后#前面没有高亮
原来的情况: 打开终端输入:echo $PS1 输入:gedit ~/.bashrc定位到如下代码:if [ "$color_prompt" = yes ]; then PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]...
2018-02-27 22:21:42
1034
原创 从0开始Linux
如果在命令行下使用vim,先按下ESC退出编辑模式,然后输入 :wq ( : 不能省略)保存并退出,或者输入 :q! ( : 不能省略)强制退出,从而回到命令行界面。...
2018-02-13 13:22:34
220
原创 golang项目main包的问题
golang项目中的main包里除main.go外若有其他go文件时,采用go run main.go运行项目大部分时候是会出错的解决办法:在项目根目录下执行go build ./main这样就可以生成main.exe文件,运行此文件即可...
2018-02-11 10:29:25
2292
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人