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.Collections.ObjectModel; | |
| using System.ComponentModel; | |
| namespace WpfApplication1.ViewModel | |
| { | |
| public class MainWindowViewModel : INotifyPropertyChanged | |
| { | |
| public MainWindowViewModel() | |
| { | |
| InitSourceCollection(); |
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
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| var context = new TestContext(); | |
| context.Parents.Add(new Parent | |
| { | |
| Name = "Parent", |
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.Text; | |
| namespace ConsoleApplication1 | |
| { | |
| using System.Globalization; | |
| using System.Net.Http; | |
| using System.Security.Cryptography; | |
| class Program |
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
| static void SetServiceProperties() | |
| { | |
| var requestMethod = "PUT"; | |
| var requestBody = string.Format("<StorageServiceProperties><Cors><CorsRule><AllowedOrigins>{0}</AllowedOrigins><AllowedMethods>{1}</AllowedMethods><MaxAgeInSeconds>{2}</MaxAgeInSeconds><ExposedHeaders>{3}</ExposedHeaders><AllowedHeaders>{4}</AllowedHeaders></CorsRule></Cors></StorageServiceProperties>", "http://www.baidu.com", "GET,PUT", 200, "x-ms-meta-*", "x-ms-meta-data*,x-ms-meta-target,x-ms-meta-source"); | |
| var storageServiceVersion = "2014-02-14"; | |
| var date = DateTime.UtcNow.ToString("R"); | |
| var canonicalizedHeaders = string.Format("x-ms-date:{0}\nx-ms-version:{1}", date, storageServiceVersion); | |
| var canonicalizedResource = string.Format("/{0}\ncomp:properties\nrestype:service", StorageAccount); | |
| var stringToSign = string.Format("{0}\n\n\n{1}\n\ntext/plain; charset=utf-8\n\n\n\n\n\n\n{2}\n{3}", requestMethod, requestBody.Length, canonicalizedHeaders, canonicalizedResource); | |
| var authorizationHeader = GetAuthorization |
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 class Program | |
| { | |
| private static readonly string[] Arrays = new[] | |
| { | |
| "jerry", | |
| "Kate", | |
| "Steve", | |
| "Mark", | |
| "Joe" | |
| }; |
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
| workflow Auto-RestartVM | |
| { | |
| Param | |
| ( | |
| [Parameter(Mandatory = $true)] | |
| [String] | |
| $AzureConnectionName, | |
| [Parameter(Mandatory = $true)] | |
| [String] |
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 class TweetHttpClient : ITwitterHttpClient | |
| { | |
| public TweetHttpClient() | |
| { | |
| _httpClient = new HttpClient | |
| { | |
| BaseAddress = new Uri("https://api.twitter.com/") | |
| }; | |
| } |
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
| # setup NPM behinds a HTTP proxy | |
| npm config set proxy http://127.0.0.1:1098 | |
| npm config set https-proxy http://127.0.0.1:1098 | |
| # unset NPM proxy | |
| npm config rm proxy | |
| npm config rm https-proxy | |
| # set NPM to mirror registry | |
| npm config set registry https://registry.npm.taobao.org |
OlderNewer