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
| let memory = rawData!.bindMemory(to: UInt8.self, capacity: 4) | |
| print(memory[0], memory[1], memory[2], memory[3]) | |
| print(ttl, Int(rdlen)) | |
| /* ..... */ | |
| let error = DNSServiceQueryRecord( | |
| &service, | |
| kDNSServiceFlagsTimeout, |
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
| import UIKit | |
| import CoreData | |
| @UIApplicationMain | |
| class AppDelegate: UIResponder, UIApplicationDelegate { | |
| func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | |
| // Override point for customization after application launch. | |
| return true | |
| } |
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
| Austria: 40ms | |
| Smolensk: 20ms | |
| Sofia Bulgaria: 50ms | |
| Tambov: 24ms | |
| Moscow MTS: 14ms | |
| Yandex Cloud: 17ms | |
| Novosibirsk: 65ms | |
| Yaroslavl: 19ms | |
| Krasnodar: 37ms | |
| Minsk: 54ms |
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
| package main | |
| import ( | |
| //"crypto/rand" | |
| "fmt" | |
| "golang.org/x/crypto/salsa20" | |
| ) | |
| func main() { | |
| nonce := []byte { |
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
| project('quickjs', 'c', version : '2019-08-10') | |
| add_project_arguments('-DCONFIG_VERSION="2019-08-10"', language : 'c') | |
| lib = static_library('quickjs', 'quickjs.c', 'cutils.c', 'quickjs-libc.c', 'libregexp.c', 'libunicode.c') | |
| compiler = executable('qjsc', 'qjsc.c', link_with : lib) #, link_args : '-Wl,-S' | |
| repl_c = custom_target( | |
| 'repl.c', |
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
| // | |
| // main.c | |
| // testQJS | |
| // | |
| // Created by menangen on 15/08/2019. | |
| // Copyright © 2019 menangen. All rights reserved. | |
| // | |
| #include "quickjs.h" | |
| #include "quickjs-libc.h" |
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
| import XCTest | |
| import class Foundation.Bundle | |
| final class commandlinetoolTests: XCTestCase { | |
| func testExample() throws { | |
| // This is an example of a functional test case. | |
| // Use XCTAssert and related functions to verify your tests produce the correct | |
| // results. | |
| // Some of the APIs that we use below are available in macOS 10.13 and above. |
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
| import PlaygroundSupport | |
| import Cocoa | |
| import SpriteKit | |
| import GameplayKit | |
| class GameScene: SKScene { | |
| let spriteSize: CGFloat = 128 | |
| let mapSize = double2(2, 2) | |
| func getMapTexture(_ source: GKCoherentNoiseSource) -> SKTexture |
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
| const assert = require('assert'); | |
| class Encoder { | |
| static get alpha () { | |
| return "0123456789ABCDEFGHJKLMNPQRSTVXYZ" | |
| } | |
| static getCode(number) { | |
| const r = number & 31; | |
| const diff = (number - r) >> 5; |
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
| import SpriteKit | |
| import GameplayKit | |
| class GameScene: SKScene { | |
| override func didMove(to view: SKView) { | |
| let frequency: Double = 1.0 | |
| let sampleCount: Int32 = 16 | |
| let mapSize: Double = 5 |