上一页 1 2 3 4 5 6 7 ··· 65 下一页
摘要: golang 中本身不支持三目运算,如果想要简化代码,可以自定义一个三目运算的函数,通过函数的调用来实现三目运算 package main import ( "fmt" ) // 三目运算的函数 func ternary(a bool, b, c interface{}) interface{} { 阅读全文
posted @ 2021-08-22 16:17 GetcharZp 阅读(2455) 评论(0) 推荐(0) 编辑
摘要: ![](https://img2020.cnblogs.com/blog/1383776/202108/1383776-20210822112425405-573674684.png) ![](https://img2020.cnblogs.com/blog/1383776/202108/1383776-20210822112625525-531983361.png) ![](https://im 阅读全文
posted @ 2021-08-22 11:27 GetcharZp 阅读(32) 评论(0) 推荐(0) 编辑
摘要: package main import ( "fmt" "errors" ) type Stack []int // 入栈 func (s *Stack) push(a int) { *s = append(*s, a) } // 出栈 func (s *Stack) pop() (int, err 阅读全文
posted @ 2021-08-22 00:29 GetcharZp 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 用法一: 为函数设置不定长度的参数 func myPrint(x ...interface{}) { for _, v := range x { fmt.Println(v) } } 用法二: 为数组设置默认长度 a := [...]int{12, 32, 12} // [12 32 12] 3 3 阅读全文
posted @ 2021-08-17 14:56 GetcharZp 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 下载ftp yum -y install vsftpd 编辑配置文件,将下面两项的注释打开 # vim /etc/vsftpd/vsftpd.conf chroot_list_enable=YES chroot_list_file=/etc/vsftpd/chroot_list # 允许登录服务器的 阅读全文
posted @ 2021-08-13 16:42 GetcharZp 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 网上很多说法是第三方服务的问题,不过我们这边之前那个服务器上都是正常的,那么,考虑到这里最大可能就是配置的问题了,参考 https://wiki.w7.cc/chapter/35?id=3903 得到了思路 修改 php.ini 文件中的 always_populate_raw_post_data 阅读全文
posted @ 2021-08-09 17:15 GetcharZp 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 查看所有环境变量 env 查看指定环境变量的值,注意查看的时候又 $ 符号 echo $HOME 设置新的环境变量 export MY_NEW_ENV="new_env" 删除指定的环境变量 unset MY_NEW_ENV 阅读全文
posted @ 2021-07-30 17:14 GetcharZp 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 使用phpinfo()确认GD扩展库中是否有 freetype 项 1、Freetype 下载 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.4.10.tar.gz # 如果使用 wget 的时候提示 bash: 阅读全文
posted @ 2021-07-29 09:52 GetcharZp 阅读(79) 评论(0) 推荐(0) 编辑
摘要: 1、先下载对应的php-fpm镜像并启动,然后通过 exec登入对应的容器。 2、配置该容器的下载源 cp /etc/apt/sources.list /etc/apt/sources.copy.list # 备份原始下载源数据 echo "deb http://mirrors.ustc.edu.c 阅读全文
posted @ 2021-07-29 00:54 GetcharZp 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 安装 zip 工具 yum -y install zip 含文件夹的压缩 # -r 表示迭代压缩文件夹里面的内容 # XXX.zip 压缩后文件的名称 # XXX 待压缩的文件夹 zip -r <XXX.zip> <XXX> 压缩文件的解压 # 默认以压缩文件的前缀为文件夹的名称进行解压 # 解压后 阅读全文
posted @ 2021-07-28 10:01 GetcharZp 阅读(714) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 65 下一页