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
| // | |
| // breakout.c | |
| // | |
| // Computer Science 50 | |
| // Problem Set 3 | |
| // | |
| // standard libraries | |
| #define _XOPEN_SOURCE | |
| #include <stdio.h> |
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
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
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
| README.ext | |
| http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/tags/v1_8_6/README.EXT?revision=12055 | |
| Extending Ruby - Pickaxe | |
| http://ruby-doc.org/docs/ProgrammingRuby/html/ext_ruby.html | |
| Extending Ruby on O'Reilly | |
| http://onlamp.com/pub/a/onlamp/2004/11/18/extending_ruby.html | |
| Ruby C Extensions - Mark Volkman |
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
| require 'rubygems' | |
| require 'nokogiri' | |
| require 'open-uri' | |
| require 'net/http' | |
| class NokoLinkSet < Nokogiri::XML::NodeSet | |
| # Create new LinkSet object from the url and the selector | |
| def initialize(url, selector) | |
| if not ( url.nil? and selector.nil? ) | |
| @raw_html = open(url) |
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
| --->->>->++++++++++++++++++++++++++++>++>-->+>++ | |
| +++++>++>-->++++++++++++++++++>+++++++>+++++++++ | |
| ++++++++++++>-->++++++++>+++++++++>++++++++++>++++++++>+++++ | |
| +>++++++++++++>++++++>+>+++++++>++++++++++>+++++>-->++++++++ | |
| +>++++++>++>->++++++++++++>++>+++++++++++++>-->++++++++>>+++ | |
| ++++++++++>-->++++++++++++++>>+++++++++++>+>+++++++++ |
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> | |
| #include <math.h> | |
| int main() { | |
| int t, a, b, b2, b4, s, p; | |
| scanf("%d", &t); | |
| typedef double d; | |
| while(t--) { | |
| scanf("%d %d", &a, &b); | |
| a %= 10; | |
| b2 = (b>2)?b%2:b; |
NewerOlder