View ConsistentHashing.cs
1 2 3 4 5 6 7 8 9 10
/// <summary>
/// 一致性 Hash 算法
/// </summary>
class ConsistentHashing
{
List<KeyValuePair<uint, string>> _serList = new List<KeyValuePair<uint, string>>();
 
public ConsistentHashing(string[] serList)
{
if (serList == null || serList.Length == 0)
View C# radix tree
1 2 3 4 5 6 7 8 9 10
public class Tree
{
/// <summary>
/// store the tree's root
/// </summary>
private Node _root;
 
/// <summary>
/// construct a new tree with it's root
/// </summary>
View 0.suffixtree.cs
1 2 3 4 5 6 7 8 9 10
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
 
namespace SuffixTreeAlgorithm
{
public class SuffixTree
{
View ConcurrentConsumerQueue.cs
1 2 3 4 5 6 7 8 9 10
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
 
namespace Tup.Utilities
{
/// <summary>
/// 并行消费者队列
View Netflix.js
1 2 3 4 5 6 7 8 9 10
(function () {
'use strict';
 
var clientKey = "XXXXXXXXXXXXXX";
var clientSecret = "XXXXXXXXXXXX";
var oauthToken;
var oauthSecret;
var userId;
var loginUrl;
var applicationName;
Something went wrong with that request. Please try again.