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 goToByScroll= function(id){ | |
$('html,body').animate({scrollTop: $("#"+id).offset().top},'slow'); | |
return false; | |
} |
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
$('#searchbox input').bind('keydown', function(e) { | |
var code = (e.keyCode ? e.keyCode : e.which); | |
if(e.shiftKey){ | |
$('.dialpad').append('<span class="dial">Shift</span>\n'); | |
event.preventDefault(); | |
}else if(e.altKey){ | |
$('.dialpad').append('<span class="dial">Alt</span>\n'); | |
event.preventDefault(); | |
}else if(e.ctrlKey){ |
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($){ | |
// bgImgPos hack | |
if(!document.defaultView || !document.defaultView.getComputedStyle){ // IE6-IE8 | |
var oldCurCSS = $.curCSS; | |
$.curCSS = function(elem, name, force){ | |
if(name === 'background-position'){ | |
name = 'backgroundPosition'; | |
} | |
if(name !== 'backgroundPosition' || !elem.currentStyle || elem.currentStyle[ name ]){ | |
return oldCurCSS.apply(this, arguments); |
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($){ | |
// Progressbar plugins | |
$.fn.progBar=function(p){ | |
var Show = (p.labelShow==undefined) ? 'false' : p.labelShow; | |
var type = (p.type==undefined) ? '' : p.type; | |
var interval = (p.interval==undefined) ? 1500 : p.interval; | |
$(this).addClass('progressbar-value progress-header'); | |
$(this).animate({'width' : p.progress + '%'}, interval); | |
if(Show == true) | |
$(this).prev('label').html(p.progress + type); |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 uploadFile() | |
{ | |
$qfilesCount = count($_FILES['quesFiles']['name']); | |
$afilesCount = count($_FILES['ansFiles']['name']); | |
$quesImg = array(); | |
$ansImg = array(); | |
for($i = 0; $i < $qfilesCount; $i++) | |
{ | |
if(!empty($_FILES['quesFiles']['name'][$i])) |
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
$scope.selectedInterval = 30; | |
$scope.updateTimeInterval = function() | |
{ | |
var startTime = 8; | |
var endTime = 13; | |
var tt = startTime*60; // start at 8am | |
var ap = ['AM', 'PM']; | |
//loop to increment the time and push results in 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
<select | |
class="form-control" | |
ng-options="sub.employee_id as [sub.employee_name_first,sub.employee_name_last].join(' ') for sub in selectedSubject.teacher" | |
ng-model="selectedTeacher"> | |
</select> |
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
$http({ | |
method: 'POST', | |
url: 'ws/ws_assignment_post.php', | |
data: $.param(reqdata), | |
headers: {'Content-Type': 'application/x-www-form-urlencoded'} | |
}).then(function (response) { | |
var data = response.data; | |
if (data.status === 0) { | |
window.location.href = "/assignments.php"; | |
} |
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
SELECT id, ( 3959 * acos( cos( radians(37) ) * cos( radians( lat ) ) | |
* cos( radians( lng ) - radians(-122) ) + sin( radians(37) ) * sin(radians(lat)) ) ) AS distance | |
FROM markers | |
HAVING distance < 25 | |
ORDER BY distance | |
LIMIT 0 , 20; |
OlderNewer