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
# this script calculates the use of modifier keys in different kb layouts | |
# kotoistus is Finnish keyboard layout (and for this purpose equivalent of Swedish layout) | |
# fi-intl is my custom layout, essentially US layout mixed with ö and ä letters | |
# us is basic US layout. | |
symbol_counts = { | |
#'a': 443776445, | |
#' ': 74199965, # ignore spaces for now | |
'_': 22890057, | |
',': 10895692, |
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
{ | |
"2013-01-01": [ | |
], | |
"2013-01-02": [ | |
"Aapeli" | |
], | |
"2013-01-03": [ | |
"Elmeri", | |
"Elmo", | |
"Elmer" |
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
use std; | |
#[link( | |
name="rust_hello", | |
vers="0.1", | |
author = "zokier", | |
url="http://github.com/zokier/rust_hello", | |
uuid="6240d465-7dba-4aa8-9053-027a1b12ecc4" | |
)]; |
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 pygame, time, random, sys, copy, os | |
from pygame.locals import * | |
t2 = 0 | |
nor = 0 | |
pc = [[[1, 1], [1, 1]], [[1, 0], [1, 0], [1, 1]], [[0, 1], [0, 1], [1, 1]], [[1], [1], [1], [1]], [[0, 1, 1], [1, 1, 0]], [[1, 1, 0], [0, 1, 1]], [[1, 1, 1], [0, 1, 0]]] | |
cols = [(0, 0, 0), (100, 100, 100), (10, 100, 225), (0, 150, 220), (0, 220, 150), (60, 200, 10), (180, 210, 5), (210, 180, 10), (100, 200, 170)] | |
pygame.init() | |
pygame.display.set_mode((320, 240)) | |
sk = pygame.display.get_surface() | |
f = [[1] + [0 for x in range(8)] + [1] for x in range(19)] + [[1 for x in range(10)]] |
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
#!/usr/bin/ruby | |
require 'socket' | |
require "base64" | |
require "open3" | |
server = "localhost" | |
port = "6667" | |
nick = "Nickname#{rand(5000)}" | |
channel = "#channel" |
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 <stdio.h> | |
int main(int, char**) | |
{ | |
if (4294967296 != 4294967296LL) | |
puts("Literal overflows"); | |
else | |
puts("Literal does not overflow"); | |
} | |
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
void (*yesno_cb)(bool); | |
void yn_tavern_room(bool b) | |
{ | |
if (b) | |
set_player_location(&loc_room_offline); | |
else | |
set_player_location(&loc_tavern_bartender); | |
} |
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_nameresolution.rs:16:21: 16:29 error: unresolved name `Bar::foo`. | |
trait_nameresolution.rs:16 println!("{:?}", Bar::foo()); // does not work | |
^~~~~~~~ | |
note: in expansion of format_args! | |
<std-macros>:222:8: 222:50 note: expansion site | |
<std-macros>:221:4: 223:6 note: in expansion of format! | |
<std-macros>:239:45: 239:63 note: expansion site | |
<std-macros>:238:4: 240:5 note: in expansion of println! | |
trait_nameresolution.rs:16:4: 16:33 note: expansion site | |
error: aborting due to previous error |
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 Foo {} | |
struct Bar; | |
impl Foo for Bar {} | |
fn main() { | |
let a: @Foo = @Bar as @Foo; | |
let b = a as @Bar; | |
} |
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.rs:20:12: 20:18 error: type `&~A:Send` does not implement any method in scope named `a` | |
test.rs:20 a.a(); | |
^~~~~~ | |
error: aborting due to previous error | |
task '<unnamed>' failed at 'explicit failure', /build/rust-git/src/rust/src/libsyntax/diagnostic.rs:98 | |
task '<unnamed>' failed at 'explicit failure', /build/rust-git/src/rust/src/librustc/rustc.rs:391 |
OlderNewer