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
#! /usr/bin/env python | |
import unittest | |
from selenium import webdriver | |
class TestGmail(unittest.TestCase): | |
def setUp(self): | |
self.driver = webdriver.Firefox() |
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.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; |
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; | |
using System.Threading.Tasks; | |
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Data; | |
using System.Windows.Documents; | |
using System.Windows.Input; |
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
<Window x:Class="MD5Util.MainWindow" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
Title="MD5 Encryptor" Height="200" Width="375"> | |
<Grid> | |
<Grid.ColumnDefinitions> | |
<ColumnDefinition Width="91*"/> | |
<ColumnDefinition Width="251*"/> | |
</Grid.ColumnDefinitions> | |
<Label Content="Clear Text" HorizontalAlignment="Left" Margin="22,28,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.368,0"/> |
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; | |
using System.Threading.Tasks; | |
using System.Security.Cryptography; | |
namespace MD5Util | |
{ | |
public class Encryptor |
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.Configuration; | |
using System.IO; | |
using System.Security.Permissions; | |
using System.Collections.Generic; | |
using System.Data; | |
using System.Text; | |
using Topshelf; | |
using Microsoft.SqlServer.Management.Smo; |
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
public void Start() | |
{ | |
try | |
{ | |
watcher.Path = watcherpath; | |
watcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.FileName | NotifyFilters.DirectoryName; | |
watcher.Filter = "*.bak"; | |
watcher.Filter = "*.tmp"; | |
watcher.Renamed += new RenamedEventHandler(restoredb); | |
watcher.EnableRaisingEvents = true; |
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
public static void Main() | |
{ | |
HostFactory.Run(x => | |
{ | |
x.Service<AutoSQLRestore>(s => | |
{ | |
s.ConstructUsing(name => new AutoSQLRestore()); | |
s.WhenStarted(tc => tc.Start()); | |
s.WhenStopped(tc => tc.Stop()); | |
}); |
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.Configuration; | |
using System.IO; | |
using System.Security.Permissions; | |
using System.Data; | |
using System.Text; | |
using System.Diagnostics; | |
using System.ComponentModel; | |
using System.ServiceProcess; | |
using System.Collections.Generic; |
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
res.RelocateFiles.Add(new RelocateFile(mdfname, dbpath + dbname + ".mdf")); | |
res.RelocateFiles.Add(new RelocateFile(ldfname, dbpath + dbname + "_log" + ".ldf")); | |
try | |
{ | |
res.SqlRestore(svr); | |
} | |
catch (FailedOperationException fox) | |
{ | |
str.WriteLine("{0} Exception caught.", fox.Message); |