摘要: 在国内采用go get有时会下载不到一些网站如golang.org的依赖包。 方法1(亲测有效): gopm 代替go 下载第三方依赖包可以采用gopm从golang.org一些镜像网站上下载。 注意,gopm只能把包的原代码下载,需要自己去go install。 a). 安装gopm b). 用g 阅读全文
posted @ 2019-03-30 22:59 opensmarty 阅读(693) 评论(0) 推荐(0) 编辑
摘要: 使用 ... 运算符定义变长参数函数 (PHP 5 >= 5.6.0, PHP 7) 现在可以不依赖 func_get_args(), 使用 ... 运算符 来实现 变长参数函数。 以上例程会输出: $req: 1; $opt: 0; number of params: 0 $req: 1; $op 阅读全文
posted @ 2019-03-30 22:36 opensmarty 阅读(4195) 评论(0) 推荐(1) 编辑
摘要: php5.6.x到php7.0.x特性 1.标量类型声明 字符串(string), 整数 (int), 浮点数 (float), 布尔值 (bool),callable,array,self,Class/interface name 2.返回值类型声明 定义参数类型和返回值类型 function t 阅读全文
posted @ 2019-03-30 22:12 opensmarty 阅读(234) 评论(0) 推荐(0) 编辑
摘要: PHP5.4.0新特性研究 1、内建Web Server 这的确是个好的改进,大大的方便了开发人员。以后开发机不装nginx,httpd也行 如: 前台运行: 后台运行: 2、数组定义,增加了一种简便写法 结果: Array ( [0] => 1 [1] => 2 [2] => 3 ) Array 阅读全文
posted @ 2019-03-30 22:11 opensmarty 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 我在Github新建一个仓库,写了License,然后把本地一个写了很久仓库上传。 先pull,因为两个仓库不同,发现refusing to merge unrelated histories,无法pull 因为他们是两个不同的项目,要把两个不同的项目合并,git需要添加一句代码,在git pull 阅读全文
posted @ 2019-03-29 11:01 opensmarty 阅读(1814) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2019-03-29 10:56 opensmarty 阅读(39) 评论(0) 推荐(0) 编辑
摘要: 打开 File下的 Invalidate Caches / Restart...下的 Invalidate and Restart. 便可以了 ...... 阅读全文
posted @ 2019-03-27 13:17 opensmarty 阅读(1118) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2019-03-26 21:15 opensmarty 阅读(2) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2019-03-26 17:55 opensmarty 阅读(5) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2019-03-26 17:14 opensmarty 阅读(2) 评论(0) 推荐(0) 编辑