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
# Clear the host | |
Clear-Host | |
# Write/Log the starting date and time | |
Write-Host "Desktime Hack Started At" (Get-Date -Format G) | |
# Load assembly to manipulate mouse funationality | |
Add-Type -AssemblyName System.Windows.Forms | |
# Load Win 32 dll method for minimize and maximize window |
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
public (string, string, int) CoolWay_UserInfo(param1, param2, param3.....) | |
{ | |
string firstName = "Shahriar"; | |
string lastName = "Hossain"; | |
int yearsOfExpertise = 4; | |
return (fName: firstName, lName: lastName, experience: yearsOfExpertise); | |
} |
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
public (string fName, string lName, int experience) CoolWay_UserInfo() | |
{ | |
string firstName = "Shahriar"; | |
string lastName = "Hossain"; | |
int yearsOfExpertise = 4; | |
return (firstName, lastName, yearsOfExpertise); | |
} |
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
public (string, string, int) CoolWay_UserInfo() | |
{ | |
string firstName = "Shahriar"; | |
string lastName = "Hossain"; | |
int yearsOfExpertise = 4; | |
return (firstName, lastName, yearsOfExpertise); | |
} |
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
public static Tuple<int, int, int, int, int, int, int, Tuple<Tuple<int, int>>> OldWay_TupleCreation() | |
{ | |
Tuple<int, int> twoTuple = new Tuple<int, int>(9, 10); | |
var tempTumple = Tuple.Create(1, 2, 3, 4, 5, 6, 7, twoTuple); | |
return tempTumple; | |
} |
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
public static void Main(string[] args) | |
{ | |
var x = OldWay_UserInfo(); | |
Console.WriteLine("{0} {1} {2}", x.Item1, x.Item2, x.Item3); | |
} |
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
public static Tuple<string, string, int> OldWay_UserInfo() | |
{ | |
string firstName = "Shahriar"; | |
string lastName = "Hossain"; | |
int yearsOfExpertise = 4; | |
Tuple<string, string, int> userInfo = new Tuple<string, string, int>(firstName, lastName, yearsOfExpertise); | |
//or | |
//var userInfo = Tuple.Create(firstName, lastName, yearsOfExpertise); | |
return userInfo; | |
} |
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 const string BaseUrl = "http://intilaqemployees.azurewebsites.net/api/employeesapi"; | |
public async Task<List<Employee>> GetEmployeesAsync() | |
{ | |
var httpClient = new HttpClient(); | |
try | |
{ | |
var jsonResponse = await httpClient.GetStringAsync(BaseUrl).ConfigureAwait(false); | |
//The following line never gets executed |
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
var settings = new JsonSerializerSettings | |
{ | |
NullValueHandling = NullValueHandling.Ignore, | |
Converters = new List<JsonConverter> | |
{ | |
new IsoDateTimeConverter() | |
{ | |
DateTimeFormat= "yyyy-MM-dd HH:mm:ss" | |
} |
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
public static void ProcessText([BlobTrigger(@"input-dir/{name}.txt")] TextReader content, | |
string name, | |
[Blob(@"output-dir/{name}")] TextWriter contentOutput) | |
{ | |
Console.WriteLine(String.Format("Reading Content from : {0}", name)); | |
var temp = String.Format("Contents : {0}", content.ReadToEnd()); | |
contentOutput.WriteLine(temp); | |
} | |
public static void CopyBlobToBlob([BlobTrigger(@"input-dir/{name}.jpeg")] Stream content, |
NewerOlder