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.Linq; | |
using System.Linq.Expressions; | |
using Microsoft.AspNet.OData; | |
using Microsoft.AspNet.OData.Builder; | |
using Microsoft.AspNet.OData.Extensions; | |
using Microsoft.AspNet.OData.Formatter; | |
using Microsoft.AspNetCore.Builder; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Net.Http.Headers; |
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
export const decodeArg = (web3: Web3, hexString: string, solidityType: string, offsetInBytes: number, lengthInBytes: number): any => { | |
if (lengthInBytes > 32) { | |
throw new Error('Cannot decode types >32 bytes length'); | |
} | |
const zxoffset = hexString.startsWith('0x') ? 2 : 0; | |
const zeroedLength = 32 - lengthInBytes; | |
return web3.eth.abi.decodeParameter(solidityType, '00'.repeat(zeroedLength) + hexString.slice(zxoffset + offsetInBytes * 2, zxoffset + (offsetInBytes + lengthInBytes) * 2)); | |
}; | |
export const decodePackedArgs = (web3: Web3, hexString: string, typeMetadatas: [string, number][]) => { |
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
Пробирка Колина Пауэлла и "легальность" нападения на Ирак | |
В интернетах часто любят упоминать пресловутую пробирку которой Колин Пауэлл тряс перед вторжением в Ирак -- якобы он говорил что в ней находятся образцы иракского ОМП, и потому надо немедленно воевать. | |
Так вот, сначала немного вводных данных. Ко времени вторжения в Ирак у ООН всё еще не было данных о судьбе некоторых частей оружейной программы Ирака. За подробностями об инспекциях и полученной информации можно посмотреть документы [UNSCOM](http://www.un.org/depts/unscom/unscmdoc.htm) и [UNMOVIC](http://www.unmovic.org/). | |
***UNMOVIC Twelfth Quarterly Report UN document S/2003/232 of 28 February 2003** | |
* | |
*As there is little new substantive information in the weapons part of Iraq’s declaration, or new supporting documentation, the issues that were identified as unresolved in the Amorim report (S/1999/356) and in UNSCOM's report (S/1999/94) remain.* |
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
0eNrlXWty28gRvgur8ichXdPzHleSKq+P4J8pl4oSIQm1fBUI2nG2dIDcI7lYTpIBJD5EdBPdoKy1V/tjdymCHwbd09/0azC/ja7n22Jdlct69P63UXmzWm5G7//x22hT3i2n8+Zv9bd1MXo/KutiMRqPltNF86malvPRw3hULmfFP0fv4eHzeFQs67Iui8fftx++XS23i+uiyhfsf1nMi5u6Km8mxbKo7r5N8p2L6nZ6U2Tw9WqTEVbL5rYZ1frx6Nvo/QSczrealVX+ZfutHo+ut7e3RXW1Kf+VQUHt/3kYd+6t9/deFLNyu5jsh7BezdHbvnO7G6t37gGBNHvI9eprUU02X8v65r4L5WAHBPkJsnCXj4+wab7/uFXHoipn7VC/5sds/181Mv24hdNr7PNrMu7j3a829bTOQ6qrbYEM2e6HfF3e9YnA7SWfBTpaFuXd/fVqWzWq1fAZQXd79Jtt9aWYTdoJ0sE19gnXxuca9Qim52FaTWAaBDPwMIMXjDPyMKMVjDPtMTd1hru7rymJ7maYdc9RA4IKigtrHQELGCxwYYORjFZzYWOQjNbw9KXjDlQzQC1bstRYHQbr5LCGMVqmaQUlEUFgqytJRBDlsBwRJJ4I3F4EClsItOLBJH0eBiTs7HdWZOIpO9txnraZE4zBWFrrZwv45GmR7059t18BjcdXQG24atG7mWkCCmR5Y/Khf0xsa/Hp/Ji80GXQ9jC4LLuOVtzY4QoJcinijx4lE2jvWBnbXd7H1qFDZS9Je6cHH6o5mEyDs5xs6tUaQTEHlNZ1qqvV/Oq6uJ9+KVdVc9FNWd1sy/qqWE6v58XVrNw0/310gLJTVCxnV/Xqqr3H6P3tdL7Jf62K6eyqueG6mO2+ery+/bD/quP+fimretvOy50Q2ismH0YPjQeWXa926KMR9sQgnE7en51OWUdeYToyWm4AuI6MZDoldW46eXQ6GfaCmcz5oTrWdErujzOdDuy0WUzn88l8ukCeGOJhEmkijDmmn1U1vSs |
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
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TypeApplications #-} | |
{-# LANGUAGE TypeOperators #-} | |
module Main where |
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
0eNqtnU1vHElyhv9Kg5e1gdagK79zjuuLTz7YvhkDoyn1aNpLkUSTGq8w0H93NdkSaTHfyHjGBha72FHPo6qoqKg3MzIi/ri6vvl8uD8dbx+vfv7j6sPh4f3peP94vLu9+vnqn48ff9t8ONw+HB+/bDf/end9d393enz38H5/s7++OWw396e7j6fDw8Px98O7z/cfT/sPh83D3c3+tNmfTvsvm1/vTpt/Od7sPz/8ZfNPK2Tz15u793/bPHx5eDx8+mnz778dHzbrf/abh5v1r3q8+bL5dPfh+Ovx8GHz+/503N8+bu5+Xf94vazjx9vN9Zf1XzlcHx7+a7s53P62v32//vDxbnN92Ly/+3S/fzyuV7X57+Pjb5v97ebw9+PD4/H246u/+S8P3+/i4aer7dXD7f7+3ePdu4+n44fz7f/96udlt9tefXn636/bq/31ejufHw/vzr+8X2FXPz+ePh+2V8f3d7cPVz//xx9X5yvb35z/7ccv94fVasf13lb27f7T+f89mePd/f72cHO1Ao+3Hw7nv+XrL9urw+3j8fF4eMY8/Z8v/3n7+dP14bT+4Dvg+vjx3eHm8P7xdHz/7v7u5rCy7+/WR/L0jJ6uOT9dcV7x61Xdrj89Pl3cH1fL+b9Ohw+v/4bznS716/Z//YOU4vmK1od5uPX9+Ov6t90e1qd2fff5dL6FpW6XlLfrH/7y6vff7id8v5/9+/efP32+2T/end7eSbvcyYAQX0z6aX9z8+5m/+n+LaD89GyM9NMQknyXsez0dWQnImhEcSKSRlQnomhEcyKMZ9J9iGCY82xqF8Ow57I4GYZBF6eHBsOiS3QyDJMuTheNlk2dPhotmxbX+xaj/cItlQSyyCPZD7EpGnFs8NO3UWwb4zaGOophi/ONidbj7T6zTuJYcL41yfCS4HxrkuElwfnWJOPNC863Jj2/eWXIcL41qRkM51uTdwbDGdpzMBjO2J6TwXC6ajaiWXBG92x9tJ1+Wgw/jU4/LYafxuBTD5NoFiO |
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
0eNqsfeuSHDeu9Lv49/QXvJM4r7LhcOjS6504o0vo4jgbG/vuX/VI9pTkYhGZ2b92bUtEgUygkNUJ8D+/vH76ev346fH9l1/+5z+/PL758P7zL//zj//88vnx9/evnm7/7su/P15/+Z9fHr9c3/3y8Mv7V+9u//T6+mr7o7/89+GXx/dvr//3y//E/z4s/9L1/z5+un7+fPny6dX7zx8/fPpyeX19+rJbJP3314dfru+/PH55vH57jOd/+Pdv77++e339tFn5+QEefvn44fP2x7f/u1ndlij/rz788u9f/udS7f/V28rbE3y+/bfPH6/Xt5d3H95+fbpe8s3W7Yl/Wj/9tf6769vHr+8u16frmy+fHt9cPn54uv7dWv7TWovP1t5fH3//1+sPXz/dnr4+pJR+PbCSl150yYuyXD8GyUAFtynGs31KD/aQcjjaqbb2JEue9LWBJhkYawMmGTD0LOwcszFvh9GPDiOGpS8pSb7EdXynqllIawtDs5DBA0n97EDsIbaHVPLhgawDPUfNmbq2oGXc2NCUW8+264besO2XHe7XOtqzlnnjOtyLlnqjrS1oKTEF8ETK6VvwGb4PqbajE0mOF7qWf9M64IuWgNP6dV61tJgKeCL1/H27BUh/SO2wNknriK9aCk7rl3rVUnDq6H6dvhO37c9x269xuF/riG9aDk7riG9aDs7rF3vT8mKO4Im005fidsB5q657Payu1xHftRycHQW8loPz+s3etbyY0Rq+n753twPO4yGNeHgi64jvWg7O6zf70HJwHuB+jdO34rb9JW37dVho53XEDy0Hl3XEDy0Hl/Wb3bS8WFCybqdvxe2Ay1aqWDk6kbKOeNNycFlHvIlfBarjs4CWGAtazNvpi3c74WIPORx+GigO6h60LFwc5D1oabjA9D2cvhm3E6h527LDarsGhz9aIq7rsI9Ry8Q1OUxo6bFm+APX6dtxO+W6lSzxkMVXx+e6qCXj6gj9pGXj6vhUl7QUWdGyPqbz77P5oW7pJR5 |
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.Threading; | |
using System.Threading.Tasks; | |
namespace Utils | |
{ | |
public class AsyncLock<T> where T : class | |
{ | |
public bool IsDeconstructed { get; private set; } | |
private readonly SemaphoreSlim _semaphore; |
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.Diagnostics; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var logger = new MyLogger(); | |
var sw = Stopwatch.StartNew(); | |
for (int i = 0; i < 50000; i++) |
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 Newtonsoft.Json; | |
using Newtonsoft.Json.Converters; | |
namespace X | |
{ | |
public class CheckedStringEnumConverter : StringEnumConverter | |
{ | |
public CheckedStringEnumConverter() : this (false) | |
{ |