Skip to content

Instantly share code, notes, and snippets.

Console.WriteLine("Enter the first day of the week (day, month, year) eg(24, 02, 2013)");
string userInput = Console.ReadLine();
if (dateArray[0] < 1 && dateArray[0] > 31 || dateArray[1] < 1 && dateArray[1] > 12 || dateArray[2] < 1000 && dateArray[2] > 2013)
{
Console.WriteLine("Incorrect form for a date. Please try again.");
InputHours();
}
string[] splitDate = userInput.Split(',');
for (int i = 0; i < splitDate.Length; i++)
@DapperFox
DapperFox / Lab1.Driver
Created July 19, 2013 04:44
C# - TimeSheet Application
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
//http://collabedit.com/pg9sd
namespace Lab1
{
class Driver
{
@DapperFox
DapperFox / class tutorial
Created July 31, 2013 21:43
class tutorial
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Untitled</title>
<link rel="stylesheet" href="css/style.css">
<link rel="author" href="humans.txt">
</head>
foreach (var s in data.AllPeople.Where(person => person.ZipCode.ToString().Contains("3")))
{
Console.WriteLine(s.ToString());
}
Console.ReadLine();
@DapperFox
DapperFox / Lab3 Finished
Created August 14, 2013 00:18
Final with comments
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Lab3
{
class Program
{
@DapperFox
DapperFox / gist:6511029
Created September 10, 2013 15:24
updateDatabaseView method for Inventory Project
private void updateDatabaseView(InventoryCategory selectedCategory)
{
String typeString = "InventoryProject." + selectedCategory.ToString();
Type selectedType = Type.GetType(typeString);
if (selectedType != null)
{
List<IInventoryItem> selectedItems = new List<IInventoryItem>();
@DapperFox
DapperFox / helasimple_login.as
Created February 5, 2014 21:10
Read for workout and lifting
// Reads workout from readWorkout.php
public function readWorkouts(kind:int)
{
var workoutLoader:urlLoader = new URLLoader;
var workoutVariables:URLVariables = new URLVariables;
var workoutURL:urlRequest = new urlRequest(path + "readWorkout.php");
workoutVariables.uid = userId;
workoutVariables.kind = kind;
workoutURL.data = workoutVariables;
@DapperFox
DapperFox / config file
Created March 24, 2014 19:55
config file
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
</sectionGroup>
</configSections>
@DapperFox
DapperFox / other config
Created March 24, 2014 19:56
other config
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=301880
-->
<configuration>
<connectionStrings>
<!--todo: change connectionString to correct database-->
<add name="MembershipConnectionString" connectionString="Data Source=50.56.188.176;Initial Catalog=Membership;Persist Security Info=True;User ID=sa;Password=lQ1%\ZUH;" providerName="System.Data.SqlClient"/>
@DapperFox
DapperFox / ThreadTest.java
Created May 20, 2014 22:42
Thread LejosTest
package learnlejos;
import lejos.nxt.*;
/**
* Created by blakebishop on 5/6/14.
*/
public class ThreadTest {
public static void main(String[] args) {
// TouchListener touchListener = new TouchListener();