Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
87% Quality Score
Upvotes Received
6
Posts with Upvotes
5
Upvoting Members
5
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
1 Commented Post
~16.0K People Reached
Favorite Tags
Member Avatar for Ashenvale

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 …

Member Avatar for Bladtman242
0
149
Member Avatar for Bladtman242

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 …

Member Avatar for Bladtman242
0
202
Member Avatar for Bladtman242

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 …

Member Avatar for NormR1
0
3K
Member Avatar for Bladtman242

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 …

Member Avatar for Bladtman242
0
185
Member Avatar for Bladtman242

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 …

Member Avatar for Bladtman242
0
173
Member Avatar for Bladtman242

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 …

Member Avatar for Bladtman242
0
154
Member Avatar for Bladtman242

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 …

Member Avatar for Bladtman242
0
190
Member Avatar for Bladtman242

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++ …

Member Avatar for Bladtman242
0
190
Member Avatar for binoman

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 …

Member Avatar for binoman
0
1K
Member Avatar for AhmedGhazey

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.

Member Avatar for Bladtman242
0
104
Member Avatar for Bladtman242

[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 …

Member Avatar for Bladtman242
0
226
Member Avatar for Bladtman242

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 …

Member Avatar for Bladtman242
0
209
Member Avatar for Bladtman242

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 …

Member Avatar for Bladtman242
0
257
Member Avatar for Bladtman242

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 …

Member Avatar for Bladtman242
0
115
Member Avatar for Bladtman242

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; …

Member Avatar for Bladtman242
0
506
Member Avatar for Bladtman242

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 :)

Member Avatar for Bladtman242
0
145
Member Avatar for Bladtman242

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> …

Member Avatar for Bladtman242
0
620
Member Avatar for Bladtman242

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 …

1
70
Member Avatar for Bladtman242

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? …

Member Avatar for Bladtman242
0
527
Member Avatar for happygeek

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 …

Member Avatar for javmedia
0
305
Member Avatar for Bladtman242

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 …

Member Avatar for Bladtman242
0
140
Member Avatar for Bladtman242

Hi, can someone plz tell me how to compile gtkmm in code:blocks? or actually, how to compile gtkmm at all in windows?

Member Avatar for Bladtman242
0
285
Member Avatar for Kiba Ookami

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.

Member Avatar for Stefano Mtangoo
0
238
Member Avatar for Bladtman242

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? …

Member Avatar for Bladtman242
0
143
Member Avatar for slim2hott

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 …

Member Avatar for NathanOliver
-2
656
Member Avatar for Phil++

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

Member Avatar for John A
0
190
Member Avatar for johnray31

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 …

Member Avatar for johnray31
0
165
Member Avatar for Bladtman242

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 …

Member Avatar for Bladtman242
2
179
Member Avatar for orwa

I need an example on downloading an internet file in a windows service application before logon using c++.

Member Avatar for MosaicFuneral
0
179
Member Avatar for yazooney

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 …

Member Avatar for jen140
0
888