Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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, { useRef, useEffect } from 'react'; | |
const scaleWidth = 500; | |
const scaleHeight = 500; | |
/* | |
topImage is an object | |
{ | |
image: String, // name of image | |
imageUrl: String, // full url of remote hosted image |
This file contains hidden or 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 addLineBreaksToParagraph = string => | |
string.split('\n').map((text, index) => ( | |
<p key={index}> | |
{text} | |
</p> | |
)); | |
// e.g. | |
<div>{addLineBreaksToParagraph(heading)}</div> |
This file contains hidden or 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 arr = [[["blah", 876, true], [3, 23, 56], ["hjdfhkjhk", false, -1]]]; | |
const arr1 = [["blah", 876, true], [3, 23, 56], ["hjdfhkjhk", false, -1]]; | |
const arr2 = [[["blah", 876, true], [[98728713,918723987,1283787],3, 23, 56], [[98728713,918723987,1283787],"hjdfhkjhk", false, -1]]]; | |
const arr3 = [[["blah", 876, true], [[98728713,[2376,81727],918723987,1283787],3, 23, 56], [[98728713,918723987,1283787],"hjdfhkjhk", false, -1]]]; | |
const arr4 = [[["blah", 876, true], [[[[[98728713,918723987,1283787],3, [1263876,["sdhjh",[12,true,[12873,8273,128],94853],23, 56]]], [[98728713,918723987,1283787],"hjdfhkjhk"]]], false, -1]]]; | |
const getDepthOfArray = (arr) => { | |
let depth = 0; | |
let included = []; |
This file contains hidden or 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 for lft-concept": { | |
"prefix": "htmlbf", | |
"body": [ | |
"<!DOCTYPE html>", | |
"<html>", | |
"<head>", | |
"\t<meta charset=\"utf-8\" />", | |
"\t<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">", | |
"\t<title>$0</title>", |