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 int
SQL
USE [msdb]
GO
 
/****** Object:  Job [iERP85_ExpandGLPeriods]    Script Date: 02/01/2012 10:45:58 ******/
BEGIN TRANSACTION
DECLARE @ReturnCode INT
SELECT @ReturnCode = 0
/****** Object:  JobCategory [[Uncategorized (Local)]]]    Script Date: 02/01/2012 10:45:58 ******/
IF NOT EXISTS (SELECT name FROM msdb.dbo.syscategories WHERE name=N'[Uncategorized (Local)]' AND category_class=1)
BEGIN
by Brent Pabst   February 01, 2012 @ 7:50am
16 Views
no comments
 
C#
SPListItem item = properties.ListItem;
 
SPFieldUser userField = (SPFieldUser)item.Fields.GetField("Customer");
SPFieldUserValue fieldValue = (SPFieldUserValue)userField.GetFieldValue(item[userField.ID].ToString());
string customerEmail = fieldValue.User.Email;
by jaredmroberts   December 15, 2011 @ 1:35pm
54 Views
no comments
 
new AsyncNetTask(myContext, myHandler) {
 
    // 작업중에 필요한 변수가 있다면 finalize 하거나 이 객체의 생성자 인자로 넘길 수 있을 것입니다.
    // 유지해야 하는 변수라면 멤버 변수 등을 사용할 수도 있을 것입니다.
    Mydata mData;
 
    @Override
    protected TcpEnvelope onPreExecute() {
        return makeEnvelope();
    }
by arngard   November 17, 2011 @ 8:26pm
31 Views
no comments
 
SQL
 
alter table Table1
add constraint FK_Table1_Table2 FOREIGN KEY ( Fk_Table1Column ) references Table2(PK_Table2Column)
by Egli   September 29, 2011 @ 5:48am
50 Views
no comments
 
/*
@ Navigator Detect Function (JavaScript)
@author Luca Provenzano (mailto: hiimluca@gmail.com)
*/
 
function NavDetect(Navegador){
        var Navegador = navigator.appName;
        switch(Navegador){
            case 'Netscape':
            alert('Usted está utilizando Mozilla Firefox o Chrome');
76 Views
no comments
 
C#
Sol Reqs:
.NET 3.5
x64
Add Ref: Microsoft.SharePoint assembly 
 
// Applying a template to a new site
Site Actions –> New Site. You'll find your Site Template in the list of Installed Items, in the All Categories or Blank & Custom filters.
 
//  how to upgrade the content database - after applying SP1
C:\Program Files\Common Files\Microsoft Shared\Web ServerExtensions\14\bin\psconfig.exe –cmd upgrade
by Jose David Parra   August 11, 2011 @ 7:48pm
193 Views
no comments
 
Get-Process | Where-Object {$_.ProcessName -like "w*"}
 
Table 1-4. Commonly Used Windows PowerShell Comparison Operators
 
Operator    Purpose
-lt    Less than
-le    Less than or equal to
-gt    Greater than
-ge    Greater than or equal to
-eq    Equal to
by Jose David Parra   August 10, 2011 @ 3:42pm
79 Views
no comments
 
C++
// Copyright Krzysztof Czainski 2011
// Distributed under the Boost Software License, Version 1.0.
//    (See accompanying file LICENSE_1_0.txt or copy at
//          http://www.boost.org/LICENSE_1_0.txt)
 
/**
 * @file cz/boost/utility/safe_bool.hpp
 * Introduction by Vladimir Batov:
 * An implicit conversion to bool (operator bool() const) is very much
 * idiomatic and is often deployed in constructs like "if (foo)" and "if (!foo)"
160 Views
no comments
 
C#
namespace SharePointUpload {
    class Program {
        static void Main(string[] args) {
            ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback((a, b, c, d) => { return true; });
            WEB_REFERENCE_NAME.Imaging img = new WEB_REFERENCE_NAME.Imaging();
            img.UseDefaultCredentials = true;
            img.Url = "SHAREPOINT_SITE/_vti_bin/imaging.asmx";
            try {
                foreach (string filename in Directory.GetFiles("LOCAL_FOLDER")) {
                    img.Upload("PICTURE_LIBRARY_NAME", "PICTURE_FOLDER_IF_ANY", File.ReadAllBytes(filename), Path.GetFileName(filename), true);
by Veshiy0leg   May 31, 2011 @ 2:26pm
126 Views
no comments
 
C#
namespace SharePointUpload {
    class Program {
        static void Main(string[] args) {
            ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback((a, b, c, d) => { return true; });
            WEB_REFERENCE_NAME.Imaging img = new WEB_REFERENCE_NAME.Imaging();
            img.UseDefaultCredentials = true;
            img.Url = "SHAREPOINT_SITE/_vti_bin/imaging.asmx";
            //img.up
            try {
                //var x = img.GetListItems("Implementation Team Photos", "");
by Veshiy0leg   May 31, 2011 @ 2:25pm
81 Views
no comments
 
public class SortByName implements Sortable {
    
    @Override
    public File[] sort(File[] files) {
        File aux;
        
        for (int i = files.length; i >= 1; i--) {
            for (int j = 1; j < i; j++) {
                if (files[j] != null && 
                        files[j - 1].getName().compareTo(files[j].getName()) > 0) {
by Licínio Mendes   May 31, 2011 @ 6:32am
86 Views
no comments
 
C#
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Web.Mvc;
using Microsoft.Practices.EnterpriseLibrary.Validation;
 
namespace Thoughtology.Web.Mvc
{
    /// <summary>
    /// Maps a browser request to a data object and provides validation
by Enrico Campidoglio   May 23, 2011 @ 3:49am
241 Views
no comments
 
#http://www.nivot.org/2009/03/26/PowerShell20CTP3ModulesInPracticeNETInterfaces.aspx
 
function Get-Interface {
 
#.Synopsis
#   Allows PowerShell to call specific interface implementations on any .NET object. 
#.Description
#   Allows PowerShell to call specific interface implementations on any .NET object. 
#
#   As of v2.0, PowerShell cannot cast .NET instances to a particular interface. This makes it
286 Views
no comments
 
C#
/// <summary>
/// An entry that can be either a single ip or a range
/// </summary>
public class IpEntry
{
    public string StartRange { get; set; }
 
    public string EndRange { get; set; }
 
    public bool IsRange
by rawbert   January 17, 2011 @ 1:29am
196 Views
2 comments
 
#If DEBUG = False Then
<Obsolete("This class/method is a stub and should not be in production.", True)> _
Public Class StubAttribute
#Else
<Obsolete("This class/method is a stub and should not be in production.", False)> _
Public Class StubAttribute
#End If
    Inherits Attribute
 
    Private _value As String
by Aron Tsang   September 07, 2010 @ 1:54am
159 Views
no comments
 
#If DEBUG Then
    <Obsolete("This should not be in production", False)> _
    Public Sub BreakBuildIfIsNotDebug()
 
    End Sub
#Else
       <Obsolete("This should not be in production", True)> _
    Public Sub BreakBuildIfIsNotDebug()
 
    End Sub
by Aron Tsang   September 06, 2010 @ 10:00am
213 Views
1 comments
 
<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
    <style type="text/css">
          .sys-template
          {
            display: none;
          }
    </style>
    
<script src="../Scripts/MicrosoftAjax/MicrosoftAjax.js" type="text/javascript"></script> 
<script src="../Scripts/MicrosoftAjax/MicrosoftAjaxDataContext.js" type="text/javascript"></script>
by Ross   August 11, 2010 @ 7:41am
572 Views
no comments
 
XML
<PropertyGroup>
    <SolutionRootDir>$(MSBuildProjectDirectory)\..</SolutionRootDir>
    <ApplicationName>MyApp</ApplicationName>
    <WebApplicationName>$(ApplicationName).Web</WebApplicationName>
    <MSBuildCommunityTasksPath>$(SolutionRootDir)\BuildScripts\MSBuildCommunityTasks</MSBuildCommunityTasksPath>
    <WebProject>$(SolutionRootDir)\$(WebApplicationName)\$(WebApplicationName).csproj</WebProject>
    <PackageDir>$(SolutionRootDir)\Package</PackageDir>
    <Configuration>Release</Configuration>
  </PropertyGroup>
by Petter Wigle   May 09, 2010 @ 3:25am
404 Views
no comments
 
XML
<PropertyGroup>
    <SolutionRootDir>$(MSBuildProjectDirectory)\..</SolutionRootDir>
    <ApplicationName>MyApp</ApplicationName>
   <Version>0.0.1.0</Version>
    <Company>Active Solution AB</Company>
    <Copyright>Copyright © Active Solution AB 2010</Copyright>
</PropertyGroup>
<PropertyGroup Condition="'$(BUILD_NUMBER)' != ''">
    <Version>$(BUILD_NUMBER)</Version>
</PropertyGroup>
by Petter Wigle   May 09, 2010 @ 3:13am
810 Views
1 comments
 
C#
int intValue = 1512;
string stringValue = intValue.ToString("#,#", CultureInfo.GetCultureInfo(Thread.CurrentThread.CurrentCulture.Name));
/* Result in US English (en-US) will be 1,512
   Result in Swedish (sv-SE) will be 1 512 */
by Robert Andersson   April 29, 2010 @ 4:53am
298 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