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
mysqlimport --ignore-lines=1 --lines-terminated-by='\r\n' --fields-optionally-enclosed-by='\"' --fields-terminated-by=, --local -u root -paspire@123 aspire_development ".$fileCsv |
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 parseDate = function(s) { | |
var re = /^(\d\d)-(\d\d)-(\d{4}) (\d\d):(\d\d):(\d\d)$/; | |
var m = re.exec(s); | |
return m ? new Date(m[3], m[2]-1, m[1], m[4], m[5], m[6]) : null; | |
}; | |
window.ParsleyValidator | |
.addValidator('checkEndDate', function (value, requirement) { | |
var endDate = new Date(parseDate(value).toString()); | |
var startDate = new Date(parseDate($(requirement).val()).toString()); | |
return Date.parse(startDate) <= Date.parse(endDate); |
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 stateCity = [ | |
{'stateName':'Andaman and Nicobar Islands','cityName':[ | |
{'city':'Port Blair'} | |
]}, | |
{'stateName':'Andhra Pradesh','cityName':[ | |
{'city':'Visakhapatnam'}, | |
{'city':'Vijayawada'}, | |
{'city':'Guntur'}, | |
{'city':'Nellore'}, | |
{'city':'Kurnool'}, |
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
#add 'node_modules' to .gitignore file | |
git rm -r --cached node_modules | |
git commit -m 'Remove the now ignored directory node_modules' | |
git push origin master |
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 state = [ | |
"Andaman and Nicobar Islands", | |
"Andhra Pradesh", | |
"Arunachal Pradesh", | |
"Assam", | |
"Bihar", | |
"Chandigarh", | |
"Chhattisgarh", | |
"Dadra and Nagar Haveli", | |
"Delhi", |
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 | |
// DEFINE our cipher | |
define('AES_256_CBC', 'aes-256-cbc'); | |
// Generate a 256-bit encryption key | |
// This should be stored somewhere instead of recreating it each time | |
$encryption_key = openssl_random_pseudo_bytes(32); | |
// Generate an initialization vector | |
// This *MUST* be available for decryption as well |
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
// credit: Louis Lazaris | |
document.onreadystatechange = function () { | |
switch (document.readyState) { | |
case 'loading': | |
console.log('loading...'); | |
break; | |
case 'interactive': | |
console.log('DOM is ready...'); | |
break; | |
case 'complete': |
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
$FirstDay = date("Y-m-d", strtotime('today'));// today's date | |
$LastDay = date("Y-m-d", strtotime($FirstDay.' +6 day'));// +6 days date | |
echo $date = date("Y-m-d",strtotime('monday this week')).' To '.date("Y-m-d",strtotime("sunday this week")); | |
$FirstDay = date("Y-m-d", strtotime('monday this week'));// this monday's date | |
$LastDay = date("Y-m-d", strtotime('sunday this week'));// this sundays's date |
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
window.onerror = function(message) { | |
top.location.href = 'http://stackoverflow.com/search?q=' + | |
encodeURIComponent(message + ' [js]'); | |
}; |
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 checkTime() { | |
start = $("#startDate").val(); | |
end = $("#endDate").val(); | |
if((Date.parse(start) > Date.parse(end))) { | |
$("#startDate").focus(); | |
alert('Incorrect Start time and End time'); | |
return false; | |
}else{ | |
return true; |