The site is loading…

  • Egy képanimáció készítése fényképekből, zenével. Az animációt el kell készíteni Flash-vel és már programmal (Photo story, vagy videószerkesztő) segítségével is. (beadandó minden forrásállomány, és futtatható állomány is)
  • Egy interaktív banner. Az animációt el kell készíteni Flash-vel és már programmal (java script, html5) segítségével is. (beadandó minden forrásállomány, és futtatható állomány is)

diego2.swf
diego.zip (html5 akart lenni, de nem nagyon jött össze 🙂

  • egy QR kód, mely a portfólióra mutat.

Continue reading

https://docs.google.com/document/d/1SX0tRMfup9jNVCXMm9SLYfgUPwRUIeWCark-ztk15mM/edit

main:

  1. int main(){
  2. 	int be=0;
  3. /*
  4. 	vector<int > vec(10);
  5.  
  6. 	typename vector<int>::iterator it;
  7. 	for(vector<int>::iterator it=vec.begin();it!=vec.end();++it){
  8.     	*it
  9. 	}
  10. */
  11.  
  12. 	list<konyv> adatbazis;
  13. 	do{
  14.     	cout << "1. beszur" << endl;
  15.     	cout << "2. torles" << endl;
  16.     	cout << "11. listazas" << endl;
  17.     	cout << ">: ";
  18.     	cin >> be;
  19.     	if(be==1){beszur(adatbazis);}
  20.     	if(be==2){torol(adatbazis);}
  21.     	if(be==11){listaz(adatbazis);}
  22. 	} while (be<12);
  23.  
  24. 	return 0;
  25. }

header:

  1. #include <iostream>
  2. #include <list>
  3.  
  4. using namespace std;
  5.  
  6. struct konyv{
  7.   string szerzo;
  8.   string cim;
  9.   int ar;
  10.   int db;
  11. };
  12.  
  13. void beszur(list<konyv> &adatbazis){
  14. 	konyv tmp;
  15. 	cout << "Szerzo: ";
  16. 	cin >> tmp.szerzo;
  17. 	cout << "Cim: ";
  18. 	cin >> tmp.cim;
  19. 	cout << "Ar: ";
  20. 	cin >> tmp.ar;
  21. 	cout << "Db: ";
  22. 	cin >> tmp.db;
  23. 	adatbazis.push_back(tmp);
  24. }
  25. void torol(list<konyv> &adatbazis){
  26. 	int pos;
  27. 	cout << "Pozíció: ";
  28. 	cin >> pos;
  29. 	list<konyv>::iterator it;
  30. 	it=adatbazis.begin();
  31. 	adatbazis.erase((it+pos));
  32. }
  33. void listaz(list<konyv> adatbazis){
  34. 	list<konyv> adatbazis::iterator it;
  35. 	for (it=adatbazis.begin() ; it != adatbazis.end(); it++){
  36.     	konyv tmp=*it;
  37.     	cout << tmp.szerzo << " " << tmp.cim << " " << tmp.ar << " " << tmp.db << endl;
  38. 	}
  39. }

Continue reading

https://docs.google.com/document/d/1SivPVqXB9kCiKycBCkvScJMFX84xeHjVY0WMqkMNjxs/edit

  1. /****************************************************************
  2.  *
  3.  * Purpose: Basic example of pipe. 
  4.  *          Read and write fixed length records across a pipe.
  5.  *          This is about a simple as they come...
  6.  *
  7.  ******************************************************************/
  8.  
  9. #include <sys/types.h>
  10. #include <unistd.h>			/* pipe.		*/
  11. #include <signal.h>
  12.  
  13. void Child  (int Handle);
  14. void Parent (int Handle);
  15.  
  16. void main()
  17. {
  18.  
  19.   pid_t		Pid;
  20.   int 		fd[2];
  21.  
  22.   pipe(fd);				/* Create two file descriptors 	*/
  23.  
  24.   Pid = fork();
  25.  
  26.   if ( Pid == 0)			/* Child			*/
  27.   {
  28.     close(fd[0]);
  29.     Child(fd[1]);
  30.     puts("Child end");
  31.   }
  32.   else					/* Parent.			*/
  33.   {
  34.     close(fd[1]);
  35.     Parent(fd[0]);
  36.     puts("Parent end");
  37.   }
  38. }
  39.  
  40. /****************************************************************
  41.  *
  42.  *      The Child sends data to the parent.
  43.  *
  44.  ****************************************************************/
  45.  
  46. void Child(int Handle)
  47. {
  48.   char Buff[]="Martin 1 abcdefghijklmnop ";
  49.  
  50.   write(Handle, Buff, strlen(Buff)+1);
  51.  
  52.   Buff[7] = '2';
  53.   write(Handle, Buff, strlen(Buff)+1);
  54.  
  55.   Buff[7] = '3';
  56.   write(Handle, Buff, strlen(Buff)+1);
  57.  
  58.   Buff[7] = '4';
  59.   write(Handle, Buff, strlen(Buff)+1);  
  60.  
  61.   close(Handle);
  62. }
  63.  
  64. /****************************************************************
  65.  *
  66.  *      Read the data sent by the child.
  67.  *
  68.  ****************************************************************/
  69.  
  70.  
  71. void Parent(int Handle)
  72. {
  73.  
  74.   char Buff[50];
  75.   /* ...	Read EXACTLY the number of bytes sent. 
  76.      ...	0 is returned when the pipe is closed by the child. */
  77.  
  78.   while (read(Handle,Buff, 27) > 0)
  79.   {
  80.     printf("%sn", Buff);
  81.   }
  82.  
  83. }

Continue reading

https://docs.google.com/document/d/19Nl9-33m5tZruWxhdzQ9anPBUJcXwU0BxqEnrvcpsjM/edit

main:

  1. #include <iostream>
  2. #include "verem.h"
  3.  
  4. using namespace std;
  5.  
  6. int main () {
  7. 	Stack<int> verem;
  8. 	verem.push(1);
  9. 	cout << verem.top() <<endl;
  10. 	return 0;
  11. }

verem.h:

  1. #ifndef VEREM_H_INCLUDED
  2. #define VEREM_H_INCLUDED
  3.  
  4. #define DEFAULT_SIZE 5
  5. template <typename t>
  6. class Stack {
  7. public:
  8. 	Stack(int=DEFAULT_SIZE);
  9.  
  10. 	void push(t);
  11. 	t pop();
  12. 	t top()const {return _array[_top];}
  13.  
  14. 	int size()const {return _top;}
  15. 	int maxSize()const {return _max;}
  16.  
  17. 	void clear();
  18. 	bool isEmpty()const{return -1==_top;}
  19.  
  20. 	Stack(const Stack&);
  21. 	Stack& operator = (const Stack&);
  22. 	~Stack();
  23. private:
  24. 	t* _array;
  25. 	int _top;
  26. 	int _max;
  27. };
  28.  
  29. #endif // VEREM_H_INCLUDED
  30.  
  31. using std::cout;
  32. using std::endl;
  33.  
  34. template <typename t>
  35. Stack<t>::Stack(int max_):_top(-1),_max(max_)
  36. {
  37. 	if(max_>0)
  38.     	_array=new t[max_];
  39. 	else
  40. 	{
  41.     	cout<<"The max size must be >0!!"<<endl;
  42.     	_array=new t[DEFAULT_SIZE];
  43.     	_max=DEFAULT_SIZE;
  44. 	}
  45. }
  46.  
  47. template <typename t>
  48. void Stack<t>::push(t item_)
  49. {
  50. 	if(_top!=_max)
  51.     	_array[++_top]=item_;
  52. 	else
  53.     	cout<<"The stack is full!!"<<endl;//Iparban is használt megoldás: throw "full"; az "xy" helyett valami exception leszármazotatt szoktak dobni.
  54. }
  55.  
  56. template <typename t>
  57. t Stack<t>::pop()
  58. {
  59. 	if(_top!=-1)
  60.     	return _array[_top--];
  61. 	else
  62.     	cout<<"The stack is empty"<<endl;//Iparban is használt megoldás: throw "empty"; az "xy" helyett valami exception leszármazotatt szoktak dobni.
  63. }
  64.  
  65. template <typename t>
  66. void Stack<t>::clear()
  67. {
  68. 	delete[] _array;
  69. 	_array=new t[_max];
  70. 	_top=-1;
  71. }
  72.  
  73. template <typename t>
  74. //deep copy meg kell írni mivel az _array dinamikusan van foglalva
  75. Stack<t>::Stack(const Stack& stack_)
  76. {
  77. 	_max=stack_._max;
  78. 	_top=stack_._top;
  79. 	_array=new t[_max];
  80. 	for(int i=0;i<=_top;++i)
  81.     	_array[i]=stack_._array[i];
  82.  
  83. }
  84.  
  85. template <typename t>
  86. Stack<t>& Stack<t>::operator = (const Stack& stack_)
  87. {
  88.  	delete[] _array;// Azért kell mivel itt már létezik az objektu, a copy konstruktornál feljebb még nem létezik, hanem akkor jön létre
  89. 	_max=stack_._max;
  90. 	_top=stack_._top;
  91. 	_array=new t[_max];
  92. 	for(int i=0;i<=_top;++i)
  93.     	_array[i]=stack_._array[i];
  94. 	return *this;
  95. }
  96.  
  97. template <typename t>
  98. Stack<t>::~Stack()
  99. {
  100. 	delete[] _array;
  101. }

Continue reading