- XDebug v3+ inside Docker (e.g. php:7.3-apache Docker image)
- Running Docker v20.10+
- VSCode with PHP Debug Extension (Felix Becker)
- Using Docker Compose for orchestration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: | |
- main | |
- features/** | |
- dependabot/** | |
pull_request: | |
branches: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package utils | |
import "unicode" | |
// IsDigitString 是否为数字字符串 | |
func IsDigitString(str string) bool { | |
for _, x := range []rune(str) { | |
if !unicode.IsDigit(x) { | |
return false | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"crypto/md5" | |
"encoding/hex" | |
) | |
// Md5 encode the str | |
func Md5(s string) string { | |
h := md5.New() | |
n, err := h.Write([]byte(s)) | |
if err != nil || n == 0 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function snakeToCamelCase($string){ | |
$result = ''; | |
$subIndexArr = explode('_', $string); | |
foreach ($subIndexArr as $index => $temp) { | |
if ($index === 0) { | |
$result .= $temp; | |
} else { | |
$result .= ucfirst($temp); |
FROM golang:1.15 as builder
ENV GO111MODULE=on
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package abstract | |
import "fmt" | |
/** | |
* 树节点结构 | |
*/ | |
type TreeNode struct { | |
value string | |
level int |
- Go语言实现基于树的组合算法 :combination.go
- Go语言使用md5加密 :md5.go
- Go语言常用工具库 :utils.go
- 深度比较量对象 :compare.php
- CURL请求封装 :curlRequest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function curlRequest($url, $method = "GET", $data = "", $userPassword = "") | |
{ | |
$httpHeader = array( | |
'Content-Type: application/json', | |
'Content-Length: ' . strlen($data) | |
); | |
$ch = curl_init(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 删除索引 | |
DELETE /artist_sug_0323 | |
GET index_name/_search | |
{ | |
"query": { | |
"query_string": { | |
"default_field": "search_field", | |
"query": "*anything*" | |
} |
NewerOlder