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 RestSharp.Deserializers; | |
| using RestSharp.Serializers; | |
| namespace RestSharp.Serialization | |
| { | |
| public interface IRestSerializer : ISerializer, IDeserializer | |
| { | |
| string[] SupportedContentTypes { get; } | |
| DataFormat DataFormat { get; } |
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
| /* | |
| * There is a colony of 8 cells arranged in a straight line where each day every cell competes with | |
| * its adjacent cells(neighbour). Each day, for each cell, if its neighbours are both active or both | |
| * inactive, the cell becomes inactive the next day, otherwise it becomes active the next day. | |
| * | |
| * Assumptions | |
| * The two cells on the ends have single adjacent cell, so the other adjacent cell can be assumsed to | |
| * be always inactive. Even after updating the cell state. consider its previous state for updating the | |
| * state of other cells. Update the cell information of all cells simultaneously. | |
| * |
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; | |
| namespace AmazonAssessment | |
| { | |
| public static class GCD | |
| { | |
| public static void Run() | |
| { | |
| Console.WriteLine(Solution(new int[] { 36, 48, 1152 }, 24)); | |
| } |
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
| // Written in 2013 | |
| // Not tested since .NET Framework 4 | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Net; | |
| using System.Runtime.InteropServices; | |
| public class ARP | |
| { |
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.IO; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using Microsoft.VisualBasic; | |
| using Microsoft.VisualBasic.CompilerServices; | |
| using System.Runtime.InteropServices; |
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 string ReplaceDiacritics(this string str) | |
| { | |
| string stringFormD = str.Normalize(NormalizationForm.FormD); | |
| StringBuilder sb = new StringBuilder(); | |
| for (int i = 0; i < stringFormD.Length; i++) | |
| { | |
| UnicodeCategory unicodeChar = CharUnicodeInfo.GetUnicodeCategory(stringFormD[i]); | |
| if (unicodeChar != UnicodeCategory.NonSpacingMark) | |
| sb.Append(stringFormD[i]); |
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 Microsoft.CodeAnalysis; | |
| using Microsoft.CodeAnalysis.CSharp; | |
| using Microsoft.EntityFrameworkCore; | |
| using Microsoft.EntityFrameworkCore.Design.Internal; | |
| using Microsoft.EntityFrameworkCore.Infrastructure; | |
| using Microsoft.EntityFrameworkCore.Metadata; | |
| using Microsoft.EntityFrameworkCore.Migrations; | |
| using Microsoft.EntityFrameworkCore.Migrations.Design; | |
| using Microsoft.EntityFrameworkCore.Migrations.Operations; | |
| using Microsoft.EntityFrameworkCore.Storage; |
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.IO; | |
| using System.Text; | |
| public class ASCII85 | |
| { | |
| /// <summary> | |
| /// Prefix mark that identifies an encoded ASCII85 string, traditionally '<~' | |
| /// </summary> | |
| public string PrefixMark = "<~"; |
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
| - Open Automator | |
| - File -> New -> Service | |
| - Change "Service Receives" to "files or folders" in "Finder" | |
| - Add a "Run Shell Script" action | |
| - Change "Pass input" to "as arguments" | |
| - Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*" | |
| - use "com.microsoft.VSCodeInsiders" for insiders edition | |
| - Save it as something like "Open in Visual Studio Code" |
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 namespace System.Management.Automation | |
| using namespace System.Management.Automation.Language | |
| Register-ArgumentCompleter -Native -CommandName 'gh' -ScriptBlock { | |
| param($wordToComplete, $commandAst, $cursorPosition) | |
| $commandElements = $commandAst.CommandElements | |
| $command = @( | |
| 'gh' | |
| for ($i = 1; $i -lt $commandElements.Count; $i++) { | |
| $element = $commandElements[$i] | |
| if ($element -isnot [StringConstantExpressionAst] -or |
OlderNewer