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 canvas = null; | |
function buttonSocial(div){ | |
if($("#image-"+div).attr("src") == "images/"+div+".png"){ | |
$("#image-"+div).attr("src", "images/"+div+"-ativo.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
from datetime import datetime | |
import json | |
data = { | |
'title': 'Hello World', | |
'created_on': datetime(1986, 5, 16, 0, 0) | |
} | |
def date_handler(obj): |
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> | |
<link href="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css" rel="stylesheet" type="text/css" /> | |
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> | |
<script src="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> |
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 pushNotification; | |
document.addEventListener("deviceready", onDeviceReady, false); | |
// device APIs are available | |
function onDeviceReady() { | |
initPushwoosh(); | |
} |
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 math | |
def distance(origin, destination): | |
lat1, lon1 = origin | |
lat2, lon2 = destination | |
radius = 6371 # km | |
dlat = math.radians(lat2-lat1) | |
dlon = math.radians(lon2-lon1) |
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 | |
function saveImage($base64img){ | |
if($base64img == ""){ | |
return "0"; | |
}else{ | |
define('UPLOAD_DIR', 'upload/'); | |
$base64img = str_replace('data:image/jpeg;base64,', '', $base64img); | |
$data = base64_decode($base64img); |
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 fileTransfer = new FileTransfer(); | |
var uri = encodeURI("http://some.server.com/download.php"); | |
fileTransfer.download( | |
uri, | |
fileURL, | |
function(entry) { | |
console.log("download complete: " + entry.toURL()); | |
}, | |
function(error) { |
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> | |
<title></title> | |
<script type="text/javascript" charset="utf-8" src="cordova.js"></script> | |
<script type="text/javascript"> | |
document.addEventListener("deviceready", init, 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<script type="text/javascript" charset="utf-8" src="cordova.js"></script> | |
<script type="text/javascript"> | |
document.addEventListener("deviceready", init, 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<script type="text/javascript" charset="utf-8" src="cordova.js"></script> | |
<script type="text/javascript"> | |
document.addEventListener("deviceready", init, false); |
OlderNewer