Sticky Posts

异音相从谓之和,同声相应谓之韵。- 刘勰《文心雕龙》 作者之用心未必然,而读者之用心何必不然。- 谭献《复堂词录序》 凡作诗之体,意是格,声是律,意高则格高,声辨则律清,格律全,然后始有调。- 空海《文镜秘府论・论文意》 词之为体,要眇宜修,能言诗之所不能言,而不能尽言诗之所能言。诗之境阔,词之言长。- 王国维《人间词话》 # 先秦 # 佚名 # 桃夭 12345桃夭桃之夭夭,灼灼其华。之子于归,宜其室家。桃之夭夭,有蕡其实。之子于归,宜其家室。桃之夭夭,其叶蓁蓁。之子于归,宜其家人。 #...

Categories

Post List

repost: ANSI Escape Codes · GitHub # ANSI Escape Sequences Standard escape codes are prefixed with Escape : Ctrl-Key: ^[ Octal: \033 Unicode: \u001b Hexadecimal: \x1B Decimal: 27 Followed by the command, somtimes delimited by opening square bracket ( [ ), known as a Control Sequence...

# Q1: Why does bash background_process.sh produce no output for jobs ? 1cat background_process.sh 12345#!/bin/bash# run sleep command for 300, 400, and 500 secondssleep 300 &sleep 400 &sleep 500 & 123456789bash background_process.shjobssleep 300 &[1] 66560jobs[1]+...

# Q1: Why are Box and dyn required in Vec<Box<dyn Sale>> ? dyn — opts into dynamic dispatch Without dyn , Rust uses static dispatch (generics/monomorphization), meaning only one concrete type per collection. dyn Sale tells the compiler: “I don’t know the exact type at...

# Table of Contents Component Structure Reactive State Computed / Memoization Event Handlers & Methods Watchers / Effects Lifecycle Hooks Props & Communication Two-Way Binding Template Refs / DOM Refs Context / Provide-Inject Composables / Custom Hooks Conditional Rendering List...

repost: Introduction to concurrent.futures in Python - smrati katiyar Concurrency in Python can be efficiently handled using the concurrent.futures module. This module provides a high-level interface for asynchronously executing function calls using either threads or processes. It allows you to run...

repost: Most Developers Don’t Know Python Has a Built-In Config File Parser - mata # Stop reinventing the wheel with YAML, JSON, or TOML — Python already has *configparser* baked in. Every developer has faced the same problem at some point: Where do you put all those environment-specific values —...

repost: datetime - Determine Whether Two Date Ranges Overlap - Stack Overflow # Question Given two date ranges, what is the simplest or most efficient way to determine whether the two date ranges overlap? As an example, suppose we have ranges denoted by DateTime variables StartDate1 to EndDate1 and...

repost: async / await in forEach loop 🤯. Hey! I recently was working on a… | by Nick Graffis | Medium Hey! I recently was working on a project that had me looping through an array of table names, and wanted to see if each table existed in a MySQL database. Create one if it didn’t exist, then log...

repost: Run gists using npx - DEV Community We can run gists using npx. I learned about that after reading this: https://nodejs.dev/learn/the-npx-nodejs-package-runner. # I want to run my gist I created a gist that prints some text. I ran the command, but it didn’t work. I figured I needed...

repost: findByText() vs getByText() vs queryByText()- React Testing Library | by Anjali Ajith | Medium I have a short-term memory span, so here i am writing blog posts to re-enforce long-term memory. It’s not going to be perfect . # Cheat Grid Check if something is on screen right now:...