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
IF EXISTS(select * from sysobjects where id = object_id('dbo.SP_ShrinkAllDatabasesOnServer') and xtype = 'P') | |
DROP PROCEDURE dbo.SP_ShrinkAllDatabasesOnServer | |
GO | |
CREATE PROCEDURE dbo.SP_ShrinkAllDatabasesOnServer | |
AS | |
BEGIN | |
CREATE TABLE #TempDatabasesTable | |
( | |
[DatabaseName] sysname not null primary key, |
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
DECLARE @DatabaseName varchar(100), @SqlStatement varchar(1024) | |
SET ROWCOUNT 1 | |
SELECT @DatabaseName = NAME FROM SYSDATABASES ORDER BY NAME | |
WHILE @@ROWCOUNT > 0 | |
BEGIN | |
SET @SqlStatement = 'ALTER TABLE tblUsers ALTER COLUMN email nvarchar(250) NOT NULL' | |
SELECT @SqlStatement = 'Use [' + @DatabaseName + '] exec (' + @SqlStatement + ')' | |
PRINT (@SqlStatement) | |
SELECT @DatabaseName = NAME FROM SYSDATABASES WHERE NAME > @DatabaseName |
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
DECLARE @DatabaseName varchar(100), @SqlStatement varchar(1024) | |
SET ROWCOUNT 1 | |
SELECT @DatabaseName = NAME FROM SYSDATABASES ORDER BY NAME | |
WHILE @@ROWCOUNT > 0 | |
BEGIN | |
-- Change this to your own SQL statement you want to execute against your db's | |
SET @SqlStatement = 'ALTER TABLE tblUsers ALTER COLUMN email nvarchar(250) NOT NULL' | |
SELECT @SqlStatement = 'Use [' + @DatabaseName + '] exec (' + @SqlStatement + ')' | |
-- Print the command to the screen |
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
/// <summary> | |
/// Determines whether [is odd number] [the specified number]. | |
/// </summary> | |
/// <param name="number">The number.</param> | |
/// <returns> | |
/// <c>true</c> if [is odd number] [the specified number]; otherwise, <c>false</c>. | |
/// </returns> | |
public static bool isOddNumber(int number) | |
{ | |
if (number % 2 == 0) |
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
/// <summary> | |
/// credit card number and an attached weight number | |
/// </summary> | |
public class CreditCardNumbers | |
{ | |
public int number { get; set; } | |
public int weightNumber { get; set; } | |
/// <summary> | |
/// Initializes a new instance of the <see cref="CreditCardNumbers"/> class. |
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
/// <summary> | |
/// Validates the VISA credit card. | |
/// </summary> | |
/// <param name="creditCardNumber">The credit card number.</param> | |
/// <returns></returns> | |
public static bool validateVISACreditCard(string creditCardNumber) | |
{ | |
// this is a short credit card, the algorithm is unknown so return true | |
//ISRACARD | |
if (creditCardNumber.Length == 8 || creditCardNumber.Length == 9) |
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
$(document).ready(function() { | |
$(".add_order").live('click', function() { | |
// do something | |
}); | |
}); |
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
function loadAuctionOffers(saleID) { | |
$.getJSON("/HttpHandlers/AuctionOffersHandler.ashx?saleID=" + saleID + "&cacheKiller=" + Math.random(), function(json) { | |
var offers = $(".auction_offers_table").find("tr.row").length; | |
if (offers < json.length) { | |
playAlertSound(); | |
$(".auction_offers_table").find("tr.row").remove(); | |
for (var i = 0; i < json.length; i++) { | |
var auctionID = json[i].saleID; | |
var city = json[i].city; |
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
ps -e -o pid,command | grep [r]esque | sed 's/ */ /g' | cut -f2 -d' ' | xargs kill |
OlderNewer