Skip to content

Instantly share code, notes, and snippets.

View hoganlong's full-sized avatar

Hogan Long hoganlong

View GitHub Profile
SELECT *
FROM tableNm
WHERE circleNm IN ('test1', 'test2', 'test3')
-- is the same as
SELECT *
FROM tableNm
JOIN (
VALUES(
void Main()
{
var myPets = new List<petInfo>();
var yourpets = new List<petInfo>();
myPets.Add(new petInfo("me", "dog","Rex"));
myPets.Add(new petInfo("me", "fish","Goldy"));
myPets.Add(new petInfo("me", "iguana","Spikey"));
yourpets.Add(new petInfo("you", "dog","Spot"));
WITH XX_SQDC_LINES_REF (Line, Name, Site) AS
(
VALUES
(1 , 'Table ',1),
(2 , 'Lamp ',1),
(3 , 'Screen ',2),
(4 , 'Forcep ',2),
(5 , 'Brush ',2),
(6 , 'Camera2',2),
(7 , 'Screen2',2),
using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Data.SqlClient;
using PropertyInfo = System.Reflection.PropertyInfo;
/*
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);
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()
{
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"),
@hoganlong
hoganlong / Creating a local file based upstream remote for Git and GitHub for Windows.md
Last active September 9, 2021 14:08 — forked from toolmantim/setting_up_a_new_remote_git_repository.textile
Creating a local file based upstream remote for Git and GitHub for Windows

#Creating a local file based upstream remote for Git.

#####(This works with GitHub for windows without pushing to the web!)

###Set up the new bare repo on the on your local file system: (a bare repo has not workspace it is used for sharing only. By convention it has .git in the folder name since there is no .git sub-directory in the repositiory)

C:\ORIGIN >git init --bare MyProject.git
Initialized empty Git repository in C:/ORIGIN/MyProject.git/
C:\ORIGIN >cd MyProject.git
@hoganlong
hoganlong / gist:10945491
Last active August 29, 2015 13:59
Store git repository in in A3
+-------+
| |
| |
| |
char * (*arr ) [ 2 ]
| | | |
| | | |
| +-+ |
+---------+