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 log(e, msg) { | |
for (var i in e) { msg += i + "=" + e[i] + "\n"; } | |
(new Image()).src="log.pl?m=" + encodeURIComponent(msg); | |
} | |
function abc() { | |
try { | |
// ... function code | |
} catch(e) { log(e, "abc"); } | |
} |
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 | |
/* | |
|-------------------------------------------------------------------------- | |
| Return a Collection of Objects | |
|-------------------------------------------------------------------------- | |
*/ | |
// collection of all users | |
$sql = "select * from users"; |
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
public function getLocation() { | |
$lat = 37; | |
$lon = -122; | |
$radius = 40; | |
$result = Zipcode::select( | |
DB::raw("*, | |
( 3959 * acos( cos( radians(?) ) * | |
cos( radians( lat ) ) | |
* cos( radians( lng ) - radians(?) | |
) + sin( radians(?) ) * |
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
// takes the form field value and returns true on valid number | |
function valid_credit_card(value) { | |
// accept only digits, dashes or spaces | |
if (/[^0-9-\s]+/.test(value)) return false; | |
// The Luhn Algorithm. It's so pretty. | |
var nCheck = 0, nDigit = 0, bEven = false; | |
value = value.replace(/\D/g, ""); | |
for (var n = value.length - 1; n >= 0; 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
/* | |
Taken and cribbed from blog.datalicious.com/free-download-all-australian-postcodes-geocod | |
May contain errors where latitude and longitude are off. Use at own non-validated risk. | |
*/ | |
SET NAMES utf8; | |
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; | |
DROP TABLE IF EXISTS postcodes_geo; |
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
data = [ | |
{ | |
"Compound_id":133, | |
"Compound_name":"carbofuran", | |
"Protein_id":858, | |
"Protein_name":"CDs 1", | |
"Type":"possible", | |
"RScore":31, | |
"combination_id":"133_858" | |
}, |
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
// Routes.php | |
Route::get('upload', function() | |
{ | |
return View::make('upload-form'); | |
}); | |
Route::post('upload', function() | |
{ | |
// Get and move uploaded file. |
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 pafy | |
url = raw_input ("Enter your URL : ") | |
# Instantiation | |
video = pafy.new (url) | |
#Users Choice | |
print "1 => Download || 2 => Extract" | |
choice = raw_input ( "Input d To Download or ei To Extract Information : ") |
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 | |
// This creates a date string in the format YYYY-WNN, which is | |
// a four digit year followed by a hyphen and letter W then the | |
// two digit week number | |
$strtotime = date("o-\WW"); | |
// The $start timestamp contains the timestamp at 0:00 on the | |
// Monday at the beginning of the week | |
$start = strtotime($strtotime); |
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
1033edge.com | |
11mail.com | |
123.com | |
123box.net | |
123india.com | |
123mail.cl | |
123qwe.co.uk | |
150ml.com | |
15meg4free.com | |
163.com |