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
// REMOVE | |
const sleep = (ms) => new Promise((r) => setTimeout(r, ms)); | |
const test = async () => { | |
await sleep(500); | |
} | |
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 from "react"; | |
export const highlightTextHelper = (input, searchTerm) => { | |
if (!input || !searchTerm) return <>{input}</>; | |
let textIndex = input.toLowerCase().indexOf(searchTerm.toLowerCase()); | |
if (textIndex !== -1) { | |
let startText = input.substring(0, textIndex); | |
let foundText = input.substring(textIndex, textIndex + searchTerm.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
SELECT * FROM table_name | |
WHERE 1 = 2; |
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 ValidAnagram(first, second) { | |
if(first.length !== second.length){ | |
return false; | |
} | |
const lookup = {}; | |
for(let i = 0; i < first.length; i++){ | |
let letter = first[i]; | |
// if letter exists, increment or set to 1 |