I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
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 <iostream> | |
using namespace std; | |
int main() | |
{ | |
const int ROWS=3; | |
const int COLUMNS=3; | |
char board[ROWS][COLUMNS]={{'1','2','3'}, |
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
let urlBase = "https://pokeapi.co/api/v2/pokemon/" | |
const sampleGet = async (pokemonName) => { | |
let response = await fetch(urlBase + pokemonName); | |
let parsedJson = await response.json(); | |
document.body.innerHTML = `<img alt="default front sprite for starmie" src=${parsedJson.sprites.front_default} >`; | |
} | |
sampleGet("starmie"); |
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
/* Based on this http://jsfiddle.net/brettwp/J4djY/*/ | |
function detectDoubleTapClosure() { | |
let lastTap = 0; | |
let timeout; | |
return function detectDoubleTap(event) { | |
const curTime = new Date().getTime(); | |
const tapLen = curTime - lastTap; | |
if (tapLen < 500 && tapLen > 0) { | |
console.log('Double tapped!'); | |
event.preventDefault(); |