Skip to content

Instantly share code, notes, and snippets.

View hoganlong's full-sized avatar

Hogan Long hoganlong

View GitHub Profile
@hoganlong
hoganlong / gist:10945491
Last active August 29, 2015 13:59
Store git repository in in A3
void Main()
{
List<CalendarEvent> events = new List<CalendarEvent>()
{
new CalendarEvent("1", new DateTime(2014,1,1,1,1,1),new DateTime(2015,1,1,1,1,1),"one")
{
EventTeamMembers = new List<TeamMember>()
{
new TeamMember("sam spade","sam","sam"),
new TeamMember("hogan long","hogan","long"),
public static IEnumerable<T1> FindSubsequence<T1, T2>(
this IList<T1> first,
IList<T2> second,
Func<T1, T2, bool> matchPredicate)
{
T2 firstofsecond = second.FirstOrDefault();
var locations =
first.Select((ele,index) => new { ele = ele, index = index})
.Where(item => matchPredicate(item.ele,firstofsecond))
.Select(item => item.index);
void Main()
{
DemonstrateDataView();
}
private static void DemonstrateDataView()
{
// Create a DataTable with three columns.
DataTable table = new DataTable("NewTable");
Console.WriteLine("Original table name: " + table.TableName);
/*
* filterJSON v.9.1 - http://www.jeffrey-way.com
* Last Updated: January 29, 2009
* When you attach a JSON file, it will parse it with getJSON, and then allow you to filter through and display the items on the page according to
* a specified limit, delay, transition, etc.
* Developed by Jeffrey Way
* http://jeffrey-way.com/filterjson-a-jquery-plugin/
* jeffrey@effrey-way.com
var utilities = function() {
var util = this;
util.log = function(msg){
alert(msg);
};
var p = document.createElement('p');
p.innerHTML = '<input type="checkbox" onclick="util.log(\'hey\')" value="1">Check me'; // this part is a legacy code and I have no control over to rewrite it as HTMLObjectElement way
};
@hoganlong
hoganlong / md5.js
Created February 8, 2010 17:22
MD5 via JavaScript
/**
*
* MD5 (Message-Digest Algorithm)
* http://www.webtoolkit.info/
*
**/
var MD5 = function (string) {
function RotateLeft(lValue, iShiftBits) {
using System;
using System.Text;
namespace testalot
{
public class testa
{
override public string ToString()
{
return ("testa tostring()");
@hoganlong
hoganlong / gist:1683075
Last active September 29, 2015 23:07
Links to git based blog engines (and others of direct interest)
Blog post on jekyll and gh-pages functionality
http://haacked.com/archive/2013/12/02/dr-jekyll-and-mr-haack/
Balrog
Node based static site generator
https://github.com/jlord/balrog
Example >> https://github.com/jlord/jlord.github.io
GitPress (Python / Node backend)
https://github.com/joeyespo/gitpress
CREATE TABLE TTable
(
ProjectId INT,
MonthYear DATETIME,
Month VARCHAR(5),
Year INT,
Generation FLOAT,
Expected FLOAT,
CarryOver FLOAT
)