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(); |
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 Show-JsonTreeView { | |
param ( | |
[Parameter(Mandatory)] | |
$Json | |
) | |
function Show-jsonTreeView_psf { | |
#---------------------------------------------- |
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
class House { | |
# Lower case bc private | |
hidden [Room[]]$rooms | |
# Constructor (PoSH support overloading, which is huge) | |
House() { | |
$this.rooms = Room[]; | |
} | |
# [Room[]] means our return type is an array of Rooms |
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
/** | |
* @plug | |
* DOMRegex.js | |
* https://mattoestreich.com | |
* | |
* @description | |
* Modified from: https://stackoverflow.com/a/62144522 | |
* TLDR; querySelectorAll with regex support | |
* | |
* @important |
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
[v-cloak] { | |
display: block; | |
padding: 50px 0; | |
} | |
@keyframes spinner { | |
to { | |
transform: rotate(360deg); | |
} | |
} |
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 Show-JsonTreeView { | |
param ( | |
[Parameter(Mandatory)] | |
$Json | |
) | |
function Show-jsonTreeView_psf { | |
#---------------------------------------------- |
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
# this forces Arena into full screen mode on startup, set back to 3 to reset | |
# note that if you go into the Arena "Graphics" preference panel, it will reset all of these | |
# and you will need to run these commands again | |
defaults write com.wizards.mtga "Screenmanager Fullscreen mode" -integer 0 | |
defaults write com.wizards.mtga "Screenmanager Resolution Use Native" -integer 0 | |
# you can also replace the long complicated integer bit with any other scaled 16:9 | |
# resolution your system supports. | |
# to find the scaled resolutions, go to System Preferences --> Display and then | |
# divide the width by 16 and multiple by 9. on my personal system this ends up |
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
def run(): | |
i = input("enter 20 numbers separated by spaces: ") | |
iList = i.split(" ") | |
validate_input(iList, 20) | |
nums = list_str_to_list_int(iList) | |
return calculate_sum(nums) | |
def validate_input(strList, expectedTotal): | |
l = len(strList) | |
if l != expectedTotal: |
NewerOlder