This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Usage examples | |
// | |
// Calls the default asp.net event for the control | |
// OnClientClick = "return confirmAction('Are you sure?', this);" | |
// | |
// Uses your own function | |
// OnClientClick = "return confirmAction('Are you sure?', function() { window.alert('No Way!'); });" | |
// | |
// Uses built in browser confirmation | |
// OnClientClick = "return confirmAction('Are you sure?');" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// basic example | |
$('span').filter(function() { | |
return this.innerHTML.match(/\b(fire|aqua|elec|wood)\b/gi); | |
}).css("border", "1px solid red"); | |
// styling each individual word | |
var fire = "<span style='border: 3px solid red;'>fire</span>"; | |
var aqua = "<span style='border: 3px solid blue;'>aqua</span>"; | |
var elec = "<span style='border: 3px solid gray;'>elec</span>"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TestMethod] | |
public void TestIQueryableExtensions() | |
{ | |
var folks = new List<Person>(); | |
folks.Add(new Person{ Id = 1, Name = "Patrick" }); | |
folks.Add(new Person { Id = 2, Name = "James" }); | |
Assert.AreEqual(folks.GetById(1).Name, "Patrick"); | |
Assert.AreEqual(folks.GetById(2).Name, "James"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class EntityItemExtension | |
{ | |
public static TEntity GetById<TEntity>(this IEnumerable<TEntity> source, int id) | |
where TEntity : class, IEntityItem | |
{ | |
return source.First(e => e.Id.Equals(id)); | |
} | |
public static void Save<TEntity>(this TEntity entity) | |
where TEntity : class, IEntityItem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using PayrollYear = System.Int32; | |
using PayperiodNumber = System.Int32; | |
namespace TAS.SQL_DAL | |
{ | |
public class PayrollYearInfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Serializable] | |
[AttributeUsage(AttributeTargets.Property)] | |
public class PropertyDefault : OnMethodInvocationAspect | |
{ | |
private enum AccessorType | |
{ | |
Get, | |
Set | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace PropertyDefaultAttributeTestConsole | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Person pat = new Person(); | |
Console.WriteLine(pat); // "Caldwell, Pat" | |
Console.WriteLine(pat.Fiance); // "Woody, Lauren" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Configuration; | |
using TASNET_Interface.IDAL; | |
namespace TASNET_Interface | |
{ | |
public class DALFactory : IDataAccess | |
{ | |
private static string _dal = ConfigurationManager.AppSettings["Dal"]; | |
private static IDataAccess _dataAccess; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$url = $_POST["ajaxproxy_url"]; | |
unset($_POST["ajaxproxy_url"]); | |
if (isset($_POST["ajaxproxy_unpw"])) | |
{ | |
$unpw = $_POST["ajaxproxy_unpw"]; | |
unset($_POST["ajaxproxy_unpw"]); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TRIGGER Benefits.AddressHashcode | |
ON Benefits.Addresses | |
INSTEAD OF INSERT | |
AS | |
BEGIN | |
SET NOCOUNT ON; | |
INSERT INTO addresses | |
SELECT City, State, Zip, Street1, Street2, County, | |
ISNULL( |