I hereby claim:
- I am mishrsud on github.
- I am sudhanshutheone (https://keybase.io/sudhanshutheone) on keybase.
- I have a public key ASDSGXjxaBLqBQA2fsVPrh7hHn0EuP-tj2wCdhh8DQKG4Qo
To claim this, I am signing this object:
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| using Microsoft.Extensions.Hosting; | |
| namespace WebApplication24 | |
| { | |
| public abstract class HostedService : IHostedService |
| using Microsoft.Azure.CosmosDB.Table; | |
| namespace AzureTableStorageDemo | |
| { | |
| public class ChildrenEntity : TableEntity | |
| { | |
| public ChildrenEntity() | |
| { | |
| } |
| -- Technique 1 | |
| SELECT CASE transaction_isolation_level | |
| WHEN 0 THEN 'Unspecified' | |
| WHEN 1 THEN 'ReadUncommitted' | |
| WHEN 2 THEN 'ReadCommitted' | |
| WHEN 3 THEN 'RepeatableRead' | |
| WHEN 4 THEN 'Serializable' | |
| WHEN 5 THEN 'Snapshot' END AS TRANSACTION_ISOLATION_LEVEL | |
| FROM sys.dm_exec_sessions | |
| where session_id = @@SPID |
| public class LimitedPool<T> : IDisposable where T : class | |
| { | |
| readonly Func<T> _valueFactory; | |
| readonly Action<T> _valueDisposeAction; | |
| readonly TimeSpan _valueLifetime; | |
| readonly ConcurrentStack<LimitedPoolItem<T>> _pool; | |
| bool _disposed; | |
| public LimitedPool(Func<T> valueFactory, Action<T> valueDisposeAction, TimeSpan? valueLifetime = null) | |
| { |
| var path = @"C:\SourceCode\docker-test-framework\Core\app.config"; | |
| var cdriveRepl = string.Concat("/", "mnt", "/", "c", "/"); | |
| var unixPathSep = "/"; | |
| Console.WriteLine(path.Replace(@"C:\", cdriveRepl).Replace(@"\", unixPathSep)); |
| // From https://github.com/shanselman/get-azure/blob/master/Program.cs | |
| public static class ShellHelper | |
| { | |
| public static string Bash(string cmd) | |
| { | |
| var escapedArgs = cmd.Replace("\"", "\\\""); | |
| var process = new Process() | |
| { | |
| StartInfo = new ProcessStartInfo |
| void Main() | |
| { | |
| var jobExecutor = new JobExecutor(); | |
| Task t = Task.Run(() => jobExecutor.DoJob()); | |
| t.ConfigureAwait(false); | |
| Task t2 = Task.Run(() => jobExecutor.DoJob()); | |
| t2.ConfigureAwait(false); |
| void Main() | |
| { | |
| var str = "Hello"; | |
| var integer = 23; | |
| System.Reflection.MethodInfo methodDefinition = typeof(GenericClass).GetMethod("PrintName"); | |
| System.Reflection.MethodInfo method = methodDefinition.MakeGenericMethod(integer.GetType()); | |
| method.Invoke(new GenericClass(), new object [] {integer}); | |
| } | |
| // Define other methods and classes here |
I hereby claim:
To claim this, I am signing this object:
| function arrayTest() { | |
| var array = [ | |
| [1234, "123123-132131-ejwh213", "comment 1234 | comment 2345"], | |
| [1235, "123124-132132-ejwh214", "comment 3 | comment 32"], | |
| [1236, "1231235132133-ejwh215", "comment 4 | comment 5"]]; | |
| var theArray = array.find(function (el) { | |
| return el.indexOf("1231235132133-ejwh215") > -1; | |
| }); | |