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> | |
/// Is the specified datetime DST? | |
/// </summary> | |
[TestMethod] | |
public void DST_Started_On_April_27_1980() | |
{ | |
var ts = new DateTime(1980, 4, 15, 12, 0, 0); | |
var isDst = Utils.EasternTimeZone.IsDaylightSavingTime(ts); |
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
## Transfer data in Azure Storage Tables from one Azure Storage Account to another | |
## Download and install AzCopy -- https://azure.microsoft.com/en-us/documentation/articles/storage-use-azcopy/ | |
## Get the Preview version of AzCopy in order to access Table Storage. The current stable version works with Blob storage only. | |
## Tables will be created if they don't exist | |
$source_acct = "Source_Azure_Storage_Account_Name" | |
$source_key="Source_Azure_Storage_Account_Key" | |
$destination_acct="Destination_Azure_Storage_Account_Name" | |
$destination_key="Destination_Azure_Storage_Account_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
private static void ExecuteTwoMethodsOpeningTwoConnections(string connectionString) | |
{ | |
using(TransactionScope scope = new TransactionScope()) | |
{ | |
ExecuteCommandA(connectionString); | |
ExecuteCommandB(connectionString); | |
Console.WriteLine("Both records are written to database transactionally."); | |
scope.Complete(); | |
} |
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
private static void ExecuteSqlTransactionUsingTransactionScope(string connectionString) | |
{ | |
using(TransactionScope scope = new TransactionScope()) | |
{ | |
using (SqlConnection connection = new SqlConnection(connectionString)) | |
{ | |
connection.Open(); | |
SqlCommand command = connection.CreateCommand(); | |
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
private static void ExecuteSqlTransaction(string connectionString) | |
{ | |
using (SqlConnection connection = new SqlConnection(connectionString)) | |
{ | |
connection.Open(); | |
SqlCommand command = connection.CreateCommand(); | |
SqlTransaction transaction; | |
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
/*final-css*/ | |
.speech-bubble { | |
text-align:center; | |
font:40px/100px Arial, sans-serif; | |
color:#fff; | |
background:red; | |
width:300px; | |
height:100px; | |
margin:auto; | |
position: absolute; |
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
<!--ash--> | |
<div class="speech-bubble">ash</div> |
NewerOlder