This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alert("Wizer"); |
This file has been truncated, but you can view the full file.
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useReducer, useState } from 'react'; | |
interface Message { | |
from: string; | |
message: string; | |
} | |
interface ChatState { | |
messages: Message[] | null; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function generateEmptyPathArray(pathLength) { | |
let path = ["M"]; | |
for (let i = 1; i < pathLength-1; i++) { | |
path.push("."); | |
} | |
path.push("B"); | |
return path; | |
} | |
function simulateMining(path, time) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type filterFunc[T any] func(int, T) bool | |
func filter[T any](arr []T, fn filterFunc[T]) []T { | |
filtered := []T{} | |
for i, e := range arr { | |
if fn(i, e) { | |
filtered = append(filtered, e) | |
} | |
} | |
return filtered |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const https = require("https"); | |
const querystring = require("querystring"); | |
const fs = require("fs"); | |
const path = require("path"); | |
(async () => { | |
// Root of json file should be an array.. | |
// [] | |
const LOG_FILE_PATH = path.resolve(__dirname, "./log.json"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Programmatically set input. | |
* https://stackoverflow.com/a/72014541/10431732 | |
* | |
* @param {HTMLElement} node | |
* @param {String} value | |
* @example - You would use it like this: | |
const textarea = document.querySelector("textarea"); | |
const submitButton = document.querySelector('button[aria-label="Submit"]'); | |
const TEXT_TO_TYPE = "hello, world!"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<blockquote class="tiktok-embed" cite="https://www.tiktok.com/@scout2015/video/6718335390845095173" data-video-id="6718335390845095173" style="max-width: 605px; min-width: 325px"> | |
<section> | |
<a target="_blank" title="@scout2015" href="https://www.tiktok.com/@scout2015?refer=embed">@scout2015</a> Scramble up ur name & I’ll try to guess it😍❤️ <a title="foryoupage" target="_blank" href="https://www.tiktok.com/tag/foryoupage?refer=embed">#foryoupage</a> | |
<a title="petsoftiktok" target="_blank" href="https://www.tiktok.com/tag/petsoftiktok?refer=embed">#petsoftiktok</a> <a title="aesthetic" target="_blank" href="https://www.tiktok.com/tag/aesthetic?refer=embed">#aesthetic</a> | |
<a target="_blank" title="♬ original sound - tiff" href="https://www.tiktok.com/music/original-sound-6689804660171082501?refer=embed">♬ original sound - tiff</a> | |
</section> | |
</blockquote> | |
<script async src="https://www.tiktok.com/embed.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Client-Side: client side: import React, { useState } from "react"; | |
function VideoButton() { | |
const [downloadLink, setDownloadLink] = useState(null); | |
const [videoName, setVideoName] = useState(null); // State to store the video file name | |
const uploadFile = (event) => { | |
const file = event.target.files[0]; | |
if (file) { | |
const formData = new FormData(); |
NewerOlder