4,084 Posted Topics

Member Avatar for yasmen_1
Member Avatar for DGULLIVER

I personally can not think of one single reason why you shouldn't be able to run them both one one machine. of course that is assuming you are not working on a 486 desktop that should've been replaced two decades ago.

Member Avatar for stultuske
0
359
Member Avatar for letters1417

actually, yes. but you also have to change the +'s to -'s, and < to >. can you show the changed code you tried?

Member Avatar for JamesCherrill
0
2K
Member Avatar for divinity02

Divinity: nobody expects you to build up to anyones level but your own, but the question you must ask yourself: "If I still make (almost) the exact same errors as I did a year ago and still not manage to get any further toward a solution then I did at …

Member Avatar for JamesCherrill
0
239
Member Avatar for joshl_1995

This is not just a black and white question. Are you in the situation that you can (financially) carry on without taking the project? Do you have other work to fall back on? Do you already have a few decent projects to put on your resume? True, maybe friends and …

Member Avatar for jkon
0
721
Member Avatar for Jamie_11
Member Avatar for Ioanna_1

without seeing any of your code, all I can guess is, you are trying to use a Stream that is already closed.

Member Avatar for stultuske
0
252
Member Avatar for james sipha

hello James, If this is your first visit to DaniWeb, welcome. If by some chance you've mistaken the forum for "coderz-for-hire" or if you thought you saw a big "We'll do your homework for you" banner on top of the page, I'm afraid you're mistaken. DaniWeb is a group of …

Member Avatar for stultuske
-4
217
Member Avatar for Mar. Na.

you want us to comment on your code without seeing your code? based on your description: extract it in a method, and call that method in a loop.

Member Avatar for JamesCherrill
0
392
Member Avatar for WarriorsFan510

Do you have these classes in one single .java file? Then that is your problem. The second class (with it's import statement) has to be inside a second .java file, being: die.java But this is far from your only problem: you are using variables you never declare. For instance: what …

Member Avatar for stultuske
0
538
Member Avatar for Hari_11

seems as if some simple conditional statements can solve this for you. What do you have so far?

Member Avatar for stultuske
0
174
Member Avatar for Mar. Na.

my recommendation: don't. even though /* and */ are usually (not always!!) used for comments, some frameworks (GWT, for instance) use it to tell you that native code is being used. Here is a simple example of how to code a JSNI method that puts up a JavaScript alert dialog: …

Member Avatar for Mar. Na.
0
1K
Member Avatar for FarrisFahad

well, just look at the Paypal website. according to them, it can be done, so who am I to disagree ? Then again be advised, that not all companies want to be paid with Paypal.It's nice and all, but when you're hungry, you can 't just walk into a bakery …

Member Avatar for Julia_2
0
418
Member Avatar for omotoyosi
Member Avatar for AleMonteiro
0
258
Member Avatar for J_2

why would you want to do this: for (int i = 0; i < number; i++) { int randomInteger = randomNumber.nextInt(); maxValue = numArray[i]; minValue = numArray[i]; This means you overwrite the maxValue and minValue each iteration, regardless whether the value is more than the existing max, or lower than …

Member Avatar for stultuske
0
997
Member Avatar for AbhiRanjan

do remember that Java runs in a JVM and doesn't have access to all data of the OS. Also: not all OS's work the same way.

Member Avatar for stultuske
0
158
Member Avatar for adikimicky

also: don't make it harder on yourself then it should be: catch (Exception ex) { } see what's wrong there? how will you ever know whether that part of your code runs the way you think, or throws a whole lot of exceptions? you are hiding every exception you throw, …

Member Avatar for Lakhveer
0
7K
Member Avatar for divinity02

but, most importantly: we have no idea what you are trying to do with your code, neither do we have an idea what it's doing (wrong).

Member Avatar for divinity02
0
136
Member Avatar for Saboor880

an ms access database? why on earth do you want to do that? not only would it need the database, it had better have MS Office (at the very least Access) installed, and very few serious people would agree to use a MS Access database for a serious application.

Member Avatar for stultuske
0
250
Member Avatar for anand01
Member Avatar for Dennis_8

the irritating part is that it's basically "code you've found online". Does it actually link to your db, is it correctly configured? Why not writing your own persistence code?

Member Avatar for Dennis_8
0
409
Member Avatar for Nation
Member Avatar for DeanMSands3

encryption shouldn't be based on whether your app is mobile, web or standalone. Never read a "for dummies" book. The only thing they really achieve in is making you believe you actually read something worth reading. if a topic is worth reading: don't go for the "for dummies" edition. It's …

Member Avatar for stultuske
0
308
Member Avatar for Sheila Mae

First of all: don't forget to add an actual question to your post, secondly, the code you show, is JavaScript, not Java. A good first start is knowing what language you are working in. Did you write this code yourself?

Member Avatar for stultuske
0
179
Member Avatar for Tomas_3

why didn't you just post that here: https://www.daniweb.com/community-center/for-hire-hiring/52 Since this isn't actually a post concerning technical issues you are having with any of the languages you tagged, the tags don't really apply here. Why do you want to create it for smartphones first, by the way? I doubt it's easier.

Member Avatar for Raul Perez
0
315
Member Avatar for joshSCH

Harvey_1 : you could/should have posted that in a new thread. this is what we refer to as a 'dead thread', a thread that is years old, and marked 'solved' almost a decade ago. chances of people reading this are slim. start a new thread, provide all the information of …

Member Avatar for stultuske
0
36K
Member Avatar for Gl753

As always: keep your code as simple as possible. For instance: String monthName[] = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; String monthString; int month = 8; switch (month) { case 1: monthString = "January"; break; case 2: monthString = "February"; break; case 3: monthString …

Member Avatar for stultuske
0
342
Member Avatar for Sandeep_16
Member Avatar for Ong_1

by instantiating and using it? Only the showCharacters will be useless in your GUI, since it's hardcoded with console output.

Member Avatar for stultuske
0
221
Member Avatar for Zac_3

Can't you refactor this bit? if (myMatrix[i - 1][j - 1] == true) { counter2 = counter2 + 1; } if (myMatrix[i - 1][j] == true) {counter2 = counter2 + 1; } if (myMatrix[i - 1][j + 1] == true) { counter2 = counter2 + 1; } if (myMatrix[i][j - …

Member Avatar for JamesCherrill
0
220
Member Avatar for JamesCherrill
Member Avatar for eny321

prateek: this thread is four years old. You should try to write your own code, and when come into something you can't solve, start a new thread, showing your code and what you expect it to do and what it is actually doing (wrong). Don't revive dead threads.

Member Avatar for stultuske
0
4K
Member Avatar for OsaMasw

if you are totally new to Java, maybe you should start with getting acquainted with the language. It's a bit like learning to swim: if you don't know how, jumping in the deep end when noone else is around, might get you in trouble you can't get out of.

Member Avatar for OsaMasw
0
653
Member Avatar for altjen

`new JButton("added button");` creates a Button. can you be more specific about what you try to do, and how you've tried it so far?

Member Avatar for mKorbel
0
8K
Member Avatar for NONONO123

If you are new to programming, you should consider start learning at the beginning. Jumping into more advanced techniques won't make learning it easier. James told you what to do to check the first thing, in a way someone new to programming should be able to understand, let alone somebody …

Member Avatar for NONONO123
0
3K
Member Avatar for dhitinair

The best and most reliable way: > 1. learn Java > 2. rewrite the code in Java > 3. **THIS STEP ALSO IF YOU USE A CODE CONVERTER** > a. Test the code > b. As long as bugs are found - fix the bugs and return to step 3.a

Member Avatar for stultuske
0
1K
Member Avatar for Mar. Na.

what "does not work"? can you distinguish between requirements - pseudocode - actual code, say what works, what fails, any error message, where the exact problem is, ...

Member Avatar for Mar. Na.
0
261
Member Avatar for bsabev

Sure, why not? But, "try before you buy". Since it's 12 months free, first try it out for a personal website (not linked to your client) for a period of (at least) a month. See if it's stable, see if you can get lots of people to visit your page …

Member Avatar for stultuske
0
422
Member Avatar for pihuu

What is 'query', what is 'em', what does 'getResultList()' return? This code is way to vague to be clear. Have you debugged over your code and checked the contents of list?

Member Avatar for JamesCherrill
0
164
Member Avatar for andreas.petrou.967

This is not Java code, this is JavaScript code. If you think they are the same, it's a bit as saying a Car is the same as a Carpet Anyway, have you tried applying a regex validation?

Member Avatar for andreas.petrou.967
0
299
Member Avatar for divinity02

I just checked a bit the original code: while(i<=4) { if(i<=4) { There is no need for the if statement here, that's already checked by the while. Secondly, your problem lies here: else if(choice == 'B' || choice == 'b') { System.out.println(playername+" no troll!! not the correct answer, you need …

Member Avatar for stultuske
0
253
Member Avatar for Fatma_3
Member Avatar for pritaeas

Not bad, yet I'm afraid quite a few applications won't be able to work with it just yet. I've seen quite a few applications where errors like this are caught with "if error == 404" -> not found " else if error in < specific error code list > " …

Member Avatar for diafol
3
227
Member Avatar for coder91

JUnit tests don't take parameters. JUnit tetsts are supposed to test existing units, not to create new untested units.

Member Avatar for coder91
0
330
Member Avatar for zelrick
Member Avatar for coder91

This makes very little sense: what if there is a value that appears as both key and value? how will you know which to return then?

Member Avatar for JamesCherrill
0
134
Member Avatar for geysa
Member Avatar for mikey3891

Also, something that is better to start early with, it'll make your code shorter, more efficiĆ«nt and easier to maintain later on: String response = input.next().toUpperCase(); if(position == 0) { if(response.equals("A")) { responseAns = true; } } else { if(response.equals("B")) { responseAns = true; } } This is quite a …

Member Avatar for mikey3891
0
260
Member Avatar for Saboor880

where is that `getString("name");` call? I only see calls to a `getSring(int column);` method.

Member Avatar for stultuske
0
245
Member Avatar for laguardian

> The NullPointerException is right before the if loop. The app works well if I code it this way: if(mode.equals("easy")) { but with this, it would only display the Easy difficulty with the NBA image set. > there is no such thing as an if-loop, only an if-statement. This means …

Member Avatar for stultuske
0
337

The End.