- 声明变量都加
$
- 调用类 a 的方法b 使用
$a->b
php 执行文件需要写:
<? php
echo "hello"
?>
package main | |
func main() { | |
// holds current server configuration 动态更新当前服务的配置 | |
var config atomic.Value | |
go func() { | |
// Reload config every 10 seconds 每 10 秒重载配置 | |
// and update config value with the new version 用新版本的值更新配置项 | |
for { |
package main | |
import ( | |
"sync" | |
"sync/atomic" | |
) | |
func main() { | |
type Map map[string]string | |
var m atomic.Value |
#include <stdio.h> | |
#include <unistd.h> | |
int main(void) { | |
pid_t fpid; // fpid 表示 fork 函数返回值 | |
int count=0; | |
// 调用 fork, 创建出子进程 | |
fpid = fork(); |
package main | |
import ( | |
"sync" | |
"sync/atomic" | |
"testing" | |
) | |
type Config struct { | |
a []int |
// request https | |
// disable security checks globally for all requests of the default client | |
func main() { | |
http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true} | |
_, err := http.Get("https://golang.org/") | |
if err != nil { | |
fmt.Println(err) | |
} | |
} |
package main | |
import "fmt" | |
func main() { | |
ben := &Ben{name: "Ben"} | |
jerry := &Jerry{name: "Jerry"} | |
var maker IceCreamMaker = ben | |
var loop0, loop1 func() |
$
$a->b
php 执行文件需要写:
<? php
echo "hello"
?>
cmake_minimum_required(VERSION 3.15) | |
project(run_curl C) | |
set(CMAKE_C_STANDARD 99) | |
# 设置头文件 | |
set(INC_DIR ./curl/include) | |
# 设置源码 | |
set(LINK_DIR ./curl/lib) |
#!/usr/bin/env bash | |
function exitIfEmpty() { | |
if [ -z "$2" ]; then | |
echo "$1 is empty" | |
exit 1 | |
fi | |
} | |
function initJob() { |
-- scan whole keys in redis by key_pattern and filter | |
-- key_pattern: key regexp | |
-- count: match count for once scan | |
-- filter: one function that accepts the value of key as param. | |
local scan=function(key_pattern, count, filter) | |
local start = "-1" | |
local lst = {} | |
while (start ~= "0") do | |
if (start == "-1") then |