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
body | |
{ | |
margin: auto; | |
width: 78%; | |
color: #666; | |
font-family: GillSans, Calibri, Trebchet, sans-serif; | |
} | |
/* Deal with the links */ |
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
a:link,a:visited,a:hover{color:#476c8e}a:link,a:visited,.nav:visited,.nav:link,.nav,.codeheader,.quoteheader,.catbg3 a:visited,.catbg3 a:link,tr.catbg3 td,.catbg3,.catbg2 a:visited,.catbg2 a:link,.catbg a:visited,.catbg a:link,.maintab_active_back,.maintab_back,.maintab_back a:visited,.maintab_back a:link,.maintab_active_back a:visited,.maintab_active_back a:link,.maintab_active_back a:hover,.maintab_back a:hover,.mirrortab_back,.mirrortab_active_back,.mirrortab_active_back a:visited,.mirrortab_active_back a:link,.mirrortab_back a:visited,.mirrortab_back a:link,.mirrortab_active_back a:hover,.mirrortab_back a:hover,div.navigation ul li a{text-decoration:none}a:hover,a.nav:hover,.titlebg2 a:visited,.titlebg2 a:link,.titlebg2 a:hover{text-decoration:underline}.nav:visited,.nav:link,.nav,button,textarea,input,textarea,select,.quote,.code,.codeheader,.quoteheader,.windowbg,.windowbg2,.windowbg3,.mirrortab_active_back a:hover,.mirrortab_back a:hover{color:#000}a.nav:hover{color:#c33}table{empty-cells:show}tr,th,td |
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
# tiny shoes app that tells the length of some text | |
Shoes.app :title => 'strlen', :width => 300, :height => 125 do | |
background "#CFC".."AFA" | |
stack :margin => 10 do | |
para "Enter some text here" | |
@text = edit_line | |
every 0.1 do | |
@len.replace "The length of the text entered is " + @text.text.length.to_s + "." | |
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
# Rolling a dice is equivalent to generating a random number from 1 to 6. | |
def dice_roll | |
sum = 0 | |
2.times { | |
sum += 1 + rand(6) | |
} | |
sum | |
end | |
NewerOlder