Wednesday, 21 November 2012

Modelling and simulation

NAT 

Egyszerűbb folyamatok modellezése Mérések és szimulációk, a paramétermódosítás hatásai, törvényszerűségek, modellalkotás egyszerű tevékenységekre

Why use computer models?

As well as financial modelling, spreadsheet software can be used for many other kinds of computer model:
  • modelling supermarket queues
  • modelling the stresses which will be borne by a new bridge
  • modelling traffic flow in a new road system
Computer models are cheaper to setup than alternative methods that could be used to predict what will happen in a system, eg building a prototype. Other benefits include being able to:
  • make alterations and quickly see the outcomes
  • repeat tests several times over
  • learn from "what if?" scenarios
  • model dangerous situations safely

Limitations of computer models

A model is only as good as the rules used to create it. A mistake could have been made by whoever wrote the model and not every situation might have been considered - both of these issues could cause the model to give incorrect answers.


Computer simulation

 
A computer simulation is an application designed to imitate a real-life situation. A good example is software which simulates the experience of piloting a plane.

In the exam you may be asked to provide an example of simulation and list its advantages and disadvantages.
View from flight sim cockpit, looking out to the city of London, the London Eye is in shot
A real-life flight simulator - used for training pilots - is far more sophisticated, and is very expensive.
The pilot sits inside a specially designed cockpit on hydraulically controlled struts which move the cockpit to give the feel of the pitch and roll of a real plane. Sensors detect the actions of the pilot and move the cockpit accordingly. The view from the cockpit window is replaced with computer generated images.
Flight simulators give trainee pilots experience of:
  • different flying conditions, eg poor weather, night flying
  • emergency situations, eg frozen runways, fog, engine failure
  • landing procedures and how they differ from airport to airport
Flight simulators are safe and cost effective too. No fuel is needed and there's no crew to pay, any damage to the plane is simulated, and the pilot is never at risk.

Other uses of simulation

  • Nuclear power stations use simulation to improve output by looking at temperature, pressure and gas flow in the plant.
  • Scientific experiments (for example plant growth) can be observed in varying conditions.
  • Coastal erosion (the effect of the sea on the coastline) can be studied to anticipate possible flooding, so that defences can be best positioned.
  • Traffic flow can be simulated in major cities to investigate the need for new roads and/or traffic lights.
  • The aerodynamic effect on the shape of cars can be investigated by simulating air flow over different body shapes.

Virtual Reality

silver virtual reality headset with 'virtuality' written in blue across the front
Head-mounted VR display
Virtual Reality (VR) is a computer simulation which allows the user to interact with the system. Special interfaces give the user the feel, sound and view of the virtual system. The user wears a head-mounted display through which the virtual world can be seen.

Advantages and disadvantages of simulation

Advantages

  • It can avoid danger and loss of life.
  • Conditions can be varied and outcomes investigated.
  • Critical situations can be investigated without risk.
  • It is cost effective.
  • Simulations can be speed up so behaviour can be studied easily over a long period of time.
  • Simulations can be slowed down to study behaviour more closely.

Disadvantages

  • It can be expensive to measure how one thing affects another, to take the initial measurements, to create the model itself (such as aerodynamic wind tunnels).
  • To simulate something a thorough understanding is needed and an awareness of all the factors involved, without this a simulation cannot be created.
 http://www.bbc.co.uk/schools/gcsebitesize/ict/modelling/1computersimulation_act.shtml

Source: http://www.bbc.co.uk/schools/gcsebitesize/ict/modelling



Algodoo science simulations

 http://www.algodoo.com



Frictional force
 air friction
 
Spring experiments
 spring constant
damping

Machines
 Windmill

Gravity
strength of gravity

Light
Refraction
Eye and glasses
Dispersion

Density
floating
sink








Tuesday, 25 September 2012

Emelt fakt C++

Logikai utasítások

 if (i%5!=0)   cout << i << endl;

 if (i%5==0)   coutinue;

 ==
>
<
<=
>=
!=

and    &&
or        ||



 switch (muv) {
    case '+': cout << a+b << endl; break;
    case '-': cout << a-b << endl; break;
    case '*': cout << a*b << endl; break;
    case '/': cout << a/b << endl; break;
    default: cout << "Ilyen muvelet nincsen" << endl;
    }


Random number

#include <time.h>
 
  /* initialize random seed: */
  srand ( time(NULL) );

  /* generate secret number: */
  iSecret = rand() % 10 + 1; 
 
 
 
 
 
http://www.doc.ic.ac.uk/~wjk/C++Intro/CourseStructure.html#S1 

10A SQL

Source: http://www.w3schools.com/sql/default.asp

Database Management Sotwares: MySQL, SQL Server, Access, Oracle, Sybase, DB2

Standard Query Language

Quiz: http://www.w3schools.com/sql/sql_quiz.asp

  • SELECT - extracts data from a database
  • UPDATE - updates data in a database
  • DELETE - deletes data from a database
  • INSERT INTO - inserts new data into a database

  • CREATE DATABASE - creates a new database
  • ALTER DATABASE - modifies a database
  • CREATE TABLE - creates a new table
  • ALTER TABLE - modifies a table
  • DROP TABLE - deletes a table
  • CREATE INDEX - creates an index (search key)
  • DROP INDEX - deletes an index

SQL SELECT Syntax

 SELECT column_name(s) FROM table_name

 SELECT DISTINCT column_name(s) FROM table_name

 SELECT column_name(s) FROM table_name WHERE column_name operator value

= Equal
<> Not equal
> Greater than
< Less than
>= Greater than or equal
<= Less than or equal
BETWEEN Between an inclusive range
LIKE Search for a pattern
IN To specify multiple possible values for a column


SELECT * FROM Persons WHERE LastName='Svendson' AND (FirstName='Tove' OR FirstName='Ola')

SELECT column_name(s) FROM table_name ORDER BY column_name(s) ASC|DESC

DELETE FROM Persons WHERE LastName='Tjessem' AND FirstName='Jakob'

UPDATE Persons SET Address='Nissestien 67', City='Sandnes' WHERE LastName='Tjessem' AND FirstName='Jakob'

INSERT INTO Persons (P_Id, LastName, FirstName) VALUES (5, 'Tjessem', 'Jakob')

9A presenation programs

Presentation Words


blank
slide
bulleted point
animation
theme
brass
clay
iron
belly
at least
chart
bar chart
table
transparent
to insert
hyperlink
previous -
to consist of
to bring front
to send back
handout
title


Good or bad presentations

feature – sajátosság, jellemvonás
too much text (2-3 – sentences enough, no sentences just keywords)
no pictures
too small, bad quality
not readable
speaks quietly
no gesture
ctrl+c ctrl+V
no eye contact (audience)
bad background
bad order of slides (need a good structure)
bad fonts
table is hard to understand (chart is better)
http://www.youtube.com/watch?v=gNG0etmnwuk



 

9A drawing programs


MS Paint Words

pixel
canvas
free form select tool
rectangular  select tool
eraser
fill
color picker
magnify tool
pencil
brush
air brush
text tool
line (straight)
curve
rectangle
polygon
ellipse
rounded rectangle
opaque, transparent
skew, rotate, flip, stretch
palette

http://www.teachers.ash.org.au/geparker/how_to_use_microsoft_paint.htm

Monday, 2 April 2012

What is the biggest problem facing Today's young generation?

What is the biggest problem facing Today's young generation?

 I would say a break down in interpersonal communicative skills is the biggest problem they face.
 Dealing with the out of control information age.
 the economy

 

 

 

Wednesday, 4 January 2012

History of computer languages

History of computer languages


artificial language

The first high-level programming language to be designed for a computer was Plankalkül, developed for the German Z3 by Konrad Zuse between 1943 and 1945.

Konrad Zuse, Erfinder des ersten Computers der Welt, 1989 im Berliner Museum für Verkehr und Technik an einem Nachbau des so genannten Z 1. Der Urvater aller Computer kommt aus Deutschland.

 The period from the 1960s to the late 1970s brought the development of the major language paradigms now in use, though many aspects were refinements of ideas in the very first Third-generation programming languages.


The 1980s were years of relative consolidation. C++ combined object-oriented and systems programming.

The rapid growth of the Internet in the mid-1990s created opportunities for new languages. Perl, originally a Unix scripting tool first released in 1987, became common in dynamic websites. Java came to be used for server-side programming.

The five main categories of computer languages are "general purpose languages (C++, Java, C#, Smalltalk), scripting languages (Perl, Python), Web-based languages (Javascript, PHP, Curl), functional languages (ML, Haskell), and AI languages (Common Lisp, Prolog)."


Example codes: http://onestepback.org/articles/poly/













Computer language timeline

http://www.levenez.com/lang/lang_a4.pdf


Konrad Zuse in Nazi Germany may have developed the first real computer programming language, "Plankalkul" ca. 1945. This is mentioned in the 1978 ACM History of Programming Languages FORTRAN session.
According to Sammet, over 200 programming languages were developed between 1952 and 1972, but she considered only about 13 of them to be significant.
Here's a chronological list of computer languages that we consider to have had the most influence.
  • 1957 FORTRAN
  • 1958 ALGOL
  • 1960 LISP
  • 1960 COBOL
  • 1962 APL
  • 1962 SIMULA
  • 1964 BASIC
  • 1964 PL/I
  • 1966 ISWIM
  • 1970 Prolog
  • 1972 C
  • 1975 Pascal
  • 1975 Scheme
  • 1977 OPS5
  • 1978 CSP
  • 1978 FP
  • 1980 dBASE II
  • 1983 Smalltalk-80
  • 1983 Ada
  • 1983 Parlog
  • 1984 Standard ML
  • 1986 C++
  • 1986 CLP(R)
  • 1986 Eiffel
  • 1988 CLOS
  • 1988 Mathematica
  • 1988 Oberon
  • 1989 HTML
  • 1990 Haskell 

http://people.ku.edu/~nkinners/LangList/Extras/search.htm