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
#---------------------------------------- | |
#Post | |
#---------------------------------------- | |
class Post(models.Model): | |
#Slug is the 'short' version of the title, used in the URL and | |
# used as the primary key | |
slug = models.CharField( | |
primary_key=True, | |
max_length=255 | |
) |
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 map = new OpenLayers.Map({ | |
div: "map", | |
layers: [ | |
new OpenLayers.Layer.Vector("GeoJSON", { | |
strategies: [new OpenLayers.Strategy.Fixed()], | |
protocol: new OpenLayers.Protocol.HTTP({ | |
url: "county_file.json", | |
format: new OpenLayers.Format.GeoJSON({}) | |
}) | |
}) |
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 map = new OpenLayers.Map({ | |
div: "map", | |
layers: [ | |
new OpenLayers.Layer.Vector("GeoJSON", { | |
strategies: [new OpenLayers.Strategy.Fixed()], | |
protocol: new OpenLayers.Protocol.HTTP({ | |
url: "county_file.json", | |
format: new OpenLayers.Format.GeoJSON({}) | |
}) | |
}) |
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
gdal_translate -of PNG -a_srs EPSG:4326 -a_ullr -127.62 50.41 -66.42 21.61 original_image.png temp_output1.png | |
gdalwarp -t_srs '+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs' temp_output1.png temp_output2.png | |
gdal_translate -of PNG -outsize 80% 80% temp_output2.png reprojected_image.png |
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> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<link rel="stylesheet" href="http://openlayers.org/dev/theme/default/style.css" type="text/css"> | |
<link rel="stylesheet" href="http://openlayers.org/dev/examples/style.css" type="text/css"> | |
<style> | |
polyline, polygon, circle{ |
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
(function() { | |
var codeeditor, dataeditor, init, svg_foot, svg_head, svgeditor, update; | |
svg_head = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.0//EN\" \"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd\">\n<svg version=\"1.0\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n<g id=\"demoholder\">"; | |
svg_foot = "</g>\n</svg>"; | |
svgeditor = ace.edit("js_div0"); | |
dataeditor = ace.edit("js_div1"); |
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
//Draw lines for each attribute, starting from origin | |
for(datum in RADAR._data.children){ | |
if(RADAR._data.children.hasOwnProperty(datum)){ | |
//Store x,y so we don't have to recalculate everytime | |
x = (Math.cos(index*2*Math.PI/6) * radius) + center[0] | |
y = (Math.sin(index*2*Math.PI/6) * radius) + center[1] | |
cur_value = RADAR._data.children[datum].value; | |
//DO STUFF |
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
a = '<span>Abelmoschus esculentus</span><a href="#" class="search-choice-close" rel="1"></a>'; | |
b = a.replace(/<[\/]?span>/g,''); | |
final_string = b.replace(/<a.*$/g,''); |
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
"------------------------------------------- | |
set nocompatible | |
syntax on | |
"Mouse | |
set mouse=a | |
set selectmode=mouse | |
set et | |
set sw=4 |
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
" ******************************************************************************** | |
" Standard colors used in all ir_black themes: | |
" Note, x:x:x are RGB values | |
" | |
" normal: #f6f3e8 | |
" | |
" string: #A8FF60 168:255:96 | |
" string inner (punc, code, etc): #00A0A0 0:160:160 | |
" number: # | |
" ******************************************************************************** |
OlderNewer