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
library("XML") | |
library("RCurl") | |
url = "http://thecaucus.blogs.nytimes.com/" | |
xpath = '//*[@id="entry-230579"]/div/text()' | |
page = getURL(url) | |
tree = htmlTreeParse(page, useInternalNodes=TRUE) | |
text = getNodeSet(tree, '//*[@id="entry-230579"]/div') | |
text |
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: ([a-z]) (["])([a-z]) | |
replace: $1 \\$2$3 | |
find: ."" | |
replace: ./"" | |
find: ([a-z])(["]) ([a-z]) | |
replace: $1\\$2 $3 |
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
I was raised in a very Catholic household, but lately a bit of my once-strong Catholic identity has been peeling away. I haven't been to church since May, I'm questioning my thoughts on a lot of the Church's social doctrines, and I don't pray nearly as often as I used to. | |
I got some bad news from home recently about a friend, and only several days later did I even think to pray. Realizing that I had forgotten that astounded me, because in other times that would have been my first instinct. Trying to pray, however, felt no better. I felt weird asking for God's help--like a friend who hasn't called you back in months but suddenly needs a place to crash. I ended up calling my mom and asking her to pray, because I feel like my prayers have by now lost whatever potency they may have ever held. | |
If I'm going to be a lapsed Catholic, I want it to be a product of reading and honest questioning, investigating the philosophical arguments for Catholicism, really narrowing down what I agree with. Basically, I want to ha |
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
All of the google results for this are outdated / don't work. Here's a simple fiddle that stakes div relative to the bottom of its container div. | |
http://jsfiddle.net/9pXpU/ | |
<div class="colWrapper"> | |
<div class="barContainer"> | |
<div class="bar" style="background-color:#b4cde2;"></div> | |
<div class="bar" style="background-color:#7ca7cc;"></div> | |
<div class="bar" style="background-color:#6094c1;"></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
UPDATE point_table SET polygon_id = poly_table.poly_id FROM poly_table WHERE ST_Intersects(point_table.the_geom, poly_table.the_geom); |
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
Forked from @BrianAbelson | |
library('rjson') # For parsing json in R | |
library('RCurl') # For sending an http request | |
library('plyr') # For ddply | |
# Takes an data frame with a unique id column and an address column at the very least | |
# it returns a data frame with the uid, lat, lng and specificity of geocoding | |
# use the uid to join these results back to your data if you want | |
# you can also accomplish roughly the same thing with a for loop instead of ddply |
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
csvData <- getURL("https://docs.google.com/spreadsheet/pub?key=[YOUR-KEY-GOES-HERE]&output=csv") | |
df <- read.csv(textConnection(csvData), stringsAsFactors = FALSE) |
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
location_type stores additional data about the specified location. The following values are currently supported: | |
"ROOFTOP" indicates that the returned result is a precise geocode for which we have location information accurate down to street address precision. | |
"RANGE_INTERPOLATED" indicates that the returned result reflects an approximation (usually on a road) interpolated between two precise points (such as intersections). Interpolated results are generally returned when rooftop geocodes are unavailable for a street address. | |
"GEOMETRIC_CENTER" indicates that the returned result is the geometric center of a result such as a polyline (for example, a street) or polygon (region). | |
"APPROXIMATE" indicates that the returned result is approximate. |
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
<!--[if !IE]>--> | |
<link type="text/css" rel="stylesheet" media="only screen and (max-device-width: 480px)" href="css/iPhone.css" /> | |
<link type="text/css" rel="stylesheet" media="only screen and (min-device-width: 768px) and (max-device-width: 1024px)" href="css/iPad.css" /> | |
<!--<![endif]--> |
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
/* | |
* MEDIA QUERIES | |
*/ | |
/* tablet landscape / netbook */ | |
@media screen and (max-width: 1024px) {} | |
/* iPad Retina Display (2048x1536 264ppi) */ | |
@media screen and (max-width: 1536px) and (resolution: 264ppi) {} |