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
#!/usr/bin/perl | |
#fetch Gravatars | |
use strict; | |
use warnings; | |
use LWP::Simple; | |
use Digest::MD5 qw(md5_hex); | |
my $size = 90; |
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
//ref: http://jasonwatmore.com/post/2014/03/25/AngularJS-A-better-way-to-implement-a-base-controller.aspx | |
//base.js | |
(function() { | |
var base = angular.module('base', []); | |
base.controller('BaseCtrl', function($scope, $location, $timeout, $route) { | |
var queryStr = $location.search(); | |
if(queryStr.timeout){ | |
var timeoutLengthSec = (queryStr.timeout) * (1000); | |
$timeout(function(){ | |
$route.reload(); |
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://stackoverflow.com/questions/11582512/how-to-get-url-parameters-with-javascript/11582513#11582513 | |
function getURLParameter(name) { | |
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [,""])[1].replace(/\+/g, '%20')) || null; | |
} |
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 * | |
FROM db | |
WHERE DateRequested >= DATEADD(day, DATEDIFF(day, 0, GETDATE()), 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 formatLargeNumbers = function (maxNumberToDisplay, maxPlaces, forcePlaces, forceLetter, forceToolTip) { | |
$(document).ready(function () { | |
applyFormatting(); | |
}); | |
function applyFormatting() { | |
$(".large-number-format").each(function() { | |
var number = $(this).html(); |
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
//FROM: http://stackoverflow.com/questions/8324239/generating-html-from-arbitrarily-complex-json-object-in-javascript | |
jQuery(function($) { | |
display("Loading the JSON data"); | |
$.ajax({ | |
type: "GET", | |
url: "/path/to/the/data", | |
dataType: "JSON", | |
success: function(data) { | |
display("Got the data, rendering it."); |
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
column.For(x => x.UserAchievementMappingGroup == null ? string.Empty : string.Format("<input type=\"button\" data-command=\"displayAchievementAditonalInfoModal\"/><span class=\"hide\">{0}</span>", x.AchievementTransaction.AdditionalInformation) | |
).Sortable(false).Named("Additional Information") | |
.Encode(false).Attributes(@class => "additional-column").HeaderAttributes(@class => "additional-column"); |
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
//from stackoverflow somewhere | |
function jsonToHtmlList(json) { | |
return objToHtmlList(JSON.parse(json)); | |
} | |
function objToHtmlList(obj) { | |
if (obj instanceof Array) { | |
var ol = document.createElement('ol'); | |
for (var child in obj) { |
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
@echo off | |
echo A cleaning script for .NET MSBuild compiled folders - Jason Chalom 2015 | |
echo This will delete all bin and obj folders | |
echo Beware!! | |
echo | |
echo First MSBUILD CLEAN will be activated. | |
echo Will use the location for VS 2013 MS Build Tools 32 bit X86 | |
pause | |
"C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild.exe" /t:clean | |
echo not implemented yet |
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
%Guassian_Elimination with jordan method | |
%This is my code Jason Chalom 711985 | |
%[r, c] = size(A); | |
%A = [2 -1 2 1; 1 1 2 1; 2 1 5 3]; | |
% a has both a matrix and b vector | |
function [output] = Guassian_Elimination_Jordan (a, b) | |
%do gauss first | |
a= horzcat(a,b); | |
[r,c] = size(a); |
OlderNewer