Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# Copyright (C) 2009 jolts
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
#!/usr/bin/env ruby
# Uppgift 2 av Johan Nordström
$places = {} # Håller koll på elmätaren för platsen
$guests = [] # Håller reda på samtliga gäster
def create_guests
'''Skapar 5 slumpmässiga gäster'''
$guests << Guest.new("Bengt", "Larsson", "Tegelvägen 2", "111-115-511", "2009-15-03", 1, 2400)
$guests << Guest.new("Sven", "Bengtsson", "Testvägen 3", "121-151-111", "2009-01-01", 2, 3000)
#!/usr/bin/env ruby
# Uppgift 2 av Johan Nordström
$places = {} # Håller koll på elmätaren för platsen
$guests = [] # Håller reda på samtliga gäster
def create_guests
'''Skapar 5 slumpmässiga gäster'''
$guests << Guest.new("Bengt", "Larsson", "Tegelvägen 2", "111-115-511", "2009-15-03", 1, 2400)
$guests << Guest.new("Sven", "Bengtsson", "Testvägen 3", "121-151-111", "2009-01-01", 2, 3000)
#!/usr/bin/env ruby
# Uppgift 2 av Johan Nordström
$places = {} # Håller koll på elmätaren för platsen
def create_guests
'''Skapar 5 slumpmässiga gäster'''
guests = []
guests << Guest.new("Bengt", "Larsson", "Tegelvägen 2", "111-115-511", "2009-15-03", 1, 2400)
guests << Guest.new("Sven", "Bengtsson", "Testvägen 3", "121-151-111", "2009-01-01", 2, 3000)
# Uppgift 1 av Johan Nordström
class RubyCamping
def initialize
@guest = {}
end
def print_menu
puts """-------------------------------------------
Välkommen till Ruby Camping!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
Uppgift 4
</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="style.css" type="text/css" />
<link rel="stylesheet" href="reset.css" type="text/css" />
body {
font-size: 62.5%;
background-color: #1C273D;
padding:25px auto 25px auto;
margin: auto;
}
#Container {
width: 1000px;
background-color: #1C273D;
body {
font-size: 62.5%;
background-color: #1C273D;
padding:25px auto 25px auto;
}
#Container {
width: 800px;
background-color: #1C273D;
margin: auto;
body {
font-size: 62.5%;
background-color: #1C273D;
padding: 25px 0px 25px 0px;
}
#Container {
background-color: #1C273D;
width: 1100px;
body {
font-size: 62.5%; /* 16px × 62.5% = 10px */
background-color: #1C273D;
padding: 50px 200px 20px;
}
#Container {
background-color: #1C273D;
width: 800px;