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
| Server Software: nginx/1.4.6 | |
| Server Hostname: paperpaper.ru | |
| Server Port: 80 | |
| Document Path: / | |
| Document Length: 37679 bytes | |
| Concurrency Level: 1 | |
| Time taken for tests: 711.723 seconds |
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
| Server Software: nginx/1.4.6 | |
| Server Hostname: paperpaper.ru | |
| Server Port: 80 | |
| Document Path: / | |
| Document Length: 34971 bytes | |
| Concurrency Level: 1 | |
| Time taken for tests: 413.202 seconds | |
| Complete requests: 1000 |
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
| function getValue(id, cache, retrieveValue) { | |
| if(cache.has(id)) { | |
| return cache.get(id); | |
| } else { | |
| // синхронный запрос к удаленному источнику | |
| return retrieveValue(id); | |
| } | |
| } |
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
| function getValue(id, cache, retrieveValue) { | |
| if(cache.has(id)) { | |
| return cache.get(id); | |
| } else { | |
| return new Promise(function(ful, rej) { | |
| retrieveValue(id, ful, rej); | |
| }); | |
| } | |
| } |
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
| // длинный вариант | |
| function getValue(id, cache, retrieveValue) { | |
| return new Promise(function(ful, rej) { | |
| if(cache.has(id)) { | |
| ful(cache.get(id)) | |
| } else { | |
| rej(false); | |
| } | |
| }).catch(function() { |
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
| module Main | |
| import Data.Vect | |
| import Data.Vect.Views | |
| data Total : {a : Type} -> (a -> a -> Type) -> (x : a) -> (y : a) -> Type where | |
| LR : x `order` y -> Total order x y | |
| RL : y `order` x -> Total order x y | |
| interface TotalOrder a (order : a -> a -> Type) | order 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
| finToHex : Fin 16 -> Char | |
| finToHex FZ = '0' | |
| finToHex (FS FZ) = '1' | |
| finToHex (FS (FS FZ)) = '2' | |
| finToHex (FS (FS (FS FZ))) = '3' | |
| finToHex (FS (FS (FS (FS FZ)))) = '4' | |
| finToHex (FS (FS (FS (FS (FS FZ))))) = '5' | |
| finToHex (FS (FS (FS (FS (FS (FS FZ)))))) = '6' | |
| finToHex (FS (FS (FS (FS (FS (FS (FS FZ))))))) = '7' | |
| finToHex (FS (FS (FS (FS (FS (FS (FS (FS FZ)))))))) = '8' |
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
| module crc32 | |
| import Data.Bits | |
| g0 : Bits 32 | |
| g0 = intToBits 0xEDB88320 | |
| g1 : Bits 32 | |
| g1 = shiftRightLogical g0 (intToBits 1) |
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
| bitsToBytes : Bits 32 -> Vect 4 (Bits 8) | |
| bitsToBytes x = bitsToBytes' 4 x | |
| where | |
| bitsToBytes' : (n : Nat) -> Bits 32 -> Vect n (Bits 8) | |
| bitsToBytes' Z x = [] | |
| bitsToBytes' (S k) bits = let prevBits = bitsToBytes' k bits in | |
| let shifted = shiftRightLogical bits (MkBits $ natToBits {n = nextBytes 32} k * 8) in | |
| let nextByte = truncate {m = 24} {n = 8} shifted in | |
| nextByte :: prevBits |
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
| ### Keybase proof | |
| I hereby claim: | |
| * I am termina1 on github. | |
| * I am thought_sync (https://keybase.io/thought_sync) on keybase. | |
| * I have a public key whose fingerprint is 2AD6 D5B3 EFF4 288E 61F3 57CE C2C1 B06C 79D7 CD3B | |
| To claim this, I am signing this object: |