03 2022 档案

摘要:https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_character_encoding?view=powershell-7.2 In general, Windows Po 阅读全文
posted @ 2022-03-29 20:49 ascertain 阅读(126) 评论(0) 推荐(0) 编辑
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2022-03-28 23:10 ascertain 阅读(31) 评论(0) 推荐(0) 编辑
摘要:App.vue <template> <div id="heart" @click="toggleFlag"> <span :class="{active:flag}"></span> <span :class="{active:flag}"></span> </div> </template> < 阅读全文
posted @ 2022-03-28 15:11 ascertain 阅读(278) 评论(0) 推荐(0) 编辑
摘要:main.ts import { createApp } from 'vue' import App from './App.vue' import { createPinia } from 'pinia' const store = createPinia() const app = create 阅读全文
posted @ 2022-03-27 23:31 ascertain 阅读(92) 评论(0) 推荐(0) 编辑
摘要:web storage API: <script> for(let b = 0; b < 10; ++b) { localStorage.setItem(`vault-${b}`, `vaunt-${b}`) } console.log(localStorage.length) localStora 阅读全文
posted @ 2022-03-27 23:31 ascertain 阅读(21) 评论(0) 推荐(0) 编辑
摘要:main.ts import { createApp } from 'vue' import App from './App.vue' const app = createApp(App) type Filter = { format: <T extends any>(str: T) => stri 阅读全文
posted @ 2022-03-26 21:30 ascertain 阅读(88) 评论(0) 推荐(0) 编辑
摘要:import { onMounted } from 'vue' type Options = { elem: string } const base64 = (elem: HTMLImageElement) => { const canvas = document.createElement('ca 阅读全文
posted @ 2022-03-26 12:44 ascertain 阅读(144) 评论(0) 推荐(0) 编辑
摘要:<template> <div v-move class="box"> <div class="header"> </div> <div>zax</div> </div> </template> <script lang="ts" setup> import { ref, DirectiveBind 阅读全文
posted @ 2022-03-26 11:58 ascertain 阅读(118) 评论(0) 推荐(0) 编辑
摘要:vite.config.ts import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import * as path from 'path' // https://vitejs.dev/config/ exp 阅读全文
posted @ 2022-03-26 10:28 ascertain 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-03-24 11:45 ascertain 阅读(12) 评论(0) 推荐(0) 编辑
摘要:Server端设置3s才返回数据 单线程 import requests, random, string, datetime def download(url): print('start') response = requests.get(url) print('complete') lst = 阅读全文
posted @ 2022-03-23 13:00 ascertain 阅读(101) 评论(0) 推荐(0) 编辑
摘要:改造老旧教程案例: asyncio.gather import asyncio async def b(): print(5) await asyncio.sleep(2) print(55) return 5 async def p(): print(4) await asyncio.sleep( 阅读全文
posted @ 2022-03-23 11:35 ascertain 阅读(55) 评论(0) 推荐(0) 编辑
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2022-03-22 23:11 ascertain 阅读(214) 评论(0) 推荐(1) 编辑
摘要:使用Promise封装ajax function ajax (url) { return new Promise((resolve, reject) => { let xhr = new XMLHttpRequest() xhr.onreadystatechange = function () { 阅读全文
posted @ 2022-03-22 22:07 ascertain 阅读(23) 评论(0) 推荐(0) 编辑
摘要:通用公式: a % b = a - int(a / b) * b 取整: 向下取整 -∞方向 floor(a/b) 取底除法Python 向零取整, 舍弃小数, 截断除法C Java Javascript 取模公式通用, 但是因为取整的区别, Python的取模跟其他语言不一样,Python真是怪胎 阅读全文
posted @ 2022-03-22 12:19 ascertain 阅读(173) 评论(0) 推荐(0) 编辑
摘要:正常情况, 赋值给其他变量 public class B { public static void main(String[] args) { int bb = 5; int pp = ++bb; System.out.println(pp); } } public class B { public 阅读全文
posted @ 2022-03-22 10:56 ascertain 阅读(31) 评论(0) 推荐(0) 编辑
摘要:span width: fit-content line-height flex table grid transform 阅读全文
posted @ 2022-03-21 15:06 ascertain 阅读(26) 评论(0) 推荐(0) 编辑
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2022-03-21 14:19 ascertain 阅读(32) 评论(0) 推荐(0) 编辑
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2022-03-21 13:07 ascertain 阅读(44) 评论(0) 推荐(0) 编辑
摘要:margin <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" cont 阅读全文
posted @ 2022-03-20 23:53 ascertain 阅读(26) 评论(0) 推荐(0) 编辑
摘要:version: "3.9" volumes: data: external: false config: external: false plugins: external: false kibana: external: false networks: demo: name: demo exte 阅读全文
posted @ 2022-03-20 22:28 ascertain 阅读(57) 评论(0) 推荐(0) 编辑
摘要:Single Node: cluster.name: vagrant-cluster node.name: vagrant #node.attr.rack: r1 #path.data: /path/to/data #path.logs: /path/to/logs #bootstrap.memor 阅读全文
posted @ 2022-03-20 22:24 ascertain 阅读(175) 评论(0) 推荐(0) 编辑
摘要:# 增量更新 POST wares/_update/1/ { "doc":{ "id":3 } } # 查看mapping get wares/_mapping 阅读全文
posted @ 2022-03-20 19:08 ascertain 阅读(153) 评论(0) 推荐(0) 编辑
摘要:# 指定 _id 查询 get wares/_doc/1 # 查询所有 get wares/_search { "query":{ "match_all": {} } } # 指定 term get wares/_search { "query":{ "term":{ "description":{ 阅读全文
posted @ 2022-03-20 19:01 ascertain 阅读(49) 评论(0) 推荐(0) 编辑
摘要:# tokenizer put /orders { "settings":{}, "mappings":{ "properties":{ "title":{ "type":"text", "analyzer":"standard" } } } } put /orders/_doc/1 { "titl 阅读全文
posted @ 2022-03-20 18:56 ascertain 阅读(32) 评论(0) 推荐(0) 编辑
摘要:Aggregation可不指定查询条件, 默认查询所有 求和: 以price进行分组 # 以price进行分组 get vanilla/_search { "query":{ "match_all": {} }, "aggs":{ "group_price":{ "terms": { "field" 阅读全文
posted @ 2022-03-20 18:50 ascertain 阅读(106) 评论(0) 推荐(0) 编辑
摘要:from fastapi import FastAPI, Request, Response, Header, Body, Form, Cookie from fastapi.responses import JSONResponse, ORJSONResponse, FileResponse, H 阅读全文
posted @ 2022-03-20 16:06 ascertain 阅读(747) 评论(0) 推荐(0) 编辑
摘要:const arr = ['a', 'a', 'a', 'd', 'e', 'f'] for (let i = 0; i < arr.length; ++i) { console.log(`arr.length = ${arr.length}, i = ${i}`) if (arr[i] 'a') 阅读全文
posted @ 2022-03-19 13:52 ascertain 阅读(206) 评论(0) 推荐(0) 编辑
摘要:put wares { "settings":{ "number_of_shards": 1, "number_of_replicas":0 }, "mappings":{ "properties":{ "id":{ "type":"integer" }, "title":{ "type": "ke 阅读全文
posted @ 2022-03-19 10:15 ascertain 阅读(24) 评论(0) 推荐(0) 编辑
摘要:以下测不出效果, 因为程序逻辑是在function two中执行 <script> function one () { console.info('one') } function two () { setTimeout(() => { console.info('two') }, 1) } fun 阅读全文
posted @ 2022-03-19 08:44 ascertain 阅读(33) 评论(0) 推荐(0) 编辑
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2022-03-19 08:18 ascertain 阅读(31) 评论(0) 推荐(0) 编辑
摘要:BFC: block formatting context <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <me 阅读全文
posted @ 2022-03-19 07:50 ascertain 阅读(69) 评论(0) 推荐(0) 编辑
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="description" content=""> <meta name="keywords" content="bait bark"> <meta h 阅读全文
posted @ 2022-03-15 16:01 ascertain 阅读(26) 评论(0) 推荐(0) 编辑
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="description" content=""> <meta name="keywords" content="bait bark"> <meta h 阅读全文
posted @ 2022-03-15 13:34 ascertain 阅读(18) 评论(0) 推荐(0) 编辑
摘要:let b = { n1: 11, n2: 22, n3: 44, n4: 55, ns: { n1, n2 } } n1 n2 不是变量, 是b的key let t={22,33} let b = { n1: 11, n2: 22, n3: 44, n4: 55, ns: { this.n1, t 阅读全文
posted @ 2022-03-15 13:08 ascertain 阅读(21) 评论(0) 推荐(0) 编辑
摘要:let i = 0 setTimeout(function (n) { console.log(55, n) }, 1000, setTimeout(function () { console.log(44, i) i++ return i+2 })) 先计算第三参数, 返回值为Timeout对象, 阅读全文
posted @ 2022-03-15 11:10 ascertain 阅读(20) 评论(0) 推荐(0) 编辑
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="description" content=""> <meta name="keywords" content="bait bark"> <meta h 阅读全文
posted @ 2022-03-14 22:27 ascertain 阅读(23) 评论(0) 推荐(0) 编辑
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="description" content=""> <meta name="keywords" content="bait bark"> <meta h 阅读全文
posted @ 2022-03-13 22:36 ascertain 阅读(51) 评论(0) 推荐(0) 编辑
摘要:random() 返回一个介于左闭右开[0.0, 1.0)区间的浮点数 基本方法 random.seed(a=None, version=2)初始化伪随机数生成器。如果未提供a或者a=None,则使用系统时间为种子。如果a是一个整数,则作为种子。 random.getstate()返回一个当前生成器 阅读全文
posted @ 2022-03-05 18:51 ascertain 阅读(168) 评论(0) 推荐(0) 编辑
摘要:https://superuser.com/questions/867728/user-vs-system-environment-variables-do-system-variables-override-user-variabl 除了Path变量外, User Variables 优先级高, 阅读全文
posted @ 2022-03-04 12:37 ascertain 阅读(54) 评论(0) 推荐(0) 编辑
摘要:tk(toolkit)是用来做图形用户界面(GUI graphical user interface)的工具,与tcl命令结合可以创建和操作GUI的窗口组件,Python里面也有一个叫Tkinter的模块作为Tk GUI的接口。 Tcl/Tk快速入门_最实用的Linux博客-CSDN博客 阅读全文
posted @ 2022-03-04 12:35 ascertain 阅读(440) 评论(0) 推荐(0) 编辑
摘要:with open(file) as f: for line in f: for field in line.split(): print(filed) import re from collections import defaultdict valve = '''51.222.253.18 - 阅读全文
posted @ 2022-03-03 21:02 ascertain 阅读(44) 评论(0) 推荐(0) 编辑
摘要:Named Capturing Groups: Backreferences: \number \1 匹配结果的第一个分组 \g<number> \g<1> 匹配结果的第一个分组, 避免歧义 \g<named_group> \g<valor> 匹配命名分组 valor (?P<valor>expre 阅读全文
posted @ 2022-03-03 10:39 ascertain 阅读(33) 评论(0) 推荐(0) 编辑
摘要:Python: 当 \char 不构成转义序列时, \ 被作为普通字符, \1 \100 八进制转义序列 Javascript: Java: 阅读全文
posted @ 2022-03-03 10:08 ascertain 阅读(27) 评论(0) 推荐(0) 编辑
摘要:import re from collections import defaultdict regex = re.compile(r'[^\w-]+') valor = defaultdict(lambda: 0) with open(file = 'statistic.txt', mode = ' 阅读全文
posted @ 2022-03-02 23:45 ascertain 阅读(21) 评论(0) 推荐(0) 编辑
摘要:IP -> int import socket ip = '5.5.5.5' def inet_aton(a: str): n = 0 for i, v in enumerate(reversed([int(n) for n in a.split('.')])): n += v << (8 * i) 阅读全文
posted @ 2022-03-02 16:57 ascertain 阅读(42) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-03-01 13:51 ascertain 阅读(19) 评论(0) 推荐(0) 编辑
摘要:newline: (windows) Only for text mode 写: newline=None (default) newline='' newline='\n' other Summarize: 写文件时, 全部使用 '\n' , newline=None 替换成 os.linesep 阅读全文
posted @ 2022-03-01 13:29 ascertain 阅读(40) 评论(0) 推荐(0) 编辑

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