...
...
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
# Pretty Feed | |
Styles an RSS/Atom feed, making it friendly for humans viewers, and adds a link | |
to aboutfeeds.com for new user onboarding. See it in action: | |
https://interconnected.org/home/feed |
"use client"; | |
import { useState, useEffect, useRef } from "react"; | |
function SimpleRecordButton() { | |
const [isRecording, setIsRecording] = useState(false); | |
const [audioStream, setAudioStream] = useState(null); | |
const [mediaRecorder, setMediaRecorder] = useState(null); | |
const [audioBlob, setAudioBlob] = useState(null); | |
const [recordingTime, setRecordingTime] = useState(0); | |
const timerRef = useRef(null); |
# Place this file in the folder that you want to edit, and then run `python spaces-to-dashes.py` | |
import os | |
def rename_files_and_folders(root_directory): | |
for dirpath, dirnames, filenames in os.walk(root_directory, topdown=False): | |
# Rename files | |
for filename in filenames: | |
if ' ' in filename: | |
old_file_path = os.path.join(dirpath, filename) |
{ | |
"main": | |
[ | |
"ESC", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "BACKSPACE", | |
"PGUP", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", 127, | |
"ALT", "a", "s", "d", "f", "g", "h", "j", "k", "l", ";", "\n", | |
"SHIFT", "z", "x", "c", "v", " ", "b", "n", "m", ",", ".", "PGDN" | |
], | |
"main-shift": |
--- | |
let { text, posts } = Astro.props; | |
--- | |
<astro-link data-posts={posts}> | |
<a>{text}</a> | |
</astro-link> | |
<script> | |
class AstroLink extends HTMLElement { |
function clearInputs() { | |
let inputs = document.getElementsByTagName("input"); | |
for (const i of inputs) { | |
i.value = ""; | |
} | |
} |
const { BaseDirectory, exists } = window.__TAURI__.fs; | |
async function doesFileExist(fileName) { | |
let fileExists = await exists(fileName + ".pdf", { | |
baseDir: BaseDirectory.Download, | |
}); | |
let fileCounter = 0; | |
while (fileExists) { | |
fileCounter++; |
Prompt: Write a function in JavaScript that wraps a Unicode character in an HTML document in a <span>
tag with a CSS class.
Raw GPT-4 Output:
You can use the following JavaScript function to achieve this:
function wrapUnicodeCharacter(char, cssClass) {