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
| @functions{ | |
| /// <summary> | |
| /// Prints a random number followed by name | |
| /// </summary> | |
| /// <param name="name">The name to be printed</param> | |
| } | |
| @helper SayHello(string name) { | |
| int randomNumber = 4; // A random number | |
| @randomNumber @name | |
| } |
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
| //Name: Alerts | |
| //Author: Danny Lloyd 1.0 | |
| var Alerts = (function () { | |
| var internalAlert = function (type, message) { | |
| var li = $('<li class="alert alert-' + type + '">' | |
| + '<span class="glyphicon glyphicon-' + getIcon(type) + '" style="padding-right:5px;"></span> ' + | |
| message + | |
| '</li>'); | |
| $('#alerts').append(li); | |
| }; |
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
| @{ | |
| ViewBag.Title = "Edit"; | |
| Layout = "~/Views/Shared/_Layout.cshtml"; | |
| //Get list of objects (users) from database | |
| var users = new Web.Core.Data.Account().GetUsers(); | |
| } | |
| <div class="form-group"> | |
| <div class="col-md-2"> | |
| <label>Approvers</label> |
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 Language="VB" AutoEventWireup="false" CodeFile="Calendar.aspx.vb" Inherits="Calendar" %> | |
| <!DOCTYPE html> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head runat="server"> | |
| <title></title> | |
| <style> | |
| div.calendar { | |
| font-family: sans-serif; |
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
| Partial Class Calendar | |
| Inherits System.Web.UI.Page | |
| Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load | |
| If Not IsPostBack Then | |
| RenderCalendar() | |
| End If | |
| 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
| /* Drop all non-system stored procs */ | |
| DECLARE @name VARCHAR(128) | |
| DECLARE @SQL VARCHAR(254) | |
| SELECT @name = (SELECT TOP 1 [name] FROM sysobjects WHERE [type] = 'P' AND category = 0 ORDER BY [name]) | |
| WHILE @name is not null | |
| BEGIN | |
| SELECT @SQL = 'DROP PROCEDURE [dbo].[' + RTRIM(@name) +']' | |
| EXEC (@SQL) |
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
| PING -A xxx.xxx.xxx.xxx |
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
| <asp:Repeater ID="rpt" runat="server"> | |
| <ItemTemplate> | |
| Item template | |
| </ItemTemplate> | |
| <FooterTemplate> | |
| <asp:PlaceHolder runat="server" Visible="<%# rptSubmissions.Items.Count = 0%>"> | |
| <div class="row" style="border-top: solid 3px #E9E9E9; padding-bottom: 10px;"> | |
| <span style="font-style:italic; font-weight: bold;">No data</span> | |
| </div> | |
| </asp:PlaceHolder> |
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
| --Copied from here http://stackoverflow.com/questions/2094436/how-to-find-largest-objects-in-a-sql-server-database | |
| SELECT t.NAME AS TableName, | |
| i.name AS indexName, | |
| SUM(p.rows) AS RowCounts, | |
| SUM(a.total_pages) AS TotalPages, | |
| SUM(a.used_pages) AS UsedPages, | |
| SUM(a.data_pages) AS DataPages, | |
| (SUM(a.total_pages) * 8) / 1024 AS TotalSpaceMB, | |
| (SUM(a.used_pages) * 8) / 1024 AS UsedSpaceMB, | |
| (SUM(a.data_pages) * 8) / 1024 AS DataSpaceMB |