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

For source code navigate to: Tomcat_Installation_Directory\webapps\jsp-examples\

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

You need to get your hands on J2SDK (preferably 1.5 or 1.6) and a decent text editor which provides at least auto indentation and syntax highlighting.

Get the latest SDK here. For a decent text editor you can see this and this.

You can get the Sun Tutorials here.

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

VB6 is a 'real' language. I don't like the syntax anymore, but I had a respectable job for 7 years using VB 6 and VB Script, we did lots of great things with it. You're such a typical purist ~s.o.s~

I have two parameters on which I gauge a language - earning a living and appreciating the beauty of the language. VB no doubt is a great way of earning a living, but I particularly find that it doesn't actually teach me anything or makes me think in a different or innovative way. Lisp tops the list when it comes to actually learning something, but alas...

That's a bit of a sweeping statement ! and widely off the mark. I'm surprised at you for this throw away line.

That was not a generic statement, but a something which I see at my place. At your place it might be a different thing, but here, the word VB6 rings only a maintenance bell.

~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

*Grasps*
*shivers*
*Hides away in the shadows*

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

> Well thats just you i suppose to be honest I would actually find it
> quite funny if someone drove past and shot me with a paintball gun.

What if its not you? What if its one of your close ones, loved ones? It looks to be all fun before it actually starts.

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

VB6 taught in colleges, you have got to be joking. Has the world run out of decent languages to be taught to beginners?

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

> The requested resource (/helloJSP/hello.jsp) is not available.
This error usually means the container is unable to locate file. There is some problem with the path that you specify. If your root folder is "HelloJSP", and if your jsp file is present in the root folder, you just need to type: http://localhost:8080/HelloJSP/hello.jsp Post the code if it still doesn't solve your problem since I have no idea what you are trying to do.

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

The manga which should have, but never got converted to anime is ``Zombie Powder". Don't think anyone would have heard that name, but the manga is pretty interesting.

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

C++ is the language in which most of the engines are written, not to mention C++ is the language predominantly use in the game development scenario. How fluent are you with C++? If you are a beginner, first consider learning C++ rather than jumping right into the fray with 3D game programming.

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

> I got a book on vb6
Any reason you are not into a real programming language. Most of the people who learn VB6 do it for maintenance of old projects.

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

C++ is not a good option to start with. Like I said in my previous posts, Python and Java would be better choices. Plus you have got nothing to lose since both of them are mainstream, commercially hyped and used languages.

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

> Living in the future is lonely.
Hey don't make us look like relics of the past... ;-)

But yes I agree, the time which suits you is really weird. Don't think you would find anyone in IRC except Dani, hacking with her code.

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

Checking between 9 PM - 11.30 PM (IST) would be more like it. Anyways I keep checking in between intervals whenever I am browsing Daniweb.

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

Not to mention it would blow away the brains of a first timer... ;-) Writing the whole code in Cambridge prefix notation is not a pretty sight. I still vote for Python or Java.

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

Library calls execute within the process space of the `C or C++ runtime' whereas System calls spawn a separate process and the control is transferred from the current process to the newly spawned one. Each process has a stack of its own. Library calls result in the creation of a new stack frame whereas system call result in the creation of a new stack.

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

Don't double post, your question has been already answered in your original thread.

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

You can store the current record position in a session scope and use it accordingly.

Integer lowerBound = session.getAttribute("lowerBound");
if(lowerBound == null)
    session.setAttribute("lowerBound", new Integer(1));
else
    session.setAttribute("lowerBound", new Integer(lowerBound.intValue() + increment));
Integer upperBound = session.getAttribute("upperBound");
if(upperBound == null)
    session.setAttribute("lowerBound", new Integer(increment));
else
   session.setAttribtue("lowerBound", new Integer(upperBound.intValue() + increment));

And do follow Jwenting's advice, he is saying the right thing. Don't make a mess of your JSP code.

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

| Can you guys make out a face of a baby?
Yes, I can. ;-)

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

I guess this is what you call `Bad luck'...

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

A smart combination of Graphics card and RAM should set things alright for a gamer. Also it depends on the game you are about to play. Games like `Stalker: Shadows of Chernobyl' though recent require a minimal configuration. On the other hand, `Elder Scrolls' requires you to have a solid configuration for a uninterrupted game play.

Considering that you have 1GiB of RAM, you need to get a decent graphic card if you already haven't got one.

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

Look here for some game development resources and free engines.

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

Thousands of dollars have been put in developing this concept and layout. Don't think this is something you would get your hands on...

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

> Well, lots of people say that C/C++ is more useful. That's why I am learning.
All languages are useful in real world. Think of them as tools for achieving a given task. Want to do embedded programming, dig up on C. Need quick GUI's, look up Python, Java, C#, VB .NET and the likes. Interested in AI development, look up Lisp. Interested in the field of Mathematics, learn up Haskell.

Knowing a host of languages is what differentiates a programmer from a good programmer, though the language with which you start is an important decision.

Python, Perl, Java are the few languages which are known to be good language for beginners.

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

Maybe I should just snip your email id... ;-)

> I like chatting, and tried the Daniweb chat room an year ago.
Hey how come I end up waiting there alone. :-)`

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

Engines are software modules (normally standalone) which perform a core functionality. Its not just the game engine, there are others namely Physics Engine (dealing with friction, viscosity etc), Sound Engine (playing sounds), AI Engine (managing the AI part of the game).

Normally you won't get to see most of these terms since they have specialized purposes and for normal purposes are encapsulated within the game engine. Segregating the functionality of the game into small components of engine is a technique commonly used for developing professional games.

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

Its a misconception among many people. They always talk about performance without knowing the actually implications of what they are saying considering 80% of the people who cry about performance run no real test or profile their code.

Come on, I mean there has to be some difference between C and Python. But think of it this way, I would rather write a small text based RPG game in Python in one week and have 95% performance than spend 3 weeks writing it in C and have 100% performance benefits.

With the kind of benefits Python offers over its fast counterparts, its kind of acceptable. I mean, you can't have everything, can you ? ;-)

~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 posting some code, its difficult to pinpoint exactly what you are trying to do given the small description.

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

Yes something like that. Python is basically a scripting language which means it is an interpreted language. You don't need to compile the program. Just type and run it !! Thats why Python is used for quick prototyping of small projects.

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

> double duration = Math.ceil(-Math.log10(1 - a * r / p) / Math.log10(1 + r))

Yes, provided you write your own function "log10" based on what I had posted before.

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

Why doesn't this work in your case:

dayCount = (dayOfMonth - 1) % arraySize;
imageId = myImageArray[dayCount];

Oh and BTW, your logic is wrong, the array indexing starts at 0 and not at 1. So your mesh of 'if' statements which use 1 as the starting index is wrong, unless you have something different planned out.

Plus you are using the wrong method to get the day. You should get the day of month, not the day of week otherwise you would always access the first 7 images since DAY_OF_WEEK ranges between 1 to 7. Use this:

GregorianCalendar c = new GregorianCalendar();
int day = c.get(Calendar.DAY_OF_MONTH);
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Your formula appears to be incorrect. Your log function is not taking any arguments, when it should be talking one. See the one I posted in my previous post.

The log function in the Math class gives us log to the base e, that is natural log. For normal calculations, we use log to the base 10. Hence we have to do some adjustments specified by me in my previous post.

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

Replace all integers with float and change all "%d" to "%f", even in the scanf statement. Also post the results you get when you use ints and when you use floats.

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

But I guess that is not what he is looking for.

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

You forgot Biological warfare...

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

Look carefully the code I had posted and make the changes in your code accordingly. You are getting th formula and the method all wrong.

~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

> i am not trying to find i am trying to form a palindrome fron the letters of the given string
Use the approach suggested by me in my previous post.

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

Alex, there is as such no 'simple' way of doing the thing you are trying to achieve. If yours is a client side only Javascript application, use the approach which I had mentioned in my previous post. If you are using your Javascript file in a dynamic page, use the approach provided by Matt.

Each and every server side language has its own way of doing it. If using PHP, use the method specified by Matt. If using JSP, you can use the include directive to do the same.

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

In that case, linking to google with a proper search term would have been more like it since its likely that with a proper search term, the results would have been more rewarding. Linking to just Google, makes no sense.

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

Heh I guess you people are taking this waaay too seriously. Don't think rep has anything to do with what one is. I have seen Daniweb members with almost no reputation but providing the best of advice.

Its simple, the people who help others and mingle with other people are the ones who get most reputation. People who just believe in helping out people without participating in forum discussions, don't get it at all.

It would be really better if Dani could implement the idea suggested by Salem. I really like it.

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

Create a new element of type 'script' using document.createElement('script') and set its properties accordingly. Something I found on one of the sites. Write this at the top of the script file in which you plan on including your file.

if (typeof(km_scripts) == 'undefined') var km_scripts = new Object();
km_myclass_import('importedfile.js');

function km_myclass_import(jsFile) {
  if (km_scripts[jsFile] != null) return;
  var scriptElt = document.createElement('script');
  scriptElt.type = 'text/javascript';
  scriptElt.src = jsFile;
  document.getElementsByTagName('head')[0].appendChild(scriptElt);
  km_scripts[jsFile] = jsFile; // or whatever value your prefer
}
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

One way is that you can convert the result to a string object and do a substring to extract the portion of the result desired.

var a = 0.000050001;
var precision = 5;
var strA = a.toString();
var result = strA.substr(0, precision + 2);
alert(result);

I am not saying this is the only efficient way of doing it, but yes, one way of doing it.

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

Game development is not fun !! You have got to be joking. And BTW, 'fun' doesn't fetch you revenue, if you must know that...

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

You can start off by eliminating words which don't have a repeated character. This would help you in cutting down the processing. Then with the words which have at least a pair of repeating characters, try out various combinations of the character forming the word.

For eg. if your word is "sat", you can safely eliminate it since it doesn't have a repeating character. Now if the word in consideration is "sosa", generate various combinations of the characters forming the word which has at least a pair of repeating characters. Some examples would be "sos" and "sas". Of course yo have to keep in mind that single characters are by default palindromes.

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

Thanks 'underJack' but I guess you missed my smiley at the end. ;-)

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

Also don't cross post. Your question has been already answered in the Java forum.

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

Again you are getting confused. The last time I checked, Allegro and SDL were more used for game development and are called game programming libraries / game programming API's, not to be confused with GUI libraries. They don't have the concept of 'drag and drop' as such.

The programmer uses those libraries since it provides a easy wrapper around the core DirectX / OpenGL API calls.