CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets for: Jon Erickson
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
by Jon Erickson   June 30, 2010 @ 11:09am
565 Views
no comments
 
XML
<CustomPatterns>
  <Pattern Severity="SUGGESTION">
    <Comment>Use method Any()</Comment>
    <ReplacePattern>$seq$.Any()</ReplacePattern>
    <SearchPattern><![CDATA[$seq$.Count() > 0]]></SearchPattern>
    <Params />
    <Placeholders>
      <ExpressionPlaceholder Name="seq" ExpressionType="System.Collections.IEnumerable" ExactType="False" />
    </Placeholders>
  </Pattern>
by Jon Erickson   April 07, 2010 @ 8:51am
570 Views
no comments
 
C#
public static class CollectionExtensions
{
    public static SelectList ToSelectList<T>(this IEnumerable<T> list,
                                             Func<T, string> value,
                                             Func<T, string> text)
    {
        return new SelectList(list.Select(x => new { Value = value(x), Text = text(x) }), "Value", "Text");
    }
 
    public static SelectList ToSelectList<T>(this IEnumerable<T> list,
by Jon Erickson   February 25, 2010 @ 12:12pm
Tags:
244 Views
no comments
 
// ==UserScript==
// @name           StackOverflow - Auto Upvote
// @namespace      StackOverflow
// @include        http://stackoverflow.com/questions/*
// @include        http://meta.stackoverflow.com/questions/*
// @include        http://serverfault.com/questions/*
// @include        http://superuser.com/questions/*
// ==/UserScript==
 
(function() {
by Jon Erickson   November 25, 2009 @ 2:19pm
265 Views
1 comments
 
C#
using System;
using System.Web.Mvc;
using Castle.Components.Validator;
using EZTrac.DependencyResolution;
using EZTrac.ViewModels;
using xVal.ServerSide;
 
namespace EZTrac.Controllers.Attributes
{
    [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
by Jon Erickson   November 15, 2009 @ 8:29pm
Tags:
192 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate