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
#include <cstdio> | |
#include <cstdarg> | |
using namespace std; | |
typedef struct { | |
int a; | |
int b; | |
int c; | |
} themespec_t; |
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
test |
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
(2:658)$ gdb -q --args cargo build | |
Reading symbols from cargo...done. | |
(gdb) r | |
Starting program: /home/antek/bin/cargo/cargo-nightly-i686-unknown-linux-gnu/bin/cargo build | |
warning: Could not load shared library symbols for linux-gate.so.1. | |
Do you need "set solib-search-path" or "set sysroot"? | |
[Thread debugging using libthread_db enabled] | |
Using host libthread_db library "/usr/lib/libthread_db.so.1". | |
[New Thread 0xb73ffb40 (LWP 23218)] | |
[New Thread 0xb71feb40 (LWP 23219)] |
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 java.util.*; | |
import java.lang.*; | |
class Log { | |
public static void put(String fmt, Object... args) { | |
String data = String.format(fmt, args); | |
System.out.println(data); | |
} | |
} |
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
trait Action { | |
fn invoke(&self); | |
fn revoke(&self); | |
} | |
struct RemoveAction { | |
dummy: int | |
} | |
impl RemoveAction { |
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
checkd :: [Int] -> Int -> Int | |
checkd [] n = n | |
checkd (prime:primes) n = | |
if (elem n primes || n `mod` prime == 0) then | |
prime | |
else | |
checkd primes n | |
preplist :: [Int] -> Int -> [Int] | |
preplist curlist n = filter (\ x -> x < (n `div` 2 + 1)) curlist |
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
(ns s512.core | |
(:require [clojure.java.io :as io]) | |
(:gen-class)) | |
(set! *warn-on-reflection* true) | |
(defn data-file [] | |
(io/file "out.bin")) | |
(defn data-stream [] |
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 qualified Data.ByteString.Lazy as BL | |
import Data.Binary.Get | |
import Data.Word | |
readArray :: Get [Word8] | |
readArray = do | |
empty <- isEmpty | |
if empty | |
then return [] | |
else do |
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 qualified Data.ByteString.Lazy as BL | |
import Data.Binary.Get | |
import Data.Word | |
import Data.Bits | |
import Data.Char | |
readArray :: Get [Word8] | |
readArray = do | |
empty <- isEmpty | |
if empty |
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
#pragma once | |
#define NAMESPACE_ENDIANCONVERSION_BEGIN namespace EndianConversion { | |
#define NAMESPACE_ENDIANCONVERSION_END } | |
#include <stdint.h> | |
// __BYTE_ORDER__ is a gcc macro | |
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ | |
#define __LESWAP(n, x) x |
OlderNewer