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 Carousel from "nuka-carousel" | |
import image1 from './image1.png'; | |
import image2 from './image2.png'; | |
import image3 from './image3.png'; | |
import { useState } from "react"; | |
const Carousel = () => { |
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
//drag.js | |
import React from "react"; | |
import autoBind from 'react-autobind'; | |
import _ from "lodash"; | |
import { Responsive, WidthProvider } from "react-grid-layout"; | |
const ResponsiveReactGridLayout = WidthProvider(Responsive); | |
export default class DragFromOutsideLayout extends React.Component { | |
constructor(props) { | |
super(props); |
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> | |
body { | |
background-color: black; | |
} | |
</style> | |
<style> | |
.third { |
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 x = [{config: {a: 1}, w:1}, {config: {a: 2}, w:2}]; | |
var y = 2; | |
const newConfig = { | |
config: { | |
b: 1, | |
a: 300 } | |
}; | |
converge( | |
update, |
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 arr = [1,2,3,4,5,6,7,8,9,10]; | |
var arr1 = [ | |
{id: 1, url:'s'}, | |
{id: 2}, | |
{id: 3}, | |
{id: 4}, | |
{id: 5,url:'ss'} | |
] |
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
<!DOCTYPE html> | |
<html> | |
<body> | |
<input id="city" value="Boston" placeholder="city"><br/> | |
<input id="plant" value="tulips" placeholder="plant"><br/> | |
<input id="soil" value="30%" placeholder="soil moisture" > | |
<br/> | |
<input type="button" value="Go" onclick="process()"/> | |
<div id="output"> | |
</div> |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
from __future__ import print_function | |
from future.standard_library import install_aliases | |
install_aliases() | |
from urllib.parse import urlparse, urlencode | |
from urllib.request import urlopen, Request | |
from urllib.error import HTTPError |
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
//Find the largest rectangle in a histogram. | |
var myList = [1,3,4,24,26,3,0,2,2,0,2,2,0,2,2,2,0,2,2,2]; | |
function getLargestRect(arr) { | |
var result = arr.reduce(function(obj,item) { | |
if (item < 1) { | |
obj.runningItems = []; | |
return obj; | |
} |
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 selectProperties = pick | |
const data = { | |
awk: 'bla', | |
foo: 'bar', | |
doh: 'doh' | |
} | |
selectProperties(['nope'],data) |
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 diff = function(a, b) { return a - b; }; | |
var inRange = unapply(pipe( | |
identity, | |
sort(diff), | |
prop(1) | |
)) | |
inRange(600,12,120) | |
var notAbove = unapply(pipe( |
NewerOlder