This file contains hidden or 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
String.prototype.DateWCF = function () { | |
var d = new Date(parseInt(this.substr(6))); | |
return (d.getUTCMonth() + 1) + '/' + d.getUTCDate(); | |
}; | |
//usage | |
var option = //some shipping option object returned from a RESTful WCF service | |
option.DeliveryEnd.DateWCF() |
This file contains hidden or 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
var KeyMap = { | |
"Enter":13, | |
"Shift":16, | |
"Tab":9, | |
"LeftArrow":37 | |
}; | |
for (var key in KeyMap) { | |
KeyMap["is" + key] = function(compare,ev) { | |
return ev.keyCode == compare |
This file contains hidden or 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.Web; | |
using System.Web.UI; | |
using System.Web.UI.WebControls; | |
using WebFormsMvp; | |
using WebFormsMvp.Web; |
This file contains hidden or 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 WebFormsMvp; | |
using BissellMVPTest.BLL.Views.Models; | |
using BissellMVPTest.BLL.Views; | |
using BissellMVPTest.BLL.Views.EventArguments; |
This file contains hidden or 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; | |
namespace BissellMVPTest.BLL.Views.EventArguments | |
{ | |
public class BlogPostArgs : EventArgs | |
{ | |
public string PostTitle { get; set; } |
This file contains hidden or 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
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="PageView.aspx.cs" Inherits="BissellMVPTest.Web.PageView" %> | |
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"> | |
</asp:Content> | |
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> | |
<h2>New Post</h2> | |
<asp:Panel ID="savePanel" Visible="<%# isVisible %>" runat="server"> | |
<p> | |
Title: <%# Model.Title %> | |
</p> |
This file contains hidden or 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
--Employees | |
CREATE TABLE Employees( | |
Id int not null, | |
LastName nvarchar(50) not null, | |
MiddleName nvarchar(50), | |
FirstName nvarchar(50) not null, | |
primary key(Id) | |
) | |
GO |
This file contains hidden or 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
void Main() | |
{ | |
var genericType = typeof(GenericClass<>); | |
Type[] t = { typeof(int) }; | |
var toCreate = genericType.MakeGenericType(t); | |
object o = Activator.CreateInstance(toCreate, "brian", "scaturro"); | |
o.Dump(); | |
} | |
class GenericClass<T> |
This file contains hidden or 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
SELECT DISTINCT p.ID | |
FROM wp_posts p | |
LEFT JOIN wp_term_relationships tr ON tr.object_id = p.ID | |
LEFT JOIN wp_term_taxonomy tt ON tr.term_taxonomy_id = tt.term_id | |
LEFT JOIN wp_terms t ON tt.term_id = t.term_id | |
WHERE p.post_type = "sermon" | |
AND p.post_status = "publish" | |
ORDER BY p.ID ASC |
This file contains hidden or 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
(function(exports, undefined){ | |
var Wulib = {}, | |
activeDoc = app.activeDocument; | |
var ArtBoard = function(board) { | |
this.board = board; | |
}; | |
ArtBoard.prototype = { | |
addPadding:function(val) { |