Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Collections.Generic;
using System.Text.Json;
using VT = System.ValueTuple<int, int>;
class NoRepeatArr{
Dictionary<VT, int> cache = new Dictionary<VT, int>();
Dictionary<VT, VT> nextState = new Dictionary<VT, VT>();
//digitSeq e digit
enum NodeType {
Enter,
Digit,
Exponent,
End,
BeforePoint,
Point,
AfterPoint,
}
// import { isNumber } from 'util';
// class CurStep {
// wei : number
// curV : number
// }
// function IsNum( c : string) {
// return !isNaN(Number(c))
// }
//特定长度的整数最高位 > 0
enum OpType {
None,
Remove,
Add,
Replace,
}
class MethodDetail {
method : OpType
num : number
}
enum OpType {
None,
Remove,
Add,
Replace,
}
class MethodDetail {
method : OpType
num : number
}
//检查数量 满足 则 只Replace
//迭代修复
//1中行为 修复多个问题
//最优解
//解决问题顺序
//解决问题方法
//所有解中的最优解决方案
class LinkedNode<T>{
data : T = null
enum ProblemT {
Less,
More,
Same,
MisUp,
MisLow,
MisNum
}
class SNode {
start : number
//三种操作:
//构造 线段树
//OP1 某个节点+Sum Value 叶子节点加值
//OP2 Range 范围加值 从根节点 如果 Range 完全包含在当前Range之中 若Range 1个点则 直接加在叶子上 否则尽量加载中间节点上
class SegNode {
left : SegNode = null
right : SegNode = null
allChild : SegNode[] = new Array<SegNode>()
sum : number = 0
start : number = 0 //[] 闭区间
@liyonghelpme
liyonghelpme / BaseObject.cs
Created August 21, 2017 03:26 — forked from JakubNei/BaseObject.cs
My fancy custom UnityEngine.Transform like setup. Sorry, i just love doing stupid things like this.
/// <summary>
/// Implements basic equals methods and bool converions, similar to UnityEngine.Object
/// </summary>
public class BaseObject
{
public override bool Equals(object obj)
{
return AreObjectsEqual(this, obj as BaseObject);
}
public override int GetHashCode()
@liyonghelpme
liyonghelpme / MacBuildIOS.py
Created November 8, 2016 08:06
amr库的mac上编译IOS库,mac的xcode交叉编译功能
import os
pwd = os.getcwd()
DEVELOPER = os.popen("xcode-select -print-path").read().strip()
os.environ["DEVELOPER"] = DEVELOPER
DEST= os.path.join(pwd, "opencore-amr-iOS")
os.environ["DEST"] = DEST