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
| var bigDecimal = Math.random(); | |
| var improvedNum = (bigDecimal * 10) + 1; | |
| var randomNumber = Math.floor(improvedNum); | |
| alert(randomNumber); |
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> | |
| <head> | |
| <title>Current Date</title> | |
| <script type="text/javascript"> | |
| var d = new Date(); | |
| var current_date = d.getDate(); | |
| var current_month = d.getMonth() +1; | |
| var current_year = d.getFullYear(); | |
| document.write("Today is " + current_month + "-" + current_date + "-" + current_year); | |
| </script> |
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> | |
| <head> | |
| <title>Output</title> | |
| </head> | |
| <body> | |
| <?php echo $output; ?> | |
| </body> |
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 'net/http' | |
| pages = %w( www.ericjgruber.com | |
| www.lawrencecoders.com | |
| www.americanacollectors.com | |
| www.witchesbecryin.com | |
| ) | |
| threads = [] |
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 "base64" | |
| enc = Base64.decode64("UHV0IHlvdXIgc2hvZXMgb24u") | |
| puts enc |
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 "base64" | |
| enc = Base64.encode64("Put your shoes on.") | |
| puts enc |
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 class="field"> | |
| <%= f.label :state %><br /> | |
| <% states = { 'Kansas' => 'KS', 'Missouri' => 'MO', 'Nebraska' => 'NE' } %> | |
| <% list = states.sort | |
| list.each {|x| %> | |
| <%= f.radio_button :state, x[1] %> <%= h(x[0]) %> <br /> | |
| <% } %> | |
| </div> |
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
| It looks like Firefox (and presumably, other browsers) are not liking the display: block; CSS in your modules/system/defaults.css on line 51. | |
| Let's not modify core CSS files, but instead add this to your theme's CSS: | |
| .node.clear-block { | |
| display: inline-block !important; | |
| } |
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
| Oh sure, you could do this with jQuery, but in my early days, this is what I used ... | |
| <script> | |
| <!-- | |
| // Set slideShowSpeed (milliseconds) | |
| var slideShowSpeed = 8000 | |
| // Duration of crossfade (seconds) | |
| var crossFadeDuration = 3 |
NewerOlder