Some stats: - Total number of links: 23983
Discover gists
Markdown Preview Enhanced supports rendering flow charts
, sequence diagrams
, mermaid
, PlantUML
, WaveDrom
, GraphViz
, Vega & Vega-lite
, Ditaa
diagrams.
You can also render TikZ
, Python Matplotlib
, Plotly
and all sorts of other graphs and diagrams by using Code Chunk.
Please note that some diagrams don't work well with file exports such as PDF, pandoc, etc.
This feature is powered by flowchart.js.
//将以下内容放置在vscode-用户代码片段-javascript.json文件中即可使用快捷设置 | |
//选项难免有纰漏,您可以在此基础上修改或者自定义选项; | |
// ---------------OpenLayer--------------------------- | |
{ | |
"openlayersMap":{ | |
"prefix": "olM", | |
"body": [ | |
"new ol.Map({", | |
" title: ${1:title},", // 可选标题 | |
" target: ${2:target},", // 地图的目标元素 |
To utilize the AWS CLI for listing S3 buckets and deleting those that match a specific pattern, follow these steps. This guide focuses on how to remove buckets starting with the prefix "sk."
Requirements
- AWS CLI must be installed.
- Appropriate AWS credentials and permissions should be set up.
Step 1: Get a List of Buckets First, use the AWS CLI installed on your machine to retrieve a list of all S3 buckets.
class MainActivity : ComponentActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
WindowCompat.setDecorFitsSystemWindows(window, false) | |
super.onCreate(savedInstanceState) | |
setContent { | |
RubberBandSliderTheme { | |
Surface(modifier = Modifier.fillMaxSize(), color = MaterialTheme.colorScheme.background) { | |
Box(contentAlignment = Alignment.Center) { | |
RubberBandSlider(modifier = Modifier | |
.height(200.dp) |
Note: this was originally several Reddit posts, chained and linked. But now that Reddit is dying I've finally moved them out. Sorry about the mess.
URL: https://www.reddit.com/r/ProgrammingLanguages/comments/up206c/stack_machines_for_compilers/i8ikupw/ Summary: stack-based vs register-based in general.
There are a wide variety of machines that can be described as "stack-based" or "register-based", but not all of them are practical. And there are a lot of other decisions that affect that practicality (do variables have names or only address/indexes? fixed-width or variable-width instructions? are you interpreting the bytecode (and if so, are you using machine stack frames?) or turning it into machine code? how many registers are there, and how many are special? how do you represent multiple types of variable? how many scopes are there(various kinds of global, local, member, ...)? how much effort/complexity can you afford to put into your machine? etc.)
- a pure stack VM can only access the top elemen
export async function fetchAll(urls: string[], concurrency = 5, retryPolicy = defaultRetryPolicy): Promise<Response[]> { | |
const controller = new AbortController(); | |
const semaphore = new Semaphore(concurrency); | |
const promises = urls.map(async url => { | |
await semaphore.acquire(); | |
try { | |
return await fetchWithRetry(url, retryPolicy, controller.signal); | |
} catch (error) { | |
controller.abort(); // abort all requests on fatal error | |
throw error; |
package com.vishal2376.animations.ui.theme | |
import androidx.compose.animation.animateColorAsState | |
import androidx.compose.animation.core.EaseInOut | |
import androidx.compose.animation.core.animateFloatAsState | |
import androidx.compose.animation.core.tween | |
import androidx.compose.foundation.background | |
import androidx.compose.foundation.clickable | |
import androidx.compose.foundation.layout.Arrangement | |
import androidx.compose.foundation.layout.Box |
# Download all images from all FOLDER_NAME in FOLDER_NAME folder | |
# and save them to FOLDER_NAME/_attachments folder. | |
# Then replace remote image paths with local paths. | |
# Usage: python download_imgs.py | |
import os | |
import urllib | |
import urllib.parse | |
import urllib.request | |
import re |
#!/bin/bash | |
# | |
# Sylinux Installer / Updater Scripts | |
# Copyright (C) 2011 Matthew Gyurgyik <pyther@pyther.net> | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation; either version 2 | |
# of the License, or (at your option) any later version. | |
# |