摘要: lsblk -o NAME,TYPE,MOUNTPOINT,MODEL,SERIALlsblk --paths udevadm info --query=all --name=/dev/sda | grep SERIAL smartctl -i /dev/sda 阅读全文
posted @ 2024-02-25 11:19 ascertain 阅读(11) 评论(0) 推荐(0) 编辑
摘要: import datetime datetime.date(2023, 1, 1).isoweekday() def leap_year(year: int) -> bool: return year % 4 == 0 and year % 100 != 0 or year % 400 == 0 f 阅读全文
posted @ 2024-02-10 20:32 ascertain 阅读(3) 评论(0) 推荐(0) 编辑
摘要: echo $PATH | tr : \\n echo $PATH | sed '#:#\n#g' echo $PATH | awk 'BEGIN{RS=":"}{print}' echo $PATH | awk '{gsub(/:/,"\n");print}' IFS=: read -ra entr 阅读全文
posted @ 2024-01-29 17:50 ascertain 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2024-01-12 17:30 ascertain 阅读(2) 评论(0) 推荐(0) 编辑
摘要: gpmc.msc gpms.msc stands for Group Policy Management Console, It is a Microsoft Management Console(MMC) snap-in that provides a single administrative 阅读全文
posted @ 2024-01-11 10:59 ascertain 阅读(1) 评论(0) 推荐(0) 编辑
摘要: openapi_extra @app.get('/items', operation_id='a', openapi_extra={"x-aperture-labs-portal": "blue", 'requestBody': { 'content': { 'required': True, 'a 阅读全文
posted @ 2023-12-14 16:14 ascertain 阅读(15) 评论(0) 推荐(0) 编辑
摘要: Java private static void insertionSort(int[] array) { for (int i = 1; i < array.length; ++i) { int index = i - 1, mark = array[i]; while (mark < array 阅读全文
posted @ 2023-11-19 10:45 ascertain 阅读(2) 评论(0) 推荐(0) 编辑
摘要: Java public class Ersatz { public static void main(String[] args) { int[] ints = new int[8]; for (int v = 0; v < ints.length; ++v) { ints[v] = (int) ( 阅读全文
posted @ 2023-11-18 15:42 ascertain 阅读(4) 评论(0) 推荐(0) 编辑
摘要: toString package org.example.c; public class A { public static String toString(Object[] array) { if (array == null) return "null"; StringBuilder strin 阅读全文
posted @ 2023-11-17 15:35 ascertain 阅读(1) 评论(0) 推荐(0) 编辑
摘要: Java while public class A { public static int binarySearch(int[] array, int aim) { int low = 0, high = array.length - 1, mid; while (low <= high) { mi 阅读全文
posted @ 2023-11-17 10:49 ascertain 阅读(3) 评论(0) 推荐(0) 编辑
摘要: pgedit.msc secpol.msc 当然如果如果是家庭版用户没有组策略是无法像上述一样操作的,我们可以打开注册表编辑器(运行regedit),展开注册表到 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policie 阅读全文
posted @ 2023-09-28 14:16 ascertain 阅读(5) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en-US"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Docume 阅读全文
posted @ 2023-09-26 23:47 ascertain 阅读(2) 评论(0) 推荐(0) 编辑
摘要: data = '[{"foo": "bar", "foo": "baz", "b": 99}]' json.loads(data, object_hook=print) json.loads(data, object_pairs_hook=print) 阅读全文
posted @ 2023-06-13 14:44 ascertain 阅读(31) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en-US"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Docume 阅读全文
posted @ 2023-06-11 15:32 ascertain 阅读(75) 评论(0) 推荐(0) 编辑
摘要: Non-Printing Characters in Prompts (tldp.org) 阅读全文
posted @ 2023-06-11 08:39 ascertain 阅读(1) 评论(0) 推荐(0) 编辑
摘要: offsetParent is containing block 1. position: static; offsetTop 元素的上外边距到containing block的上内边距 (containing block的padding + element.margin) <!DOCTYPE ht 阅读全文
posted @ 2023-06-10 10:15 ascertain 阅读(101) 评论(0) 推荐(0) 编辑
摘要: Element: scrollHeight property - Web APIs | MDN (mozilla.org) <!DOCTYPE html> <html lang="en-US"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA 阅读全文
posted @ 2023-06-09 23:39 ascertain 阅读(3) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en-US"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Docume 阅读全文
posted @ 2023-06-09 23:01 ascertain 阅读(6) 评论(0) 推荐(0) 编辑
摘要: import jwt from datetime import datetime payload_data = { 'sub': '4242', 'iss': 'issuer', # issuer of the token 'name': 'Jessica Temporal', 'nickname' 阅读全文
posted @ 2023-06-07 17:32 ascertain 阅读(25) 评论(0) 推荐(0) 编辑
摘要: import asyncio import sys class AsyncContextManager: async def __aenter__(self): return self async def __aexit__(self, exc_type, exc_val, exc_tb): pri 阅读全文
posted @ 2023-06-06 14:08 ascertain 阅读(54) 评论(0) 推荐(0) 编辑