- Strength to Increase Rep
- +17
- Strength to Decrease Rep
- -4
- Upvotes Received
- 1K
- Posts with Upvotes
- 872
- Upvoting Members
- 377
- Downvotes Received
- 47
- Posts with Downvotes
- 39
- Downvoting Members
- 35
A simple man with simple needs.
- Interests
- Daydreaming, contemplating, sulking, anime and programming; in that order.
3,892 Posted Topics
Re: Few points: [LIST=1] [*]close() calls should always go in the "finally" blocks [*]Never use System.exit() to duck out in case of failure. If your code is used in a large/big setting, exitting the JVM in case something fails isn't pleasant. Boolean returns are your friend. [*]Always check the return status … | |
Re: [quote=jd_1604;285142]District cricket is a good excuse to have a drink[/quote] Drink all the booze you want to. | |
Re: 264 Huh, what's this all about? ;-) | |
| |
Re: > i want to trace these button events. You can't trap this event. | |
Re: > b = (one)a; `b` and `a` are of reference type ArrayList but you are trying to cast them to type `one` and hence the error. BTW, instead of posting large code snippets it would be better if you explained "what" you wanted to do and a small code snippet … | |
Re: Have a look at [URL="http://www.daniweb.com/community-center/daniweb-community-feedback/threads/300989"]this topic[/URL] which talks about something similar. AFAICT, ignore list is the closest you can get when it comes to "blacklist". | |
Re: FLCL Naruto Samurai Champloo Innocent Venus Black Lagoon Death Note Ouran High School Host club Air Gear D Gray Man Black Blood brothers and many more.... :D | |
Re: Considering you have no programming expericence, any advice we give you would go for waste as you would have having no clue as to how to realize the idea. Learn a programming language of your choice. Maybe then you would be in a position to actually achieve something. | |
Re: Instead of directly pointing out the answer, I would like to help you understand the technique for tackling these sort of issues (which are very common when programming anything). So basically you have a problem statement and the code written to solve it. But, like code written by most programmers, … | |
Re: > for some reason the file doesn't start with a eof character does it? EOF isn't a character, this is one of the reasons why the [ICODE]read [/ICODE]method in Java and the [ICODE]getchar[/ICODE]/[ICODE]fgetc [/ICODE]function in C returns an [ICODE]int [/ICODE]instead of a [ICODE]char[/ICODE] [hint: since char is unsigned, there would … | |
Re: You cant as such check for such conditions in case of a simple sort like bubble sort. Take for eg. this array. 1 2 3 4 5 6 8 7 During the first seven passes no swap is performed since the next number is always greater than the current but … | |
Re: > Write an image editor. Java has an extensive image manipulation API. You have got to be [URL="http://paulbuchheit.blogspot.com/2007/05/amazingly-bad-apis.html"]joking.[/URL] ;-) | |
Re: > Should I use simple ArrayList or HashMap as I need to pass selected > checkbox values... Just ensure that all your checkbox elements have the same name and then use the [icode]HttpServletRequest.getParamterValues('elementName')[/icode] to retrieve a String array containing the list of item id's. ![]() | |
Re: I would say extremely quiet... BTW Dani the link to Daniweb API in your signature is broken. | |
Re: If you are on MS Windows, save yourself the trouble and install the Anaconda python distribution which comes with a native package manager called `conda`. Things which are extremely difficult to install on windows (e.g. Numpy, Scipy, Intel MKL dependencies) become a breeze without having to deal with weird dependency … | |
Re: > Interesting. I would have imagined it was much, much higher. I believe that most of the folks "landing" on Daniweb are looking for a solution to some technical problem. Given that most of the programming happens on a laptop/desktop, we have too few mobile users. There is a high … ![]() | |
Re: Rather than a mass email (which can easily get lost due to folks not correctly configuring their mail account with old Daniweb), I believe there should be a sticky post/blog post accessible from the login page *before* someone has logged in. I'm surprised you haven't got a active blog given … | |
Re: > , the other is a scripting language, which can only run front-end in a webbrowser. This isn't true; look at [Node.js](http://nodejs.org/). It provides all the API calls required to do I/O (network connections, read/write files etc.), integrate with other C/C++ API's out there (by writing node.js libraries which wrap … | |
Re: Try using the RandomAccessFile in read mode.[code] public class MainTest { public static void main(String args[]) throws Exception { RandomAccessFile in = new RandomAccessFile("file.txt", "r"); String line; while(true) { if((line = in.readLine()) != null) { System.out.println(line); } else { Thread.sleep(2000); // poll the file every 2 seconds } } } … | |
Re: > Is there a way to display the source of the iframe or the html file > that is being displayed in the iframe in the web browsers address > bar? AFAIK, no. It seems pretty logical that the URL in the address bar doesn't change given that the user … | |
Re: Except that don't use == operator for comparing strings; use the equals/equalsIgnoreCase method instead. | |
Re: It is worth noting that though those two things ( <typename T> and <class T> ) are interchangeable in most of the cases there are some senarios where you must use [I]<typename T>. [/I]Eg. Suppose you want to create a templated class with something like this: [code=cplusplus] template < class … | |
Re: Apache POI is a pretty well known library for creating `.doc` and `.docx` files. If you do a search for "doc to pdf java" you'll come across few open source libraries (not well known) which can do this. Assuming you are not doing any fancy coloring/formatting, I would recommend writing … | |
Re: There is no authorative site which lists all projects in need of help. One option would be to visit https://github.com/trending?l=java , look at projects which catch your fancy, drop a mail to the owner if he/she is interested in your contributings and fire away. The "github" way of contributing has … | |
Re: I switch between projects and I find keeping a note of the current state of things helps. I use the Microsoft OneNote for this but I think any basic text editor should do the job. As far as working with code is concerned, in case I need to drop off … | |
Re: > One thing is for certain. Daniweb was bleeding users with the old forum based interface I think this was because the old forum based interface was still very different from the traditional forum based interface offered by many other web sites. The new interface shares the same problem. I … | |
Re: I see the same; probably a bug. | |
Re: If it works well (searching by tag), is well controlled (well defined tags) and maybe supports some nifty operations (like intersect etc.) then yes, tagging system sounds good for Daniweb! | |
Re: I have come to realize that only a handful of beginners prefer programming "discussions". This is one of the primary reasons why SO is viral; as long as you have a precise question, there are loads of professionals out there ready to give you an answer for "free". The reward … | |
Re: [quote=WaltP;297892]Well, don't know how to load the pic, and can't delete the message...[/quote] Go to the site [url]www.imageshack.us[/url], upload your picture there. After uploading you will get an URL of the image. Just click the insert image button on the WYSIWYG editor of Daniweb, paste the URL. Your pic will … | |
![]() | Re: I think it should be fine to have them there to promote other folks to contribute their own solutions/answers. |
Re: Looks sleek and simple. I like the toned down colors. No top navigation bar? | |
![]() | Re: Hover badge or highlighted user name sounds like a good idea. |
Re: Also, `next` takes an optional `default` argument so you can easily call `v0 = next(infile, None)` and check the value of `v0` before proceeding... | |
Re: I still have to provide my feedback on the official thread but since you have already created this thread, maybe I can just use this one. On first looks, it's definitely sleek looking and modern theme, a job well done. Regarding your question, my personal answer would be "yes". I'm … | |
Re: The first one fails because `base` is *inside* the function which only comes into the picture when the function is executed. When you exec the code string, the top level definitions get executed, the functions themselves don't. The second one fails because `'int'` is not directly present in the `ns` … | |
Re: You need to start debugging the code (which is pretty small IMO). As a starting point, what's the smallest sample with which you can reproduce this problem? What happens when you run this with inputs [5, 4]? Which IDE are you using to write code? Can you try out the … | |
Re: For me it's Dragon Nest; fast-paced action based MMO FTW! | |
Hello to all programmers out there. Considering the growing request for practice problems by the beginners, we ( Me, Joey, Niek, Aaron..) have decided to start a sticky which will host some common practice problems which would help the beginners in understanding the programming concepts in a better way. (Did … | |
Re: Regarding your 3rd "why", Python performs certain primitive optimizations when it comes to immutable values. For when you write `e=258; f=258` on the *same* line, Python realizes that it can save some space by making both variables point to the same value. This works not only for numbers but all … | |
Re: > don't use english by default because usually IT does, use a language you all understand. I don't really agree with this. Programming cuts across boundaries so always assume that the code you write will end up being maintained by some person on the other side of the globe who … | |
Re: > Could you please send me tutorial link, that explain how to set up driver and sample code to connect to MS Access database? I tried to find but I was confouse. You need to stop, think, understand the error message and then proceed. Your code doesn't work even after … | |
Re: Coding the tutorial with the magic number given to ignore function would not be such a good idea. Either declare the constant at the start of the program, in a header file or better yet use inbuilt constants like max value provided in the limits header file. Another robust method … | |
Re: [quote=joeprogrammer;249378]Despite this book's title, it's actually aimed more at "intermediate" beginners if you know what I mean. It teaches C++ very throughly, but can be a bit steep for newbies. (The back of the book says level is "Beginning to Intermediate".) However, I would recommend this book to anyone who … | |
Re: You should always include the output you get from runnnig the code so that you can get better answers. Regarding your question, `nextInt` throws an Exception when the next token is not an int. Two solutions here: 1. Check if the next token is an integer before calling `nextInt` on … | |
EDIT: Please note, as I write this, the post is now 6 years old and might have some outdated information. I'd personally recommend beginners start with "Learn C the hard way" by Zed and this book since I have heard good things about them. Reading the FAQ put together by … | |
Re: Depends on what exactly do you mean by a company -- a big time software gaint or a small time budding organization with no more than 10 people. If the former, then yes, you are correct. But if the latter, then no, I have seen small time companies (like those … |
The End.