This file contains hidden or 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 main | |
| import ( | |
| "bytes" | |
| "encoding/json" | |
| "fmt" | |
| "io" | |
| "log" | |
| "net/http" | |
| ) |
This file contains hidden or 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 yaml | |
| import os | |
| import argparse | |
| def split_yaml_file_by_tag(file_path, output_dir, server_url): | |
| with open(file_path, 'r', encoding='utf-8') as file: | |
| data = yaml.safe_load(file) | |
| openapi_version = '3.0.0' # OpenAPI version |
This file contains hidden or 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
| cmake_minimum_required(VERSION 3.15) | |
| project(msyql_exec_client C) | |
| set(CMAKE_C_STANDARD 99) | |
| add_executable(msyql_exec_client main.c /usr/local/Cellar/mysql-connector-c/6.1.11/bin) | |
| include_directories(/usr/local/Cellar/mysql-connector-c/6.1.11/include) | |
| find_library(MYSQL_CLIENT mysqlclient /usr/local/Cellar/mysql-connector-c/6.1.11/lib) | |
| target_link_libraries(msyql_exec_client LINK_PUBLIC ${MYSQL_CLIENT}) |
This file contains hidden or 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 service | |
| import ( | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "net/http/httptest" | |
| "strings" | |
| "testing" |
This file contains hidden or 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 auth | |
| import ( | |
| "crypto/hmac" | |
| "crypto/rand" | |
| "crypto/sha256" | |
| "encoding/hex" | |
| "log" | |
| ) |
This file contains hidden or 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
| { | |
| "vetur.format.defaultFormatter.js": "vscode-typescript", | |
| "vetur.validation.template": true, | |
| "eslint.validate": [ | |
| { | |
| "language": "vue", | |
| "autoFix": true | |
| }, | |
| { | |
| "language": "html", |
This file contains hidden or 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 main | |
| import ( | |
| "fmt" | |
| ) | |
| func testP(in <-chan string) { | |
| for v := range in { | |
| fmt.Println(v) | |
| } |
This file contains hidden or 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 main | |
| import "fmt" | |
| // longestSlice Longest Consecutive Sequence | |
| func longestConsSeq(sorted []int) ([]int, int) { | |
| max := 1 | |
| head := 0 | |
| for i := 0; i < len(sorted); i++ { | |
| cur := 1 |
This file contains hidden or 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 main | |
| import "fmt" | |
| // MaxDup input a random slice and return max duplicate element and lenght | |
| func MaxDup(a []int) (int, int) { | |
| maxV := 0 | |
| max := 0 | |
| b := make(map[int]int) |
This file contains hidden or 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 main | |
| import ( | |
| "log" | |
| "net/http" | |
| "sync/atomic" | |
| ) | |
| type redirector struct { | |
| counter uint32 |
NewerOlder