Gearman can be installed on Windows through cygwin.
Install cygwin packages (through setup.exe):
- gcc
- make
- libuuid1-devel
- libiconv
DELETE n1 FROM names n1, names n2 WHERE n1.id > n2.id AND n1.name = n2.name |
<?php | |
$url = 'http://103.251.43.79/echallan/challan/models/frmgrnverificationdefacement.php'; | |
$myvars = 'GRN=KL000001500201415E&USERID=abc'; | |
$ch = curl_init( $url ); | |
curl_setopt( $ch, CURLOPT_POST, 1); | |
curl_setopt( $ch, CURLOPT_POSTFIELDS, $myvars); | |
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1); | |
curl_setopt( $ch, CURLOPT_HEADER, 0); |
<input type="text" id="from" placeholder="Starting date dd-mm-yyyy"> | |
<input type="text" id="to" placeholder="Ending date dd-mm-yyyy"> | |
<button onclick="calculate()">Calculate</button> | |
<script> | |
function calculate(){ | |
var from = document.getElementById('from').value; | |
var to = document.getElementById('to').value; | |
from = from.split('-'); | |
var from_day = parseInt(from[0]); |
adb logcat | grep `adb shell ps | grep com.app.package | cut -c10-15` |
#!/bin/bash | |
# change docRoot | |
docRoot=~/src/shakir/ | |
for semester in */; | |
do | |
semester="${semester%?}" | |
cd "$docRoot/$semester/" | |
for branch in */; |
http://stackoverflow.com/questions/5060652/jquery-selector-for-input-value |
//Return IE version or if not IE return false | |
function isIE () { | |
var myNav = navigator.userAgent.toLowerCase(); | |
return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false; | |
} | |
//Example: | |
if (isIE () == 8) { |
var ref = new Firebase('https://<example>.firebaseio.com/rewards').push(); | |
ref.setWithPriority({ | |
name: 'apple', | |
otherKey: 'somevalue', | |
... | |
}, 'apple', function(err) { | |
if( error ) { console.error(err); } | |
else { | |
fetchValue(); |
// pros: does not fetch entire record set | |
// cons: grabs the last record which needs to be ignored | |
var first = true; | |
var ref = new Firebase(...); | |
ref.endAt().limit(1).on("child_added", function(snap) { | |
if( first ) { | |
first = false; | |
} | |
else { | |
console.log('new record', snap.val()); |