MFG 5.1 Anime & Manga Forums  

Go Back   MFG 5.1 Anime & Manga Forums > General > MFG Lounge > The Gas Chamber

The Gas Chamber Enter at your own risk ... let off some steam and vent some of that e-anger. Keep the flames low and lay off the noobs. If you're going to be easily offended then don't come to this forum cause someone will probably hurt your fragile feelings. Since spam is moderately tolerated your post count won't increase. READ THE RULES FIRST and don't whine because you've been warned.

Reply
 
LinkBack Thread Tools
Old 05-08-2008   #1 (permalink)
Bleach Ranked
(24) Captain-Commander
 
Masked_Felix's Avatar
 
Join Date: Mar 2007
Location: Randland
Posts: 3,193
Rep Power: 38
Masked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond repute
Send a message via AIM to Masked_Felix Send a message via MSN to Masked_Felix Send a message via Yahoo to Masked_Felix
Default ...




I FREAKING HATE NODES.
__________________
Quote:
Originally Posted by IRC
<Z> why you scared of Hal?
<Amerowolf> Because words hurt, Z, because words hurt.
My Wii Code is 6772 9289 6105 2375.
My Brawl Friend Code is 1848-3184-0718
Masked_Felix is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-08-2008   #2 (permalink)
Naruto Ranked
(22) Yonbi
 
RandomPenguin's Avatar
 
Join Date: May 2005
Location: The world that never was.
Posts: 2,168
Blog Entries: 5
Rep Power: 27
RandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond repute
Send a message via MSN to RandomPenguin
Default Re: ...

...
__________________

-Axel of Organization XIII-
Quote:
If you have a dream, don't wait. Act. Got it memorized?



RandomPenguin is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-08-2008   #3 (permalink)
(12) Saiyan Prince
 
shotkeeper's Avatar
 
Join Date: Apr 2008
Location: Holland
Posts: 229
Rep Power: 1
shotkeeper is on a distinguished road
Default Re: ...

WTF IS that. DON"T TELL ME I WILL GET THESE THINGS IF I CHOOSE SIENCE SUBJECTS.
shotkeeper is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-08-2008   #4 (permalink)
Bleach Ranked
(24) Captain-Commander
 
Masked_Felix's Avatar
 
Join Date: Mar 2007
Location: Randland
Posts: 3,193
Rep Power: 38
Masked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond repute
Send a message via AIM to Masked_Felix Send a message via MSN to Masked_Felix Send a message via Yahoo to Masked_Felix
Default Re: ...

If you take Computer Science.

// ************************************************** **
// Reference-based implementation of ADT list.
// ************************************************** **
public class ListReferenceBased implements ListInterface {
// reference to linked list of items
private Node head;
private int numItems; // number of items in list

public ListReferenceBased() {
numItems = 0;
head = null;
} // end default constructor

public boolean isEmpty() {
return numItems == 0;
} // end isEmpty

public int size() {
return numItems;
} // end size

private Node find(int index) {
// --------------------------------------------------
// Locates a specified node in a linked list.
// Precondition: index is the number of the desired
// node. Assumes that 1 <= index <= numItems+1
// Postcondition: Returns a reference to the desired
// node.
// --------------------------------------------------
Node curr = head;
for (int skip = 1; skip < index; skip++) {
curr = curr.getNext();
} // end for
return curr;
} // end find

public Object get(int index)
throws ListIndexOutOfBoundsException {
if (index >= 1 && index <= numItems) {
// get reference to node, then data in node
Node curr = find(index);
Object dataItem = curr.getItem();
return dataItem;
}
else {
throw new ListIndexOutOfBoundsException(
"List index out of bounds exception on get");
} // end if
} // end get

public void add(int index, Object item)
throws ListIndexOutOfBoundsException {
if (index >= 1 && index <= numItems+1) {
if (index == 1) {
// insert the new node containing item at
// beginning of list
Node newNode = new Node(item, head);
head = newNode;
}
else {
Node prev = find(index-1);
// insert the new node containing item after
// the node that prev references
Node newNode = new Node(item, prev.getNext());
prev.setNext(newNode);
} // end if
numItems++;
}
else {
throw new ListIndexOutOfBoundsException(
"List index out of bounds exception on add");
} // end if
} // end add

public void remove(int index)
throws ListIndexOutOfBoundsException {
if (index >= 1 && index <= numItems) {
if (index == 1) {
// delete the first node from the list
head = head.getNext();
}
else {
Node prev = find(index-1);
// delete the node after the node that prev
// references, save reference to node
Node curr = prev.getNext();
prev.setNext(curr.getNext());
} // end if
numItems--;
} // end if
else {
throw new ListIndexOutOfBoundsException(
"List index out of bounds exception on remove");
} // end if
} // end remove

public void removeAll() {
// setting head to null causes list to be
// unreachable and thus marked for garbage
// collection
head = null;
numItems = 0;
} // end removeAll
} // end ListReferenceBased
__________________
Quote:
Originally Posted by IRC
<Z> why you scared of Hal?
<Amerowolf> Because words hurt, Z, because words hurt.
My Wii Code is 6772 9289 6105 2375.
My Brawl Friend Code is 1848-3184-0718
Masked_Felix is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-08-2008   #5 (permalink)
Naruto Ranked
(22) Yonbi
 
RandomPenguin's Avatar
 
Join Date: May 2005
Location: The world that never was.
Posts: 2,168
Blog Entries: 5
Rep Power: 27
RandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond repute
Send a message via MSN to RandomPenguin
Default Re: ...

argh i'm doing it for my A-levels next year
__________________

-Axel of Organization XIII-
Quote:
If you have a dream, don't wait. Act. Got it memorized?



RandomPenguin is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-08-2008   #6 (permalink)
Bleach Ranked
(24) Captain-Commander
 
Masked_Felix's Avatar
 
Join Date: Mar 2007
Location: Randland
Posts: 3,193
Rep Power: 38
Masked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond repute
Send a message via AIM to Masked_Felix Send a message via MSN to Masked_Felix Send a message via Yahoo to Masked_Felix
Default Re: ...

Quote:
Originally Posted by RandomPenguin View Post
argh i'm doing it for my A-levels next year
If you're in High School, I don't know if you'll have to worry about it much. I was blissfully unaware of their existence until my second semester of college. Screw nodes. I'll use an ArrayList.
__________________
Quote:
Originally Posted by IRC
<Z> why you scared of Hal?
<Amerowolf> Because words hurt, Z, because words hurt.
My Wii Code is 6772 9289 6105 2375.
My Brawl Friend Code is 1848-3184-0718
Masked_Felix is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-08-2008   #7 (permalink)
Naruto Ranked
(22) Yonbi
 
RandomPenguin's Avatar
 
Join Date: May 2005
Location: The world that never was.
Posts: 2,168
Blog Entries: 5
Rep Power: 27
RandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond reputeRandomPenguin has a reputation beyond repute
Send a message via MSN to RandomPenguin
Default Re: ...

yep yep i will not have to care for them. =)
__________________

-Axel of Organization XIII-
Quote:
If you have a dream, don't wait. Act. Got it memorized?



RandomPenguin is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-08-2008   #8 (permalink)
Beyond Birthday
 
Chibi Mystic Gohan's Avatar
 
Join Date: Sep 2004
Location: Surrounded by dickgirls
Posts: 1,655
Rep Power: 46
Chibi Mystic Gohan has a reputation beyond reputeChibi Mystic Gohan has a reputation beyond reputeChibi Mystic Gohan has a reputation beyond reputeChibi Mystic Gohan has a reputation beyond reputeChibi Mystic Gohan has a reputation beyond reputeChibi Mystic Gohan has a reputation beyond reputeChibi Mystic Gohan has a reputation beyond reputeChibi Mystic Gohan has a reputation beyond reputeChibi Mystic Gohan has a reputation beyond reputeChibi Mystic Gohan has a reputation beyond reputeChibi Mystic Gohan has a reputation beyond repute
Default Re: ...

Quote:
Originally Posted by Masked_Felix View Post
If you take Computer Science.

// ************************************************** **
// Reference-based implementation of ADT list.
// ************************************************** **
public class ListReferenceBased implements ListInterface {
// reference to linked list of items
private Node head;
private int numItems; // number of items in list

public ListReferenceBased() {
numItems = 0;
head = null;
} // end default constructor

public boolean isEmpty() {
return numItems == 0;
} // end isEmpty

public int size() {
return numItems;
} // end size

private Node find(int index) {
// --------------------------------------------------
// Locates a specified node in a linked list.
// Precondition: index is the number of the desired
// node. Assumes that 1 <= index <= numItems+1
// Postcondition: Returns a reference to the desired
// node.
// --------------------------------------------------
Node curr = head;
for (int skip = 1; skip < index; skip++) {
curr = curr.getNext();
} // end for
return curr;
} // end find

public Object get(int index)
throws ListIndexOutOfBoundsException {
if (index >= 1 && index <= numItems) {
// get reference to node, then data in node
Node curr = find(index);
Object dataItem = curr.getItem();
return dataItem;
}
else {
throw new ListIndexOutOfBoundsException(
"List index out of bounds exception on get");
} // end if
} // end get

public void add(int index, Object item)
throws ListIndexOutOfBoundsException {
if (index >= 1 && index <= numItems+1) {
if (index == 1) {
// insert the new node containing item at
// beginning of list
Node newNode = new Node(item, head);
head = newNode;
}
else {
Node prev = find(index-1);
// insert the new node containing item after
// the node that prev references
Node newNode = new Node(item, prev.getNext());
prev.setNext(newNode);
} // end if
numItems++;
}
else {
throw new ListIndexOutOfBoundsException(
"List index out of bounds exception on add");
} // end if
} // end add

public void remove(int index)
throws ListIndexOutOfBoundsException {
if (index >= 1 && index <= numItems) {
if (index == 1) {
// delete the first node from the list
head = head.getNext();
}
else {
Node prev = find(index-1);
// delete the node after the node that prev
// references, save reference to node
Node curr = prev.getNext();
prev.setNext(curr.getNext());
} // end if
numItems--;
} // end if
else {
throw new ListIndexOutOfBoundsException(
"List index out of bounds exception on remove");
} // end if
} // end remove

public void removeAll() {
// setting head to null causes list to be
// unreachable and thus marked for garbage
// collection
head = null;
numItems = 0;
} // end removeAll
} // end ListReferenceBased
You... double nigger.
__________________


"Words don't exist so that we can tell the truth; they exist so that we can conceal the truth"
- ZOMBIEPOWDER. Volume 02
Chibi Mystic Gohan is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-08-2008   #9 (permalink)
(12) Saiyan Prince
 
shotkeeper's Avatar
 
Join Date: Apr 2008
Location: Holland
Posts: 229
Rep Power: 1
shotkeeper is on a distinguished road
Default Re: ...

I think I won't go for ICT after all./
shotkeeper is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-08-2008   #10 (permalink)
Bleach Ranked
(24) Captain-Commander
 
Masked_Felix's Avatar
 
Join Date: Mar 2007
Location: Randland
Posts: 3,193
Rep Power: 38
Masked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond repute
Send a message via AIM to Masked_Felix Send a message via MSN to Masked_Felix Send a message via Yahoo to Masked_Felix
Default Re: ...

That's just a class someone else made having to do with Nodes. If you look at the comments, it explains what's going on.
Once you learn the gist of Computer Science, it's fun.
__________________
Quote:
Originally Posted by IRC
<Z> why you scared of Hal?
<Amerowolf> Because words hurt, Z, because words hurt.
My Wii Code is 6772 9289 6105 2375.
My Brawl Friend Code is 1848-3184-0718
Masked_Felix is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-08-2008   #11 (permalink)
Bleach Ranked
(25) Vasto Lorde
 
Ultimate_Gohan's Avatar
 
Join Date: Oct 2007
Location: Albania
Posts: 3,738
Blog Entries: 1
Rep Power: 38
Ultimate_Gohan has a reputation beyond reputeUltimate_Gohan has a reputation beyond reputeUltimate_Gohan has a reputation beyond reputeUltimate_Gohan has a reputation beyond reputeUltimate_Gohan has a reputation beyond reputeUltimate_Gohan has a reputation beyond reputeUltimate_Gohan has a reputation beyond reputeUltimate_Gohan has a reputation beyond reputeUltimate_Gohan has a reputation beyond reputeUltimate_Gohan has a reputation beyond reputeUltimate_Gohan has a reputation beyond repute
Default Re: ...

No offense Felix but I don't get why the fuck you just make random threads and put some random script code there. (not this one but I've seen a couple of others)
__________________


Ultimate_Gohan is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-08-2008   #12 (permalink)
Bleach Ranked
(24) Captain-Commander
 
Masked_Felix's Avatar
 
Join Date: Mar 2007
Location: Randland
Posts: 3,193
Rep Power: 38
Masked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond repute
Send a message via AIM to Masked_Felix Send a message via MSN to Masked_Felix Send a message via Yahoo to Masked_Felix
Default Re: ...

Random, you say?
__________________
Quote:
Originally Posted by IRC
<Z> why you scared of Hal?
<Amerowolf> Because words hurt, Z, because words hurt.
My Wii Code is 6772 9289 6105 2375.
My Brawl Friend Code is 1848-3184-0718
Masked_Felix is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-08-2008   #13 (permalink)
Bleach Ranked
(25) Vasto Lorde
 
Ultimate_Gohan's Avatar
 
Join Date: Oct 2007
Location: Albania
Posts: 3,738
Blog Entries: 1
Rep Power: 38
Ultimate_Gohan has a reputation beyond reputeUltimate_Gohan has a reputation beyond reputeUltimate_Gohan has a reputation beyond reputeUltimate_Gohan has a reputation beyond reputeUltimate_Gohan has a reputation beyond reputeUltimate_Gohan has a reputation beyond reputeUltimate_Gohan has a reputation beyond reputeUltimate_Gohan has a reputation beyond reputeUltimate_Gohan has a reputation beyond reputeUltimate_Gohan has a reputation beyond reputeUltimate_Gohan has a reputation beyond repute
Default Re: ...

...Yeah...?
__________________


Ultimate_Gohan is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-08-2008   #14 (permalink)
Bleach Ranked
(21) Onmitsukido Leader
 
Eliwood21's Avatar
 
Join Date: Nov 2007
Location: Sitting on the roof, staring at the bright cresent moon...
Posts: 1,682
Rep Power: 27
Eliwood21 has a reputation beyond reputeEliwood21 has a reputation beyond reputeEliwood21 has a reputation beyond reputeEliwood21 has a reputation beyond reputeEliwood21 has a reputation beyond reputeEliwood21 has a reputation beyond reputeEliwood21 has a reputation beyond reputeEliwood21 has a reputation beyond reputeEliwood21 has a reputation beyond reputeEliwood21 has a reputation beyond reputeEliwood21 has a reputation beyond repute
Default Re: ...

Quote:
Originally Posted by Masked_Felix View Post
If you take Computer Science.

// ************************************************** **
// Reference-based implementation of ADT list.
// ************************************************** **
public class ListReferenceBased implements ListInterface {
// reference to linked list of items
private Node head;
private int numItems; // number of items in list

public ListReferenceBased() {
numItems = 0;
head = null;
} // end default constructor

public boolean isEmpty() {
return numItems == 0;
} // end isEmpty

public int size() {
return numItems;
} // end size

private Node find(int index) {
// --------------------------------------------------
// Locates a specified node in a linked list.
// Precondition: index is the number of the desired
// node. Assumes that 1 <= index <= numItems+1
// Postcondition: Returns a reference to the desired
// node.
// --------------------------------------------------
Node curr = head;
for (int skip = 1; skip < index; skip++) {
curr = curr.getNext();
} // end for
return curr;
} // end find

public Object get(int index)
throws ListIndexOutOfBoundsException {
if (index >= 1 && index <= numItems) {
// get reference to node, then data in node
Node curr = find(index);
Object dataItem = curr.getItem();
return dataItem;
}
else {
throw new ListIndexOutOfBoundsException(
"List index out of bounds exception on get");
} // end if
} // end get

public void add(int index, Object item)
throws ListIndexOutOfBoundsException {
if (index >= 1 && index <= numItems+1) {
if (index == 1) {
// insert the new node containing item at
// beginning of list
Node newNode = new Node(item, head);
head = newNode;
}
else {
Node prev = find(index-1);
// insert the new node containing item after
// the node that prev references
Node newNode = new Node(item, prev.getNext());
prev.setNext(newNode);
} // end if
numItems++;
}
else {
throw new ListIndexOutOfBoundsException(
"List index out of bounds exception on add");
} // end if
} // end add

public void remove(int index)
throws ListIndexOutOfBoundsException {
if (index >= 1 && index <= numItems) {
if (index == 1) {
// delete the first node from the list
head = head.getNext();
}
else {
Node prev = find(index-1);
// delete the node after the node that prev
// references, save reference to node
Node curr = prev.getNext();
prev.setNext(curr.getNext());
} // end if
numItems--;
} // end if
else {
throw new ListIndexOutOfBoundsException(
"List index out of bounds exception on remove");
} // end if
} // end remove

public void removeAll() {
// setting head to null causes list to be
// unreachable and thus marked for garbage
// collection
head = null;
numItems = 0;
} // end removeAll
} // end ListReferenceBased

AH! I see what you need to do:

.setList = null;

Problem solved.
__________________
Eliwood21 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-08-2008   #15 (permalink)
Bleach Ranked
(24) Captain-Commander
 
Masked_Felix's Avatar
 
Join Date: Mar 2007
Location: Randland
Posts: 3,193
Rep Power: 38
Masked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond reputeMasked_Felix has a reputation beyond repute
Send a message via AIM to Masked_Felix Send a message via MSN to Masked_Felix Send a message via Yahoo to Masked_Felix
Default Re: ...

I suppose you could look at it that way. There is always a pattern, a structure, a purpose, however. Look a little deeper.

Edit: Eliwood, you and your never-ending node novity knowledge have failed this time! For this is the ListReferenceBased Class! HAHAHAHA! TRIUMPH! TRIUMPH!
__________________
Quote:
Originally Posted by IRC
<Z> why you scared of Hal?
<Amerowolf> Because words hurt, Z, because words hurt.
My Wii Code is 6772 9289 6105 2375.
My Brawl Friend Code is 1848-3184-0718
Masked_Felix is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks