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
// Will grab a fusion table layer for each | |
function getFusionTableLayer(mapLayer, fusiontableID) { | |
var fusionLayer = new google.maps.FusionTablesLayer({ | |
query: { | |
select: '*', | |
from: fusiontableID | |
} | |
}); |
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 | |
error_reporting(-1); | |
header('Access-Control-Allow-Origin: *'); | |
$store = isset($_POST['store']) ? substr($_POST['store'],0,10) : false; | |
$fp = fopen('test.txt', 'r+'); | |
if ($store) { |
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 createLine(linepoints, style, stroke, opacity, zIndex) { | |
var coordArray = []; | |
for (var i in linepoints) { | |
var coord = linepoints[i].split(","); | |
var lat = coord[1]; | |
var lng = coord[0]; | |
var lineCoord = new google.maps.LatLng(lat, lng); | |
coordArray.push(lineCoord); | |
} |
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 | |
$date = date ("l, F jS, Y"); | |
$time = date ("h:i A"); | |
$msg = ""; | |
if ($_SERVER['REQUEST_METHOD'] == "POST") { | |
foreach ($_POST as $key => $value) { | |
$msg .= ucfirst ($key) ." : ". $value . "\n"; | |
} | |
} |
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 | |
$routenum = $_REQUEST['routenum']; | |
$style = $_REQUEST['style']; | |
$tableRoutes = ""; | |
$key = "&key="; | |
$callback = "&callback=jsonp"; | |
$select = "geometry"; | |
$query = "http://www.google.com/fusiontables/api/query?sql=SELECT+{$select}+FROM+{$tableRoutes}+WHERE+route='{$routenum}'{$key}{$callback}"; | |
$getfile = file_get_contents($query); | |
$geometry = substr($getfile, 10, -2); |
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 getAllColors() { | |
for (var s in document.styleSheets) { | |
var stylesheet = document.styleSheets[s]; | |
if (stylesheet.title == 'themecolors') { | |
var rule = stylesheet.cssRules[0] || stylesheet.rules[0]; | |
// if (rule.style.color) { | |
// rule.style.color = "red" |
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
@mixin setColor($property, $varName, $color) { | |
@if $property == 'text' { | |
color: $color; | |
color: var($varName, $color); | |
} | |
@if $property == 'background' { | |
background: $color; | |
background: var($varName, $color); | |
} | |
} |
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 str = "123456789abcdefgh" | |
let keyIndex = Int(arc4random_uniform(50)) | |
let newIndex = str.index(str.startIndex, offsetBy: keyIndex) | |
let keyTwo = str.substring(to: newIndex) | |
let keyOne = str.substring(from: newIndex) | |
str = keyTwo + "0000000" + keyOne | |
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
class WebViewController: UIViewController, UIGestureRecognizerDelegate { | |
@IBOutlet weak var webView: UIWebView! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// WebView: Register tap | |
let panGesture = UITapGestureRecognizer(target: self, action: #selector(doneDragging(_:))) | |
panGesture.delegate = self | |
webView.addGestureRecognizer(panGesture) |