trait Interface {
fn variable_we_need(&self) -> i32;
fn use_variable() {
do_something_with(self.variable_we_need());
}
}
struct Implementer {
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
#[derive(Clone, Copy, Debug)] | |
enum Foo { | |
One, | |
Two, | |
} | |
impl Foo { | |
pub fn get_it(&self) -> &str { | |
match self { | |
Foo::One => "Doodoo", |
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
SRCS = main.c test.c | |
OBJS = $(SRCS:.c=.o) | |
EXENAME = test | |
CFLAGS = -Wall -Wpedantic -Wextra | |
all: debug | |
debug: CPPFLAGS += -DDEBUG | |
debug: CFLAGS += -Og -ggdb | |
debug: OUTDIR = out/debug |
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
SRCS = main.c test.c | |
OBJS = $(SRCS:.c=.o) | |
EXENAME = test | |
CFLAGS = -Wall -Wpedantic -Wextra | |
all: debug | |
# Debug settings | |
debug: CPPFLAGS += -DDEBUG |
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
# frozen_string_literal: true | |
def recurse(*more) | |
public_send(caller[0][/`.*'/][1..-2], *more) | |
end | |
def doit_helper(n, acc) | |
puts '*' * acc | |
recurse(n, acc+1) unless acc >= n | |
end |
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/env ruby | |
# frozen_string_literal: true | |
# A direction (y,x). | |
# The order follows the curses convention. | |
module Directions | |
RIGHT = { y: 0, x: 1 }.freeze | |
LEFT = { y: 0, x: -1 }.freeze | |
UP = { y: 1, x: 0 }.freeze | |
DOWN = { y: -1, x: 0 }.freeze |
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/env ruby | |
# frozen_string_literal: true | |
# A direction (y,x). | |
# The order follows the curses convention. | |
module Directions | |
RIGHT = { y: 0, x: 1 }.freeze | |
LEFT = { y: 0, x: -1 }.freeze | |
UP = { y: 1, x: 0 }.freeze | |
DOWN = { y: -1, x: 0 }.freeze |
This is a SCRIPT-8 cassette.
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/env ruby | |
require 'net/http' | |
require 'uri' | |
require 'json' | |
def vote(points) | |
poss = (1..9).to_s | |
s1, s2, s3, s4, s5 = '' |
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
127.0.0.1 adclick.g.doublecklick.net | |
127.0.0.1 adeventtracker.spotify.com | |
127.0.0.1 adnxs.com | |
127.0.0.1 adnxs.comadplexmedia.adk2x.com | |
127.0.0.1 ads.spotify.com | |
127.0.0.1 ads-fa.spotify.com | |
127.0.0.1 analytics.spotify.com | |
127.0.0.1 audio2.spotify.com | |
127.0.0.1 audio-sp-sto.spotify.com | |
127.0.0.1 b.scorecardresearch.com |
NewerOlder