Are you bored of constant checking twitter profiles/rss reader to get fresh informations about Ruby? Rubycious.com is a simple website, that collects the most interesting stuff around this great tool. It does just one thing - stores users' links to great resources, which are next presented in nice and clean way.
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
Section ZadanieOne. | |
Variables A B C D : Prop. | |
Theorem impl_rozdz : (A -> B) -> (A -> C) -> A -> B -> C. | |
Proof. | |
Qed. | |
Theorem impl_komp : (A -> B) -> (B -> C) -> A -> C. | |
Proof. |
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
aaaa |
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
Hello World! |
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
#include <stdio.h> | |
int another_function(int x) { return !((~(~0U>>1)|x)&(x-1)); } | |
int main(void) { | |
int i; | |
for (i = 0; i < 256; ++i) printf("%3d: %d\n", i, another_function(i)); | |
return 0; | |
} |
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
2012/2017 • Re: Ogłoszenia (Tifts) | |
<div class="codetitle">Code:</div><div class="codecontent">Szanowny Panie,<br><br> w "katalogu przedmiotu" na galaxy czyli:<br><br>http://galaxy.agh.edu.pl/~ | |
2012/2017 • Re: Sesja zimowa [2012/2013] (Tifts) | |
Dodałem algebrę bo już wiadomo.<hr> | |
2012/2017 • Re: BHP - grupy 5,6 (Tifts) | |
Owszem zrobią dla nas termin. I to nie tylko dla nas - z EiT cały rocznik nie miał BHP, bo informacja do nich nie dotarła. xD Ustala się termin teraz, ale z gór | |
2012/2017 • Re: BHP - grupy 5,6 (dickstra) |
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
Hash[['foo', 'bar', 'foo', 'baz'].group_by {|s| s}.map {|k, v| [k, v.size]}] | |
#=> {"foo"=>2, "bar"=>1, "baz"=>1} | |
['foo', 'bar', 'foo', 'baz'].each_with_object({}) { |v, o| o[v] ||= 0; o[v] += 1 } | |
#=> {"foo"=>2, "bar"=>1, "baz"=>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
#sebcioz: programs is a hash containing rows from a mysql query with two fields: program_id and program_name. | |
#participants is a hash containing rows from a mysql query with several fields, one of which is program_id. I would like to create a third hash that puts participants into groups based on program_id | |
programs = [{:program_id => 1, :program_name => :a}, {:program_id => 2, :program_name => :b}, {:program_id => 3, :program_name => :c}] | |
participants = [{:name => :q, :program_id => 1}, {:name => :w, :program_id => 1}, {:name => :e, :program_id => 2}] | |
groups = participants.group_by { |p| p[:program_id] } | |
p groups #=> {1=>[{:name=>:q, :program_id=>1}, {:name=>:w, :program_id=>1}], 2=>[{:name=>:e, :program_id=>2}]} |
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
class A | |
class << self | |
def a | |
"a" | |
end | |
alias b a | |
end |
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
# Is a constant defined in a module that is then included in a class, available to instance methods from the module that ended up in that class? | |
module A | |
B = "b" | |
end | |
class D | |
include A | |
def e |