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
#include "DebouncedInputComponent.h" | |
#include "TimerManager.h" | |
UDebouncedInputComponent::UDebouncedInputComponent() | |
{ | |
PrimaryComponentTick.bCanEverTick = false; | |
DebounceDelay = 0.2f; // Default debounce delay in seconds | |
Threshold = 0.05f; // Default movement threshold | |
LastProcessedValue = 0.0f; // Initial value for comparison |
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
IndianRed='[38;5;167m' | |
LightCoral='[38;5;210m' | |
Salmon='[38;5;209m' | |
DarkSalmon='[38;5;174m' | |
LightSalmon='[38;5;216m' | |
Crimson='[38;5;160m' | |
Red='[38;5;196m' | |
FireBrick='[38;5;124m' | |
DarkRed='[38;5;88m' | |
Pink='[38;5;218m' |
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 removeAllTabs = () => { | |
const tabs = mynahUI.getAllTabs(); | |
Object.keys(tabs).forEach(key => mynahUI.removeTab(key, mynahUI.lastEventId)); | |
}; | |
const createTabs = (count) => { | |
const addTabButton = document.querySelector('.mynah-ui-icon.mynah-ui-icon-plus'); | |
for (let i = 0; i < count; i++) { | |
addTabButton.click(); | |
} |
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
#!/bin/bash | |
# Check if directory is provided | |
if [ -z "$1" ]; then | |
echo "Usage: $0 <directory>" | |
exit 1 | |
fi | |
DIRECTORY="$1" |
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
/** | |
* Ask clarifying questions: | |
* - What types of input are we expecting (valid HTML strings)? | |
* - What should happen in the event of invalid or non-HTML inputs? | |
* - Should we focus solely on HTML or handle any generic XML/HTML-like string input? | |
* | |
* Analyze various solutions and tradeoffs: | |
* - We could use `DOMParser()` to parse the HTML and detect structural errors. | |
* - Alternative methods like regular expressions are not suitable for parsing HTML due to its complexity. |
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
# mypy.ini | |
[mypy] | |
python_version = 3.10 | |
strict = True | |
warn_unused_ignores = True | |
warn_redundant_casts = True | |
warn_unused_configs = True | |
warn_unreachable = True | |
show_error_codes = True |
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
#include <stdio.h> | |
#include <string.h> | |
#include <stdbool.h> | |
#define GSM7_BITSET_SIZE 32 // 256 / 8 | |
unsigned char gsm7_bitset[GSM7_BITSET_SIZE] = {0}; | |
void init_gsm7_bitset() { | |
const char *gsm7_chars = "@£$¥èéùìòÇ\nØø\rÅåΔ_ΦΓΛΩΠΨΣΘΞ\x1BÆæßÉ " | |
"!\"#¤%&'()*+,-./0123456789:;<=>?" |
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
:root { | |
--scale-0: 1rem; | |
--scale-1: 1.125rem; | |
--scale-2: 1.25rem; | |
--scale-3: 1.5rem; | |
--scale-4: 1.875rem; | |
--scale-5: 2.25rem; | |
--scale-6: 3rem; | |
--scale-7: 3.75rem; | |
--scale-8: 4.5rem; |
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
# Update your EV2 Amazon Linux box to whatever version you want | |
sudo apt purge nodejs npm | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash | |
nvm install node | |
source ~/.bashrc | |
nvm install latest | |
# LIVE THE DREAM |
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 Queue { | |
constructor() { | |
this.elements = []; | |
} | |
enqueue = (e) => this.elements.push(e); | |
dequeue = (e) => this.elements.shift(); | |
isEmpty = () => this.elements.length === 0; | |
peek = () => !this.isEmpty() ? this.elements[0] : undefined; | |
length = () => this.elements.length; | |
dump = () => this.elements; |
NewerOlder