~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> I have the basic knowledge in C++ and C.
Better start off with some console based games. They would help you in concentrating on the logical aspects of the game without wasting your time in developing the GUI.

Plus commercial games make use of API's like DirectX and OpenGL and not just plain old Win32. Once a console based program is ready, making a graphical version of it won't be much difficult.

thekashyap commented: Good point abt commercial games.. +2
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Maybe this holds the key to your question.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

|>The difference of course being that the Java application was well
|>architectured, easy to maintain, and performant while the ROR
|>application was a mess, impossible to maintain, and can't survive
|>under load.

That I hear from each and every Java programmer. ;-)

But considering that many professional sites have been made using ROR, there is no harm in atleast trying it out, esp if the OP has yet to learn a language.

peter_budo commented: Good point +6
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

>I'd love to be able to find that poll thread again, but alas, it seems to
>have disappeared, perhaps moved to another forum where the
>public can no longer view it.
True, due to many issues, it has been moved to the 'Area 51'.

joshSCH commented: Must be some pretty confidential stuff there... ;-) +11
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

IT Professionals after death:

christina>you commented: lol =) +17
joshSCH commented: b/c your nice :) +11
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

A common solution to this problem is to pass around the array size along with the array. That way, it would work for all types of arrays, not just C style strings (char arrays with terminating null character).

void doSomething(int* arr, int size)
{
     //get ready to add some bugs to your code
}
Matt Tacular commented: Fine post, you're also a good teacher +2
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I pity the werewolves...

ndeniche commented: what am i gonna do now?!? +1
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Here is another:

NEVER LIE TO A WOMAN!!


A man called home to his wife and said, "Honey I have been asked to go fishing up in Canada with my boss & several of his Friends.
We'll be gone for a week. This is a good opportunity for me to get that Promotion I'v been wanting, so could you please pack enough Clothes for a week and set out my rod and fishing box, we're Leaving From the office & I will swing by the house to pick my things up" "Oh! Please pack my new blue silk pajamas." The wife thinks this sounds a bit fishy but being the good wife she is, did exactly what her husband asked.

The following Weekend he came home a little tired but otherwise looking good. The wife welcomed him home and asked if he caught many fish? He said, "Yes! Lots of Salmon, some Bluegill, and a few Swordfish. But why didn't you pack my new blue silk pajamas like I asked you to Do?"

You'll love the answer...
*
*
*
The wife replied, "I did. They're in your fishing box....."

christina>you commented: Cute. :-) +17
Aia commented: Christina was refering to the joke, not you!, just kidding +4
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> i do not know these algorithms
You would have to learn them to solve the problem at hand. Try the wikipedia. It should help you in getting started at least.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> What do you think the dark matter/dark energy is?
Someone the pastor thought he would make up so he could prevent you people from sleeping? ;-)

Sturm commented: lol nice one +1
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Yes, please don't listen to others and start this already. Keep notifying us of your progress from time to time. After all, we wouldn't mind a fair bargain. ;-)

Aia commented: Alright +2
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Here are some:

One day a man is sitting in his office and all of a sudden he hears a voice "Quit you job, leave your wife sell your house and fly to Vegas" he thinks nothing of it and goes about his day.

The next day he hears the voice twice say "Quit you job, leave your wife sell your house and fly to Vegas" hes a bit weirded out but ignores it and goes about his business.

The next day he hears the voice every hour, "Quit you job, leave your wife sell your house and fly to Vegas". He gets worried but is afraid to tell any1 and goes about his business.

The next day he hears the voice every minute, "Quit you job, leave your wife sell your house and fly to Vegas".

He can stand it anymore, so he quits his job, sells the house, calls his wife to tell her its over and get the first plane to Vegas with all his cash.

When he arrives in Vegas, the voice says "Goto Caesar's Palace". He grabs a cab and heads to the casino. Then voice then says "Go to the roulette table". He goes in and heads to the roulette table.

The voice then says "Bet it all on Red 22". He places all his worldly money on red 22. The dealer spins the wheel and says "black 5".

The voice in his head says `Oh F*$%'.

A drunk is walking down the …

linux commented: You made me laugh. +1
arjunsasidharan commented: That was good +3
jamello commented: A pretty good one +1
ndeniche commented: piston broke... haha :D +4
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> So, multitasking is a more simple concept of multithreading?
Mutitasking is what your operating systems are packed with. You have the ability to execute more than one tasks / processes. You can read an ebook using Acrobat reader at the same time download something. You are given the feeling that its all happening at the same time even though its not. The OS allocates time slices or frames to each of these processes and these slices are so small that you get the feeling of multiple tasks being executed simultaneously. It is made possible through 'task switching'.

Multi-threading is tightly bound to the concept of using more than one threads to execute the same task. Thus you can have more than one tasks running and for each task there would be multiple threads. Threads are handled almost in the same way as tasks though there are subtle differences. Thus in lay man's terms:

Multi-tasking - more than one application running
Multi-threading - more than one threads running per application

John A commented: Right... I knew that. I just forgot about that little detail [noparse]:P[/noparse] +13
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

How about something like: double duration = Math.ceil(-Math.log(1 - a * r / p) / Math.log(1 + r)) Though I would like to point out here that the log use here is to the natural base (e) so you might want to convert it so that it is to base 10 using the formula: log A(base 10) = log A (base [I]e) / [/I]log 10 (base [I]e[/I])

peter_budo commented: Great examples +6
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

<sarcasm>
No please don't stop yet. You have come really far people, lets post some more random things about God and make this thread one with 100 pages(currently its 99).
</sarcasm>

;-)

Aia commented: <sarcasm> The best is to come </sarcasm> +2
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> I'm just as "mean" to other people as I am to you, so don't feel like you're being singled out.
Good thing moderators are outside the 'mean' domain ;-)

> But I clearly understand, I'm stupid. I'm done.
You have just started out in your life. Like Narue previously said, these things do and will happen. Running away won't solve your problems, face them, fight them. Good luck.

arjunsasidharan commented: That's what i said big B :) +2
Rashakil Fol commented: To gain, you must lose something of equal value. -1
Aia commented: You are gaining. +2
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> And EVERYTIME I bad rep someone for a good reason over something, WolfPack "equalizes"
Actually someone goes out and equalizes any kind of bad rep given ot anyone, and even I try that out. Didn't I give that to 'sk8ndestroy' ? Didn't I give it out to you ? And I guess considering that me, wolfpack and the others can go a long way in influencing someone's rep (almost 10-20 points) I don't see any problem even if you get bad repped by 2-3 normal posters.

<something here to keep things on topic which is basically how off topic I can go>

christina>you commented: yes, you are right. +9
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> You obviously don't use MSN Messenger
Rightly said, I normally don't use messengers but if necessary, Yahoo is the one I go for. And being a proponent of text based smileys, I don't know a lot about the modern ones.

> I can even see the rose petals in (F).
Ah, the kind of imagination you possess. ;-)

WolfPack commented: he he +7
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Oh so nice of you, but many people think otherwise. :-)

jbennet commented: i think you are a nice guy +14
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I guess someone here is a big fan of Naure... ;-)

Aia commented: It's about time that you get another from me :) +1
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

*Arghh* they are hurting my eyes. I have even stopped visiting the software development forum because of it. ;-)

IMHO, colors are not needed for one to know they are entering or leaving a particular section, since I would be the one performing the action. Like someone had stated before, what works for someone else might not work for us. The idea as I may assume is borrowed from Slashdot but its important to know that Daniweb is not a blog.

Maybe its just me, but sorry to say but these funky colors are making Daniweb look more like a fun thing where kids play games rather than a place for developers / professionals to hang out.

Again like the others, I have started thinking what you want Daniweb to become, since instead of taking inspiration from someone we should strive to become (Google Groups, TheScripts) where simplicity is of paramount, we are trying to become a Jack-of-all-trades and Master-of-none.

Thank you.

tgreer commented: Agreed. +7
Sulley's Boo commented: x_x agreed just like tgreer :p +3
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

284

christina>you commented: I'm sorry if I ever upset you. -Christina +8
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Yeah I got hold of the real culprit. And since currently normal members can't hand out negative reputation, I could have settled the score. Its a pity I am not built that way.

Nice that I can see who repped me. WIsh I could control the rep points I give to someone.

WolfPack commented: hehe. an eye for an eye sometimes makes things more fun. +7
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Sheesh, I guess its time for me to start seriously participating in the Word Games... ;-)

WolfPack commented: hehe. +7
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

awww...come one don't stop!

*sigh* Are you really that debate hungry?

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> Until the thread is closed or I am specifcally told to stop, I will continue the discussion.

Infaction, please stop.. ;-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> Why don't you or the admins step in and give your humble opinions on the subject.

Because its a fragile topic bound to cause a lot of hue and cry if spoken on. Its a wise choice to not to speak about something than speaking about it and preparing oneself for becoming a flame bait.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

WTF? That's one of the biggest piles of crap you've piled on this discussion (or so I hope... I missed 30 pages of it).

haha okay. Perhaps you should try reading more.. Go get an education somewhere.. Maybe they can help your foolishness..

At least Christina and those other Christians were somewhat open-minded. You are just plain ignorant. lol..

Actually, I don't want to waste my time on you. You are obviously a closed-mined fool. You don't see anything, you are only defensive.. your posts are idiotic..

Maybe its a reason enough to close the thread.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

This thread has completely lost its meaning and has remained no more than 'naming names' thread. I have request this thread to get closed so that things go out of hand. In the meantime any more attempts to bring disgrace to anyone would be dealt with strictly.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Even I don't take sides -- so I guess it must be out of personal spite.

christina>you commented: thank you for the +rep. and here's some for you also. -christina +6
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I guess the one who wanted us all to fight like cats and dogs must be very happy with this.

Take an eg. of three people A, B, C. B dereps A and C. Both are agitated. A thinks its C's doing and C think's its A's doing. Start of rep war. Someone's evil plan succeeds.

Someone has been derepping me four times in a row and leaving out profane comments -- out of personal spite or because of a misunderstanding, I don't know.

I request whoever is doing this to please stop and settle the matter over PM is he/she has some problem with anyone. Whoever you are, you are destroying the community.

PS: I would probably get another deprep with another profane comment --- I am sure of it...

Rashakil Fol commented: A blast of sanity. +4
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Watch, I'll get more -rep for this too

:D

I guess you would be more than happy to get the name of repper...

jbennet commented: + rep +11
joshSCH commented: Would you like to tell me who negatively repped me? lol.. +4
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Seemingly pleasant invocations ruin inner thinking.

arjunsasidharan commented: thanks for the rep. :-) i was just asking for a new game, we already have to many word games dont we? +1
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Please do so. The mods and super mods here are pretty helpful. Be sure to stay away from the super mod though -- he has a knack of giving infractions to potential spammers... :-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

How many reputation points does it take to get a block? Is it 100? Because I have 46 points at the moment.

It takes 50 points for a change of title and 50 points for an additional block, so together it becomes 100 points for a total change.

Yeah, I'm the person that spends most of my time in the geek's lounge playing word games hehe...

Yeah, you are the one all of them are looking after... ;)

BTW, I am happy with the Rep system except for some kids "derepping" me for no reason without knowing that my neg rep can affect them in a big way. I guess thats why they don't bother leaving their names behind. :D

PS: A couple of more points and something would surely change -- either my title or the shiny dots. :twisted:

John A commented: Here you go then... let's see what happens :mrgreen: --your blogger friend Joe +9
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

...and do a favour to the members of this forum by posting code in code tags. :D

ajay_tabbu commented: thanks for wishing.but i m thankfull to u who help me. +1
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Hello there my friend Tom, welcome to Daniweb. :D

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Maybe something like this:

double factorial (double value)
{
    double result = 1.0;
    while (fabs (value) > 0)
    {
        result *= value--;
    }
    return result;
}

int main ()
{
    double summand = 0.0, sum = 0.0;
    int value = 0, current = 0;
    bool flag = true;

    cout << "Enter the power of e whose answer you want: " ;
    cin >> value;
    getchar ();

    do
    {
        summand = pow ((double)value, (double)current) / factorial (current);
        if (flag)
            sum += summand;
        else
            sum -= summand;

        flag = !flag;
        ++current;
    }
    while (summand > 0.00001);
    cout << "\nAnswer is : " << sum;

    getchar ();
    return 0;
}
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Maybe you need to look a bit harder at the code I posted. It takes care of changing the flag variable. Look out for the part posted in bold...

John A commented: Rep for a hard-working (and patient!) moderator... --Joe(y) +8
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You can save iterations and the additional checking performed in the loops by doing something like:

#include <iostream>

int main ()
{
    using namespace std ;

    int limit = -1, count = 1 ;
    bool isPrime = true ;

    cout << "Enter the limit: " ;
    cin >> limit ;
    getchar () ;

    cout << 2 << endl ; // handle special case since 2 is the only even prime number

    // the number of loops are cut in half by the use of i+=2 since
    // only odd numbers can be prime ( except for 2 which is even )
    
    for (int i = 3; i < limit; i+=2)
    {

        // there is a theorem which states that a number if not prime 
       // has to have factors less than equal to its own square root
        for (int j = 2; j * j <= i; ++j)
        {
            if (i % j == 0)
            {
                isPrime = false ;  // since factor found hence not prime
                break ;
            }
        }
        if (isPrime)
        {
            ++count ;
            cout << i << endl ;
        }
        else
        {
            isPrime = true ;  // reset the flag for next number
        }
    }

    cout << "The number of random numbers in the given range are : " << count ;
    getchar () ;
    return 0;
}
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

How about this and this for a start ?

Keep on googling and you will find lots of them.

mattyd commented: Flash Help # thanks again-- MattyD +5
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I guess I did post a similar code in another thread.... ;)

John A commented: Caught my little slip... ;) +8
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Beginning of the new end, the dawn of destruction.

mattyd commented: Beginning of the new end, the dawn of destruction--matty +5
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Good ones Twilli.


Now some from my side....

Newton's Law for Engineers

Law - 1

Every Engineer continues his state of chatting or forwarding mails unless he is assigned work by external unbalanced manager.

Law - 2

The rate of change in the Work is directly proportional to the payment received from client and takes place at the quick rate when deadline force is applied.

Law -3.

For every appraisal there is an equal but opposite Work Implementation.

Bonus Law - 4

Bugs can neither be created nor be removed from the software. They can only be converted from one form to another. The total number of bugs in the software always remain constant.

;)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I am mine - Perl Jam

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

E) When you have nothing better to do than criticize some stupid games played on the message boards.... ;)

mattyd commented: # funny stuff +3
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

This happens since the referred column contains numric data and you are trying to substitute it with a string when null is encountered. You just happened to place the TO_CHAR function at the wrong place.

Do something like:

SELECT INITCAP(lastname), INITCAP(firstname), NVL(TO_CHAR(referred), 'test') 
FROM your_table_name ;

Try it out and let me know if it works or not.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Btw, I don't know exactly what you try to do with the score, but I noticed that if you guess the number at the first try your score is 0
and it seems to work properly as long as you enter in the many attempts.

A logical formula for score can be something like: score += 5 * attempts ; Also for generating good random numbers see this.

Aia commented: Great information about random numbers +1
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

As many of you probably already know, yesterday DaniWeb received a massive amount of spam threads.

I want to thank the moderators for deleting all the spam; it makes me really grateful that we have them here. However would DaniWeb manage without the "flag bad post" link? ;)

Yay, I deleted 4 out of 7 and banned that spammer (oh how I love to see the user title Banned ;)). So do I get a cookie ? :D

John A commented: Yes, you most certainly do :cheesy: ty -joeprogrammer +6
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Just a minor point, better use ++variable instead of using variable++. If done so prevents the creation of a temporary variable. This is a normal hack used by all programmers.

• Pre-increment(++a) - Increment the value of variable and then use it.

• Post-increment (a++) - Use the value of variable and then increment it.

Since we just want the value of variable to be incremented, just use pre-increment.

John A commented: Thanks for the info :) - joeprogrammer +6