Format:
Recent snippets for: jaredmroberts
using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using System.Reflection; using System.Web; /// <summary> /// Summary description for OrderByHelper /// </summary>
21 Views
no comments
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;
54 Views
no comments
SELECT o.name, c.text FROM sysobjects o INNER JOIN syscomments c ON o.id = c.id WHERE xtype = 'P' AND CharIndex('<KEYWORD>',c.text) > 0 ORDER BY o.name
39 Views
no comments
List<Product> products = new List<Product>(); products.Sort(delegate(Product p1, Product p2) { return p1.ProductName.CompareTo(p2.ProductName); });
44 Views
no comments
public static UserPrincipal GetUserAdInfo(string domainName, string loginName) { PrincipalContext ctx = new PrincipalContext(ContextType.Domain, domainName); UserPrincipal user = UserPrincipal.FindByIdentity(ctx, loginName); if(user != null) { return user; }
69 Views
no comments
$.ajax({
url: 'Service.asmx/Method',
type: 'POST',
contentType: 'application/json',
data: '{"Parameters":"Must be JSON strings!"}',
success: function(response) {
// Don't forget that the response is wrapped in a
// ".d" object in ASP.NET 3.5 and later.
console.log(response.d);
}
99 Views
no comments
SELECT * FROM OPENQUERY(ADSI, 'SELECT objectCategory, cn, givenName, sn, mail, name, department,SAMAccountName FROM ''LDAP://DC=<<DOMAIN>>,DC=<<COM,LOCAL,NET>>'' WHERE objectClass = ''group'' ORDER BY cn') AS ADGroups
148 Views
no comments
declare @Field1 nvarchar(255) declare CursorFile cursor for SELECT field1 from MyTable OPEN CursorFile FETCH NEXT FROM CursorFile INTO @Field1 WHILE @@FETCH_STATUS = 0 BEGIN FETCH NEXT FROM CursorFile INTO @Field1
81 Views
no comments
CREATE FUNCTION [dbo].[udf_StringToTable] ( @string VARCHAR(MAX), @delimiter CHAR(1) ) RETURNS @output TABLE( data VARCHAR(256) ) BEGIN
89 Views
no comments
USE [DBNAME] SELECT name INTO #UsersTemp FROM sys.sysusers Where issqluser=1 and name not in ( 'dbo', 'guest', 'INFORMATION_SCHEMA', 'sys', 'sysadm') USE [DBNAME]
92 Views
no comments
function checkEmail(inputvalue){ var pattern=/^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+\.([a-zA-Z])+([a-zA-Z])+/; if(pattern.test(inputvalue)){ return true; }else{ return false; } }
172 Views
no comments
$("#loading_animation").bind({ ajaxStart: function() { $(this).show(); }, ajaxStop: function() { $(this).hide(); } });
495 Views
no comments
Public Class ProjectInstaller Private Const LOG_SOURCE As String = "Log" Private Const LOG_LOG As String = "Log" Private _mainEventLog As EventLog Public Sub New() MyBase.New() 'This call is required by the Component Designer.
580 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
