This file has been truncated, but you can view the full file.
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
{ | |
"0x94f61134":"executeOrder(uint256)", | |
"0xc5fee757":"executeOrder2(uint256)", | |
"0xe9fca283":"buy(uint256,bytes32)", | |
"0x0ed74c08":"func_0C2C()", | |
"0xba485844":"func_0C0E()", | |
"0x6971d64c":"func_0AB9()", | |
"0xe31e2d6d":"func_0A93()", | |
"0x304bac6f":"func_0A6E()", | |
"0x70357e79":"func_08D3()", |
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
#import <JRSwizzle/JRSwizzle.h> | |
@implementation AVPlayerItem (MLWPerformance) | |
+ (void)load { | |
[AVPlayerItem jr_swizzleMethod:NSSelectorFromString(@"_attachToFigPlayer") withMethod:@selector(mlw_attachToFigPlayer) error:nil]; | |
} | |
- (void)mlw_attachToFigPlayer { | |
static dispatch_queue_t queue = nil; |
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
#import <AVFoundation/AVFoundation.h> | |
@interface MLWAsyncAVPlayer : AVPlayer | |
@end |
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
contract ShardedToken { | |
using SafeMath for uint256; | |
address owner = msg.sender; | |
uint256 private _totalSupply; | |
mapping(address => ShardedToken.Extension) private extensions; | |
function register() public { | |
extensions[msg.sender] = new Token.Extension(); | |
} |
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
#!/bin/bash | |
dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | |
# magnet:?xt=urn:btih:7ffbcd8cee06aba2ce6561688cf68ce2addca0a3 | |
# 1. Fixed letter1, letter2, letter3 assignments for macOS compatibility | |
# 2. Changed grep to sgrep (sorted grep), need to preinstall: npm i -g sgrep | |
if [ "$1" != "" ]; then | |
letter1=$(echo ${1:0:1}) | |
if [[ $letter1 == [a-zA-Z0-9] ]]; then |
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
// https://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightMultLookup | |
function isPowerOfTen(uint256 x) public pure returns (bool result) { | |
assembly { | |
let dict := 0x00011c021d0e18031e16140f191104081f1b0d17151310071a0c12060b050a09 | |
let zeroes := 0 | |
for { let offset := 0 } lt(offset, 256) { offset := add(offset, 32) } { | |
let v := and(shr(offset, x), 0xffffffff) | |
switch v |
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
#ifndef Lohi_h | |
#define Lohi_h | |
namespace lohi { | |
template<typename T> | |
struct Lohi; | |
template<typename T> | |
T zero(thread const T &) { | |
return 0; |
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
/* | |
* ABDK Math 64.64 Smart Contract Library. Copyright © 2019 by ABDK Consulting. | |
* Author: Mikhail Vladimirov <mikhail.vladimirov@gmail.com> | |
*/ | |
pragma solidity ^0.5.7; | |
/** | |
* Modified version of this code: | |
* https://github.com/abdk-consulting/abdk-libraries-solidity/blob/master/ABDKMath64x64.sol#L366 | |
* |
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
const { BN } = require('bn.js'); | |
const { keccak256 } = require('ethereumjs-util'); | |
const { toBN } = require('web3-utils'); | |
// function hash (selector, salt, m) { | |
// return new BN(selector, 'hex').xor(toBN(salt)).toNumber() % 25469 % m; | |
// } | |
function hash (selector, salt, m) { | |
const saltStr = toBN(salt).toString('hex', 8); |
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
const { BN } = require('bn.js'); | |
const { keccak256 } = require('ethereumjs-util'); | |
const { toBN } = require('web3-utils'); | |
const numberOfSelectors = 1000; | |
const tableSizeKoef = 1.5; | |
const maxBucketSize = 2; | |
function hash (selector, salt, m) { | |
return new BN(selector, 'hex').xor(toBN(salt)).toNumber() % 65537 % m; |
NewerOlder