•

Check out our Community Blogs

## Fischerspooner's Content

There have been 27 items by Fischerspooner (Search limited from 13-April 20)

#### See this member's

Sort by                Order

### #322544New guy in town

Posted by on 06 December 2006 - 11:36 AM in Introductions

Hello,

Searching the internet about moving elements in an array I bumped on your forum
I'm a 29 year old guy getting more and more interested in programming. Just learning Java with BlueJ.
Other hobbies are: getting pierced, tats, music

If you got any questions...fire away:)

-f

### #322547Moving elements in an array

Posted by on 06 December 2006 - 11:48 AM in General Programming

Hi,

I'm currently studying Java on my own and I wanted to try to "rotate" elements in an array.
So the start would be:
{5,3,8,7,7,2,0,6,1,4}
But if I enter "rotate 1" it should give me
{4,5,3,8,7,7,2,0,6,1}

But I keep running into ArrayIndexOutOfBounds errors if I check my pseudocode in Java.

I don't want some code, just a hint or two would be very much appreciated:)

This is what I have already:
```for(t=DIM-1 ; t > rot ; t--)
{
if(t < DIM)
{
k = table[t];
table[t-1] = table[t];
table[t+1]= k;
}
else
{
k = table[t];
table[t-1] = table[t-DIM];
table[t+1] = k;
}
}
```

### #322553Last Movie you Watched

Posted by on 06 December 2006 - 12:28 PM in The Lounge

I rented Kung Fu Hustle and Dead and breakfast.
Kung Fu Hustle is an excellent movie, just love the humor of it:)
Dead and breakfast was ehm <bleep>ing **, not worth the money.

### #322568New guy in town

Posted by on 07 December 2006 - 03:26 AM in Introductions

Welcome Spooner. Glad there are more people here to post than just the software

So how many Piercings and Tats you got?

There's more to life than software ;-)

Currently Ihave 10 piercings and "only" 2 tats. Getting pierced is an impulsive thing, tats well..you have to think everything over TWICE.
Especially stretching is fun, funny to see how much a body can take;)

### #322569Moving elements in an array

Posted by on 07 December 2006 - 03:31 AM in General Programming

I ran it through the debugger but I still cant find my mistake. I'm just overlooking something.

Some pseudocode:

temp = table[i+rot]; // remember what was on i+rot
table[i] = table[i+rot] // change the place of element i to i+rot
if (i+rot < table.length)
start from 0

My head is all messed up :/

### #322597Moving elements in an array

Posted by on 07 December 2006 - 02:44 PM in General Programming

I used a second array to rotate and it works. Is it even possible with one array?

```for(t=0 ; t < DIM ; t++)
{
if(t+rot < DIM)
{
table2[t+rot] = table[t];
}
else
{
table2[t+rot-DIM] = table[t];
}
}```

### #322637Where are you from?

Posted by on 08 December 2006 - 05:02 AM in The Lounge

I didnt want to make another thread:)

I'm from Belgium, a small country in Europe between the Netherlands and France.

### #322638What are you listening to?

Posted by on 08 December 2006 - 05:06 AM in Games

CSS (Cansei de Ser **) - alala
Next in line: Aphex Twin - Powerpill pacman

### #322641Where are you from?

Posted by on 08 December 2006 - 05:59 AM in The Lounge

From Malta as you can see from my interview!! a tiny island in the middle of nowhere! no no just kidding its in the middle of the Mediterranean sea!

And famous for it's flowers. It's beautiful there.

### #322650MS Access ERROR!! pls help!

Posted by on 08 December 2006 - 06:46 AM in General Computing

http://support.microsoft.com/kb/319844

### #3226634-word Story

Posted by on 08 December 2006 - 07:20 AM in Games

without rubber gloves on

### #322815Free Image Backup

Posted by on 08 December 2006 - 07:33 AM in General Programming

OFFTOPIC

Why dont you guys make a HD image?
DriveImageXML, a free tool.

http://www.runtime.org/dixml.htm

### #322664Setting up PHP on Windows

Posted by on 08 December 2006 - 07:33 AM in PHP

OFFTOPIC

Why dont you guys make a HD image?
DriveImageXML, a free tool.

http://www.runtime.org/dixml.htm

### #322683Moving elements in an array

Posted by on 08 December 2006 - 10:55 AM in General Programming

It's possible, but you have to be careful around the beginning/end of the array.

Could you post some code? I know I didn't ask for code but I'm eager to learn...

### #322686Setting up PHP on Windows

Posted by on 08 December 2006 - 11:13 AM in PHP

Hmm, looks interesting. Does it work?

Works like a charm. But ok, nothing beats Norton's Ghost:)

### #322687Setting up PHP on Windows

Posted by on 08 December 2006 - 11:14 AM in PHP

How would I fit the image of my HD on DVD or so for backup?

No idea, I use an extra partition for images. But there's an option "split files", maybe that's it?

### #322688What is your HTML program of choice

Posted by on 08 December 2006 - 11:18 AM in HTML, CSS and Javascript

ConTEXT, pretty much the same as notepad++

### #322714Coldfusion Example Code

Posted by on 09 December 2006 - 01:58 AM in ASP, ASP.NET and Coldfusion

Querying a DB.
```<cfquery name="myQuery" datasource="yourODBCdatasource">
SELECT * FROM table
</cfquery>

<!--- now show me all the records from the query  --->
<cfoutput query="myQuery">
#field1# - #field2# - #field3#
</cfoutput>```

We use it at work for our intranet

### #322715Setting up PHP on Windows

Posted by on 09 December 2006 - 05:21 AM in PHP

Images are suppose to be taken as a base image. For instance, once you install your OS and install all the software you need/want then you take an image. Not after you have 50 gigs of MP3s and Videos

Ofcourse, never said it differently:)

### #322738Looking for a song

Posted by on 10 December 2006 - 11:04 AM in The Lounge

Heyhey,

I just ran into a sweet trippy movie and I'm wondering if anyone knows the song that is used...?

http://www.skoften.n...id=4398_0_1_0_C

### #322772Moving elements in an array

Posted by on 11 December 2006 - 10:30 AM in General Programming

Thanks, I'll study it:)

### #322794Meet ....

Posted by on 12 December 2006 - 12:56 AM in The Lounge

Congratulations:)

### #322795[RegExp] Financial value yes/no

Posted by on 12 December 2006 - 01:33 AM in General Programming

Hi,

I'm trying to determine of a given value is a financial one.

It should match:
- can be positive or negative (ie. 1234.56€ or -1234.56€)
- has minimum 2 digits after the . (ie 1234.5€ should return false)
- whitespaces should be ignored so the user can type 1234.56 € and it still returns true.

I came up with this:
`(-|?)[0-9]*(\.|\,)\d\d+€`

but I'm having some problems with the whitespaces. Can someone push me in the right direction please? Or maybe it can made better? It's tested with Regular Expression Library.

### #322802[RegExp] Financial value yes/no

Posted by on 12 December 2006 - 06:03 AM in General Programming

Each language has slightly different regular expressions but this one matches optional + or -, numbers, optional dot, optional any amount of numbers:

```[-+]?[0-9]*\.?[0-9]+
```

Thank you

Is \d\d the way to ensure there are at least 2 digits? I've tested it with a long series of values and it gives me the desired result. Is there another way to do this?

Oh, the language is Java.

### #322824[RegExp] Financial value yes/no

Posted by on 12 December 2006 - 11:10 AM in General Programming

You can replace [0-9] by \d, which means digit.
So I modified my code to
`-?\d+(\.|\,)\d\d+€`

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download