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
testgist |
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
from note |
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 GMTool.Sources.Config; | |
using GMTool.Sources.Data; | |
using GMTool.Sources.Network; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using System.Web; | |
namespace GMTool.Sources.Util |
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.Runtime.InteropServices; | |
namespace GMTool.Sources.Util | |
{ | |
// 서비스 컨트롤 할때 원격에 있는 경우 아래 기능이 필요하다. 또는 원격에 있는 네트워크 드라이브 연결할때도 사용하면됨 | |
// http://www.pinvoke.net/default.aspx/mpr.wnetaddconnection2 | |
public class NetworkDrive | |
{ | |
public enum ResourceScope |
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
values = [ | |
16199, 10906, 3382, 84725, 71294, 36372, 21256, 18555, 21636, 19425, 18688, | |
10482, 7613, 74453, 58176, 50942, 26950, 26582, 9589, 9520, 210198, 50818, | |
36992, 17732, 16953, 9971, 8031, 5247, 372309] | |
limit = 312967 | |
def m(i, limit, values, taken, cache): | |
"""Calculates the maximum value that can be attained with total value less | |
than or equal to `limit`. |
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
class Guard<T> : IDisposable where T : class { | |
public Guard(T obj, Action<T> dispose) | |
{ | |
obj_ = obj; | |
dispose_ = dispose; | |
disposed_ = false; | |
} | |
public void Dispose() |
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
ZigZag-Encoding | |
--------------- | |
Maps negative values to positive values while going back and | |
forth (0 = 0, -1 = 1, 1 = 2, -2 = 3, 2 = 4, -3 = 5, 3 = 6 ...) | |
(i >> bitlength-1) ^ (i << 1) | |
with "i" being the number to be encoded, "^" being | |
XOR-operation and ">>" would be arithemtic shifting-operation |
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
/// ================ Half.cs ==================== | |
/// The code is free to use for any reason without any restrictions. | |
/// Ladislav Lang (2009), Joannes Vermorel (2017) | |
using System; | |
using System.Diagnostics; | |
using System.Globalization; | |
namespace SystemHalf | |
{ |
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 Microsoft.CodeAnalysis.CSharp; | |
using Microsoft.CodeAnalysis.CSharp.Scripting; | |
using Microsoft.CodeAnalysis.Scripting; | |
using Mono.CSharp; | |
using System; | |
using System.CodeDom.Compiler; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Dynamic; | |
using System.Linq; |
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
<canvas id="output" tabindex="1"></canvas> |
OlderNewer