code --list-extensions | xargs -L 1 echo code --install-extension # Unix
code --list-extensions | % { "code --install-extension $_" } # Windows PowerShell
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 idk(key,size){ | |
return [...key].map(x=>33*x.charCodeAt(0)%key.length).reduce((a,c)=>c+a); | |
} | |
console.log(idk('firstName', 113)) | |
class table{ | |
items = new Array(113); | |
setItem(key, value){ | |
const idx= idk(key, this.items.length); |
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 reverse(x: number): number { | |
const nums: string[] = [...(x.toString())]; | |
const list: number[] = []; | |
const negative: boolean = nums[0] == '-' ? true : false; | |
if (negative) nums[0] = "\0"; | |
nums.reverse().map(digit => { | |
if (digit == "\0") return; | |
list.push(Number(digit)); | |
}) | |
const result = Number(negative ? '-' + list.join('') : list.join('')); |
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
//https://piccalil.li/blog/a-modern-css-reset | |
/* Box sizing rules */ | |
*, | |
*::before, | |
*::after { | |
box-sizing: border-box; | |
} | |
/* Remove default margin */ |
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
<html> | |
<head> | |
<style> | |
*, *::after, *::before{ | |
margin: 0; | |
padding: 0; | |
box-sizing: border-box; | |
} |
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
// Testing Example | |
const list = [5, 2, 1, 4, 5, 2, 5, 7, 9, 8, 3] | |
console.log("Before Merge Sorting:"); | |
console.log(...list); | |
mergeSort(list); | |
console.log("After Merge Sorting:"); |
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
<?php | |
namespace App\Service; | |
use PDO; | |
use PDOStatement; | |
class Database | |
{ | |
private string $database; |
- You have
setup()
function that accepts an array of words. - Calling
isInDict(word)
function by passing a single string word. Returns true if it includes in the dictionary which we have initialized fromsetup()
function. - The word we pass it to
isInDict()
function, may have wild cards which each wild card represent a single letter.
Dictionary initializatoin:
OlderNewer