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: Kevin
/* 
 * Including this file will modify the existing jquery.unique method
 * to use the sourceIndex property of an element, if it exists.  If it
 * doesn't exist, this file does nothing.
 *
 * Use this file if your users are using a browser that supports
 * the sourceIndex property because it makes element comparison
 * much faster than the new, refactored, approaches in Sizzle.
 */
(function ($) {
by Kevin   April 25, 2011 @ 1:54pm
Tags:
419 Views
no comments
 
C#
///
///validate args
///
if (args.Length > 3)
{
    string msg = "You can use a maximum of 3 arguements.";
    ShowHelp(msg);
    throw new Exception(msg);
}
else if (args.Length == 3)
by Kevin   December 14, 2010 @ 8:25am
Tags:
71 Views
no comments
 
C#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
 
namespace DictionaryKeyPerf
{
    #region dictionary keys
    internal enum EnumKey
    {
by Kevin   December 07, 2010 @ 2:17pm
Tags:
107 Views
no comments
 
SQL
SELECT r.callDate + r.CallTime 
     ,r.Ticker 
     ,r.CallType 
     COUNT('x') OVER(PARTITION BY r.CallTime) as Cnt 
FROM ccnsource.reports r (NOLOCK) 
WHERE r.callDate = dbo.fnc_datedate(getdate()) 
ORDER BY 4 DESC
by Kevin   December 06, 2010 @ 9:08am
Tags:
113 Views
no comments
 
C#
The following extensions methods can help you in the situation below:
 
        public static TResult IfNotNull<TSource, TResult>(this TSource obj, Func<TSource, TResult> func)
        {
            return IfNotNull(obj, func, default(TResult));
        }
        public static TResult IfNotNull<TSource, TResult>(this TSource obj, Func<TSource, TResult> func, TResult defaultIfNull)
        {
            return obj == null ? defaultIfNull : func(obj);
        }
by Kevin   September 02, 2010 @ 8:01am
Tags:
106 Views
no comments
 
SQL
DECLARE #resendEvents TABLE (NCEId INT PRIMARY KEY IDENTITY)
 
INSERT #resendEvents (NCEId)
SELECT NCEId
FROM ccnsource.newcompleteevents nce (NOLOCK)
WHERE nce.DateTimeStamp BETWEEN '2009-09-10 05:15' AND GetDate()
    AND nce.CompletionStatus & 128 = 128
 
-- MARK FOR RESEND
UPDATE nce
by Kevin   September 11, 2009 @ 8:58am
Tags:
106 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