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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <script id="jsbin-javascript"> | |
| function divideBy(nominator, denominator){ |
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
| puts "Total hours in a year is:" | |
| puts 365*24 | |
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
| # Here's some new strange stuff , remeber type it exactly | |
| days = " Mon Tue Wed Thu Fri Sat Sun" | |
| months = "Jan\n Feb\n Mar\n Apr\n Jun\n Jul\n Aug\n" | |
| puts "Here are the days: #{days}" | |
| puts "Here are the months: #{months}" |
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
| tabby_cat = "\t I'm tabbed in." | |
| persian_cat = "I'm split\non a line ." | |
| backslash_cat = "I'm \\a \\ cat." | |
| fat_cat = """ | |
| I'll do a list: | |
| \t* Cat food | |
| \t* Fishes |
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
| print "Give me a number?" | |
| number = gets.chomp.to_i | |
| bigger = number * 100 | |
| puts "A bigger number is #{bigger} ." | |
| print "Give me another number: " | |
| another = gets.chomp | |
| number = another.to_i |
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
| first , second , third = ARGV | |
| puts "Your first variable is : #{first}" | |
| puts "Your second variable is : #{second}" | |
| puts "Your third variable is : #{third}" |
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
| <select name="pickYear"> | |
| <option value="1980"<?php echo $pickYear == '1980' ? 'selected' == "selected" : '' ?>> Year :</option> | |
| <?php | |
| for ($i=date('Y'); $i >= 1980 ; $i--) { | |
| $selected = '' ; |
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
| <?php | |
| /* | |
| * Start of the Base_chat | |
| * Chat App based on PHP | |
| * Author : Infobase Team | |
| */ | |
| class BaseChat{ | |
| // Database Connection | |
| private $dbConnection ; |
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
| <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
| // CSS loader front-end | |
| if( ! function_exists('theme_style_site')){ | |
| function theme_style_site($var = ''){ | |
| $url = base_url("assets/site/".$var); | |
| return '<link rel="stylesheet" href="'.$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
| n = 9 | |
| for i in 0..n | |
| puts "Your Depth is #{i} !!!" | |
| end |