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
var i = 1; | |
Object.defineProperty(window, 'n' , { | |
get() { | |
return i ++; | |
} | |
}) | |
// n == 1 | |
// n == 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
/** | |
* This is basic memoization. I am going to play around with it and come up with a few solutions! | |
* Probably going to go back and rewrite this. Its kinda ugly. | |
*/ | |
class Fib { | |
constructor() { | |
this.cache = { | |
"10": [0,1,1,2,3,4,8,13, 21, 34] | |
} |
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 errors = { | |
web_user_phone_error: { | |
error_data: "asdf" | |
} | |
} | |
return R.compose( | |
R.propOr(message, "createdMessage"), | |
errors[x] | |
)(errors) |
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 tempLineItems = lineItems.filter(item => item.label === "Medical Fee"); | |
// debugger; | |
return products && products.length > 0 ? ( | |
<Block> | |
<Block mb={combineRems(spacing.two, spacing.four)}> | |
{/* <CartProductList | |
products={products} | |
onDecreaseQuantity={decreaseQuantity} | |
onIncreaseQuantity={increaseQuantity} | |
onRemoveProduct={removeProduct} |
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 permuteString(input, iter = 0) { | |
if(iter == input.length - 1) return; | |
Let currentArr = Array.from(input); | |
Let firstChar = currentArr[0]; | |
currentArr = currentArr.splice(0,1); edbc | |
// loop through for all the characters | |
for(let i = 0; i < currentArr.length; i++) { | |
Let tempItem = currentArr[i]; |
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> | |
#include <string> | |
// #include <bits/stdc++.h> | |
using namespace std; | |
struct Node { | |
int (*func)(string); | |
string param; |
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
onmessage = function(evt) { | |
const canvas = evt.data.canvas; | |
const gl = canvas.getContext("webgl"); | |
function render(time) { | |
// ... some drawing using the gl context ... | |
requestAnimationFrame(render); | |
} | |
requestAnimationFrame(render); | |
}; |
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> | |
#include <array> | |
using namespace std; | |
struct QueueItem { | |
int func(string); | |
string params; | |
}; |
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
{ | |
"keys": [{ | |
"openseaUrl": "https://opensea.io/assets/0x495f947276749ce646f68ac8c248420045cb7b5e/4491726516030203812614450579463857042464239586635258517311568059421845094401", | |
"imageUrl": "https://i.imgur.com/dwJfUub.mp4", | |
"title": "the little spermaid" | |
}] | |
} |
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 img; | |
function preload() { | |
img = loadImage("src/assets/photo2.jpg"); | |
} | |
function setup() { | |
createCanvas(400, 400); |