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
| #!/usr/bin/ruby | |
| class GrussAugust | |
| attr_accessor :name | |
| def initialize(name = "World") | |
| @name = name | |
| end | |
| def greet |
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
| describe "IntelligentForwardings" do | |
| describe " on unauthorized access" do | |
| it "should redirect back to original page" do | |
| user = Factory(:user) | |
| visit edit_user_path(user) | |
| #Redirect 1: To the login path | |
| fill_in :email, :with => user.email | |
| fill_in :password, :with => user.raw_password | |
| click_button | |
| #Redirect 2: Back to edit path |
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
| div.matrix { | |
| color: #060; | |
| position: absolute; | |
| font-family: mono-space, sans-serif; | |
| font-size: 10px; | |
| top: 5px; | |
| left: 10px; | |
| z-index: 2; | |
| width: 99%; | |
| overflow: hidden; |
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 LangDetect { | |
| protected $dict = array( | |
| 'German' => array('ich','du','er','sie','es','wir','ihr','sie','der','die','das'), | |
| 'English' => array('i','you','he','she','it','we','us','they','this', 'the', 'a') | |
| ); | |
| protected $sourceText; | |
| public function __construct($text) { | |
| $this->sourceText = $text; | |
| } |
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
| describe "Users" do | |
| describe "Sign up" do | |
| describe "with invalid data" do | |
| it "should not create user" do | |
| lambda do | |
| visit signup_path | |
| fill_in "Name", :with => "" | |
| fill_in "Email", :with => "" | |
| fill_in "Password", :with => "" | |
| fill_in "Confirm password", :with => "" |
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
| describe "Users" do | |
| describe "Sign up" do | |
| describe "with invalid data" do | |
| it "should not create user" do | |
| lambda do | |
| visit signup_path | |
| fill_in "Name", :with => "" | |
| fill_in "Email", :with => "" | |
| fill_in "Password", :with => "" | |
| fill_in "Confirm password", :with => "" |
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
| [pixma] Discover response: | |
| [pixma] 00000000:42 4a 4e 50 82 01 00 00 00 00 00 00 00 00 00 10 | |
| [pixma] 00000010:00 01 08 00 06 04 2c 9e fc 34 95 9d c0 a8 01 27 | |
| [pixma] Found scanner at ip address: 192.168.1.39 | |
| [pixma] bjnp_allocate_device(bjnp://192.168.1.39:8612)[pixma] Get scanner identity | |
| [pixma] 00000000:42 4a 4e 50 02 30 00 00 00 00 00 00 00 00 00 00 | |
| [pixma] udp_command: Sending UDP command to 192.168.1.39:8612 | |
| [pixma] scanner identity: | |
| [pixma] 00000000:42 4a 4e 50 82 30 00 00 00 00 00 00 00 00 00 67 | |
| [pixma] 00000010:00 67 4d 46 47 3a 43 61 6e 6f 6e 3b 43 4d 44 3a |
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
| package org.avgp.sample; | |
| import org.avgp.sample.User; | |
| import org.json.JSONString; | |
| public class Message implements JSONString { | |
| protected User sender; | |
| protected User receipient; | |
| protected String content; | |
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 "java" | |
| require "json.jar" | |
| require "Sample.jar" | |
| alice = Java::OrgAvgpSample::User.new("Alice") | |
| bob = Java::OrgAvgpSample::User.new("Bob") | |
| puts alice.getId() | |
| puts bob.getId() | |
| message = Java::OrgAvgpSample::Message.new(alice, bob, "Hello Bob!") |
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
| %html | |
| %body | |
| %h1 | |
| Hello, | |
| %= name |