This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
const taskMachine = Machine({ | |
id: 'task', | |
initial: 'incomplete', | |
states: { | |
incomplete: { | |
initial: 'upcoming', | |
on: { | |
COMPLETED: 'confirmation', | |
// DELETED: 'deletion', | |
ALREADY_COMPLETED: 'complete', |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<link rel="stylesheet" type="text/css" href='style.css' /> | |
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet" /> | |
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600" rel="stylesheet" /> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> | |
<script src="script.js"></script> |
const clientTree = Machine({ | |
id: 'clientTree', | |
initial: 'loggedout', | |
states: { | |
loggedout: { | |
on: { | |
LOGGEDIN: 'loggedIn' | |
} | |
}, |
const fetchMachine = Machine({ | |
id: "agenda", | |
initial: "loading", | |
states: { | |
loading: { | |
on: { | |
NEW_AGENDA_CREATED: "creatingAgenda", | |
REDIRECTED_TO_EXISTING_AGENDA: "draft", |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
SignedIn* | |
Logout -> SignedOut | |
Dashboard | |
Idle* | |
BUY -> Confirm | |
SELL -> Confirm | |
REFRESH -> Idle | |
Confirm | |
CONFIRM -> Loading | |
Loading |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
<!doctype html> | |
<html> | |
<head> | |
<title>Quick Click</title> | |
<meta charset="utf-8" /> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> |
<?php | |
//This bit tell the program which url it wants to snatch somes stuff from | |
$contents= file_get_contents("http://www.weather-forecast.com/locations/Delhi/forecasts/latest") | |
//This bit grabs the information we need form the url above | |
preg_match('/3 Day Weather Forecast Summary:<\/b> | |
<span class="read-more-small"><span class="read-more-content"> <span class="phrase">(.*?)</span></span></span>', $contents, $matches); | |
print_r($matches); |
<?php | |
//This bit tell the program which url it wants to snatch somes stuff from | |
file_get_contents("http://www.weather-forecast.com/locations/Delhi/forecasts/latest"); | |
//This bit grabs the information we need form the url above | |
// preg_match('/Delhi 1 – 3 Day Weather Forecast Summary:<\/b> | |
// <span class="phrase">(.*?)</s', $contents, $matches); | |
// | |
// print_r($matches); |