- с утра посвизлил - весь день свободен
- украл, посвиззлил - в тюрьму
- волков бояться - в лесу не свиззлить
- не все золото что свиззлит
- свиззлинг - всему голова
- и рыбку съесть, и посвиззлить
- в большой семье свиззлом не щелкают
| require 'xcodeproj' | |
| require 'set' | |
| SOURCE_FOLDER=ARGV[0] ? ARGV[0] : ENV['PROJECT_DIR'] | |
| PROJECT_PATH=ARGV[1] ? ARGV[1] : ENV['PROJECT_FILE_PATH'] | |
| if !SOURCE_FOLDER || !PROJECT_PATH then | |
| puts "usage: ruby check-categories_compiled.rb source_folder project_path" | |
| exit 1 | |
| end |
| public protocol Stylish: class { | |
| func updateStyle() | |
| } | |
| public class StyleProxy<S: Stylish>: NSObject { | |
| fileprivate override init() { } | |
| } | |
| private class StyleProxyView<S: Stylish>: UIView { | |
| getRequest(url: string): Promise<any> { | |
| return new Promise<any>( | |
| function (resolve, reject) { | |
| const request = new XMLHttpRequest(); | |
| request.onload = function () { | |
| if (this.status === 200) { | |
| resolve(this.response); | |
| } else { | |
| reject(new Error(this.statusText)); | |
| } |
| const fs = require('fs'); | |
| const solc = require('solc'); | |
| const Web3 = require('web3'); | |
| // Connect to local Ethereum node | |
| const web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); | |
| // Compile the source code | |
| const input = fs.readFileSync('Token.sol'); | |
| const output = solc.compile(input.toString(), 1); |
| # What crazy talk is this? | |
| # See: https://twitter.com/myell0w/status/790245699694854145 | |
| # | |
| # In a world where everything has to be bigger, faster, higher and more, | |
| # users seem to have developed the expectation that the bigger the software | |
| # package, the better the software. However, if you fill up your binary with | |
| # useless data, the app store size might be too high and your app will | |
| # require download over wifi. | |
| # | |
| # The following script can be added to your Xcode target as a shell script. |
| // | |
| // SpinlockTestTests.swift | |
| // SpinlockTestTests | |
| // | |
| // Created by Peter Steinberger on 04/10/2016. | |
| // Copyright © 2016 PSPDFKit GmbH. All rights reserved. | |
| // | |
| import XCTest |
| #! /usr/bin/env python | |
| class Point(object): | |
| def __init__(self, _x, _y, _order = None): self.x, self.y, self.order = _x, _y, _order | |
| def calc(self, top, bottom, other_x): | |
| l = (top * inverse_mod(bottom)) % p | |
| x3 = (l * l - self.x - other_x) % p | |
| return Point(x3, (l * (self.x - x3) - self.y) % p) |
| /** | |
| * Base contract that all upgradeable contracts should use. | |
| * | |
| * Contracts implementing this interface are all called using delegatecall from | |
| * a dispatcher. As a result, the _sizes and _dest variables are shared with the | |
| * dispatcher contract, which allows the called contract to update these at will. | |
| * | |
| * _sizes is a map of function signatures to return value sizes. Due to EVM | |
| * limitations, these need to be populated by the target contract, so the | |
| * dispatcher knows how many bytes of data to return from called functions. |
| // iOS 9 allows you to animate between visual effects, which gives you the | |
| // ability to manipulate the blur radius. this can be useful for animating | |
| // a backdrop for a custom modal, and with a few tricks, can even be set | |
| // indirectly, allowing you to "scrub" between them back and forth with | |
| // a gesture, just like when you pull down Spotlight. | |
| // these are the two effects you want to transition between | |
| UIVisualEffect *startEffect = nil; // "nil" means no blur/tint/vibrancy (plain, fully-transparent view) | |
| UIVisualEffect *endEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]; |