class Comments < ActiveRecord::Base
belongs_to :post
end
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 lang="en"> | |
<head> | |
<meta charset="utf 8"> | |
<title>My First Web Page</title> | |
</head> | |
<body> | |
<h2>My First Web Page</h2> | |
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ut gravida lorem. Ut turpis felis, pulvinar a semper sed, adipiscing id dolor. Pellentesque auctor nisi id magna consequat sagittis. Curabitur dapibus enim sit amet elit pharetra tincidunt feugiat nisl imperdiet. Ut convallis libero in urna ultrices accumsan. Donec sed odio eros. Donec viverra mi quis quam pulvinar at malesuada arcu rhoncus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. |
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
import turtle | |
def drawSquare(my_turtle): | |
my_turtle.color("red") | |
for i in range(4): | |
my_turtle.forward(100) | |
my_turtle.right(90) | |
def drawSomethingCool(my_turtle): | |
my_turtle.color("yellow") |
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 <iostream> | |
using namespace std; | |
int FirstFactorial(int num) { | |
// set the limit to the number provided | |
int limit = num; | |
for (int i = 1; i < limit; ++i) { | |
num = num * i; | |
} | |
return num; |
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
def FirstReverse(str): | |
# create a new empty string | |
rstr = "" | |
# loop through characters in str | |
for i in str: | |
# add characters to the front of rstr | |
rstr = i + rstr | |
return rstr | |
print FirstReverse(raw_input("Enter a word: ")) |
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
/** | |
* Write a program that prints the numbers from 1 to 100. | |
* But for multiples of three print "Fizz" instead of the number | |
* and for the multiples of five print "Buzz". | |
* For numbers which are multiples of both three and five print "FizzBuzz". | |
* */ | |
var size = 100 | |
method1(size) |
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
[ | |
{name: 'Afghanistan', code: 'AF'}, | |
{name: 'Åland Islands', code: 'AX'}, | |
{name: 'Albania', code: 'AL'}, | |
{name: 'Algeria', code: 'DZ'}, | |
{name: 'American Samoa', code: 'AS'}, | |
{name: 'AndorrA', code: 'AD'}, | |
{name: 'Angola', code: 'AO'}, | |
{name: 'Anguilla', code: 'AI'}, | |
{name: 'Antarctica', code: 'AQ'}, |
$ ping google.com
Copy the IP address and paste it into a browser.
$ traceroute google.com
$ man traceroute
breakdown of a URL - scheme:[//[user:password@]host[:port]][/]path[?query][#fragment]
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
function Ape (name, species, approvedListOfFoods) { | |
this.name = name | |
this.species = species | |
this.approvedListOfFoods = approvedListOfFoods | |
this.introduce = function () { | |
console.log('Hello! My name is ' + this.name + '. I am a ' + this.species + '. I like ' + this.approvedListOfFoods) | |
} | |
this.eat = function (food) { |
var x = 1
var x = 1
OlderNewer