Skip to content

Instantly share code, notes, and snippets.

View jnericks's full-sized avatar

Jon Erickson jnericks

View GitHub Profile
@jnericks
jnericks / SQLManagementStudioRagnorakGreyColorScheme.reg
Created September 30, 2010 20:49
SQL Management Studio Ragnorak Grey Color Scheme
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server\100\Tools\Shell\FontAndColors\{A27B4E24-A735-4D1D-B8E7-9716E1E3D8E0}]
"Colorable item format version"=dword:00000008
"Plain Text Foreground"=dword:00e0e0e0
"Plain Text Background"=dword:00303030
"Plain Text FontFlags"=dword:00000000
"Selected Text Foreground"=dword:00000000
"Selected Text Background"=dword:00c0c0c0
"Selected Text FontFlags"=dword:00000000
public static class MaybeExtensions
{
public static Maybe<T> ToMaybe<T>(this T input) where T : class
{
return new Maybe<T>(input);
}
public static Maybe<TResult> Get<TInput, TResult>(this Maybe<TInput> maybe, Func<TInput, TResult> func)
where TInput : class
where TResult : class
parameters.addEnvAndSystem("build.start.year", (new SimpleDateFormat("yyyy")).format(buildStartTime));
parameters.addEnvAndSystem("build.start.month", (new SimpleDateFormat("MM")).format(buildStartTime));
parameters.addEnvAndSystem("build.start.day", (new SimpleDateFormat("dd")).format(buildStartTime));
parameters.addEnvAndSystem("build.start.hour", (new SimpleDateFormat("HH")).format(buildStartTime));
parameters.addEnvAndSystem("build.start.minute", (new SimpleDateFormat("mm")).format(buildStartTime));
parameters.addEnvAndSystem("build.start.second", (new SimpleDateFormat("ss")).format(buildStartTime));
public class AddressBook
{
public IEnumerable<Contact> Contacts
{
get { return _contacts; }
}
public AddressBook()
{
_contacts = new List();
var addressBook = new AddressBook();
// add some contacts...
((IList<Contact>)addressBook.Contacts).Add(new Contact("Some", "One"));
public IEnumerable<Contact> Contacts
{
get
{
foreach (var contact in _contacts)
{
yield return contact;
}
}
}
public static IEnumerable<T> ToEnumerable<T>(this IEnumerable<T> list)
{
list = list ?? new List<T>();
foreach (var item in list)
{
yield return item;
}
}
public IEnumerable<Contact> Enumerable
{
get { return _contacts.ToEnumerable(); }
}
$.post(link, { IsOkToDelete: confirmed }, function(data) {
// data
});
$.post(link, { IsOkToDelete: confirmed }, function(data) {
$.get('Home/IndexRelationship/', function(partialView) {
$('#my_div').html(partialView);
});
});