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
using System; | |
using System.Runtime.InteropServices; | |
using System.Threading; | |
using EnvDTE; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
namespace DteTestClassNamespace | |
{ | |
[TestClass] | |
public class DteTestClass |
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
IntPtr hWnd = IntPtr.Zero; | |
Process currentProcess = Process.GetCurrentProcess(); | |
Process[] processes = Process.GetProcessesByName(currentProcess.ProcessName); | |
foreach (Process process in processes) | |
{ | |
// Get the first instance that is not this instance, has the | |
// same process name and was started from the same file name | |
// and location. | |
// Also check that the process has a valid |
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
// Adapted from http://stackoverflow.com/questions/263400/what-is-the-best-algorithm-for-an-overridden-system-object-gethashcode | |
namespace Utilities | |
{ | |
public struct HashCode | |
{ | |
private readonly int hashCode; | |
private HashCode(int hashCode) | |
{ | |
this.hashCode = hashCode; |
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
tfpt unshelve /migrate /source:"$/VendorGraph/VendorGraph_v2.7" /target:"$/VendorGraph/FeatureBranches/Luis" "Luis" |
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
for /d /r . %%d in (bin,obj,csx,App_Data,packages) do @if exist "%%d" rd /s/q "%%d" |
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
Option Explicit | |
Dim objWMIService, objProcess, colProcess, fileSystemObject, shell | |
Dim strComputer, strList, folder, f | |
On Error Resume Next | |
strComputer = "." | |
Set objWMIService = GetObject("winmgmts:" _ | |
& "{impersonationLevel=impersonate}!\\" _ | |
& strComputer & "\root\cimv2") |
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
4th Street | |
4th St | |
Alana Way | |
Alana Way, California, USA | |
Alta Vista Terrace | |
Alta Vista Terrace, Fremont, CA 94539, USA | |
Alvord Street |
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
asking for a cab | |
calling for a cab | |
can i find | |
can i find a cab | |
/* "can I get" is extremely common but feels dangerous even with all the two letter words in - "can I get top cuts" */ | |
can i get a cab | |
can i have a cab | |
can i please get a cab | |
can i please have | |
can i please have a cab |
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
System.Data.Entity.Core.EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details. | |
---> System.Data.SqlClient.SqlException: Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. | |
---> System.ComponentModel.Win32Exception: The wait operation timed out | |
--- End of inner exception stack trace --- | |
at void System.Data.SqlClient.SqlConnection.OnError(SqlException exception, bool breakConnection, Action<Action> wrapCloseInAction) | |
at void System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, bool callerHasConnectionLock, bool asyncClose) | |
at bool System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, out bool dataReady) | |
at bool System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() | |
at _ |
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 TimeSpan ConvertDriveTimeStringToTime() { | |
if (string.IsNullOrEmpty(driveTime)) { | |
return TimeSpan.Zero; | |
} | |
// "1 day 4 hours", "4 hours 12 mins", "1 min" | |
var bits = driveTime.Split(); | |
int value = 0; | |
TimeSpan result = TimeSpan.Zero; |
OlderNewer