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 type = typeof(Person); | |
var orderAndProp = from property in type.GetProperties() | |
where Attribute.IsDefined(property, typeof(AsOrderAttribute)) | |
select new | |
{ | |
((AsOrderAttribute)property | |
.GetCustomAttributes(typeof(AsOrderAttribute), false) | |
.Single()).Order, | |
property.Name | |
}; |
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 List<string> ExtractLineParts(string line, char spliter = ' ') | |
{ | |
var res = new List<string>(); | |
line = line.Trim(); | |
var idx = 0; | |
var lastIdx = 0; | |
var quoted = false; | |
while (idx < line.Length) | |
{ | |
if (line[idx] == '\"') |
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
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Runtime.InteropServices; | |
using Microsoft.VisualBasic; | |
namespace Itok.Search.Core | |
{ | |
public class MFTScanner | |
{ |
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 static TreeNode BuildTree(string log) | |
{ | |
var root = new TreeNode(); | |
var lines = log.Split(Environment.NewLine) | |
.Where(s => !string.IsNullOrWhiteSpace(s)).ToList(); | |
var i = 0; | |
while (i < lines.Count) BuildTree(lines, root, ref i); | |
return root; | |
} |
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 class MedianFinder | |
{ | |
private readonly MinHeap _greaterHalf; | |
private readonly MaxHeap _lowerHalf; | |
public MedianFinder() | |
{ | |
_greaterHalf = new MinHeap(); | |
_lowerHalf = new MaxHeap(); |
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
using System; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading; | |
namespace Entities | |
{ | |
public class PartitionedContainer<TPayload> : IDisposable | |
{ |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
using System; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Hosting; | |
using Orleans; | |
using Orleans.Hosting; | |
namespace OrleansTest | |
{ |
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
<?xml version="1.0" encoding="utf-8"?> | |
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd" | |
autoReload="true" | |
throwExceptions="false" | |
internalLogLevel="Off"> | |
<extensions> | |
<add assembly="NLog.Azure" /> |
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
{"sig":"ec98e8088052896ddd19797e76999314958869b18a772706feb3f461c073056223731e802e9fc5bbce6d08bb851a3d0ebad28b77b2f37f8c7bb6abcd6ea8c3a90","msghash":"0b05253f89a03857d04b430c4279113a2f6cae3efd4c922fb1e00c474d885644"} |