Format:
Recent snippets for: Andy Sherwood
PROCEDURE GET_TAXLOTS(
pResultSet OUT SYS_REFCURSOR
)
IS
BEGIN
OPEN pResultSet FOR
SELECT LOCATION_INT,
TOWNSHIP AS TAXLOT
FROM PACS.ORG_PHYSICAL_LOC
WHERE TOWNSHIP IS NOT NULL;
37 Views
no comments
from dateutil.relativedelta import *
class CalcDates:
def __init__(self, now):
self.start = now - relativedelta(days=15)
self.start = self.start.replace(day=1)
self.end = now + relativedelta(days=15);
112 Views
no comments
protected void Map(Expression<Func<T, object>> property, Func<PropertyDescriptor, string> columnNamer) { MemberInfo memberInfo; if (property.Body is MemberExpression) memberInfo = ((MemberExpression)property.Body).Member; else memberInfo = ((MemberExpression)((UnaryExpression)property.Body).Operand).Member; Map(memberInfo.Name, columnNamer);
184 Views
no comments
using System; using System.Data; using System.Data.OracleClient; using System.ServiceModel.Activation; using CommonServiceLocator.NinjectAdapter; using CWS.Rounds.TabwareDAL; using CWS.Rounds.WorkOrderChecker.Core; using CWS.Utility.ServiceHelp; using log4net; using Microsoft.Practices.ServiceLocation;
194 Views
no comments
function hgstat { gci -r -fi .hg |% { $repo = $_.FullName.Substring(0,$_.FullName.Length-3); Write-Host("[" + $repo + "]") -nonewline -foregroundcolor White $result = hg out -R $repo --template '*' 2> $null
107 Views
no comments
using System.IO; using System.Text; using Ninject; using NUnit.Framework; using Should.Extensions.AssertExtensions; namespace ninject.configurer.tests { public class GreeterConfig {
173 Views
no comments
using System; using System.Collections.Specialized; using System.Configuration; using Ninject.Modules; namespace Cirrostrata.NinjectConfigurator { public interface IConfigurableNinjectModule : INinjectModule { IConfigurationSyntax Configure<T>();
255 Views
no comments
class PrototypeTest { static void Main() { dynamic pastry1 = new Prototype(); pastry1.PastryType = "cake"; pastry1.Cake = new Func<string>(() => "awesome"); Console.WriteLine("Pastry 1's {0} is {1}.", pastry1.PastryType, pastry1.Cake());
190 Views
no comments
mock.Setup(
x => x.StartWorkOrder(It.IsAny<WorkOrderRequest>())
.Verifiable();
// .. do something with mock ..
mock.Verify();
331 Views
no comments
Implement a dump method that returns all the integers as an array Add number to list, even add to end, odd add to start. If zero, clear the list If negative, swap ends; even add to start, even add to end. Accept list of integers to add to list Accept a range of integers to add to the list, i.e. 5-12
149 Views
no comments
- Raven support the notion of batch operations, allowing you to perform several - operations in one remote call to the database. All the operations executing in a - single batch are running under the same transaction, if any of the operations - fail, the entire batch fail, and all the operations that were previously executed - will be rolled back completely. + Raven supports the notion of batch operations, allowing you to perform several + operations in one remote call to the database. All of the operations executing in + a single batch run under the same transaction. If any of the operations fail, the + entire batch fails and all of the operations that were previously executed will be + rolled back completely.
203 Views
no comments
Map
---
from doc in docs
select new { Name=doc._name, Tags=doc._tags, Revision=doc._revision, Template=doc._template, PageSrc=doc._pageSrc, TemplateSrc=doc._templateSrc };
Reduce
------
from result in results
265 Views
no comments
UserControl @Cirrostrata.UnXaml.Test.SearchView
$TextBlock.label
Foreground=Black
FontSize=20
FontFamily="Segoe UI"
Margin="0 4 12 0"
StackPanel
Grid [Auto,*] [Auto,Auto,Auto]
190 Views
no comments
<UserControl x:Class="Cirrostrata.UnXaml.Test.SearchView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <UserControl.Resources> <Style TargetType="TextBlock" x:Key="label"> <Setter Property="Foreground" Value="Black" /> <Setter Property="FontSize" Value="20" /> <Setter Property="FontFamily" Value="Segoe UI" /> <Setter Property="Margin" Value="0 4 12 0" />
183 Views
no comments
using System; using System.ComponentModel.Composition; using System.ComponentModel.Composition.Hosting; using System.Reflection; namespace HelloMEF { public interface IGreetings { void Hello();
233 Views
no comments
public class JsonHelper { public static string Serialize<T>(T obj) { var serializer = new DataContractJsonSerializer(obj.GetType()); using (var ms = new MemoryStream()) { serializer.WriteObject(ms, obj); return Encoding.Default.GetString(ms.ToArray()); }
157 Views
no comments
1 lb ground beef 1 small onion, diced (~1 cup) 1 large carrot, julienned (~1 cup) 3 stalks of celery, chopped (~1 cup) 2 cloves garlic, minced 1 14.5oz cans diced tomatoes 1 15oz can red kidney beans (with liquid) 1 15oz can white beans (with liquid) 1 15oz can tomato sauce 1 12oz can V8 juice
246 Views
no comments
public class OrderProcessor : IOrderProcessor { public OrderProcessor(IOrderValidator orderValidator, IOrderShipper orderShipper) { _orderValidator = orderValidator; _orderShipper = orderShipper; } public void Process(Order order) {
165 Views
no comments
using System.Collections.Generic; using System.Linq; using Caliburn.PresentationFramework.ApplicationModel; using CWS.Application.Rounds.Model; using Db4objects.Db4o; namespace CWS.Application.Rounds.Presenters { public class SectionPresenter : Presenter, ISectionPresenter {
229 Views
no comments
syntax: glob Obj obj Bin bin *.user *.suo *.Cache *.cache *.bak
1054 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
