Posts
 
Reputation
Joined
Last Seen
Ranked #19
Strength to Increase Rep
+16
Strength to Decrease Rep
-4
93% Quality Score
Upvotes Received
330
Posts with Upvotes
257
Upvoting Members
112
Downvotes Received
17
Posts with Downvotes
17
Downvoting Members
15
155 Commented Posts
~743.76K People Reached
Favorite Tags

1,171 Posted Topics

Member Avatar for vegaseat

*I don't know how many of you have ever met Dijkstra, but you probably know that arrogance in computer science is measured in nano-Dijkstras. - Alan Kay*

Member Avatar for Reverend Jim
15
13K
Member Avatar for Duki
Member Avatar for Mike Askew

Recently I was looking for books about C#. Since this thread doesn't have alot of book suggestions I'll add the results of my search to it in the hope that it will be useful to others as well. * [A C# Reading List by Eric Lippert](http://www.informit.com/articles/article.aspx?p=1769249): * [Essential C# 4.0](http://www.amazon.com/Essential-4-0-Microsoft-Windows-Development/dp/0321694694/ref=sr_1_2?s=books&ie=UTF8&qid=1360450257&sr=1-2&keywords=essential+c%23) …

Member Avatar for Shahzad111
17
3K
Member Avatar for viksat07

Of course we are able to help you. Could you show us your code and point out what issue you are having?

Member Avatar for Govind_11
0
31K
Member Avatar for brodeur

Compiler output: FriedmanRPSgame.java:3: error: package hsa does not exist import hsa.Console; ^ FriedmanRPSgame.java:7: error: cannot find symbol static Console c; // The output console ^ symbol: class Console location: class FriedmanRPSgame FriedmanRPSgame.java:11: error: cannot find symbol c = new Console (); ^ symbol: class Console location: class FriedmanRPSgame FriedmanRPSgame.java:21: error: …

Member Avatar for Zirely
0
243
Member Avatar for ray.chappel

Do you have a specific question about this piece of code? Or was this intended to be a code snippet?

Member Avatar for LohithS
0
194
Member Avatar for daledan
Member Avatar for Mian_13
0
754
Member Avatar for richard.haines.39

The exception message tells you exactly what the problem is: *Multiple decimal separators in pattern "#.##0.00"* A decimal separator in this context is a dot, and your formatter pattern contains *multiple* (more than one, two to be precise) of these.

Member Avatar for Demonix
0
6K
Member Avatar for paruse

[QUOTE=paruse;1017271]I'm a beginner in C++. I saw \b and \r in a program source code. I've seen \n and I know its purpose. But why do we use \r and \b in C++? Please clear my doubt. Thank You.[/QUOTE] Those codes are called backslash codes (or character escape sequences), there's …

Member Avatar for Shafiq_1
0
38K
Member Avatar for William Hemsworth
Member Avatar for Uchenna_1
0
9K
Member Avatar for Violet_82

Actually to be correct, the [Color constructor](http://docs.oracle.com/javase/6/docs/api/java/awt/Color.html#Color(int,%20int,%20int)) we're talking about takes 3 values in the range 0-255 (255 inclusive!) Thus, to be entirely correct you'd need to call the constructor as follows: `new Color(rand.nextInt(256), rand.nextInt(256), rand.nextInt(256))` >How do I return just int numbers I can use somewhere else? You could …

Member Avatar for Verse_1
3
5K
Member Avatar for payara111

[QUOTE=VernonDozier;865671]That's a star? I doesn't look like any star I've ever seen.[/QUOTE] It isn't a star but a 'star pattern' (or asterisk pattern)

Member Avatar for Chetana_1
-1
2K
Member Avatar for Luckychap
Member Avatar for akshaydixi

Your code is total rubbish, void main(), conio.h, no code indenting, magic numbers et al. Have you even ever heard about code conventions? I think those boring library and hotel management stuff are already way too difficult for you to code. If you think so high of yourself that you're …

Member Avatar for Darackht
-2
3K
Member Avatar for Strange&Evil

>So Far I Havent Started to Code On My 'OWN' What are you waiting for? Get started! Cheapest way, and you learn something too ;-)

Member Avatar for Nathan_5
0
233
Member Avatar for jsefraijeen

1. No need for String conversion here: `System.out.println(""+multiply(-8,8));` PrintStream.println has an [overload](http://docs.oracle.com/javase/7/docs/api/java/io/PrintStream.html#println(int)) that takes int as argument. 2. No need to roll your own abs, [Math.abs(int)](http://docs.oracle.com/javase/7/docs/api/java/lang/Math.html#abs(int)) provides one. 3. Another possible approach that satisfies the (2 years old) request: `new BigInteger(a).multiply(new BigInteger(b))` **[1] [2] [3]** **[1]** `a` and `b` denote …

Member Avatar for JamesCherrill
0
9K
Member Avatar for deceptikon
Member Avatar for Sune

Well, why don't you just check out the [URL="http://www.daniweb.com/code/forum2.html"]code snippets section[/URL]? Plenty of good stuff about pointers can be found [URL="http://www.eternallyconfuzzled.com/tuts/languages/jsw_tut_pointers.aspx"]here[/URL]. Edit:: The nicest code snippets I've ever seen on this forum, were the ones which you can find [URL="http://www.daniweb.com/code/coder5020.html"]here[/URL] (though they're more about C than about C++, I'd strongly …

Member Avatar for shafiqkuidad
0
390
Member Avatar for 35nando

The following link describes in detail how to code edge detection yourself: [URL="http://www.pages.drexel.edu/~weg22/edge.html"]http://www.pages.drexel.edu/~weg22/edge.html[/URL] And maybe this link is useful too: [URL="http://www.intelliproject.net/articles/showArticle/index/image_proc_edge_detect"]http://www.intelliproject.net/articles/showArticle/index/image_proc_edge_detect[/URL]

Member Avatar for Abheek88
0
2K
Member Avatar for awesomelemonade
Member Avatar for senaddor

Seems like you're using Microsoft Visual C++ ... > Did you put the header file in the project ? > Is the header file in the same directory as the '.cpp' file(s) where you're including it in ?

Member Avatar for yonela.yonce
0
2K
Member Avatar for GuitarComet

With me your code compiles (I'm using MinGW), but when running, your program will crash :)

Member Avatar for Ömer
0
323
Member Avatar for tux4life

One of the things which attracted my attention was that there are often newbies asking how to create a password program in C/C++, often they don't succeed, well here's my response, you can use it for any purpose you want, one thing you'll have to keep in mind is that …

Member Avatar for Remy1990
0
8K
Member Avatar for vegaseat

[B]>use fgets() instead of scanf() because it avoids buffer overflow problems if you type in more characters than name will hold.[/B] I'm not going to repeat what Tom Gunn said once, I'm just going to link you: [url]http://www.daniweb.com/forums/post956935.html#post956935[/url]

Member Avatar for Ancient Dragon
1
470
Member Avatar for christinetom

>What you provided is great but not really portable. How is a digital version of the standard "not really portable"? **Edit:** Take a look [here](http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list).

Member Avatar for mike_2000_17
0
384
Member Avatar for Birol

In my opinion the [Head First Design Patterns](http://shop.oreilly.com/product/9780596007126.do) book is a pretty good and understandable introduction to design patterns. I believe good examples of how design patterns can be applied are key to making them easier to understand for newcomers. Also I'd recommend to clearly demonstrate the benefit of applying …

Member Avatar for prakash.kadam.5851127
0
301
Member Avatar for jakubee

You can use [Arrays.asList](http://docs.oracle.com/javase/7/docs/api/java/util/Arrays.html#asList(T...)): List<Sector> sectors = Arrays.asList( new Sector(12345, 13455), new Sector(12745, 13755) /* etc. */ ); Note however that the returned List is not **structurally modifiable [1]**, if you want to structurally modify (e.g. add, remove, insert sectors) the returned List later, then consider the following: List<Sector> sectors …

Member Avatar for tux4life
0
369
Member Avatar for gvenkatesh1989
Member Avatar for <M/>
Member Avatar for Osaid9

>I want it to display automatically when I run the programme without the need to press any buttons Set the text field's content in your constructor.

Member Avatar for JamesCherrill
0
2K
Member Avatar for jemz

Here's a readability tip: use constants defined in the [KeyEvent](http://docs.oracle.com/javase/6/docs/api/java/awt/event/KeyEvent.html) class. Example: if (e.getKeyCode() == KeyEvent.VK_UP) { // ... } else if (e.getKeyCode() == KeyEvent.VK_DOWN) { // ... } else if (e.getKeyCode() == KeyEvent.VK_LEFT) { // ... } else if (e.getKeyCode() == KeyEvent.VK_RIGHT) { // ... }

Member Avatar for jemz
0
1K
Member Avatar for G_S

>the same teacher today said that a main method doesn't require a void return type, or any return type at all. The Java compiler disagrees... If your teacher said that about Java **[1]**, then (s)he is plain wrong as per [JLS 12.1.4](http://docs.oracle.com/javase/specs/jls/se5.0/html/execution.html#12.1.4) ***The method main must be declared public, static, …

Member Avatar for G_S
0
196
Member Avatar for Dani

I'm writing this post for everyone who - like me - is trying to send requests with: `Content-Type: application/json`. I figured it out the hard way (by capturing the packet sent from the PHP code sample) that the `Content-Type` needs to be `multipart/form-data`.

Member Avatar for Dani
6
3K
Member Avatar for Pobunjenik

To be honest, I have never liked Java's Date and Calendar stuff, and luckily there's [this](http://joda-time.sourceforge.net/) available.

Member Avatar for Pobunjenik
0
959
Member Avatar for asifalizaman

In [this post](http://www.daniweb.com/software-development/java/threads/445362/java-books#post1919671) I point out the books that I find especially helpful to get proficient with Java. >The complete Java reference book 2 Are you perhaps referring to an old version of [this](http://www.amazon.com/Java-Complete-Reference-Herbert-Schildt/dp/0071606300/ref=sr_1_1?s=books&ie=UTF8&qid=1362433453&sr=1-1&keywords=java+complete+reference)? That book is probably not as "complete" as a reference as its title suggests. If I …

Member Avatar for mike_2000_17
-3
578
Member Avatar for oalee

>What on earth is LSL? (guess) [LSL](http://wiki.secondlife.com/wiki/LSL_Portal).

Member Avatar for jwenting
0
286
Member Avatar for vishalonne

Why even bother dealing with multiple frames? http://stackoverflow.com/questions/9554636/the-use-of-multiple-jframes-good-bad-practice Try a [CardLayout](http://docs.oracle.com/javase/tutorial/uiswing/layout/card.html).

Member Avatar for rush_parekh
1
10K
Member Avatar for PolarClaw

[B]>Can you please explain a little how you derived the formula c = c * (y - x) / (x + 1); ....just to get the idea of what steps to do in order to reach this formula[/B] Dude, are we going the reinvent the whole history of maths? No! …

Member Avatar for H A hashim
1
1K
Member Avatar for paku_dnj

It is safer if no echo feedback is given at the time you enter your password. That way if somebody behind you is looking over your shoulder, that person can't tell how long your password is by counting the number of asterisks on your screen. Perhaps you find this a …

Member Avatar for ~s.o.s~
1
10K
Member Avatar for toldav

You could even compact it further using the conditional operator: return ((a * d) == (b * c)) ? 0 : 1; Keep in mind however that compact code does not necessarily contribute to readability. **Edit:** You seem to have defined your isSolvable() method with **int** as return type. A …

Member Avatar for radhakrishna.p
0
369
Member Avatar for cherry.basilio2

[Integer.toBinaryString(int)](http://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html#toBinaryString(int)) in case you don't have to implement the algorithm yourself. Also note that if you write e.g. `int x = 5;` the 5 is *actually* stored in binary. `System.out.println(x);` prints 5 because the binary value in x is converted to base 10 for display.

Member Avatar for stultuske
0
273
Member Avatar for tformed

I've written a C++ class to estimate the roots of a number: you can check it out [URL="http://www.daniweb.com/code/snippet1150.html"]here[/URL] ... Maybe the following page might be helpful too: [URL="http://en.wikipedia.org/wiki/Methods_of_computing_square_roots"]http://en.wikipedia.org/wiki/Methods_of_computing_square_roots[/URL] Hope this helps !

Member Avatar for vmanes
0
3K
Member Avatar for harinath_2007

>Write System.exit(0); in your code whenever you are in stress..:) It won't reduce stress, it will create stress in the long run. Because 1. Whenever the program appears to be shutting down for no apparent reason it will cause headache to your colleague(s) (and you, if you forget about the …

Member Avatar for ~s.o.s~
-1
268
Member Avatar for IIM

It seems to have affected my upvoted / downvoted lists too: There's one post with 0 votes in my upvote list, and I know it hasn't been downvoted because my downvote count hasn't changed. In fact I even noticed that after my name change all of my previously downvoted posts …

Member Avatar for IIM
0
489
Member Avatar for rsewak
Member Avatar for <M/>

*"The greatest mistake you can make in life is to be continually fearing you will make one." - Elbert Hubbard*

Member Avatar for <M/>
0
432
Member Avatar for tux4life

If I check my profile page I read "Total Down-Votes Received: 16", yet if I click the [Posts Voted Down](http://www.daniweb.com/members/495627/mvmalderen/posts/downvoted) button, only one downvoted posts shows up. My gut feeling tells me that it is related to my nickname change, because since then the downvoted posts list seems to give …

Member Avatar for stultuske
0
239
Member Avatar for tux4life

It's me *again* ;) The other day the endorsement counts of high-level forums ("Hardware & Software", "Software Development", "Web Development", etc.) caught my attention. Here's a screenshot of the endorsements strip shown above the page footer of the Software Development forum. If I hover over an avatar (in this case …

Member Avatar for tux4life
0
241
Member Avatar for Unused Mass

Take a look at [entrySet()](http://docs.oracle.com/javase/6/docs/api/java/util/Map.html#entrySet()) and [Map.Entry](http://docs.oracle.com/javase/6/docs/api/java/util/Map.Entry.html).

Member Avatar for tux4life
0
155
Member Avatar for tux4life

It seems like sometimes when someone signs in using Facebook, something like this happens: ![rmas_fb_login](/attachments/large/1/rmas_fb_login.png "rmas_fb_login") ![rmas_fb_login21](/attachments/large/1/rmas_fb_login21.png "rmas_fb_login21") Is this considered to be "normal"? **Edit:** I noticed that while composing this post, I couldn't remove attachments I added. The remove option was available only in edit mode, *after* I posted.

Member Avatar for Reverend Jim
0
514

The End.