This file contains hidden or 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
#include <iostream> | |
#include <fstream> | |
#include <vector> | |
// Write a binary "string" to a file as binary. Used in conjunction with a previous Huffman encoding project. | |
using namespace std; | |
int main(){ |
This file contains hidden or 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
cat Part1.avi Part2.avi > tmp.avi && mencoder -forceidx -oac copy -ovc copy tmp.avi -o output.avi && rm -f tmp.avi | |
//Obviously it requires mencoder, which comes with mplayer |
This file contains hidden or 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
defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}' | |
killall Dock |
This file contains hidden or 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
# Here's the SQL statement that will find the closest 20 locations that are within a radius of 25 miles | |
# to the 37, -122 coordinate. It #calculates the distance based on the latitude/longitude of that row | |
# and the target latitude/longitude, and then asks for only rows #where the distance value is less than | |
# 25, orders the whole query by distance, and limits it to 20 results. To search by kilometers #instead | |
# of miles, replace 3959 with 6371. | |
SELECT id, ( 3959 * acos( cos( radians(37) ) * | |
cos( radians( lat ) ) * | |
cos( radians( lng ) - radians(-122) ) + | |
sin( radians(37) ) * sin( radians( lat ) ) ) ) AS distance |
This file contains hidden or 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
ogr2ogr -f MySQL MySQL:DATABASENAME,host=localhost,user=USER,password=PASSWORD SHAPEFILE.shp -nln TABLENAME -update -overwrite -lco engine=MYISAM |
This file contains hidden or 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
$states = array( | |
'Alabama', | |
'Alaska', | |
'Arizona', | |
'Arkansas', | |
'California', | |
'Colorado', | |
'Connecticut', | |
'Delaware', | |
'District-of-Columbia', |
This file contains hidden or 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 lang="en"> | |
<head> | |
<title>My Contact Card</title> | |
<!-- Include our personal style sheet --> | |
<link rel="stylesheet" type="text/css" href="style.css"> | |
<!-- Include Bootstrap's style sheet --> | |
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> |
This file contains hidden or 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
//Source: | |
//https://code.google.com/p/geo-location-javascript/ | |
var start_stop_btn, wpid = false, | |
map, z, op, prev_lat, prev_long, min_speed = 0, | |
max_speed = 0, | |
min_altitude = 0, | |
max_altitude = 0, | |
distance_travelled = 0, | |
min_accuracy = 150, | |
date_pos_updated = "", |
This file contains hidden or 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 | |
$_POST['action'] = 'select'; | |
// $_POST['First'] = 'Mark'; | |
// $_POST['Last'] = 'Twain'; | |
// $_POST['Thumb'] = ''; | |
// $_POST['Lat'] = '33.12343'; | |
// $_POST['Lon'] = '-98.234563'; | |
// $_POST['Sex'] = 'M'; | |
// $_POST['Phone'] = '9403687777'; |