function sayHello(name) {
return ‘Hello there, ‘ + name;
}
function sayHello(name) {
name = name || ‘default person’;
return ‘Hello there, ‘ + name;
import * as R from 'ramda'; | |
/* | |
* DHSI 2019, Day 1 Exercises | |
* | |
* Here are a few programming challenges that ask you to write some functions | |
* using what we learned in class today. All of these can be solved without | |
* using Ramda, but they can also be solved more easily using Ramda's functions. | |
* | |
* You may need to consult Ramda's documentation (https://ramdajs.com/docs/) to |
import React, { useState } from 'react'; | |
import { longestWord } from './day01/exercises'; | |
const LongestWord = () => { | |
const [words, setWords] = useState(''); | |
const onChange = (event) => setWords(event.target.value); | |
return ( | |
<div> |
import React, { useState } from 'react'; | |
import Headline from './components/Headline'; | |
import NameForm from './components/NameForm'; | |
import Names from './components/Names'; | |
const App = () => { | |
const [names, setNames] = useState([]) | |
return ( | |
<div> |
import React from 'react'; | |
import styled from '@emotion/styled'; | |
import { css } from '@emotion/core'; | |
import { CSSTransition } from 'react-transition-group'; | |
const has = (key, obj) => Object.prototype.hasOwnProperty.call(obj, key); | |
const keyframes = [ | |
'appear', | |
'enter', |
cask_args appdir: '/Applications' | |
tap "heroku/brew" | |
tap "homebrew/bundle" | |
tap "homebrew/cask" | |
tap "homebrew/core" | |
tap "homebrew/cask-fonts" | |
# Shell stuff | |
brew "fish" |
cask_args appdir: '/Applications' | |
tap "heroku/brew" | |
tap "homebrew/bundle" | |
tap "homebrew/cask" | |
tap "homebrew/core" | |
tap "homebrew/cask-fonts" | |
# Shell stuff | |
brew "fish" |
function sayHello(name) {
return ‘Hello there, ‘ + name;
}
function sayHello(name) {
name = name || ‘default person’;
return ‘Hello there, ‘ + name;
<!DOCTYPE html> | |
<html lang="en-us"> | |
<head> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> | |
<title> | |
Page Title | |
</title> |
require 'shellwords' | |
# Dir.glob was acting weird w/ spaces in file names, so just used find: | |
IO.popen("find Old\\ Home/apilsch/ -type f") do |fp| | |
while not (output = fp.gets).nil? | |
# Full file path: | |
file = "/Users/apilsch/Desktop/#{output.strip}" | |
# Location of original file on disk: | |
disk_file = file.sub("Desktop/Old\ Home/apilsch/", "") | |
next if not File.exist? disk_file |
location,date,type,point,lat,lon,voyage | |
"12 Fulton St, New York, NY",10/19/1843,Port of Embarkation,POINT(-8238040.262471187 4969156.247075499),40.7065671,-74.0035748,0 | |
"Merseyside L3 4BB, Liverpool, UK",11/1/1843,Port of Disembarkation,POINT(-333333.99225396814 7057466.066808143),53.400715,-2.9943902,0 | |
"Bristol Harbour, Bristol, England",4/8/1838,Shipyard Location,POINT(-290859.72885313287 6701227.851099645),51.44969200000001,-2.6128374,0 | |
"Merseyside L3 4BB, Liverpool, UK",1/4/1845,Port of Embarkation,POINT(-333333.99225396814 7057466.066808143),53.400715,-2.9943902,1 | |
"Boston, MA",1/24/1845,Port of Disembarkation,POINT(-7910238.3479711665 5215071.602551562),42.3600825,-71.0588801,1 | |
"Bay of Quick, Greenock, Scotland",1/4/1845,Shipyard Location,POINT(-531214.7175602124 7549756.132135566),55.95647599999999,-4.771983,1 | |
"12 Fulton St, New York, NY",6/27/1855,Port of Embarkation,POINT(-8238040.262471187 4969156.247075499),40.7065671,-74.0035748,2 | |
"Merseyside L3 4BB, Liverpool, UK",7/10/1855,Port of Disembarkation, |