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
(function () { | |
'use strict'; | |
var clientKey = "XXXXXXXXXXXXXX"; | |
var clientSecret = "XXXXXXXXXXXX"; | |
var oauthToken; | |
var oauthSecret; | |
var userId; | |
var loginUrl; | |
var applicationName; |
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.Concurrent; | |
using System.Collections.Generic; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace Tup.Utilities | |
{ | |
/// <summary> | |
/// 并行消费者队列 |
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; | |
namespace SuffixTreeAlgorithm | |
{ | |
public class SuffixTree | |
{ |
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 Tree | |
{ | |
/// <summary> | |
/// store the tree's root | |
/// </summary> | |
private Node _root; | |
/// <summary> | |
/// construct a new tree with it's root | |
/// </summary> |
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
/// <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) |
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
/// <summary> | |
/// Async Execute Command Action | |
/// </summary> | |
/// <param name="startFileName"></param> | |
/// <param name="startFileArg"></param> | |
/// <param name="msgAction"></param> | |
/// <returns></returns> | |
public static Task<bool> ExecuteActionAsync(string startFileName, string startFileArg, Action<string> msgAction) | |
{ | |
ThrowHelper.ThrowIfNull(msgAction, "msgAction"); |
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 XHEdu; | |
namespace System.Data | |
{ | |
/// <summary> | |
/// 包含 `已创建事务` 的 DbConnection | |
/// </summary> | |
public class DbTransactionConnection : IDbConnection | |
{ | |
private IDbTransaction innerDbTransaction = null; |
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.Generic; | |
using System.Runtime.Serialization; | |
using System.Xml; | |
using System.Xml.Schema; | |
using System.Xml.Serialization; | |
namespace Tup.Utilities | |
{ | |
/// <summary> | |
/// 支持XML序列化的泛型Dictionary类 |
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
/// <summary> | |
/// 业务逻辑 返回结果 | |
/// </summary> | |
/// <remarks> | |
/// 建议以本类型为返回对象的方法, 不要返回 null 对象. | |
/// | |
/// 提供三种方法创建本实例: | |
/// 直接实例: | |
/// new BizResult<Dish>(...); | |
/// |
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
package main | |
import ( | |
//"encoding/json" | |
"fmt" | |
//"os" | |
"sync" | |
"time" | |
) |
OlderNewer