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
IAB1 | Arts & Entertainment | |
---|---|---|
IAB1-1 | Books & Literature | |
IAB1-2 | Celebrity Fan/Gossip | |
IAB1-3 | Fine Art | |
IAB1-4 | Humor | |
IAB1-5 | Movies | |
IAB1-6 | Music | |
IAB1-7 | Television | |
IAB2 | Automotive | |
IAB2-1 | Auto Parts |
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 getDistance($latitude1, $longitude1, $latitude2, $longitude2) { | |
$earth_radius = 6371000; | |
$dLat = deg2rad($latitude2 - $latitude1); | |
$dLon = deg2rad($longitude2 - $longitude1); | |
$a = sin($dLat/2) * sin($dLat/2) + cos(deg2rad($latitude1)) * cos(deg2rad($latitude2)) * sin($dLon/2) * sin($dLon/2); | |
$c = 2 * asin(sqrt($a)); | |
$d = $earth_radius * $c; |
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
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
var videoDuration; | |
var firstQuartileFlag = true; | |
var mutedFlag = false; | |
var videoad; | |
var updateProgressBar = function() { | |
progress = (100.0 * parseFloat(videoad.prop("played").end(0)) / videoDuration).toFixed(2); | |
if (firstQuartileFlag && progress >= 25.0 && progress < 50.0) { |
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> | |
</head> | |
<body> | |
<!-- <form action="evalcode.php" id="usrform" method="post">--> | |
Code 1: <textarea id="code1" name="code1" rows="10" cols="70"></textarea> Code2: <textarea id="code2" name="code2" rows="10" cols="70"></textarea></br> | |
No of Iterations: <input type="text" name="itr" id="itr"> </br></br> | |
<div align="center"> | |
<input type="submit" align="center" onclick="callAjax()"> |
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 vertex | |
{ | |
public $key = null; | |
public $visited = 0; | |
public $distance = 1000000; // infinite | |
public $parent = null; | |
public $path = null; | |
public function __construct($key) | |
{ |
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 CacheAPC { | |
var $iTtl = 600; // Time To Live | |
var $bEnabled = false; // APC enabled? | |
// constructor | |
function CacheAPC() { | |
$this->bEnabled = extension_loaded('apc'); | |
} |
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>GoogleMap</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=4.0, user-scalable=yes"/> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<link rel="stylesheet" href="//code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css" /> | |
<style> | |
.gm-style-iw{ | |
top: 10px !important; |
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>GoogleMap</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=4.0, user-scalable=yes"/> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<link rel="stylesheet" href="//code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css" /> | |
<style> | |
#map-page, #map-canvas { width: 100%; height: 100%; padding: 0; } |
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 detectmob() { | |
if( navigator.userAgent.match(/Android/i) | |
|| navigator.userAgent.match(/webOS/i) | |
|| navigator.userAgent.match(/iPhone/i) | |
|| navigator.userAgent.match(/iPad/i) | |
|| navigator.userAgent.match(/iPod/i) | |
|| navigator.userAgent.match(/BlackBerry/i) | |
|| navigator.userAgent.match(/Windows Phone/i) | |
){ | |
return true; |
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
# This is a skeleton for testing models including examples of validations, callbacks, | |
# scopes, instance & class methods, associations, and more. | |
# Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
# | |
# I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
# so if you have any, please share! | |
# | |
# @kyletcarlson | |
# | |
# This skeleton also assumes you're using the following gems: |
OlderNewer