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
<div data-depth="0" class="comment"> | |
<span class="user"> | |
<a href="http://news.ycombinator.com/user?id=username">username</a> | |
</span> | |
<span class="timestamp">6 hours ago</span> | |
<br> | |
<p class="text">Comment</p> | |
<a href="http://news.ycombinator.com/item?id=reply_id" class="reply">reply</a> | |
</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
#hncomments div { | |
margin-left: 40px; | |
font-family: Verdana; | |
line-height: 130%; | |
} | |
.comment { | |
font-size: 9pt; | |
} | |
.comment a { | |
color: #000000; |
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
$(document).ready(function() { | |
$.ajax({ | |
url: 'http://hncomments.nathancahill.com/comments/link-id/html/', | |
success: function(data) { | |
$('#hncomments').append(data); | |
} | |
}); | |
}); |
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<title>Embedly - Embed - Example</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script> | |
<script type="text/javascript" src="../jquery.embedly.js"></script> | |
<style> | |
BODY {background-color:#333333;} | |
#content{background-color:#FFFFFF;margin:0 auto;width:800px;} |
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
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
<script> | |
$(document).ready(function(){ | |
$.getJSON('http://stage.prope.rs/api/<account_name>', function(props) { | |
$(props).each(function(id) { | |
root = $('<div />').addClass('prop').append( | |
'<span class="text" />', | |
'<span class="name" />', |
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
<?php | |
$json = file_get_contents('http://stage.prope.rs/api/<account_name>/3'); | |
$props = json_decode($json, TRUE); | |
foreach ($props as $prop) { | |
$template = "<li> | |
<div class='quote'>%s</div> | |
<div class='speech_tag'></div> | |
<div class='image'><img width='42' height='42' src='%s'></div> | |
<div class='author'> |
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
#props li { | |
background-color: #EBEBEB; | |
margin: 0 15px 30px 0; | |
width: 235px; | |
color: #333333; | |
float: left; | |
list-style: none outside none; | |
line-height: 18px; | |
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; | |
font-size: 13px; |
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
import argparse | |
import numpy | |
parser = argparse.ArgumentParser(description='Find the median of a list of values.') | |
parser.add_argument('values', metavar='N', type=float, nargs='+') | |
args = parser.parse_args() | |
values = args.values | |
values.sort() |
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
body { | |
margin: 0; | |
} | |
body img { | |
width: 100%; | |
} |
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
var getDistanceFromLatLonInKm = function(lat1, lon1, lat2, lon2) { | |
var R = 6371, | |
dLat = deg2rad(lat2 - lat1), | |
dLon = deg2rad(lon2 - lon1), | |
a = Math.sin(dLat/2) * Math.sin(dLat/2) + | |
Math.cos(deg2rad(lat1)) * Math.cos(eg2rad(lat2)) * | |
Math.sin(dLon/2) * Math.sin(dLon/2), | |
c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)), | |
d = R * c; |
OlderNewer