3,892 Posted Topics
Re: Why not continue with your [URL="http://www.daniweb.com/forums/post1374807.html#post1374807"]original thread[/URL] instead of creating a new one? Plus no code tags even after 12 posts? If you are not serious about asking for help, no one would be serious about giving you one. | |
Re: I guess no. Create a thread on PC games and you will have many takers. | |
Re: Is your test client using `BufferedWriter`? If yes, make sure you invoke the `flush()` method on the BufferedWriter after you are done with writing the message(comid in your case). | |
Re: libsdl is a better choice than BGI since it has a host of functions and has better tutorials and support on the internet than BGI. Considering that you have one entire month for making the game, you can easily switch to libsdl and finish off the project. | |
Re: Two options: [LIST=1] [*]Write your custom XML marshaller/unmarshaller which would work with your domain specific objects using the standard XML API's offered by Java (e.g. writing a class which converts a Person instance to its XML representation) [*]Use existing O/X mappers like JAXB; the learning curve might be a bit … | |
Re: AFAIK, you can't do that(*binding* to a port on an arbitrary host) for obvious reasons. A solution would be to bind to a port on your local host and delegate all requests to the other hosts by opening a normal Socket connection to it. | |
Re: You are closing the Statement object which in turn closes the ResultSet which was obtained from it. Read [URL="http://download.oracle.com/javase/6/docs/api/java/sql/Statement.html#close%28%29"]this[/URL]. Close the Statement only if you are done with the ResultSet and the Statement object, close the Connection only if you are done with the ResultSet, Statement and Connection objects. | |
Re: [quote]But it still says The requested resource (Servlet AbcServlet is not available) is not available. What did I miss? Please help.[/quote] What do the Tomcat logs say? If you see nothing unusual there, paste the URL you are trying to hit along with the directory structure you are using for … | |
![]() | Re: [URL="http://google-gruyere.appspot.com/"]Web application exploits and defenses[/URL] And while you are at it, [URL="https://www.securecoding.cert.org/confluence/display/java/The+CERT+Oracle+Secure+Coding+Standard+for+Java"]CERT secure coding standards[/URL]. |
Re: The exception says that you are passing an entire line to the parseDouble method instead of passing a String which contains a valid double representation. After reading the line, split it (look into the split method of String class) based on whatever separator char you have in the file (comma … | |
Re: IMO the watermark should go away after the text area is clicked, it's distracting. | |
Re: [quote=Shaabangbang;320802]hmm, why did you put (char*) in brackets?[/quote] Its called [I][URL="http://www.cplusplus.com/doc/tutorial/typecasting.html"]casting[/URL] [/I]. In this specific case its the casting of void pointer retuned by malloc to a pointer to a char. [quote]also whats malloc? like what does the variable stand for? or are you calling by value?[/quote] A litte google … | |
Re: Create a instance variable of type CountDownLatch in the FirstThread class with the initial value of the number of threads for which you want to wait (3 in your case). Pass this instance to the constructors of the thread class for which you'd want to wait. As the final statement … | |
Re: [quote]how could i create a single getter and setter for these two ? [/quote] You typically don't; if you did, it really wouldn't be called a "getter" or "setter" in normal Java sense. Also, if you did that, you would be making assumptions about the problem domain being modeled. In … | |
Re: [URL="http://java-source.net/open-source/crawlers"]List of open source Java web crawlers[/URL]; never used any of those so your best bet would be play around with them and use the one which suits your need. | |
Re: What happened to the [URL="http://www.daniweb.com/forums/thread316770.html"]previous thread[/URL] which you created for the same issue? I thought you had managed to sort it out? | |
Re: Database Design certainly doesn't seem like a catch-all term. Come to think of it, having a single "Databases" forum for some time would help us evaluate whether we really do need a separate forum for each specific database. | |
Re: Pro tip: when posting in forums avoid use of words like "ASAP", "urgent", "plz plz plz" etc. in your post title or post content. Writing "ASAP" gives the members an impression that you don't care about the priorities of those who would be willing to help you out and sounds … | |
Re: The other Windows sub-forums present here are a bit h/w oriented so I guess I'll leave this post here for the time being and also try getting the description of this sub-forum changed so that it can incorporate shell scripting of any sort (powershell, bash, batch etc). @flynismo Try breaking … | |
Re: Please use code tags while posting code since it preserves fomatting and makes the code more readable by syntactic highlighting.. Read the forum annoucements for more details.. | |
Re: One bug in your program, when the user enters x and y coordinate where he wants to put his number, you dont check to see if those coordinates are within bound (i.e. a < 9 and a > 0) and the same with b. This may allow user to write … | |
Re: That sounds like a pretty non-trivial task. Look into the [URL="http://www.jmonkeyengine.com/"]jMonkey Engine (jME)[/URL] which is a 3d game engine and might do everything you need and more. | |
Re: Go [URL="http://www.oracle.com/technetwork/java/javase/downloads/jdk6-jsp-136632.html"]here[/URL] and click download. On the next page, select the platform as "Windows" and click continue. Click on the download link presented on the next page. Also have a look at [URL="http://www.daniweb.com/forums/thread99132.html"]the sticky[/URL] at the top of this forum. | |
Re: Daniweb has been experiencing some performance related problems lately. I'm sure Dani and Blud are working on smoothing things out so please bear with us till this issue gets resolved. Updates on the same would be posted here. | |
Re: The problem is in your assumption that a favicon for a site is always a PNG image, which isn't the case. Normally sites use a ICO image format, which is a different image format than PNG or BMP. Read more [URL="http://en.wikipedia.org/wiki/ICO_%28file_format%29"]here[/URL]. To confirm this, try downloading the Daniweb favicon and … | |
Re: The `find` of SortedList accepts an `Author` and you are passing it a `String` (line 45: tempAuthor is a String and not Author). A few more things: - IMO don't go overboard with generics; the driver class Main need not be generified - Use standerdized notations for type-placeholders like T … | |
Re: [quote=sasucker;338194]-if I use strings, I suddenly lose the ability to use strcmp, perhaps there's some side to this function that I'm unaware of?[/quote] Nope you don't. Just use the normal comparision operator (==) for comparing C++ strings. Read [URL="http://www.cppreference.com/cppstring/all.html"]this.[/URL] | |
Re: [URL="http://download.oracle.com/javase/tutorial/java/javaOO/thiskey.html"]Using this with constructor.[/URL] EDIT: beaten | |
Re: After setting the environment variables ensure that they are properly set by checking the same using [icode]echo %yourvar%[/icode]. You need to run the setEmbeddedCP.bat file *after* setting DERBY_HOME. SOmething like: [code]c:\> set DERBY_HOME=c:\path\to\derby\home c:\>setEmbeddedCP.bat[/code] Alternatively, you can set the environment variable in your global environment settings rather than setting it … | |
Re: [quote]if they are not classes, how are they generated, where are they kept inside the memory? [/quote] Enums get special treatment by the compiler and impose additional restrictions not imposed by regular classes, specifically not having the ability to extend any class since they are automatically made to extend the … | |
Re: It means that it cant find the required function or the function defination in your file. Is that function present within your .c file ? | |
Re: Using an ORM seems like a good fit for your problem. One approach would be: [LIST] [*]Create a User table which contains all the users of your applications and has a primary key (e.g. userId) [*]Create a ComputerConfig table which stores the codes for all the parts of your computer … | |
Re: Use code tags when posting code; rad the forum announcements for more details. Regarding your issue; open the file in append mode. Use the [URL="http://download.oracle.com/javase/6/docs/api/java/io/FileWriter.html#FileWriter%28java.lang.String,%20boolean%29"]constructor of FileWriter[/URL] which accepts a boolean parameter for the same. But keep in mind that default/platform encoding is assumed when writing files. | |
Re: [quote]It would also be really nice to be able to customize the number line so if you repost their code, you could specify what line it is on. Maybe there is already a way of doing all or a part of this and I just don't know about it?[/quote] One … | |
Re: Are you planning to create a web app? Are you thinking of deploying your app on the "Google App Engine" infrastructure? If yes, start with the [URL="http://code.google.com/appengine/docs/java/overview.html"]overview of the Google App engine[/URL] instead of directly jumping to the meat of things. If your aim is to create a simple XMPP … | |
Re: [quote=Lazaro Claiborn;321943]I have written pages for my site regarding that issue. To you it is not intuitive. Unless the newbie has a very large string, using strlen isn't a truely bad thing to do; because it will not have to loop many times through each element to get the legnth … | |
Re: First of all use int main( void ) and not just main( ) since its not standard. Don't hard code values in your program, if you want to process 20 values make a preprocessor defination at the start of your program which can easily be modified if you are asked … | |
Re: Two options: - Use a third-party collections library like Apache collections/Google Collections - Use a TreeMap with a custom comparator (TreeMap by default keeps "keys" sorted and not values) Also, [URL="http://stackoverflow.com/questions/109383/how-to-sort-a-mapkey-value-on-the-values-in-java"]read this[/URL]. | |
Re: Use the Scanner class for the same. I think [URL="http://www.java-made-easy.com/java-scanner.html"]this tutorial[/URL] does a fair job of explaining the same. | |
Re: [quote]The first one basically reads as follows : "Create a string object called S where S refers to the statically defined string object "abc". The second one reads as follows : "Create a string object called S, where S points to a new dynamically allocated string object with the value … | |
Re: If all you want to send is character data, why convert it to a byte stream unless what you posted was just a dummy example. Some things you should know: [LIST] [*]application/x-www-form-urlencoded is the default content type used to encode the form data, you don't need to explicitly set it. … | |
Re: Subscribe to a forum/thread and when adding the subscription select the "no email notification" mode. This would ensure that the threads which you are watching show up in your [URL="http://www.daniweb.com/forums/usercp.php"]control panel[/URL] plus you won't get any emails for the same. | |
Re: You can use relative paths. An HTML element like [icode]<img src="/app/images/first.jpg" />[/icode] would render an image with the image URL being: [icode]http://yourhost/app/images/first.jpg[/icode]. Assuming your project name is "app", this would require you to create an "images" directory in your project. From a performance standpoint, you can rewrite the URLs to … | |
Re: Look into the java.text.MessageFormat class. Also, [URL="http://stackoverflow.com/questions/495776/should-i-use-java-text-messageformat-for-localised-messages-without-placeholders"]read this[/URL]. | |
Re: From [URL="http://www.coderanch.com/t/507836/java-programmer-SCJP/certification/Oracle-change-Sun-Certification-names"]this site [/URL]which is a *very* reliable source: [quote]Oracle has changed the naming for all sun certifications,to fit existing oracle certification names,effective September 1st Note that this is just a name change,nothing will change regarding the certifications themselves Naming of the certifications before and after the change for example … | |
Re: You don't need two while loops for populating your Deque; also your logic is flawed at this place: [code] character = inputFile.readChar(); while (!character.equals('\u0003')) { if (character.equals('\u0008')) deck.removeBack(); else deck.addToBack(character); }[/code] As soon as you read a character which is not '\u0003', the control enters the second `while` and never … | |
Re: [quote]Is it true that during autoboxing, the type.valueOf() method is called (which creates a new object only if another with the same primitive constant is not in the intern list. This applies to cases where interning is allowed[/quote] AFAIK, the specification doesn't require anything of this sort. Yes, it requires … | |
Re: Because arrays get special treatment as per [URL="http://java.sun.com/docs/books/jls/third_edition/html/arrays.html#10.7"]the specs[/URL]: [quote]The public method clone, which overrides the method of the same name in class Object and throws no checked exceptions. The return type of the clone method of an array type T[] is T[]. [/quote] | |
Re: @justin BTW, if your question gets answered, please ensure that you mark the thread as solved (this time I've done it for you). Think of this as a way of saying thanks to those who have helped you out plus making it easier for others to stumble upon your solution. | |
Re: I thought that those redirects were visible to only mods and above and not normal members. Also, I'm not sure normal members should be even seeing those redirects. |
The End.