Skip to content

Instantly share code, notes, and snippets.

@michaelnull
michaelnull / Linqexamples.cshtml
Created August 5, 2015 02:57
Homework week 6 day 2
var query = from person in db.Peoples
orderby person.LastName , person.FirstName
select new { FullName = person.LastName + ", " + person.FirstName };
var viewlist = query.ToList();
// new line
var query = from person in db.Peoples
where person.LastName.StartsWith("S")
where person.State.StartsWith("A")
select person;
CREATE TABLE cities
(
place_name varchar(20),
a2013_Estimate int,
a2010_Census int,
Change float(8)
);
insert into cities
(place_name, a2013_Estimate, a2010_Census, Change)
values ('Houston' , 2195914, 2100263, 4.55);
@michaelnull
michaelnull / bobtest
Last active August 29, 2015 14:24
Bob Test
using System.Linq;
namespace Week3Day1Homework
{
internal class Bob
{
public string hey(string input)
{
if (isYelling(input))
{
@michaelnull
michaelnull / Mkgarage
Last active August 29, 2015 14:24
Mike's garage take two
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace Mike_s_garage_take_two
{
class Program
@michaelnull
michaelnull / Mike's Garage
Created July 12, 2015 18:12
MK garage take two
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Mike_s_garage_take_two
{
class Program
{
@michaelnull
michaelnull / gist:7795c5805ad78d1af80c
Last active January 18, 2017 15:40
blackjack game
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace Blackjack
{
@michaelnull
michaelnull / shop
Last active August 29, 2015 14:24
automotive shop
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace ConsoleApplication21
{
class Program
@michaelnull
michaelnull / secretsanta
Last active August 29, 2015 14:24
Secret santa list
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace ConsoleApplication26
{
class Program
@michaelnull
michaelnull / w2 day 1 homework
Created July 7, 2015 21:07
Robot, panda and human
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication20
{
class Program
{
@michaelnull
michaelnull / day 4 gist
Last active August 29, 2015 14:24
parser for planet express
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication15
{
class Program
{