阅读视图

发现新文章,点击刷新页面。
🔲 ☆

Windows MySQL备份bat脚本

Windows MySQL备份bat脚本 🔗 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 @echo off rem ========== 可维
🔲 ☆

算法基础知识

队列和双端队列 🔗双端队列是一种将栈的原则和队列的原则混合在一起的数据结构。 队列 🔗FIFO(First Input First Output), 先进先出,新添加的元
🔲 ☆

hyper-V arch linux 网络配置

Hyper-V虚拟机安装Arch Linux后,静态IP网络配置 🔗1. 安装Arch Linux 🔗虚拟机安装Arch Linux 2. 配置网络,固定静态IP 🔗虚拟机关机
🔲 ⭐

three 拼接货架

three 拼接货架 🔗 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
🔲 ⭐

typescript 装饰器

typescript 装饰器 🔗 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 declare type MethodDecorator = <T>( target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T> ) => TypedPropertyDescriptor<T> | void type VoidFn = ((...args: any[]) => void) | ((...args: any[]) => Promise<void>) export const Performance =
🔲 ☆

SSH connection failed: connect ECONNREFUSED

Shell登录报 SSH connection failed: connect ECONNREFUSED 🔗通过VNC登录云服务器实例 🔗找到登录入口 找到vnc登录入口 查看sshd服务状态 🔗 1 netstat -tnlp | grep sshd 如果服务未启动 1 systemctl start
🔲 ☆

请求中获取浏览器推荐语言

请求中获取浏览器推荐语言 🔗 1 2 3 4 5 6 7 8 9 10 11 12 let languages: string[] | undefined // get locale from cookie const localeCookie = request.cookies.get('locale') languages = localeCookie?.value ? [localeCookie.value] : [] if (!languages.length) { // Negotiator expects plain object so we need to transform headers const negotiatorHeaders: Record<string, string> = {} request.headers.forEach((value, key) => (negotiatorHeaders[key]
🔲 ☆

flutter 生命周期

flutter 生命周期 🔗 createState(): When the Framework is instructed to build a StatefulWidget, it immediately calls createState() mounted is true: When createState creates your state class, a buildContext is assigned to that state. buildContext is, overly simplified, the place in the widget tree in which this widget is placed. Here’s a longer explanation. All widgets have a bool this.mounted property. It is turned true when the buildContext
🔲 ☆

双向链表

双向链表 🔗 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
🔲 ☆

堆和栈

堆和栈 🔗Queue 🔗 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 import LinkedList from "./LinkedList"; class Queue { constructor() { this.linkedList = new LinkedList(); } isEmpty() { return !this.linkedList.head; } peek() { if (this.isEmpty()) return null; return this.linkedList.head.value; } enqueue(value) { this.linkedList.prepend(value); } dequeue() { return this.linkedList.deleteHead();
🔲 ☆

EventSource

Eventsource单向服务端推送 🔗单向服务端推送 服务端部分 🔗服务端需要设置返回头 1 "Content-Type": "text/event-stream" 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
🔲 ☆

单向链表

链表 🔗链表是一种物理储存上非联系,数据元素的逻辑顺序通过链表中的指针链接次序,实现的一种线性储存结构。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
🔲 ☆

简易的事件监听EventBus

简易的事件监听 🔗 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 const createEvent = () => ({ events: {} as any, on(eventName: string, callback: Function) { this.events[eventName]?.push(callback) || (this.events[eventName] = [callback]); return () => { this.events[eventName] = this.events[eventName].filter( (e: any) => e !== callback ); }; }, emit(eventName: string, ...args: any[]) { const callbacks = this.events[eventName];
🔲 ☆

fork的仓库更新分支

fork 的仓库在源仓库新增分支后更新 fork 仓库的分支 🔗1. 本地新增源仓库的远程地址 🔗 1 git remote add up xxxxxxx 2. 更新本地分支 🔗 1 git fetch up 分支名:分支名 3. 更新 fork repo 远程分
🔲 ☆

forwardRef 定义的组件添加静态属性

forwardRef 定义的组件添加静态属性 🔗 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 import React, { ReactNode, RefAttributes, ForwardRefExoticComponent } from 'react'; interface ModalProps { title: ReactNode; } interface ModalStaticProps { show(): void; hide(): void; } const STATIC_PROPS:
🔲 ☆

js 获取滚动元素

js 获取滚动父元素 🔗 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 const isScrollable = function (ele) { const hasScrollableContent = ele.scrollHeight > ele.clientHeight; const overflowYStyle = window.getComputedStyle(ele).overflowY; const isOverflowHidden = overflowYStyle.indexOf('hidden') !== -1; return hasScrollableContent && !isOverflowHidden; }; const getScrollableParent = function (ele) { return !ele || ele === document.body ? document.body : isScrollable(ele) ? ele
❌