buildwith.com
loki
buildwith.com
loki
<?php | |
$arr = []; | |
$arr[1] = 'yyy'; | |
$arr[0] = 'xxx'; | |
echo json_encode($arr);//{"1":"yyy","0":"xxx"} | |
$arr = []; | |
$arr[0] = 'xxx'; |
Install php5.6 on Centos 7
Remi's RPM repository - Configuration wizard, PHP on CentOS 7 (PHP-FPM)
Command to install the Remi repository configuration package:
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
Command to install the yum-utils package (for the yum-config-manager command):
#include <stdlib.h> | |
#include <stdio.h> | |
#include <opencv/cv.h> | |
#include <opencv/highgui.h> | |
typedef struct { | |
unsigned char r; | |
unsigned char g; | |
unsigned char b; |
前端向后端传输数据时,如果是get传输,直接传在url后;如果是post传输,则在请求体body中传输。 | |
在body中的数据格式又有两种,一种是 json 数据格式,另一种是 字符串。具体要用哪种格式取决于后端入参的格式。 | |
如果后端接收json数据类型,post 的 headers 需要设置 { ‘content-type’: ’application/json’ },传给后端的数据就形如 { ‘name’:’edward’, ‘age’:’25’ } | |
package main | |
import ( | |
"fmt" | |
"sync" | |
) | |
func main() { | |
list := []int{0, 1, 2, 3, 4} | |
sizes := make(chan int) |
brew install cgit
brew install fcgiwrap
配置nginx
配置 fcgiwrap
配置cgit;文件路径 /usr/local/etc/cgitrc
<?php | |
/** | |
* 下划线转驼峰 | |
* 思路: | |
* step1.原字符串转小写,原字符串中的分隔符用空格替换,在字符串开头加上分隔符 | |
* step2.将字符串中每个单词的首字母转换为大写,再去空格,去字符串首部附加的分隔符. | |
*/ | |
function camelize($uncamelized_words,$separator='_') | |
{ | |
$uncamelized_words = $separator. str_replace($separator, " ", strtolower($uncamelized_words)); |