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
This is the todo application. | |
It uses Backbone's sync to talk to my JSON REST API. |
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
This is the login component. | |
It uses the Facebook component as a login provider. | |
It doesn't need a template file because the template is part of the index page. |
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
This is the about page. | |
It uses the Facebook component to pull my public information and populate a table with it. | |
It caches the data so it is only fetched once. |
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
This is the Facebook component of my app. | |
This is the only component that is allowed to talk to the Facebook API directly. |
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
// Amazon Glacier has a 3 to 5 hour access time. | |
// Glacier Archive and Restore Requests are $0.05 per 1,000 requests | |
// Glacier is designed with the expectation that restores are infrequent and unusual, and data will be stored for extended periods of time. | |
// You can restore up to 5% of your average monthly Glacier storage (pro-rated daily) for free each month. | |
// If you choose to restore more than this amount of data in a month, you are charged a restore fee starting at $0.01 per gigabyte. | |
// Amazon charges 0.01 per 1,000 requests (10,000 for GET requests). | |
// Azure charges 0.01 per 100,000 transactions. | |
// To make the Azure and Amazon lines not overlap, I added one one hundredth of a penny to the Amazon prices. |
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 bool ExportWorkbookToPdf(string workbookPath, string outputPath) | |
{ | |
// If either required string is null or empty, stop and bail out | |
if (string.IsNullOrEmpty(workbookPath) || string.IsNullOrEmpty(outputPath)) | |
{ | |
return false; | |
} | |
// Create COM Objects | |
Microsoft.Office.Interop.Excel.Application excelApplication; |
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.IO; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
namespace TopWords { | |
internal class Program { | |
private static void Main(string[] args) { | |
const int maxWords = 298; | |
const int minWordLength = 4; |
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.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.ComponentModel; | |
using System.Runtime.CompilerServices; | |
using System.Data.SqlClient; | |
namespace Greenshades.Online.Data.Settings { |
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
/// <summary> | |
/// Determines whether the string is a palindrome. | |
/// </summary> | |
public static bool IsPalindrome(string value) { | |
int min = 0; | |
int max = value.Length - 1; | |
while (true) { | |
if (min > max) { | |
return true; | |
} |
OlderNewer