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
void Main() | |
{ | |
// divide and conquer algorithm | |
// var A = new int [] {13, -3, -25, 20, -3, -16, -23, 18, 20, -7, 12, -5, -22, 15, -4, 7}; | |
// var A = new int [] {-3, -25, -3, -16, -23, -7, -5, 22, -4}; | |
var A = new int [] {12, -2}; | |
var result = new int [3]; | |
result = FindMaxSubArray(A, 0, A.Length - 1); | |
Console.WriteLine( result ); | |
} |
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
void InsertionSort(int [] A, int n) | |
{ | |
int curr = A[n]; | |
if (n != 0) | |
InsertionSort(A, (n-1)); | |
PushIntoItsSpot(A, curr, (n-1)); | |
} | |
void PushIntoItsSpot(int [] A, int val, int rpos) | |
{ | |
while(rpos >= 0 && A[rpos] > val) |
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
... | |
... | |
... | |
... | |
int FindExistingUpdate(ZipEntry entry) | |
{ | |
int result = -1; | |
string convertedName = GetTransformedFileName(entry.Name); | |
if (updateIndex_.ContainsKey(convertedName)) |
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
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = true) ] | |
public class TestAssumptionAttribute : TestActionAttribute | |
{ | |
private readonly string assumption; | |
public TestAssumptionAttribute(string assumption) | |
{ | |
this.assumption = assumption; | |
} | |
public override void BeforeTest(TestDetails testDetails) | |
{ |
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
#script to list all eventlog entries with a specific text in the description | |
$regex_to_match=".*RoutingExtensions.*" | |
Get-EventLog -LogName "Application" | Where-Object {$_.Message -match $regex_to_match} | format-list -Property Source,EntryType,Message,TimeWritten | |
#filter eventlog entries based on date and regular expression | |
$regex_to_match=".*DfpLibrary.*" | |
$dateVal = (get-date 2013-07-01) |