3,892 Posted Topics
Re: AFAIK, you can neither check for the up/down votes given by you nor for the reputation awarded to other members. A real pity, I know, but... :-) | |
Re: Before passing in the File object to the ImageIO#read method, print out its absolute path (File#getAbsolutePath)and verify whether it is the same as the path where you have stored your images. Edit: Oops, didn't see Norm1's reply. But yes, print out the full path using the getAbsolutePath() | |
Re: Please do not, I repeat, do not link to any roseindia material. These guys are content thieves and more concerned about driving traffic to their site than imparting knowledge; a bad sign indeed. BTW, the original article is [URL="http://www.javaspecialists.eu/archive/Issue025.html"]here[/URL]. | |
Re: [URL="http://www.zentus.com/sqlitejdbc/"]SQLiteJDBC[/URL] not good enough? Also, if you are aiming for embedded databases, I'd recommend pure Java ones like H2 & Derby. Both have a fully JDBC compliant type 4 (pure java) database driver. | |
Re: Normal users can't access Area 51 threads so the first link won't work for the OP; just thought would point this out. | |
Re: [quote]Could anyone please tell how to set the path of the properties file, so that I don't need to specify the full path when reading it.[/quote] Specify it relative to the class which would be using it or relative to your project package hierarchy. [B]Relative to your class:[/B] Ensure that … | |
Re: [quote]Would it be possible to have a tutorials forum where people can post tutorials where admin can sort through to transfer/edit/delete into the appropriate positions[/quote] Unfortunately that would attract more spammers/content thieves than members who are genuinely interested in posting tutorials. More like one more forum to moderate for spam … | |
Re: For on the fly sparse arrays, you can try something like: [code=cplusplus] #include <iostream> int main() { using namespace std; const int ROWS = 3; const int COLS = 4; double** dArr = new double*[ROWS]; for(int i = 0; i < ROWS; ++i) { dArr[i] = new double[COLS]; for(int j … | |
Re: Search the codebase for "new BookDBAO(" ? But ideally, since you are retrieving the DAO from teh servlet context, the instantiation should have happened in the class which ServletContextListener. Look into your web.xml if you have any listener tags and search in those classes. | |
Re: A tough question, it's like deciding which of your kids you like the most. ;-) A few I can think of right now: • Canvas II • Shakugan no Shana • FLCL | |
Re: It is always a good solution to google for the base exception message. Chances are that someone else has already encountered this error and found a solution for the same. Searching around, it seems that using Glassfish + Eclipse has [URL="http://h3x.no/2009/04/26/a-hint-for-the-object-foo-is-not-a-known-entity-type-errors-from-glassfish"]some problems[/URL] when it comes to dealing with object persistence … | |
Re: [quote]One should declare a String paker[][]= new String[4][13]; to store all (52) the cards[/quote] IMO better to have a "Card" class with "rank" and "suit" as member variables. The toString() of this class would take care of concatenating the toString() method output of the respective "card" and "rank" enum members. … | |
Re: You have a typo there; it is intValue and not intVlaue. | |
Re: [quote]Is there a quick way to create a constructor, or any method for that matter, where the type of data structure created is decided when the method is called[/quote] Yes, the new Java collections API is full of examples of the same. Pick any class from the collections API and … | |
Re: I am sure PHP has some sort of MVC architecture implementation wherein the controller handles the requests and delegates it to an appropriate entity.[code=javascript] // Here /operations is mapped to a PHP file which acts as a // controller and performs the delegation activity based on // the operation requested, … | |
Re: [quote]I've noticed how there seems to be a lack of 'talk' about JSP compared to PHP and ASP.NET on the web, lack of up-to-date 'printed' books and just news in general.[/quote] IMO, this kind of reasoning is flawed. Java is a pretty established language, as are C and C++. Do … | |
Re: Difficult to say anything without looking at the JSP in consideration. You can also try taking a look at the generated servlet for your JSP (process_jsp.java). | |
Re: Flash software was developed by Macromedia for a reason -- its proprietary software which has been licensed. For developing [I]Flash [/I]applications you [I]have [/I]to use Flash. | |
Re: This is how very large numbers are by default displayed in an excel file. Try pasting the same number (123456789123456789123456789) in a fresh excel worksheet and the result should probably be the same. You need to set the column/cell type of that excel sheet to "Text" instead of "General" which … | |
Re: Ram, please create your own thread for your question. Hijacking other peoples' thread is against the forum rules. | |
Re: [quote]also it gives me nullpointerxception though i have used a if condition specifying (c==null)[/quote] This is because the condition is executed after the length check of the for loop. The condition [icode]cookie == null[/icode] needs to be placed outside the FOR loop and not inside it. [quote]when i close my … | |
Re: Not to mention on a slow internet connection the entire images are downloaded, displayed in their full dimensions and then resized only when the document is _entirely_ loaded (onload will be called only when all the images are downloaded). Like Matt already mentioned, consider shrinking the images on the server … | |
Re: [icode]==[/icode] compares object references or stands for reference equality which would never hold true for objects which are loaded from a serialized file after being saved. The serialization mechanism uses the serialized byte stream to create a *new* object having the same state as the original saved object. Override the … | |
Re: Don't use a StringTokenizer or any sort of String splitter for validating dates. As already mentioned, use Date utility classes like SimpleDateFormat for validating dates unless the purpose of the exercise given to you is to implement Date validation. Also, StringTokenizer has been deprecated in favour of the String#split method. | |
Re: For all scenarios dealing with arbitrary precision calculations use BigInteger/BigDecimal. [code] class FactorialCalculator { public BigInteger compute(int num) { if(num < 0) { throw new IllegalArgumentException("negative number passed for factorial computation"); } if(num < 2) { return BigInteger.ONE; } BigInteger factorial = BigInteger.ONE; while(num > 1) { factorial = factorial.multiply(BigInteger.valueOf(num--)); … | |
Re: [url]http://www.cafeaulait.org/course/week2/08.html[/url] | |
Re: Depends on the scope of your bean and how your flow is structured. Does the JPS/Servlet which creates the bean is in the same flow as the JSP in which you want to access your bean? Is the bean placed in request/session scope? | |
Re: Are you by any chance spawing the server process by passing in the host as "localhost" or "127.0.0.1"? If yes, then AFAIK you need to replace the same with the IP address assigned by your network in case your friend is in the same network or the IP address assigned … | |
Re: This seems to be a problem with content type of your servlet response. You need to set the content type to text/xml instead of text/html for the browser to render your response in a "tree" format. | |
Re: If you are using Ajax, you can use the responseXML property which contains the document as an XmlDocument object that you can manipulate using DOM methods. [code] // Error handling omitted for brevity. var req = new XMLHttpRequest(); req.open('GET', 'http://www.google.com/', true); req.onreadystatechange = function (aEvt) { if (req.readyState == 4) … | |
Re: Do you get any errors when starting the container? Also, you need to place the class file in a location which matches your package structure. Your test.Hello.class file should be placed in the 'test' folder in the classes directory. | |
Re: A lot more men at out organization than females. Of couse the ones present are more interested in all *girl* things than software development... ;) Oh and btw, add one more to the male category. | |
Re: > I don't believe enums would be a smart move here Enums are a natural fit here IMO. It's a different thing if you are confused on how to get things rolling with enums. One possible OO solution would be: [LIST] [*]Create a enum CardSuit (e.g. SPADE, HEART, DIAMOND, CLUB) … | |
Re: [quote]Seriously this should be a website where people are allowed to make mistakes ESPECIALLY NEW MEMBERS[/quote] Yes, but it's our job to bring members on track when they make such mistakes. You should understand that you ignored rules which clearly say that site wide signatures need to be used instead … | |
Re: > I am looking for a coding project where I can learn proper > software engineering technique. Effort comes first, guidance next. Just think of something cool you've always wanted to implement and start off with whatever you have. Give it your best shot. It need not be pretty, it … | |
Re: As of Java 6, @Override annotation also works with interface methods implemented by classes. | |
Re: This indeed is a sad and shocking news. I've known Dave for quite a long time; first as someone who helped me learn C and then as a fellow moderator/senior member. He was one of the awesomest contributors of the C/C++ forums. He was always up for political discussions and … | |
Re: There are forums out there which close duplicate threads ASAP thereby preventing replication of effort and so on. After all, as you said, there is no point in regurgitating the same stuff time and time again. | |
Re: IMO, the connection executor is not the right entity to handle the result of your execution. IMO, creating handler classes for specific return types (HandlerXxx for every Connection which returns a String etc) would be a much better strategy since the ConnectionExecutor anyways doesn't know which type of connection it … | |
Re: You are trying to print out a variable(i2) which is possibly uninitialized (depends on rutime, i2 won't be initialized if i1 < 3). Either provide an initial value for i2 or write an else statement which takes care of the same. | |
Re: [quote]So what exactly is EJB? I know the definition, but I can't get what exactly is! Is it the framework?[/quote] EJB (Enterpries Java Beans) is a specification drafted for creating "re-usable" business components, in the same way as "Servlet Specification" is used for creating "web components". Think of it as … | |
Re: [QUOTE]i am getting error on this line int x=db2Crns.get(i).intValue();---- line no 38 i tried to change below line to int x=((Integer)db2Crns.get(i)).intValue(); but still same error is coming Exception in thread "main" java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer at com.kotak.autoblocknb.transaction.Transaction.main(Transaction.java:38)[/QUOTE] db2Crns.get(i) returns a String and you are trying to cast … | |
Re: A list of all getting started resources can be found in the [URL="http://www.daniweb.com/forums/thread99132.html"]sticky[/URL] placed at the top of the forum. Go through those and post specific questions if you have any. | |
Re: First and foremost, make sure you work through the official [URL="http://download.oracle.com/docs/cd/E17409_01/javase/tutorial/"]Java tutorials offered by Oracle[/URL] (the "Trails covering the basics" section) to get a hang of things. After that, picking up tutorials depends on the kind of project you are interested. Interested in developing web applications? Head over to the … | |
Re: StringBuffer class is synchronized. The vast majority of the cases which don't need this synchronization are better off using its non-synchronized counterpart; StringBuilder. > String str = new String(booleanVar); I don't think there is any String constructor which takes a boolean. Anyways, the most efficient way to convert a boolean … | |
Re: The difference between having promotional links in your signature and in each of your posts is that signatures can be disabled site-wide. This is extremely useful in case you want to do away with all the promotional links placed in signature in one go (e.g. when you ban the member … | |
Re: First suggestion; instead of making forum members download a file from "mediafire", host it on site open-source code hosting sites like Google code. After doing so, you'd be a bit comfortable with version control in general (which is the heart of every development) and people would be able to view … | |
Re: > is there any book from which i can learn net beans The best way to learn an IDE is to start using it to develop projects; learning while doing is probably the best way to do things. | |
Re: > This might also work Generally not recommended unless the range of values is known in advance and is small (i.e. v1 + v2 < Integer.MAX_VALUE). This is because the moment the difference between the two exceeds the range allowed for integers, the value of the expression overflows giving false … | |
Re: AFAIK, there is no way to customize the MFF since it is decided based on your usage patterns. Subscribing to forums and tracking them via your CP is one way of watching selected forums irrespective of your usage/posting history. |
The End.