摘要:
import asyncio import sys class AsyncContextManager: async def __aenter__(self): return self async def __aexit__(self, exc_type, exc_val, exc_tb): pri 阅读全文
摘要:
JavaScript 1. splice let arr = [1, 2, 3, 5, 6, 4, 3, 2, 1, 1, 2, 3, 4, 5] for(let i = 0; i < arr.length - 1; ++i) { for(let j = i + 1; j < arr.length; 阅读全文
摘要:
JavaScript let arr = [8, 4, 3, 2, 6, 7, 1, 5, 9] function quickSort(arr) { console.log(arr) if(arr.length <= 1) return arr let midIndex = parseInt(arr 阅读全文
摘要:
while initialize test change operation change, test, operation's order will affect the first line number 阅读全文
摘要:
What is the GCD? In mathematics, the greatest common divisor (gcd) of two or more integers, when at least one of them is not zero, is the largest posi 阅读全文
摘要:
The division (/) operator produces the quotient of its operands where the left operand is the dividend and the right operand is the divisor. The divis 阅读全文
摘要:
find out diagonal for(let b = 1; b <= 9; ++b) { let res = '' for(let p = 1; p <= 9; ++p) { if(b > p) res += ' ' else res += '*' } console.log(res) } f 阅读全文
摘要:
SQLSTATE - Wikipedia 阅读全文
摘要:
overflow: hidden, display: inline-block => BFC padding position float border padding 阅读全文
摘要:
Java can't return value Python can only return None JavaScript can return any value 阅读全文
摘要:
阅读全文
摘要:
XMLHttpRequest (javascript.info) <body> <script> // Create a new XMLHTTPRequest object let xhr = new XMLHttpRequest() xhr.timeout = 5000 // timeout in 阅读全文
摘要:
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 阅读全文
摘要:
connection import psycopg2 from psycopg2 import Error, connection, cursor conn: connection | None = None c1: cursor | None = None try: conn = psycopg2 阅读全文
摘要:
Pool 使用pool正确方法: 从pool取connection,使用完close(), 底层CMySQLConnection会return到deque, 此时从pool中得到的PooledMySQLConnection底层_cnx变为None 阅读全文
摘要:
String workspace = "/opt/jenkins/workspace/${JOB_NAME}" def v = 'v' env.e1 = 'v1' pipeline { agent { node { label 'master' customWorkspace "${workspac 阅读全文
摘要:
1. push.default https://www.fleekitsolutions.com/difference-between-push-default-matching-simple/ Set your push.default to upstream to push branches t 阅读全文
摘要:
Snippet Generator => steps (place into the steps) 只有脚本script{}可声明变量,String,def声明的变量只有script{}可用 # # Plugins # # Organization and Administration Config 阅读全文
摘要:
package main import ( "fmt" "math" "runtime" "strconv" "strings" "time" ) func producer(intChan chan int) { for b := 1000; b <= 1099; b++ { intChan <- 阅读全文
摘要:
contra-variance from typing import Callable class Food: ... class Meat(Food): ... class Animal: def eat(self, food: Food): ... class Dog(Animal): def 阅读全文