Adatok
marwellazure
0 bejegyzést írt és 18 hozzászólása volt az általa látogatott blogokban.
Programozó Páternoszter
Egyszer csak rámszól a blog és arra bíztat, hogy programozzak...*
2011.11.06 16:21:00

"Alighogy átszállt a határon a győzelem, az a hat-három s fáradtan a nagy drukkolástól ledőlnék, egyszer csak rámszól a rádió és arra bíztat, hogy verset írjak... Hát írok is." Zelk Zoltán: Rímes üdvözlő távirat http://www.mtv.hu/modernkepmesek/cikk.php?id=165709…..

Ez az ötödik hét (labor és előadás) posztja. Remek ötletként vezetjük be azt a "laborkártyát", hogy a "saját" focicsapat megléte és elhozása az órára maga is egy ilyen kártya legyen! Természetesen ezt a bónusz kártyát mindenkinek kiosztjuk a labor…..
marwellazure
2011.10.12 14:08:30

„The 600 series had rubber skin. We spotted them easy. But these are new. They look human. Sweat, bad breath, everything. Very hard to spot.”T E R M I N A T O RA mai laboron már (informatikus majdnem**) olyan fejlett ágenseket készítünk, amik analógiái az idézet "Cyber…..
marwellazure
2011.10.01 19:56:07
marwellazure
2011.10.01 21:08:00

Here we pass the ball, you understand that? We're a unit, not a one-man show. The name on the front of the shirt is more important than the one on the back. Erik Dornhelm, GOAL, http://www.imdb.com/title/tt0380389/quotes Ez a harmadik hét (labor és előadás) posztja. A hét feladata az előző…..
marwellazure
2011.09.28 22:59:27

Íme a negyedik hullám, de élvezd az elsőt, a másodikat és a harmadikat is! (Ha mást nem mondunk, akkor a szokásos "hegylakó szabály" van: csak egy maradhat, azaz az első vadászé a trófea.) Továbbá, ha mást nem mondunk, akkor a jelen hullám feladatainak megoldását is C,…..
marwellazure
2011.04.18 23:13:16
(ÉLES) B&L(**) 7/Sorter feladat:142. oldal (másik két "7/"-el egymást kizáró.)
noob.hu/2011/04/18/Sorter.png
A hozzá tartozó források pedig:
//IComparable.h
#ifndef ICOMPARABLE_H
#define ICOMPARABLE_H
class IComparable
{
public:
virtual bool operator<(const IComparable&) = 0;
};
#endif /*
*/
//Person.h
#ifndef PERSON_H
#define PERSON_H
#include "IComparable.h"
class Person:public IComparable
{
unsigned char age;
double height;
double weight;
public:Person (unsigned char age, double height, double weight):
age(age),height(height),weight(weight){}
bool SetHeight (double height);
double GetHeight(){return height;}
bool SetWeight (double weight);
double GetWeight(){return weight;}
bool SetAge (unsigned char age);
unsigned char GetAge(){return age;}
bool operator<(const IComparable& theOther)
{
return age < ((Person&) theOther).age;
}
};
#endif /*
*/
//Sorter.h
#ifndef SORTER_H
#define SORTER_H
#include "IComparable.h"
class Sorter
{
public:
static void BubbleSort(IComparable** pItems, unsigned itemCount);
};
#endif /*
*/
//main.cpp
#include <iostream>
#include "Person.h"
#include "Sorter.h"
using namespace std;
int
main (void)
{
const unsigned maxPeople = 4;
Person* people[maxPeople];
people[0] = new Person (56,100,50);
people[1] = new Person (12,180,85);
people[2] = new Person (4,182,90);
people[3] = new Person (22,182,90);
IComparable* comparables[maxPeople];
unsigned int i;
for (i = 0; i < maxPeople; i++)
comparables[i] = people[i];
Sorter::BubbleSort(comparables, maxPeople);
for (unsigned int i = 0; i < maxPeople; i++)
{
Person* pPerson = (Person*) comparables[i];
cout << (int) pPerson->GetAge () << ',' << (int) pPerson->GetHeight ()<< ',' <<(int) pPerson->GetWeight () << ',' << '\n';
}
for (unsigned int i = 0; i < maxPeople; i++)
delete people[i];
}
//Sorter.cpp
#include "Sorter.h"
void
Sorter::BubbleSort (IComparable** pItems, unsigned itemCount)
{
for (unsigned int j = itemCount; j > 0; j--)
{
for (unsigned int i = 1; i < j; i++)
{
if (*pItems[i] < *pItems[i - 1])
{
IComparable* tmp = pItems[i];
pItems[i] = pItems[i-1];
pItems[i-1] = tmp;
}
}
}
}
noob.hu/2011/04/18/Sorter.png
A hozzá tartozó források pedig:
//IComparable.h
#ifndef ICOMPARABLE_H
#define ICOMPARABLE_H
class IComparable
{
public:
virtual bool operator<(const IComparable&) = 0;
};
#endif /*
*/
//Person.h
#ifndef PERSON_H
#define PERSON_H
#include "IComparable.h"
class Person:public IComparable
{
unsigned char age;
double height;
double weight;
public:Person (unsigned char age, double height, double weight):
age(age),height(height),weight(weight){}
bool SetHeight (double height);
double GetHeight(){return height;}
bool SetWeight (double weight);
double GetWeight(){return weight;}
bool SetAge (unsigned char age);
unsigned char GetAge(){return age;}
bool operator<(const IComparable& theOther)
{
return age < ((Person&) theOther).age;
}
};
#endif /*
*/
//Sorter.h
#ifndef SORTER_H
#define SORTER_H
#include "IComparable.h"
class Sorter
{
public:
static void BubbleSort(IComparable** pItems, unsigned itemCount);
};
#endif /*
*/
//main.cpp
#include <iostream>
#include "Person.h"
#include "Sorter.h"
using namespace std;
int
main (void)
{
const unsigned maxPeople = 4;
Person* people[maxPeople];
people[0] = new Person (56,100,50);
people[1] = new Person (12,180,85);
people[2] = new Person (4,182,90);
people[3] = new Person (22,182,90);
IComparable* comparables[maxPeople];
unsigned int i;
for (i = 0; i < maxPeople; i++)
comparables[i] = people[i];
Sorter::BubbleSort(comparables, maxPeople);
for (unsigned int i = 0; i < maxPeople; i++)
{
Person* pPerson = (Person*) comparables[i];
cout << (int) pPerson->GetAge () << ',' << (int) pPerson->GetHeight ()<< ',' <<(int) pPerson->GetWeight () << ',' << '\n';
}
for (unsigned int i = 0; i < maxPeople; i++)
delete people[i];
}
//Sorter.cpp
#include "Sorter.h"
void
Sorter::BubbleSort (IComparable** pItems, unsigned itemCount)
{
for (unsigned int j = itemCount; j > 0; j--)
{
for (unsigned int i = 1; i < j; i++)
{
if (*pItems[i] < *pItems[i - 1])
{
IComparable* tmp = pItems[i];
pItems[i] = pItems[i-1];
pItems[i-1] = tmp;
}
}
}
}
marwellazure
2011.04.20 21:08:15

Laborvezetőknek A 3. előadás laborkártyáit kérdezzük végig a hallgatóktól (és persze a korábbiakból is osszunk ki, amelyeket fontosnak érezünk). Ha indokolt, akkor bevezethető a több sebességes labor, ahol az előre készülő hallgatók későbbi feladatokkal dolgoznak, vagy…..
Belépve többet láthatsz. Itt beléphetsz
10/3 Írj paancssoros programot, ami kigyűjti a alkalmazásokat (application) a ppmkonyv.xml DocBook XML 5.0 dokumentumból! (help : DocBook1.java)
Alkalmazások:
xmlto
docbook2
xsltproc
FOP
Firefox
Firefox
xsltproc
itt a kép:
kepfeltoltes.hu/view/111109/docbook_www.kepfeltoltes.hu_.jpg