Skip to content

Instantly share code, notes, and snippets.

WITH
-- write the new values
new(the_geom,description,name) AS (
VALUES (ST_SetSRID(ST_Point(12,12),4326),'an update',123456),
(ST_SetSRID(ST_Point(13,13),4326),'an insert',100000)
),
-- update existing rows
upsert AS (
UPDATE {table} original
SET the_geom=new.the_geom, description=new.description

I picture the persona of my user to be someone who doesn’t necessarily have a lot of monetary stake in the ongoing developments in and around my area of Brooklyn. Those that do tend to be older and less in-touch with technology-they could operate a website but an app might be a challenge, let alone getting them to engage.
They’re involved in either public policy or local politics or are residents (most likely recent residents) that have a piqued interest in the recent developments in the area. They’re certainly upstarts, familiar with sites that compare rankings of locations on a map-that is yelp, Zillow, etc.
They come across this site via social media most certainly, perhaps having read about it on a local news website or blog. They can include reviews/ratings of the building developers and see more info once selecting a certain one.
Ideally this would be all on one screen, either a map or a list-all of the additional info and ratings should be pop-ups.

[Imgur](http://i.imgur.com/wjtG6u1.jpg

// notice that you are passing the data `arr`
// which, in your case, is the array of the restraurants
function putOnPage(arr){
var listItemTemplate = _.template("<li><h2><%= name %></h2><h3><%= address %></h3><div><ul class='vioList'></ul></div></li>");
// now you loop through each object in `arr`
// and get each individual `rest`
_.each(arr,function(rest,index){
// you can access `rest.name`, `rest.address`
@jueyang
jueyang / relevant.md
Last active August 29, 2015 14:20
Cleared out a bookmark folder concerning what I see as relevant to my own learning/teaching, particularly related to the field of journalism. Periodically updated.
@jueyang
jueyang / index.html
Last active August 29, 2015 14:19
see spills.csv
<!DOCTYPE HTML>
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 6.
"Spill Number","DateSpillReported","SpillName","Address","Material","Amount","Resource Affected","Cause","Source","Waterbody","Closed","latitude","longitude"
1309576,"01/01/2014","Metropolitan Avenue Bridge - North Side "," Metropolitan Ave And Morgan ","Unknown Petroleum","Unknown","Surface Water","Unknown","Unknown",,"01/13/14",40.714455,-73.935296
1309591,"01/02/2014","Groundlevel "," 451 Clarkson Ave ","#6 Fuel Oil","Unknown","Unknown","Equipment Failure","Commercial/Industrial",,"01/02/14",40.656571,-73.946224
1309609,"01/03/2014","Fuel Oil Spill At Commercial Bldg "," 141 Livingston Street ","#4 Fuel Oil","Unknown","Unknown","Unknown","Commercial/Industrial",,"Not closed",40.690693,-73.988056
1309611,"01/03/2014","Business "," 141 Livingston St ","#6 Fuel Oil",20,"Unknown","Human Error","Commercial/Industrial",,"01/03/14",40.690693,-73.988056
1309692,"01/06/2014","Parking Lot Transmission Manhole 4966 "," 12th St & 2nd Ave ","Unknown Petroleum",10,"Soil","Equipment Failure","Transformer",,"02/20/14
<html>
<head>
<title>About an Ice Cream Star </title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<link href='http://cdn.knightlab.com/libs/soundcite/latest/css/player.css' rel='stylesheet' type='text/css'>
</head>
<body>
<div class="container">
ssh -p 2222 jue@localhost