This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have David & Dawn Griffiths on-line!
See this thread for details.
Win a copy of Head First Android this week in the Android forum!

fred fredricks

Greenhorn
+ Follow
since Mar 04, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by fred fredricks

Hello!
could someone help me out a little, i have to dig up information on Stack structure..ir its features and its main operations...
where can i find this kind of information??
or could some1 who knows a lot help me out???
thanks!!
ahhh, another question i have to answer is about run-time activation record stack?
my text book is not that good.....thanks!!!
18 years ago
yeah its homework...i have done like 15 questions, i only have a few left...
ie, the ones i just couldnt figure out how to do, thats why i ask for help....
its ok right?
thanks...
18 years ago
hello!!!
ok, i have to do a maths problem sheet...and i am stuck...can u guys help me out?
thanks!!
e) give the outline of an efficient algorithm to test if a point is inside a rectangle.
f) how would you test whether two circles intersect
thanks!!!
18 years ago
hi guys...does anyone know of a really, and i mean, really easy to understand tutorial on the basics...i downloaded a few, but i am still a little cofused, with terms like static and private, void....those things really got me confused....thanks a lot!
saludos
drowning newbie!!
18 years ago
i...ok, i posted something similar to this on the beginners, but i got no help and it turned into a spanish chat...
what i am having trouble doing is having a little ship shoot a bullet and hit a object that moves..could some1 explain or give me a good tutorial site maybe?
thanks...so far i have the ship that moves left to right
18 years ago
hi, sorry, i didnt mean to do it...newbie, i am playin around trying to see what does what etc...thanks for the help...here is the other class

18 years ago
hey, i just cant see the error guys...maybe you can see and help me out? its between two files, so i hope you dont mind me posting both class's and the respective compile errors..

COMPILE ERRORR:


COMPILE ERROR:
[ edited to preserve formatting using the [code] and [/code] UBB tags -ds ]
[ March 30, 2003: Message edited by: Dirk Schreckmann ]
18 years ago
hi ppl..
i have some code which reads a txt file, and then converts to binary. my problem is that i need it all to be 12bit. but not all of them come out like that.
how can i fill the "result" with 0's (zeros), from left to right till its 12??? i had a go at masking...but i am having trouble understanding that. thanx!!!
thankx ppl....
here is a bit of my code, i dont know if it will help understand;
for (int i = 0; i < data.length; i++)
{
instruction[i] = Integer.valueOf(data[i]).intValue();
}


//pc = addresses[0];
for (int j = 0; j < data.length; j++)
{
binary[j]= Integer.toBinaryString(instruction[j]);
System.out.println(binary[j]);
18 years ago
wow! ok, thanks....errrr thats a lot of code...darn i didnt know it was that much...but you have made things a bit more "clear" thanks ever so much dude! i will crack on it, see what i can up with...hope you dont mind me asking again if i get stuck...( no doubt i will...LOL)
thanks again
18 years ago
hi ppl! i have this code which i want to compile to see how it works..but its not compiling..i am a total newbie, so its probably really obvious..
i am trying to make a little image move up,down, left right when you press the arrow keys...any helps?
here is the code:
import java.awt.Graphics;
abstract class MoveableObject
{
//Draw
abstract void draw(Graphics g);

//Move, specify the speed
public void move (int direction, int s)
{
if(direction == this.RIGHT)
this.x = x + s;
if(direction == this.LEFT)
this.x = x - s;
if(direction == this.DOWN)
this.y = y + s;
if(direction == this.UP)
this.y = y - s;
}

//Overloaded, use default speed
public void move(int direction)
{
move(direction, speed);
}

// True is this object is out of the given boundary
public int outOfBound(int xBound, int yBound, int h, int w)
{
if (x < xBound)
return LEFTBOUND;
else if (x+width > xBound+w)
return RIGHTBOUND;
else if (y < yBound)
return TOPBOUND;
else if (y+height > yBound+h)
return LOWBOUND;
else
return INBOUND;

}

//Accessor
public int getWidth()
{
return width;
}
public int getHight()
{
return height;
}

//States

protected int x;
protected int y;
protected int width;
protected int height;
protected int speed;

public static final int RIGHT = 0;
public static final int LEFT = 1;
public static final int UP = 2;
public static final int DOWN = 3;


public static final int RIGHTBOUND = 0;
public static final int LEFTBOUND = 1;
public static final int TOPBOUND = 2;
public static final int LOWBOUND = 3;
public static final int INBOUND = 4;
}
18 years ago
hi everyone. i am really stuck getting started with a exercise i have been set. i really dont understan how to get started. which is always my problem. can some1 help me out, or explain a little how i should approach or get this started? thanks! much appreciated!

http://www.vtr.net/~mwb/simulator/coursework.htm
here is the aim :
For this exercise you need to understand some of the details of a hypothetical computer called FIRST which is a slightly simplified version of the first minicomputer, the DEC PDP-8.
This computer has a single accumulator (ACC), a program counter (PC) and a single bit link register. All registers - except the link register - and memory are 12 bits wide giving a maximum memory size of 212 = 4096 words.
There are 3 types of instructions, all of which occupy 1 word of memory,
�Memory reference instructions - a word in memory is the operand or a word in memory and contents of the accumulator are the operands.
�Accumulator instructions where the only operand is in the accumulator.
�I/O instructions where data is transferred between the accumulator and the I/O device.
In each type of instruction the top three bits - bits 9, 10 and 11 - in the word define the opcode. Three bits allow 8 different instructions to be defined.

thanks again ppl!
18 years ago
hi, thanks, i am looking at the code at the moment.. hmm, but i am sorry, i am a total newbie really..can you help me out a little more. i just want an image to move up, down, left right when the arrows are pressed..the mouse click is confusing me a bit
thanks !
18 years ago
hi guys...i have to basically make a centerpide game. can you help me get started please ?
hmmm, can some1 tell me how to make a dot (anything i guess? ) to move around when you press the arrrow keys?
i need a keylistener right? i am not sure. any tutorials on this?
thanks....
18 years ago
hi, does any1 know any good tutorial or examples of StreamTokenizer?? or maybe some1 can help me out a little?
i need to count words from a txt file..
i am really stupid and dont understand what it says in my txt book!
thanks!!
18 years ago
Text Processing Exercise
http://www.vtr.net/~mwb/java/index.htm
(exercise details.. )
hi wizards!
i need a lil help...well maybe a lot, since i my brain has left me. i am really strugglin with an exercise i have been given. maybe if you guys have time you can help me get started..i have kinda started but its important to start corretly, right? lol
i can get the file chooser dialog up, but i can get it to read the file and display it in the dos window. does that make sense? well have a look please guys.
thanks!
regards
mike
18 years ago