- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 6
- Posts with Upvotes
- 5
- Upvoting Members
- 5
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Re:
public int intRet1; public int intRet2; public void IntRandom(int intNumber) { int intNum[] = new int[36]; Random randomGen = new Random(); intNum[0] = randomGen.nextInt(intNumber)+1; do{ intNum[1] = randomGen.nextInt(intNumber)+1; }while(intNum[0] == intNum[1]); intRet1 = intNum[0]; intRet2 = intNum[1]; } today I tried using *java.util.Random* class, but as you can see I … |
|
Hi, for a school project (exam actually), we've written a ternary trie for text-completion. We fill it with about 400.000 lines of text (13 MB in total, as UTF-8). Now, java represents characters in UTF-16 i believe. So thats 26 MB, + another 26 for saving the complete strings in … |
|
I have this annoying problem: I am filling a HashSet out with Road objects, only doing so to avoid duplicate elements. However, the output from lines 81 though 95 shows that the set contains duplicate elements. Sorry for the messy code, this is a pretty ad-hoc sollution, in addition to … |
|
When i use this code from another class (I'll post the client if necessary, but in the interest of making a short post:) I get an ArrayStoreException from line 31. As I see it: the array is of runtime-type V, the item that should be added to the array should … |
|
Obviously I have some wrong assumptions, because this prints "strsize = 8" no matter what. I realize my use of system() might be misguided, so if you have comments on that don't hold back, just please help out with the string-thing aswell : ) BTW it's a 'wrapper' for shell … |
|
I hope I'm posting in the right forum :) I'm primarily concerned with C compilers and sun's JDK, but general info is more than welcome (Documentation for self-education as well). Well, if i wrote a program like [CODE] int i = 5 printf("i is $d", i); [/CODE] Would i=5 be … |
|
As part of our exam project we need to write a GUI in java, the problem is that the structure has got us stumped. I'm not asking you to do our work, but if someone could nod us of in the right direction it would really be appreciated. We want … |
|
Right, I wasn't sure whether to put this here or in the java forum (since I'm trying this in java) but in the end I figured it is probably a general coding question. Hope I got it right :) So, about object names :) I'm trying to do the c++ … |
|
Re:
I just try to calculate 5.3 - 5, and the answer is a bit off. this is the code: [CODE]double answer = 5.3 - 5; println("answer = " + answer);[/CODE] and the output is: "answer = 0.2999999999999998" instead of 0.3. I use Eclipse on win 7 32 bit as a … |
|
Re:
Hello Guys I ask if any one can help me i have to write application which record video from webcam , but I don't know where I must search ? can you help ? just suggest where I should read . Thanks. |
|
[B]TL;DR:[/B] I am asking for help considering the structure on the following code, and advice on code structure in general. The problem in this case is the try blocks, which are messing up the scopes and complicating error handling. I will elaborate a little for the more patient readers below … |
|
I am following a series of programming challenges for beginners, this challenge requires interactive commandline input which is a pain in java. Therefore I've made a small class in another file to handle the user input. When I try to compile the main class ('external' class compiles without problems) I … |
|
This is probably really more of a math problem. I hope I want have to go into too much (for you, boring) detail about the code, as the problem resides in this loops. Please let me know if I provided too little detail :) Now for the problem: I would … |
|
The code executes as expected, but I am not sure it is considered good code:) I am thinking especially of the two streams on the socket, if the first one is successfully opened and the next one for some reason throws an exception, the finally block will never run. If … |
|
Hi guys :) Well I got an "variable might not have been initialized" error when I tried to compile the following code: [CODE=java]import java.lang.*; public class NewFrame { public static void main(String[] args) { if (args.length != 3) { System.out.println("Usage: java NewFrame <frame-name> <frame-hight> <frame-width>"); System.exit(1); } int firstArg, secondArg; … |
|
Hi guys, I have been searching the web a bit without success, perhaps I'm using the wrong keywords. Anywho, I'm looking for a way to monitor how many bytes are uploaded/downloaded from the computer, weather trough the winAPI or whatever, I would really appreciate any help on this :) |
|
Hi, i just don't get why this isn't working. It is supposed to read from the end of a .txt and up, until it hits the first space but it just keeps repeating the last character in the text file ip.txt Any help is much appreciated. [code=c++]#include <iostream> #include <fstream> … |
|
Hi Guys, I am new to java and I need some help:) First of all: I admit, I did not write this, I re-wrote a bit of it for my needs, and therefore may not be able to fully understand parts of it. The thing is, the script accepts only … |
|
Hi, this code is merely for testing a coulpe of functions for use in a bigger program, therefore this code alone may seam silly, but there is a point to it:) When i run this and press "1" the program just terminates, pressing "2" or "whatever here" works fine however? … |
|
Re:
If you believe the results of the first annual [URL="http://www.fiascoawards.com/index.php"]Fiasco Awards[/URL] then the answer would appear to be an unequivocal yes considering that Vista got a rather staggering 86 percent of the vote for the worst performing IT product of the year. But then appearances can often be deceiving, and … |
|
Hi guys and girls. I was wondering; is there a way, using winAPI or external libs and whatnot, to check the internet connection etc? more important; check the speed the conmputer is currently uploading at? The goal is to make a program that monitors the internet connection, and if the … |
|
Hi, can someone plz tell me how to compile gtkmm in code:blocks? or actually, how to compile gtkmm at all in windows? |
|
Re:
Whenever I try to run a compiled group of code that should bring up a console, the console just flases onto the screen and is gone...I've copied a few programs from this forum onto it to check and see if its just me but it does it every time. |
|
Hi, are there some libraries i can use (in MS windows) for stuff like, obtaining info from a website? i read something about sockets once, but im not sure what it is (yes, i googled it :) ) Or would be easier/better, as some suggest, to learn java or python? … |
|
Re:
Hello everyone, as you can see I am new to this forum, I have had, not huge experience, but a bit of experience with c++. So I decidedt to make a keylogger. I know there are other ways to make this code shorter but for now i would like to … |
|
Re:
Hey, am trying to create an application that displays a text box and a submit button, so that the user can type text into the text box, click submit and it saves it into a txt file. Could you help me please? Thanks in advanced |
|
Re:
Hi guys, I need a solution. I have a uint32_t variable say var1. I need to store current time value in this variable, and somewhere in my code i need that time in proper timing formet i.e hour minute and seconds . is this possible? Any other solution for storing … |
|
Heres the code, im pretty sure i missed something really stupid, No matter what number i type i get "The number oyu type must be a positive number" so i guess the problem is either in my if statements in main or in the checkuserinput function, most likely in my … |
|
Re:
I need an example on downloading an internet file in a windows service application before logon using c++. |
|
Re:
hey, I want to read internet data through a C++ program. I am told that the way to do this is by using a proxy server and spitting out the data through the proxy to a file which then can be read. How exactly do you setup a proxy server … |