View gist:4651300
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static int CountBirds(string baseBirds = "*", string baseBirder = "*", string baseRegion = "*", string baseDate = "*") | |
{ | |
SqlCommand selectCommand; | |
string sql = "SELECT SUM(BirdCount.Counted) FROM Bird INNER JOIN BirdCount ON Bird.BirdID = BirdCount.BirdID " + | |
"INNER JOIN Birder ON BirdCount.BirderID = Birder.BirderID INNER JOIN Region ON BirdCount.RegionID = Region.RegionID " + | |
"where BirdCount.BirdID ='" + baseBirds + "' AND BirdCount.BirderID = '" + baseBirder + "' AND BirdCount.RegionID = '" + baseRegion + "' AND BirdCount.CountDate = '" + baseDate + "'"; | |
if (baseBirds == "*") | |
{ | |
sql.Replace("BirdCount.BirdID ='" + baseBirds + "' AND", String.Empty); |
View gist:4109166
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public int CompareTo(object obj) | |
{ | |
if (obj is Book) | |
{ | |
Book otherBook = (Book)obj; | |
if (this.Title != otherBook.Title) | |
{ | |
return this.Title.CompareTo(otherBook.Title); | |
} | |
} |
View gist:4054148
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void searchButton_Click(object sender, EventArgs e) | |
{ | |
try | |
{ | |
DataSet dataSet = new DataSet(); | |
dataSet = BusinessEntities.PermitData.GetApplications(firstNameTextBox.Text, lastNameTextBox.Text); | |
searchJobsByNameDataGridView.DataSource = dataSet.Tables[0]; | |
} | |
catch (Exception ex) | |
{ |
View gist:3864450
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CLASS | |
namespace DiceGame | |
{ | |
class TwoDice | |
{ | |
private static string filepath = @"C:\Users\Talia\Desktop\PROG 120\DiceGame\dice\"; | |
private int value; | |
private Image image1; | |
private Image image2; |
View gist:3862706
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void Roll() | |
{ | |
Random r = new Random(); | |
Random r2 = new Random(); | |
int roll = r.Next(1, 7); | |
int roll2 = r2.Next(1, 7); | |
} | |
//label1.Text = roll.ToString(); |
View gist:2922267
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Nicole Buck | |
//Prog 109 Project 3 | |
var bet = 0; | |
var credits = 100; | |
var count = 0; | |
var slotImages = new Array("lemon.png", "plum.png", "bell.png", "diamond.png", "clover.jpg"); |
View gist:2922001
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Windows.Forms; | |
using System.IO; |
View gist:2915803
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void SavingFile() | |
{ | |
StreamWriter writer = new StreamWriter("books.txt"); | |
foreach (Book book in books) | |
{ | |
writer.WriteLine(book.ToString()); | |
} | |
} |
View gist:2915784
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void SavingFile() | |
{ | |
StreamWriter writer = new StreamWriter("books.txt"); | |
foreach (Book book in books) | |
{ | |
writer.WriteLine(book.ToString()); | |
} | |
} |
View gist:2914021
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void removeButton_Click(object sender, EventArgs e) | |
{ | |
if (removeIsbnRadioButton.Checked) | |
{ | |
foreach (Book book in books) | |
{ | |
if (book.Isbn.Normalize().Equals(searchBookTextBox.Text.Normalize())) | |
{ | |
books.Remove(book); | |
break; |
NewerOlder