Skip to content

Instantly share code, notes, and snippets.

View hoganlong's full-sized avatar

Hogan Long hoganlong

View GitHub Profile
@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
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);
using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Data.SqlClient;
using PropertyInfo = System.Reflection.PropertyInfo;
/*
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),
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"));
SELECT *
FROM tableNm
WHERE circleNm IN ('test1', 'test2', 'test3')
-- is the same as
SELECT *
FROM tableNm
JOIN (
VALUES(
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>Freed From The Real podcast</title>
<description>A podcast for and about Magic Online</description>
<link>http://puremtgo.com/articles/recent?uid=&amp;title=freed+from+the+real</link>
<ttl>1800</ttl>
<item>
<title>Freed from the Real 414: Command Lowers Your Life Expectancy</title>
with mat1 as
(
SELECT DISTINCT
matl1.SubPartNo,
STUFF((
SELECT ', ' + matl2.PartNo
FROM Materials as matl2
WHERE matl2.SubPartNo = matl1.SubPartNo
FOR XML PATH('')
),1,1,'') as WhereUsed