04 2023 档案

摘要:MySQL create table new_table select c1,c2 from old_table [where 1=2] lose index, auto_increment create table new_table like old_table table structure 阅读全文
posted @ 2023-04-30 14:11 ascertain 阅读(51) 评论(0) 推荐(0) 编辑
摘要:connection import psycopg2 from psycopg2 import Error, connection, cursor conn: connection | None = None c1: cursor | None = None try: conn = psycopg2 阅读全文
posted @ 2023-04-29 21:47 ascertain 阅读(14) 评论(0) 推荐(0) 编辑
摘要:Pool 使用pool正确方法: 从pool取connection,使用完close(), 底层CMySQLConnection会return到deque, 此时从pool中得到的PooledMySQLConnection底层_cnx变为None 阅读全文
posted @ 2023-04-28 14:27 ascertain 阅读(10) 评论(0) 推荐(0) 编辑
摘要:String workspace = "/opt/jenkins/workspace/${JOB_NAME}" def v = 'v' env.e1 = 'v1' pipeline { agent { node { label 'master' customWorkspace "${workspac 阅读全文
posted @ 2023-04-24 19:53 ascertain 阅读(41) 评论(0) 推荐(0) 编辑
摘要:1. push.default https://www.fleekitsolutions.com/difference-between-push-default-matching-simple/ Set your push.default to upstream to push branches t 阅读全文
posted @ 2023-04-24 19:53 ascertain 阅读(14) 评论(0) 推荐(0) 编辑
摘要:Snippet Generator => steps (place into the steps) 只有脚本script{}可声明变量,String,def声明的变量只有script{}可用 # # Plugins # # Organization and Administration Config 阅读全文
posted @ 2023-04-24 19:52 ascertain 阅读(50) 评论(0) 推荐(0) 编辑
摘要:package main import ( "fmt" "math" "runtime" "strconv" "strings" "time" ) func producer(intChan chan int) { for b := 1000; b <= 1099; b++ { intChan <- 阅读全文
posted @ 2023-04-24 19:24 ascertain 阅读(13) 评论(0) 推荐(0) 编辑
摘要:contra-variance from typing import Callable class Food: ... class Meat(Food): ... class Animal: def eat(self, food: Food): ... class Dog(Animal): def 阅读全文
posted @ 2023-04-24 16:34 ascertain 阅读(43) 评论(0) 推荐(0) 编辑
摘要:keyword must be strings 阅读全文
posted @ 2023-04-21 00:59 ascertain 阅读(15) 评论(0) 推荐(0) 编辑
摘要:C int arr[5]; brackets must follow the identifier, definition of variable with array type needs an explicit size of an initializer 阅读全文
posted @ 2023-04-18 23:02 ascertain 阅读(48) 评论(0) 推荐(0) 编辑
摘要:slice, map即使为nil打印格式和空元素的情况一样, chan,func,interface,pointer为nil时,打印<nil> 当chan,func,pointer赋值后,都打印地址, interface赋值后,永远打印其dynamic value的格式 package main i 阅读全文
posted @ 2023-04-18 16:47 ascertain 阅读(12) 评论(0) 推荐(0) 编辑
摘要:Java arr本质是一个数组,可直接传数组,引用类型,可能为null JavaScript Function length rest parameter Go 阅读全文
posted @ 2023-04-17 22:52 ascertain 阅读(8) 评论(0) 推荐(0) 编辑
摘要:C Java == 基本数据类型时, two operands类型不同时, 必须可以进行自动类型转换, e.g. byte & char => int, 不能进行自动类型转换(boolean & char)则编译失败, == 不能比较基本类型和引用类型, 基本数据类型只有boolean不能与其他7个 阅读全文
posted @ 2023-04-17 20:51 ascertain 阅读(8) 评论(0) 推荐(0) 编辑
摘要:man [options...] [SECTION] PAGE... -l --local-file interpret PAGE arguments as local filenames man -l /usr/share/man/man1/ls.1.gz 阅读全文
posted @ 2023-04-15 22:13 ascertain 阅读(9) 评论(0) 推荐(0) 编辑
摘要:env in jenkins controller Jenkins dynamic slave agent Pod Template in Jenkins UI Example from git pipeline { agent { kubernetes { cloud 'kubernetes' d 阅读全文
posted @ 2023-04-15 21:53 ascertain 阅读(135) 评论(0) 推荐(0) 编辑
摘要:$@ "$@" $* "$*" a.sh echo "$@" echo $@ echo "$*" echo $* b.sh "$@" b.sh $@ b.sh "$*" b.sh $* b.sh echo $# for param; do echo "param = $param" done 阅读全文
posted @ 2023-04-09 23:29 ascertain 阅读(12) 评论(0) 推荐(0) 编辑
摘要:C goto Must be defined within a function Each label in one function must have a unique name. It cannot be a reserved C keyword C has a separate namesp 阅读全文
posted @ 2023-04-09 20:24 ascertain 阅读(10) 评论(0) 推荐(0) 编辑
摘要:The switch expression has an additional lambda-like syntax and it can be used not only as a statement, but also as an expression that evaluates to a s 阅读全文
posted @ 2023-04-09 17:39 ascertain 阅读(72) 评论(0) 推荐(0) 编辑
摘要:In Java, C, $ is valid In Go, Python, $ is invalid 阅读全文
posted @ 2023-04-09 14:39 ascertain 阅读(7) 评论(0) 推荐(0) 编辑
摘要:def get_public_ip(): from urllib.request import urlopen import re as r d = urlopen('http://checkip.dyndns.com').read() return r.compile(r'(\d+\.\d+\.\ 阅读全文
posted @ 2023-04-07 16:24 ascertain 阅读(11) 评论(0) 推荐(0) 编辑
摘要:< file cat dd iflag=nonblock status=none if=file printf '%s' "$(< file)" cp file /dev/stdout awk '{print}' file sed '' file 阅读全文
posted @ 2023-04-07 15:16 ascertain 阅读(11) 评论(0) 推荐(0) 编辑
摘要:groupadd & useradd They all have --root CHROOT_DIR AND --prefix PREFIX_DIR 阅读全文
posted @ 2023-04-06 10:04 ascertain 阅读(10) 评论(0) 推荐(0) 编辑
摘要:HISTCONTROL variable is a colon-separated list of values controlling how commands are saved in the history list. HISTCONTROL=ignoredups It causes line 阅读全文
posted @ 2023-04-05 20:33 ascertain 阅读(21) 评论(0) 推荐(0) 编辑
摘要:ssh-keyscan - gather ssh public keys from servers /etc/ssh/ssh_config => HostKey 有系统内置的key options -c Request certificates from target hosts instead o 阅读全文
posted @ 2023-04-04 21:07 ascertain 阅读(18) 评论(0) 推荐(0) 编辑
摘要:escape inputs 阅读全文
posted @ 2023-04-04 13:24 ascertain 阅读(17) 评论(0) 推荐(0) 编辑
摘要:Disable all auth (in case of Security Realm wrong configuration) Go to $JENKINS_HOME, modify config.xml REST API # acquire crumb curl -fsSL -XGET -uje 阅读全文
posted @ 2023-04-03 22:58 ascertain 阅读(7) 评论(0) 推荐(0) 编辑
摘要:apiVersion: v1 Kind: pod apiVersion: v1 kind: Pod metadata: annotations: kubeadm.kubernetes.io/kube-apiserver.advertise-address.endpoint: 192.168.8.11 阅读全文
posted @ 2023-04-02 19:05 ascertain 阅读(22) 评论(0) 推荐(0) 编辑
摘要:'import *' only allowed at module level When Python compiles code it needs a determined number of local variables, The number of variables that import 阅读全文
posted @ 2023-04-01 10:06 ascertain 阅读(14) 评论(0) 推荐(0) 编辑
摘要:insecure-registry export DOCKER_OPTS+=' --insecure-registry localhost' 阅读全文
posted @ 2023-04-01 00:53 ascertain 阅读(9) 评论(0) 推荐(0) 编辑
摘要:imagePullSecrets # using config.json kubectl create secret generic secret-docker \ --from-file=.dockerconfigjson=<path/to/.docker/config.json> \ --typ 阅读全文
posted @ 2023-04-01 00:40 ascertain 阅读(10) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示