- 👋 Hi, I’m @lofiCafe
- 👀 I’m interested in reading, programming, jogging and swimming.
- 🌱 I’m currently learning Rust
logs's Introduction
logs's People
logs's Issues
sm4
在MySQL中使用replace
更新语句的时候需要批量对某一个字段里面的字符做修改,例如以下,修改表mytable域dir里面字符bak为backup
update mytable set dir=replace(dir, "bak", "backup");
参考链接
fish shell 设置永久环境变量
今天在设置goproxy的时候发现打开了一个新的shell之后发现goproxy不生效了,于是去查看了fish的文档,发现
set -x GOPROXY https://goproxy.io,direct
只是临时生效,如果需要全局生效,需要这样设置set -Ux GOPROXY https://goproxy.io,direct
Go中的slice
func main() {
s := make([]int, 12)
s = append(s, 1)
s = append(s, 2)
s = append(s, 3)
s = append(s, 5)
for i, v := range s {
fmt.Printf("idx: %d value: %d\n", i, v)
}
// task(credential)
}
输出结果为
idx: 1 value: 0
idx: 2 value: 0
idx: 3 value: 0
idx: 4 value: 0
idx: 5 value: 0
idx: 6 value: 0
idx: 7 value: 0
idx: 8 value: 0
idx: 9 value: 0
idx: 10 value: 0
idx: 11 value: 0
idx: 12 value: 1
idx: 13 value: 2
idx: 14 value: 3
idx: 15 value: 5
感觉有点类似栈,输出的0 是默认的零值,因为声明的是一个INT length为12的slice
记录一则Nginx容器下的错误
静态资源文件放到了/usr/share/nginx/html
下面,忘记在Dockerfile里面赋予755权限,导致打不开页面 = =
top command
neovim python3 ide requirements
- pip3 install 'python-language-server[all]'
- pip3 install jedi
- open neovim
- Coc-install coc-python
Arch linux install dwm, st and dmenu
normal user can not switch to root
- check permission of
/etc/passwd
make sure that the file permission is 644 - check permission of
/usr/bin/su
make sure that the file have -s flag using chmod u+s /usr/bin/su - check permission of
/usr/bin/sudo
make sure that the file have -s flag using chmod u+s /usr/bin/sudo
Tomcat容器自动退出
部署geoserver地图应用,由于该应用需要依赖tomcat去部署,一开始我的只是加了一个CMD /app/gis/tomcat/bin/startup.sh
这样子启动容器,docker logs geoserver查看tomcat启动好之后就退出了,之后改成 CMD /app/gis/tomcat/bin/startup.sh && tail -2000f /app/gis/tomcat/logs/catalina.out
就ok了
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.