自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

think_ycx的专栏

沉淀知识

转载 陈皓:程序员技术练级攻略

原文:https://coolshell.cn/articles/4990.html程序员技术练级攻略2011年07月18日陈皓评论626 条评论9,799,612 人阅读注:该文最新的版本在这里《程序员技术练级攻略(2018版)》(需要付费阅读)月光博客6月12日发表了《写给新手程序员的一封信》,翻译自《An open letter to those who wan...

2019-03-01 14:21:11 3027

原创 关闭CSDN广告必备插件:adblock plus

本篇博文无干货,不用点击进来。推荐使用csdn频繁的人装一下吧。20180702插件地址:https://chrome.google.com/webstore/detail/adblock-plus/cfhdojbkjhnklbpkdaibdccddilifddb?hl=zh-CN效果对比: 20180830 更新:屏蔽博客文章最后一行广告,adblock添加规则:bl...

2018-07-02 20:27:47 5032

原创 开始使用新博客

TIMELINE20180702更新:广告逐渐增多20181021更新:发现文章又被删除了20190714 更新:新blog上的东西不再发布到CSDN20190912更新:删除了CSDN上和new blog上重复的旧文章,只存在new blog上。20190921更新:本blog以后只会记录(粘贴)一些错误的解决方案,一些踩过的坑。历史内容如果查看不到请移步新博客(地址见下文图...

2017-07-05 17:50:00 2699

原创 【Error】cloudflare 报错526原因

历史上曾经配置过 cloudflare到 vps之间 的证书,但是对于域名下的其他子域名(解析到github pages)的存在问题。域名接入cloudflare 后,到源站(github pages)访问不了,报错526。关闭full ssl,不验证server的证书即可。

2023-01-03 14:22:18 1670 1

原创 [Error] Spring Boot报错

报错:further occurrences of HTTP header parsing errors will be logged at DEBUG level.报错信息: Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.java.lang.IllegalArgumentException: Invalid character found in method nam.

2022-05-22 15:50:24 768 1

转载 【Error】【转载】彻底解决 Information:java: javacTask: 源发行版 8 需要目标发行版 1.8

默认修改2个配置长期修改 new project中的配置修改方式参考:Information:java: javacTask: 源发行版 8 需要目标发行版 1.8 [两张图彻底解决问题] - 程序员大本营

2021-12-20 15:25:00 825

原创 【Error】git push失败

报错:! [remote rejected] master -> master (pre-receive hook declined)原因:branch也可以单独设置权限解决方案:Open your project > Settings > Repository and go to "Protected branches", find "master" branch into the list and click "Unprotect" and try again.gitl

2021-12-14 00:43:47 221

原创 【Golang】【Error】关于go mod(GO111MODULE)与 修改方法

背景golang的mod是go 1.11开始,go推出的版本管理工具。可以通过 go env -w GO111MODULE=xxx 来设置。默认有三个值:auto/off/on。GO111MODULE=auto 在 $GOPATH/src 外面且根目录有 go.mod 文件时,开启模块支持。# 实际测试在src里面也无所谓,也可以用。GO111MODULE=off 无模块支持,go 会从 GOPATH 和 vendor 文件夹寻找包。GO111MODULE=on 模块支持,go

2021-07-27 20:24:25 4668 1

原创 【pySpark】报错:SparkContext can only be used on the driver, not in code that it run on workers.

在写pySpark时,driver(py运行的机器)上的py函数中,如果需要操作 SparkContext相关的对象,需要把这个函数标注为 @staticmethod。否则会报错,log参考文章最后。猜测原理是:需要把这个函数 通过序列化传输给spark的worker所在的机器。参考:1、https://stackoverflow.com/questions/44289962/errorsparkcontext-can-only-be-used-on-the-driver-not..

2021-05-19 19:27:44 1152

原创 【Error】 perl:Can‘t locate open.pm in @INC (you may need to install the open module) (@INC contains

本来就是火焰图不熟悉,perl的bug更是火上浇油报错:$ ./flamegraph.pl perf.folded > perf.svgCan't locate open.pm in @INC (you may need to install the open module) (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/pe...

2021-05-13 22:25:27 5754 1

原创 【Error】docker: Error response from daemon: grpc: the connection is unavailable

问题:docker start <container-id>时报错:docker: Error response from daemon: grpc: the connection is unavailable解决办法:systemctl restart docker参考:https://stackoverflow.com/questions/44073865/docker-error-response-from-daemon-grpc-the-connection..

2021-04-27 19:35:17 606

原创 【Error】SQL报错:code: 100004084,message: SQL执行失败: (1118, ‘Row size too large. The maximum row size for

报错信息:code: 100004084,message: SQL执行失败: (1118, 'Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs')原因:c.

2021-04-16 15:11:05 439

原创 关于powershell Invoke-WebRequest

powershell 3.0之后才有。参考:Joe had provided you withthe correct TechNet article link.TheInvoke-WebRequestcmdlet was introduced in Windows PowerShell 3.0.In Windows Server 2008, if installKB968929, there should be PowerShell 2.0 in the server 200...

2021-04-14 12:08:12 890

转载 【转载】2021-03-03 gVisor是什么?可以解决什么问题?

原文:https://blog.csdn.net/M2l0ZgSsVc7r69eFdTj/article/details/82754587传统的Container由于隔离性差而不适合作为Sandbox运行不受信工作负载,VM可以提供很好隔离但却额外消耗较多的内存。Google开源的gVisor为我们提供另外一种选择:在牺牲掉一定性能的情况下,它只额外消耗非常少量的内存,却可以提供了类似等级的隔离性。在本文里我们深入gVisor,最后了解一下我们增强gVisor以支持资源控制的方案。gVisor简.

2021-03-03 21:35:50 820 1

原创 关于scp 的 -t 参数

scp这个-t参数没有文档记录,但是细心的同学有时候可能会发现。-t参数被触发,意味着当前机器上的scp,即将收到另一个scp传输过来的文件。例如在A上 向B scp一个文件。scp ./* host:/rootB上的ssh会派生这个进程:bash -c scp -t /root(也可能是别的shell zsh -c scp -t /root)参考:https://stackoverflow.com/questions/50637523/where-do-i-find-...

2021-02-02 17:15:18 2456

转载 【转载】如何区分status和state?

来源:https://www.zhihu.com/question/21994784在程序代码中似乎很好区分:因为状态机(state machine)、状态迁移图(state transition diagram)都是明确的 state,所以如果「状态」的有效值之间可以搞出类似状态迁移图之类的东西,就命名为 state;否则就用 status。比如 TCP 状态之间是有迁移关系的,所以是 TCP state;HTTP 状态码由于没有互相迁移的关系,所以是 HTTP status code。..

2021-02-02 10:33:20 465 1

转载 正则表达式全集

转载正则:https://tool.oschina.net/uploads/apidocs/jquery/regexp.html表达式全集字符 描述 \ 将下一个字符标记为一个特殊字符、或一个原义字符、或一个向后引用、或一个八进制转义符。例如,“n”匹配字符“n”。“\n”匹配一个换行符。串行“\\”匹配“\”而“\(”则匹配“(”。 ^ 匹配输入字符串的开始位置。如果设置了RegExp对象的Multiline属性,^也匹配“\n”或“\r”之后的位置。 $ 匹配

2021-02-01 19:58:01 94

原创 【Error】zsh历史记录丢失

多个终端开启了zsh时,zsh的history可能会被覆盖。具体原因没有深究推荐的配置如下:HISTFILE=/specify/a/fixed/and/different/location/.historyHISTSIZE=500000SAVEHIST=500000setopt appendhistorysetopt INC_APPEND_HISTORY setopt SHARE_HISTORY参考:https://unix.stackexchange.com/questio

2021-01-31 15:37:41 850

原创 【Error】chsh: PAM: Authentication failure

chsh遇到错误:chsh: PAM: Authentication failure解决办法:修改/etc/pam.d/chsh 文件,内容如下:auth required pam_shells.so修改成:auth sufficient pam_shells.so例如:原理嘛,有空再说。参考:https://askubuntu.com/questions/812420/chsh-always-asking-a...

2021-01-06 18:22:11 2903

原创 关闭centos wayland

1、查看$XDG_SESSION_TYPE看图形界面是: Wayland还是X11参考:https://linuxconfig.org/how-to-disable-wayland-and-enable-xorg-display-server-on-ubuntu-18-04-bionic-beaver-linux2、关闭Wayland方法:sudo vim /etc/gdm/custom.conf取消注释修改WaylandEnable=false...

2020-12-24 15:56:31 1534 1

原创 【Error】IDEA 卡死在scanning files to index

参考:https://blog.csdn.net/xun527/article/details/106229769解决办法:

2020-12-17 11:49:41 428

原创 【Error】IDEA报错:org.jetbrains.jps.builders.java.dependencyView.TypeRepr$PrimitiveType cannot be cast t

错误日志:org.jetbrains.jps.builders.java.dependencyView.TypeRepr$PrimitiveType cannot be cast to org.jetbrains.jps.builders.java.dependencyView.TypeRepr$ClassType解决办法:In menu "Build > Rebuild project".参考:-https://stackoverflow.com/questions/270...

2020-12-16 20:51:15 3674

原创 【Error】Storm LocalCluster报错 type org.apache.storm.generated.InvalidTopologyException

错误log:3530 [main] WARN o.a.s.d.nimbus - Topology submission exception. (topology name='Getting-Started-Topology') #error { :cause nil :via [{:type org.apache.storm.generated.InvalidTopologyException :message nil :at [org.apache.storm.daemon.co

2020-11-26 14:21:01 437

原创 【Golang】go get之后下载文件的目录位置

go env查看环境变量1、GO111MODULE 如果为off,则在pkg目录下2、GO111MODULE如果为on,则在src目录下参考:https://blog.csdn.net/qq_43442524/article/details/104906475

2020-10-22 15:00:10 12240 4

原创 【maven】打包jar上传到服务器运行

首先配置好plugins,否则报错:Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId>

2020-10-09 12:13:46 615

转载 【转载】yum update 自动忽略内核更新

命令:yum -y -x 'kernel*' update修改配置文件的没用原文:https://blog.csdn.net/signmem/article/details/16335841系统每天凌晨 3 点自动执行 yum update 任务但升级内核后,会出现下面情况一些编译软件需要内核模块才能够被调用, 而内核模块需要与当前版本内核编译后才能够使用, 假设内核升级后,之前软件模块是不可兼容的, 需重新编译后才能够再次被调用,甚至可能导致在启动过程中因为无法加载该模块而无法启用某.

2020-09-16 15:02:40 501

转载 【转载】【C语言】浅析C语言之uint8_t / uint16_t / uint32_t /uint64_t

原文:https://blog.csdn.net/Mary19920410/article/details/71518130一、C语言基本数据类型回顾在C语言中有6种基本数据类型:short、int、long、float、double、char1、数值类型1)整型:short、int、long2)浮点型:float、double2、字符类型:char二、typedef回顾typedef用来定义关键字或标识符的别名,例如:typedef double wages;typ

2020-09-16 11:19:21 779

原创 【Error】make LKM时 找不到符号

报错:# make报错WARNING: "xxx" [/xxx.ko] undefined!WARNING: "xxx" [/xxx.ko] undefined!WARNING: "xxx" [/xxx.ko] undefined!# dmesg信息[34045.939994] lkm: Unknown symbol xxx (err 0)[34045.940072] lkm: Unknown symbol xxx (err 0)[34045.941556] lkm: Unknown

2020-09-15 14:57:19 206

原创 【Kernel】pid 与 tgid

总结:getpid()实际上返回的时 kernel task_struct中的tgid。一个进程 中 有多个线程,这些线程的pid都是一致的,都对应内核态的tgid。thread group id。但是这些线程在内核态的task_struct中的pid不一致。参考1:https://my.oschina.net/u/3258476/blog/1518920 在Linux操作系统层面,线程其实只是特殊的进程,最特殊之处在于跟其他“线程进程“共享内存(包括代码段、数据段等,但..

2020-09-15 11:12:54 948

原创 手工挂载VMware共享目录

# 参考https://www.jianshu.com/p/040f6271664c# 查看共享的目录vmware-hgfsclient# 创建文件夹sudo mkdir shared# 挂sudo vmhgfs-fuse .host:/shared /mnt/hgfs/shared -o allow_other -o nonempty# 解挂sudo umount /mnt/hgfs

2020-09-14 15:21:46 207

原创 【Error】/usr/bin/env: ‘python’: No such file or directory

问题是python找不到,安装了python3的情况下。解决办法:sudo ln -s /usr/bin/python3 /usr/bin/python参考:https://stackoverflow.com/questions/3655306/ubuntu-usr-bin-env-python-no-such-file-or-directory

2020-09-10 21:31:41 2409

转载 【Kernel】内核热补丁技术揭秘

https://ruby-china.org/topics/20680下述为UCloud资深工程师邱模炯在InfoQ架构师峰会上的演讲——《UCloud云平台的内核实践》中非常受关注的内核热补丁技术的一部分。给大家揭开了UCloud云平台内核技术的神秘面纱。如何零代价修复海量服务器的Linux内核缺陷?对于一个拥有成千上万台服务器的公司,Linux内核缺陷导致的死机屡见不鲜。让工程师们纠结的是,到底要不要通过给服务器升级内核来修复缺陷?升级意味者服务器重启、业务中断以及繁重的准备工作;不升级则担

2020-09-10 14:32:02 1334

原创 【LKM】整合多个LKM为1个

假设原来编写了两个LKm: 1.c 和2.c ,各自make insmod/rmmod是没问题的。但是如果你需要在1.c中调用2.c的函数,那就麻烦了。折腾了一个小时才搞定。1、首先编写2.h,把你需要的函数 申明在头文件中。删掉2.c中的 module_init 和 module_exit。2、在1.c中 #include "2.h", 调用函数。3、编写Makefile,参考如下:obj-m += 3.o3-objs := 1.o 2.occflags-y := -st.

2020-09-09 17:21:30 183

原创 【Kernel】如何从kernel中获取cred结构体中的value

获取linux kernel cred结构体中成员变量的value时,根绝kernel版本需要做适配。linux kernel 3.5以上,获取cred需要如下处理(重点 cred->uid.val): #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0) printk(KERN_INFO "PROCESS cred info: uid %u ",

2020-09-09 16:19:07 710

转载 【转载Kernel】Kernel Threads Continued

原文:https://sysplay.in/blog/tag/kernel-threads/Kernel Threads Continued13 Replies<< Previous ArticleIn theprevious article, we learned the basics of kernel threads such as creating the thread, running the thread and so on. In this article, we.

2020-09-07 15:41:22 156

原创 【linux】.fuse_hiddenXXXX 文件是如何生成的?

在linux系统上,如果你删除了一个elf文件,但是这个elf文件还在内存中运行。此时os会生成一个.fuse_hidden0000xxx的隐藏文件。这个文件和你的elf文件是一样的。当你的elf文件退出后,这个隐藏文件会自动的被删除。参考:https://askubuntu.com/questions/493198/what-is-a-fuse-hidden-file-and-why-do-they-existYou can safely ignore .fuse_hidden.

2020-09-03 11:42:28 3152

原创 【LKM】makefile的支持c99的方法: ccflags-y := -std=c99

如果写的LKM中 变量的定义在 函数之后,则会warning:warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]正常在gcc中添加-std=c99即可。例如:gcc -std=c99 1.c -o 1如果是在Makefile中,添加这一行:ccflags-y := -std=gnu99 -Wno-declaration-after-statement# ccflag.

2020-09-01 21:35:27 8182 1

原创 【LKM】make 错误:make -C /lib/modules/4.15.0-58-generic/build SUBDIRS=/xxx

错误日志:$ makemake -C /lib/modules/4.15.0-58-generic/build SUBDIRS=/xxxx/3-netlink modulesmake[1]: Entering directory '/usr/src/linux-headers-4.15.0-58-generic'Makefile:986: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel

2020-09-01 21:32:32 1722

转载 【转载】内核中申请内存的函数

Linux内核空间中常见的内存分配函数1void *kmalloc(size_t size,gfp_t flags)kmalloc() 申请的内存位于物理内存映射区域,而且在物理上也是连续的,它们与真实的物理地址只有一个固定的偏移,因为存在较简单的转换关系,所以对申请的内存大小有限制,不能超过128KB。较常用的flags()有:GFP_ATOMIC —— 分配内存的过程是一个原子过程,分配内存的过程不会被(高优先级进程或中断)打断; GFP_KERNEL —— 正常分配内存;...

2020-08-27 16:24:44 390

原创 【Linux Kernel】源码阅读时的:KERNEL_VERSION 和 LINUX_VERSION_CODE

问题在看源码时会遇到如下代码:#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 0, 9) xxxx#else xxxx#endif但是这个LINUX_VERSION_CODE找不到是在哪里定义的。搜索之后发现,LINUX_VERSION_CODE和KERNEL_VERSION这个宏定义,都是在linux源码 include/linux/version.h文件中的。但是下载linux kernel 源码中么有这个文件

2020-08-27 15:12:33 1929

提示
确定要删除当前文章?
取消 删除