| Mesaj |
Info autor |
Postat la 01 Apr 2008 15:47:08 Subiect: Re:
|
|
|
boboS info:
|
boboS:
raicuandi a scris: Blog -- tare proaste idee am mai avut... Nu numai ca nu ma ajuta cu absolut nimic, dar are si prostul obicei sa-mi manance o groaza de timp. Nu stiu ce mi-a venit :-P So, back to the IDE! E o idee buna ca lumea citeste si poate invata din greselile tale sau din experienta ta. Dar cat timp poate sa-ti ocupe? Faci si tu ca unu de pe xtrempc care calcula cate minute ii ia sa posteze pe zi si cati bani pierde stand pe forum.
"Noi ne facem ca muncim , ei se fac ca ne platesc"
|
Status:
Înregistrat pe: 03 Oct 2006 15:53:21
Vârsta: 25 ani
Mesaje: 949
Locatie: Galați
Programator
|
| |
Postat la 01 Apr 2008 17:05:21 Subiect: Re:
|
|
|
night_hawk info:
|
night_hawk:
raicuandi a scris: Blog -- tare proaste idee am mai avut... Nu numai ca nu ma ajuta cu absolut nimic, dar are si prostul obicei sa-mi manance o groaza de timp. Nu stiu ce mi-a venit :-P So, back to the IDE! April Fool's Thingy?
|
Status:
Înregistrat pe: 25 Mar 2007 22:01:13
Vârsta: 20 ani
Mesaje: 506
Locatie: Suceava
Programator junior
Esotheria
|
| |
Postat la 01 Apr 2008 17:53:46 Subiect: Re: Re:
|
|
|
MithY info:
|
MithY:
Si sa mearga asa departe incat sa-si stearga si blogul ?
Ultima editare efectuată de MithY pe 01 Apr 2008 17:54:02; 1 editări în total
gamedev for life
|
|
| |
Postat la 01 Apr 2008 20:16:26 Subiect: Re: Re:
|
|
|
cippyboy info:
|
cippyboy:
boboS a scris: E o idee buna ca lumea citeste si poate invata din greselile tale sau din experienta ta. a.k.a. munca in folosul comunitatii sau munca pe gratis 
|
Status:
Înregistrat pe: 04 Dec 2006 17:14:23
Vârsta: 25 ani
Mesaje: 162
Locatie: Bucuresti
Programator
Relative Team
|
| |
Postat la 01 Apr 2008 20:56:30 Subiect: Re: Re: Re:
|
|
|
night_hawk info:
|
night_hawk:
cippyboy a scris: boboS a scris: E o idee buna ca lumea citeste si poate invata din greselile tale sau din experienta ta. a.k.a. munca in folosul comunitatii sau munca pe gratis  Open source 
|
Status:
Înregistrat pe: 25 Mar 2007 22:01:13
Vârsta: 20 ani
Mesaje: 506
Locatie: Suceava
Programator junior
Esotheria
|
| |
Postat la 02 Apr 2008 10:30:01 Subiect: < fara subiect >
|
|
|
raicuandi info:
|
raicuandi:
Red Hat scoate juma de miliard pe an din Open Source. Anyway: in editorul meu, am 2 thread-uri momentan: GUI-ul, si cel in care ruleaza Ogre3D. Posibil sa mai adaug in viitor si alte thread-uri temporare. (worker threads) Thread-urile comunica prin mesaje, care si le tirmit unul altuia. (C++/CLI code ahead, in principiu .NET) Cod sursă: public enum class MessageID
{
MID_NONE,
MID_PING,
MID_PING_REPLY,
MID_SHUTDOWN,
MID_SHUTDOWN_REPLY_DONE,
MID_OGRE_INIT,
MID_OGRE_INIT_REPLY_DONE,
MID_OGRE_RESIZE,
MID_OGRE_RESIZE_REPLY_DONE,
MID_OGRE_PAINT,
MID_OGRE_PAINT_REPLY_DONE
};
public ref class Message
{
public:
MessageID id;
ThreadMessageQueue ^sender;
public:
Message(MessageID _id, ThreadMessageQueue ^_sender)
{
id = _id;
sender = _sender;
}
}; Fiecare thread are un "message queue": Cod sursă:
public ref class ThreadMessageQueue
{
public:
ThreadMessageQueue();
System::Void SendMessage(Message ^msg);
System::Void LockQueue();
System::Void SendMessageLocked(Message ^msg);
System::Void UnlockQueue();
System::Void Swap();
int Count();
Message^ Receive();
private:
System::Threading::Mutex ^mMutex;
/* The one being read by the message queue's owner. */
System::Collections::Queue ^mFrontQueue;
/* The one other threads are sending messages to. */
System::Collections::Queue ^mBackQueue;
};
Foarte simplu de folosit: Thread-urile care trimit: Cod sursă:
queue->SendMessage(msg);
...
queue->LockQueue();
queue->SendMessageLocked(msg1);
queue->SendMessageLocked(msg2);
queue->SendMessageLocked(msg3);
queue->UnlockQueue();
Iar threadul care le primeste: Cod sursă:
queue->Swap();
while (queue->Count() > 0) {
Message ^msg = queue->Receive();
... do something with msg ...
... maybe reply to msg->sender ...
}
Implementarea e banala: Cod sursă:
Editor::ThreadMessageQueue::ThreadMessageQueue()
{
mMutex = gcnew System::Threading::Mutex(false);
mFrontQueue = gcnew System::Collections::Queue();
mBackQueue = gcnew System::Collections::Queue();
}
System::Void Editor::ThreadMessageQueue::SendMessage(Editor::Message ^msg)
{
mMutex->WaitOne();
mBackQueue->Enqueue(msg);
mMutex->ReleaseMutex();
}
System::Void Editor::ThreadMessageQueue::LockQueue()
{
mMutex->WaitOne();
}
System::Void Editor::ThreadMessageQueue::SendMessageLocked(Editor::Message ^msg)
{
mBackQueue->Enqueue(msg);
}
System::Void Editor::ThreadMessageQueue::UnlockQueue()
{
mMutex->ReleaseMutex();
}
System::Void Editor::ThreadMessageQueue::Swap()
{
mMutex->WaitOne();
System::Collections::Queue ^tmp = mBackQueue;
mBackQueue = mFrontQueue;
mFrontQueue = mBackQueue;
mMutex->ReleaseMutex();
}
int Editor::ThreadMessageQueue::Count()
{
return mFrontQueue->Count;
}
Editor::Message^ Editor::ThreadMessageQueue::Receive()
{
return (Editor::Message^)mFrontQueue->Dequeue();
}
Asta e tot. Aveam nevoie rapid de un mod de a comunica intre thread-urile mele, asa ca am aruncat asta in 10 min. Nu mi-a facut probleme pana acum. (Cand un mesaj are nevoie sa trimita niste date aditionale, fac o subclasa din Message, si o trimit pe aia)
Method 2: Move Your Mouse Pointer If you move your mouse pointer continuously while the data is being returned to Microsoft Excel, the query may not fail. Do not stop moving the mouse until all the data has been returned to Microsoft Excel.
|
Status:
Înregistrat pe: 24 Mar 2007 21:02:40
Vârsta: 22 ani
Mesaje: 514
Locatie: Adelaide, Australia
Programator
|
| |
Postat la 02 Apr 2008 10:37:56 Subiect: Re: Re:
|
|
|
raicuandi info:
|
raicuandi:
boboS a scris: E o idee buna ca lumea citeste si poate invata din greselile tale sau din experienta ta. Dar tot nu ma ajuta pe mine cu nimic. boboS a scris: Dar cat timp poate sa-ti ocupe? Heh, cum pui problema...  Dar parca suna "altfel" cand o pun asa: "cati bani pierzi fiindca nu muncesti in acel timp?" Ocupa mai mult decat ar trebui. Oricum o sa-l tin, dar "minimalistic". (precum mesajul meu de mai sus, scris in 5 min)
Method 2: Move Your Mouse Pointer If you move your mouse pointer continuously while the data is being returned to Microsoft Excel, the query may not fail. Do not stop moving the mouse until all the data has been returned to Microsoft Excel.
|
Status:
Înregistrat pe: 24 Mar 2007 21:02:40
Vârsta: 22 ani
Mesaje: 514
Locatie: Adelaide, Australia
Programator
|
| |
Postat la 02 Apr 2008 11:44:49 Subiect: Re:
|
|
|
cippyboy info:
|
cippyboy:
raicuandi a scris: Red Hat scoate juma de miliard pe an din Open Source. Din blog-uri ? interesant. raicuandi a scris: Dar parca suna "altfel" cand o pun asa: "cati bani pierzi fiindca nu muncesti in acel timp?" Hehe, my point exactly  Tip pentru .NET : foloseste "using namespace System::Whatever;" dupa care poti sa scrii numai numele clasei. Rar gasesti ambiguitati care sa motiveze scrierea unui carnat de clasa.
Ultima editare efectuată de cippyboy pe 02 Apr 2008 11:47:05; 1 editări în total
|
Status:
Înregistrat pe: 04 Dec 2006 17:14:23
Vârsta: 25 ani
Mesaje: 162
Locatie: Bucuresti
Programator
Relative Team
|
| |
Postat la 02 Apr 2008 12:56:27 Subiect: Re: Re:
|
|
|
raicuandi info:
|
raicuandi:
cippyboy a scris: raicuandi a scris: Red Hat scoate juma de miliard pe an din Open Source. Din blog-uri ? interesant. raicuandi a scris: Dar parca suna "altfel" cand o pun asa: "cati bani pierzi fiindca nu muncesti in acel timp?" Hehe, my point exactly  Tip pentru .NET : foloseste "using namespace System::Whatever;" dupa care poti sa scrii numai numele clasei. Rar gasesti ambiguitati care sa motiveze scrierea unui carnat de clasa. Uite, vezi, night_hawk a spus "open source", nume incomplet calificat, in loc de "blog open source" (sau asa ceva), si eu am inteles ca se refera la open source in general, ca e "gratis". Lasa, ca si Ogre are String, si eu am String, si sunt alte clase numite la fel sau asemanator. Plus ca atunci cand o sa ma intorc peste 2 saptamani vad din prima ce e de unde. Plus ca e o idee foarte proasta sa folosesti using in headere C++. (se duc "in lant" la celelalte header, si in .cpp-ul care le include) Sa vezi atunci ce vanezi sa redenumesti pt ca ai adaugat un header nou care avea using in ele... Dar bine ca mi-am amintit :-p #13In C++, un using sau using namespace dintr-un header, atunci cand e inclus intr-un .cpp, se transmite "in lant" atat celorlalte headere incluse dupa acesta in acel .cpp, cat si in .cpp-ul respectiv. Deci te poti trezi cu surprize neplacute... Rezolvare: nu mai folosi using intr-un header. (vorbesc de C++ aici)
Method 2: Move Your Mouse Pointer If you move your mouse pointer continuously while the data is being returned to Microsoft Excel, the query may not fail. Do not stop moving the mouse until all the data has been returned to Microsoft Excel.
|
Status:
Înregistrat pe: 24 Mar 2007 21:02:40
Vârsta: 22 ani
Mesaje: 514
Locatie: Adelaide, Australia
Programator
|
| |
Postat la 02 Apr 2008 19:44:48 Subiect: Re: Re: Re:
|
|
|
cippyboy info:
|
cippyboy:
raicuandi a scris: In C++, un using sau using namespace dintr-un header, atunci cand e inclus intr-un .cpp, se transmite "in lant" atat celorlalte headere incluse dupa acesta in acel .cpp, cat si in .cpp-ul respectiv. Deci te poti trezi cu surprize neplacute... Am ~10 000 de linii scrise in C++/CLI si nu am avut decat o singura "surpriza neplacuta" : MessageBox din windows.h si MessageBox din System::Windows::Forms . Solutia a fost sa scriu ::MessageBox pentru versiunea din Windows  Oricum, daca ai ambiguitati poti folosi oricand versiunea carnat. Pe mine ma enerveaza sa scriu System::Void/Int/Single/Object la functiile de CLI.
Ultima editare efectuată de cippyboy pe 02 Apr 2008 19:46:15; 2 editări în total
|
Status:
Înregistrat pe: 04 Dec 2006 17:14:23
Vârsta: 25 ani
Mesaje: 162
Locatie: Bucuresti
Programator
Relative Team
|
| |
Postat la 04 Apr 2008 18:45:11 Subiect: < fara subiect >
|
|
|
raicuandi info:
|
raicuandi:
Stie cineva daca au bagat in VS2008 sau altcumva in 2005/2008- optiunea sa faci "pagini separate" in Task List?
Am gasit Task Listu' foarte folositor in sesiunile mai lungi de debugging, cand pot sa scrijelesc acolo o notita sa nu uit sa modific ceva, si sa continui cu debuggingu, insa o singura pagina incurca un pic...
Method 2: Move Your Mouse Pointer If you move your mouse pointer continuously while the data is being returned to Microsoft Excel, the query may not fail. Do not stop moving the mouse until all the data has been returned to Microsoft Excel.
|
Status:
Înregistrat pe: 24 Mar 2007 21:02:40
Vârsta: 22 ani
Mesaje: 514
Locatie: Adelaide, Australia
Programator
|
| |
Postat la 05 Apr 2008 19:07:54 Subiect: < fara subiect >
|
|
|
raicuandi info:
|
raicuandi:
Method 2: Move Your Mouse Pointer If you move your mouse pointer continuously while the data is being returned to Microsoft Excel, the query may not fail. Do not stop moving the mouse until all the data has been returned to Microsoft Excel.
|
Status:
Înregistrat pe: 24 Mar 2007 21:02:40
Vârsta: 22 ani
Mesaje: 514
Locatie: Adelaide, Australia
Programator
|
| |
Postat la 07 Apr 2008 12:46:24 Subiect: < fara subiect >
|
|
|
raicuandi info:
|
raicuandi:
Method 2: Move Your Mouse Pointer If you move your mouse pointer continuously while the data is being returned to Microsoft Excel, the query may not fail. Do not stop moving the mouse until all the data has been returned to Microsoft Excel.
|
Status:
Înregistrat pe: 24 Mar 2007 21:02:40
Vârsta: 22 ani
Mesaje: 514
Locatie: Adelaide, Australia
Programator
|
| |
Postat la 08 Apr 2008 15:34:23 Subiect: Re:
|
|
|
cippyboy info:
|
cippyboy:
raicuandi a scris: Its also nice the screen resolution is 1280x800, which is perfectly 4 times Commander Keen's resolution. (320x200) That's 16 times (4 rows by 4 columns) 
Ultima editare efectuată de cippyboy pe 08 Apr 2008 15:36:06; 1 editări în total
|
Status:
Înregistrat pe: 04 Dec 2006 17:14:23
Vârsta: 25 ani
Mesaje: 162
Locatie: Bucuresti
Programator
Relative Team
|
| |
Postat la 08 Apr 2008 15:52:11 Subiect: < fara subiect >
|
|
|
raicuandi info:
|
raicuandi:
Mehhhhh... :-P
Method 2: Move Your Mouse Pointer If you move your mouse pointer continuously while the data is being returned to Microsoft Excel, the query may not fail. Do not stop moving the mouse until all the data has been returned to Microsoft Excel.
|
Status:
Înregistrat pe: 24 Mar 2007 21:02:40
Vârsta: 22 ani
Mesaje: 514
Locatie: Adelaide, Australia
Programator
|
| |