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
/** | |
* @author Waruna Oshan Wisumperuma | |
* @contact warunaoshan@gmail.com | |
* Friday, October 03 2014 16:32:36 | |
* | |
*/ | |
"use strict"; | |
var PaginCollection, ReportModel, paginTotal = 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
var o = {}, a = this.$('#contactForm').serializeArray(); | |
$j.each(a, function() { | |
if (o[this.name] !== undefined) { | |
if (!o[this.name].push) { | |
o[this.name] = [o[this.name]]; | |
} | |
o[this.name].push(this.value || ''); | |
} else { | |
o[this.name] = this.value || ''; | |
} |
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
sortMonths : function(months) { | |
return _.intersection(['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], months); | |
} | |
getUniqPluck : function(arg, useCache) { | |
if (useCache) { | |
return this[arg] = this[arg] || _.uniq(_.pluck(this.List, arg)).sort(); | |
} else { | |
return _.uniq(_.pluck(this.List, arg)); | |
} |
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
alert(([][[]]+[])[!+[]+!![]+!![]+!![]]+([] | |
[[]]+[])[+[]]+(!![]+[])[+[]]+([][[]]+[]) | |
[+[]]+([]+{})[!+[]+!![]]+([][[]]+[])[! | |
+[]+!![]+!![]+!![]+!![]]+(![]+[])[!+[]+!! | |
[]]+([][[]]+[])[!+[]+!![]+!![]]+([][[]]+[]) | |
[!+[]+!![]+!![]]+(!![]+[])[+[]]) |
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
/* Adapted from Tom Cunningham's 'Data Warehousing with MySql' (www.meansandends.com/mysql-data-warehouse) */ | |
###### small-numbers table | |
DROP TABLE IF EXISTS numbers_small; | |
CREATE TABLE numbers_small (number INT); | |
INSERT INTO numbers_small VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); | |
###### main numbers table | |
DROP TABLE IF EXISTS numbers; | |
CREATE TABLE numbers (number BIGINT); |
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 | |
namespace H57\Util; | |
class Serializor { | |
/** | |
* Converts the Doctrine Entity into a JSON Representation | |
* | |
* @param object $object The Object (Typically a Doctrine Entity) to convert to an array |
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
ssh -X login | |
export DISPLAY=:0 | |
xmessage 'hi' | |
xdialog 'hi' | |
libnotify 'hi' | |
notify-send 'hi' |
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
$(document).ready(function() { | |
$("#From").datepicker({ | |
dateFormat: "yy-mm-dd", | |
changeMonth: true, | |
changeYear: true, | |
maxDate: new Date(), | |
onClose: function(selectedDate) { | |
$("#To").datepicker("option", "minDate", selectedDate); | |
} | |
}); |
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 now = new Date(); | |
var day = ("0" + now.getDate()).slice(-2); | |
var month = ("0" + (now.getMonth() + 1)).slice(-2); | |
var today = now.getFullYear()+"-"+(month)+"-"+(day) ; | |
$('#datePicker').val(today); |
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
$.ajax({ | |
type: 'post', | |
url: URL + 'index/updateDetails', | |
data: $('#form_updateUserDetails').serialize(), | |
//data: {'page': page, 'from': $('#From').val(), 'to': $('#To').val()}, | |
success: function(data) { | |
// console.log(data); | |
$('#user_up_error').html(data); | |
setErrorOff(); | |
listup(); |