My JavaScript solution to the Code100 puzzle Event Block.
This will run in Node.js. Make sure the file is in the same directory as the JSON file. Then run
node event-block.mjs
My JavaScript solution to the Code100 puzzle Event Block.
This will run in Node.js. Make sure the file is in the same directory as the JSON file. Then run
node event-block.mjs
import "./App.css"; | |
import Form from "./Form"; | |
function App() { | |
const startingData = { | |
name: "Phil", | |
jobs: [ | |
{ title: "Front end developer", company: "ACME Dev" }, | |
{ title: "Full stack developer", company: "Another place" }, | |
{ |
This is an example of how to send an email. To run this script you should:
npm install
This is an example of how to send an SMS. To run this script you should:
npm install
# Logs | |
logs | |
*.log | |
npm-debug.log* | |
yarn-debug.log* | |
yarn-error.log* | |
lerna-debug.log* | |
# Diagnostic reports (https://nodejs.org/api/report.html) | |
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Camera selection</title> | |
<style> |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Fetch test</title> | |
</head> | |
<body> | |
<main> | |
<h1>Press this button</h1> | |
<button id="btn">Press me</button> |
var http = require('http'); | |
var twilio = require('twilio'); | |
var qs = require('querystring'); | |
http.createServer(function (req, res) { | |
var body = ''; | |
req.setEncoding('utf8'); | |
req.on('data', function(data) { | |
body += data; |
# A Benchmark of Array detect against lazy select and first | |
# | |
# Inspired by https://gist.github.com/ernie/1086770 | |
require 'benchmark' | |
haystack = (1..1_000_000).to_a | |
needles = 1.upto(100).map {|n| n * 10_000} | |
puts "\n" + '=' * 80 |
$ ruby testcase.rb | |
MiniTest::Unit::TestCase is now Minitest::Test. From /Users/philnash/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/test/unit/testcase.rb:8:in `<module:Unit>' | |
Run options: --seed 59078 | |
# Running: | |
Finished in 0.001670s, 0.0000 runs/s, 0.0000 assertions/s. |