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
| Context.Response.ContentType = "application/pdf; name=" & filename | |
| Context.Response.AddHeader("content-disposition", "inline; filename=" & filename) | |
| Context.Response.AddHeader("content-length", pdfBytes.Length.ToString()) | |
| Context.Response.BinaryWrite(pdfBytes) | |
| Context.Response.End() |
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
| DECLARE @tableName varchar(50); | |
| SET @tableName = ''; | |
| SELECT | |
| COLUMN_NAME, | |
| DATA_TYPE, | |
| IS_NULLABLE | |
| FROM INFORMATION_SCHEMA.COLUMNS | |
| WHERE TABLE_NAME = @tableName |
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
| declare @TableName sysname | |
| set @TableName = 'TableName' | |
| declare @Namespace varchar(50) | |
| set @Namespace = 'Namespace' | |
| declare @prop varchar(max) | |
| PRINT 'Imports PetaPoco ' | |
| PRINT '' | |
| PRINT 'Namespace ' + @Namespace | |
| PRINT '<TableName("' + @TableName + '")>' |
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
| <%@ Control Language="vb" AutoEventWireup="false" CodeBehind="PagedRepeater.ascx.vb" Inherits="Website.PagedRepeater" %> | |
| <div> | |
| <table class='<%= Classes %>'> | |
| <thead <%= If(rptData.Items.Count = 0, "style=""display: none;""", "")%>> | |
| <%= HeaderTemplate%> | |
| </thead> | |
| <tbody> | |
| <asp:ListView ID="rptData" runat="server"> | |
| <ItemTemplate></ItemTemplate> | |
| </asp:ListView> |
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
| Option Strict Off | |
| Imports Extendo | |
| Imports System.ComponentModel | |
| Imports System.Reflection | |
| <ParseChildren(True)> | |
| Public Class PagedRepeater | |
| Inherits System.Web.UI.UserControl | |
| Public Property PageSize As Integer |
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
| Namespace Controls.Bootstrap | |
| Public Class GridView | |
| Inherits WebControls.GridView | |
| Public Sub New() | |
| UseAccessibleHeader = True | |
| AddHandler DataBound, AddressOf UseTableHeaderTag | |
| End Sub |
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
| UPDATE [dbo].person | |
| SET FirstName = 'carl' | |
| ,LastName = 'smith' | |
| ,Updated = GETDATE() | |
| OUTPUT 'UPDATE' | |
| ,DELETED.* | |
| ,INSERTED.* | |
| INTO dbo.Person_History | |
| WHERE person.id = 1 |
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
| declare @TableName sysname; | |
| set @TableName = 'TABLENAME'; | |
| declare @Namespace varchar(50); | |
| set @Namespace = 'NAMESPACE'; | |
| declare @prop varchar(8000); | |
| DECLARE @NewLineChar AS CHAR(2) = CHAR(13) + CHAR(10) | |
| PRINT 'using System; ' | |
| PRINT 'using NPoco; ' | |
| PRINT '' | |
| PRINT 'namespace ' + @Namespace + ' {' |
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 formatTraceInformation(preferedPane) { | |
| var tracer = $('#__asptrace'); | |
| var traceContent = $('span.tracecontent'); | |
| //$('*', tracer).removeAttr('style'); | |
| //Removes style from trace block | |
| //$('*', tracer).remove('style'); | |
| if (tracer.length > 0 && $('#tracer_Show').length == 0) { | |
| $('span.tracecontent > table', tracer).each(function (index, element) { | |
| $(element).addClass('trace-table'); |
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
| Imports Microsoft.Lync.Model | |
| Imports System.Threading | |
| Public Class PresenceChecker | |
| Private _contact As Contact | |
| Dim waithandle As AutoResetEvent = New Threading.AutoResetEvent(False) | |
| Dim state As ContactAvailability | |
| Public Function GetUsersPresence(user As String) As ContactAvailability |