<?xml version="1.0" encoding="utf-8"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>DaniWeb IT Discussion Community</title>
		<link>http://www.daniweb.com/forums/</link>
		<description>Tech support, programming, web development, and internet marketing community. Forums to get free computer help and support.</description>
		<language>en-US</language>
		<lastBuildDate>Tue, 01 Dec 2009 08:58:56 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.daniweb.com/alphaimages/misc/rss.jpg</url>
			<title>DaniWeb IT Discussion Community</title>
			<link>http://www.daniweb.com/forums/</link>
		</image>
		<item>
			<title>Congrats Moderators</title>
			<link>http://www.daniweb.com/forums/thread238738.html</link>
			<pubDate>Sun, 15 Nov 2009 19:19:49 GMT</pubDate>
			<description>That was amazing, in 20 minutes you managed to ban Josh4. Im quite impressed at the speed you work at. And the forums are all clean again. So you really will only have noticed him if you were on here for a period of about 20 minutes :) 
 
So congrats guys :)</description>
			<content:encoded><![CDATA[<div>That was amazing, in 20 minutes you managed to ban Josh4. Im quite impressed at the speed you work at. And the forums are all clean again. So you really will only have noticed him if you were on here for a period of about 20 minutes :)<br />
<br />
So congrats guys :)</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum6.html"><![CDATA[Geeks' Lounge]]></category>
			<dc:creator>Paul Thompson</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238738.html</guid>
		</item>
		<item>
			<title>Tutorial Simple Regex tutorial</title>
			<link>http://www.daniweb.com/tutorials/tutorial238544.html</link>
			<pubDate>Sat, 14 Nov 2009 21:01:07 GMT</pubDate>
			<description><![CDATA[Regex is one of the more complicated modules that you can use in python. Once you have learnt it though you can use it many different programming languages, so its a useful tool for using with strings. 
 
So first to use regex you must import it 
  <div class="codeblock"> <div class="spaced"> <div...]]></description>
			<content:encoded><![CDATA[<div>Regex is one of the more complicated modules that you can use in python. Once you have learnt it though you can use it many different programming languages, so its a useful tool for using with strings.<br />
<br />
So first to use regex you must import it<br />
 <pre style="margin:20px; line-height:13px">import re</pre>This loads the module for us to use. <br />
<br />
Regex is a module designed to make strings easy to manipulate and is often used to check for correct input.<br />
<br />
For example<br />
 <pre style="margin:20px; line-height:13px">r = raw_input(&quot;Please enter an email address&quot;)</pre>But how do you know without complicated checking that they have entered the right format of <a href="mailto:something@something.com">something@something.com</a>? Well to check this normally we would need to index the '@' symbol, as well as make sure they had the right words (.com) and that it was all in the right order.<br />
<br />
But with regex we can work this out in one line... that is after working out the regex string. <br />
<br />
So lets start on the email.. <br />
First we have to understand what an email needs in it:<ol style="list-style-type: decimal"><li>A Beginning (xxxx@mail.com)</li>
<li>The '@' sign</li>
<li>a domain (mail@xxx.com)</li>
<li>and a .com (we are not going to make it for .orgs/anything else)</li>
</ol><br />
So lets start (please see below for explanation of symbols)<br />
 <pre style="margin:20px; line-height:13px">import re<br />
#Lets make a fake email...<br />
email = 'bogusemail123@sillymail.com'<br />
<br />
#to make a re pattern we use a string<br />
pattern = &quot;^[A-Za-z0-9.]+@[A-Za-z0-9.]+.com$&quot;<br />
<br />
#now we check if it matches<br />
re.findall(pattern, email)<br />
#Yes! it does<br />
#It returns [&quot;bogusemail123@sillymail.com&quot;]<br />
<br />
#lets try some other addresses<br />
re.findall(pattern,&quot;@sillymail.com&quot;)<br />
#returns []<br />
re.findall(pattern,&quot;bogusemail123@sillymail&quot;<br />
#returns []</pre>So this is a relatively simple example but you can easily see how it can save you time in checking that a user has inputted the correct things as well as searching for things in a string..<br />
<br />
Now to explain what <span style="font-weight:bold">&quot;^[A-Za-z0-9.]+@[A-Za-z0-9.]+.com$&quot;</span> means<ul><li>^ --&gt; means that the pattern starts at the start of the string, this means that &quot;Hello <a href="mailto:bogusmail123@sillymail.com">bogusmail123@sillymail.com</a>&quot; will not work</li>
<li>[A-Za-z0-9.] --&gt; This is called a range, it means that anything inside that range will match the string, so and letter of A-z or a-z as well as numbers 0-9 and a dot. This means that you do not get emails with other forms of punctuation in them.</li>
<li>+ --&gt; This does not mean plus, or anything like that, rather it means that whatever came before it needs to be in the string one time or more. In this case the thing before was our range, so what it means is that we need at least one letter/number/dot or more to have the string match</li>
<li>@ --&gt; For a match where you want it to match a character exactly you just put the character in the string in the place it is meant to be</li>
<li>[A-Za-z0-9.]+ --&gt; Just another range like we had before, with a '+' sign to mean it need one or more things in the range</li>
<li>.com$ --&gt; Then we put in exactly what we want at the end of the email address ('.com') and make sure it is at the end of the string with the dollar symbol. </li>
</ul><br />
Then to check that our string matches we use  <pre style="margin:20px; line-height:13px">re.findall(regexpatter, string)</pre> That lists all of the strings that match, in our case it should only come back with either a list with one email address or nothing at all if the input was incorrect.<br />
<br />
This will not get all email addresses its just a simple example designed to show people the possibilities of the regex module.<br />
<br />
If you want to extend yourself in this, try making it so that is accepts .org/.net/com.au etc.<br />
<br />
Hope you enjoyed the tutorial and learnt something :)</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Paul Thompson</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238544.html</guid>
		</item>
		<item>
			<title>GetBestSize()??</title>
			<link>http://www.daniweb.com/forums/thread238385.html</link>
			<pubDate>Fri, 13 Nov 2009 21:42:06 GMT</pubDate>
			<description>Hi, 
Im using wxPython for my latest project and i was wondering, how do i make the window go to the best size, so it includes all of the objects on screen? 
 
I used to be able to remember... but i forgot :P</description>
			<content:encoded><![CDATA[<div>Hi,<br />
Im using wxPython for my latest project and i was wondering, how do i make the window go to the best size, so it includes all of the objects on screen?<br />
<br />
I used to be able to remember... but i forgot :P</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Paul Thompson</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238385.html</guid>
		</item>
		<item>
			<title>Banned from IRC</title>
			<link>http://www.daniweb.com/forums/thread238376.html</link>
			<pubDate>Fri, 13 Nov 2009 20:30:03 GMT</pubDate>
			<description><![CDATA[Hi,  
I thought it would be nice to go on IRC today and see if anything is happening. But i went in and entered my username "Paul Thompson" as my name and halfway through logging on it went like this: 
 
---Quote--- 
+++ Paul Thompson set to mode +iwx 
(Something about this nic not being...]]></description>
			<content:encoded><![CDATA[<div>Hi, <br />
I thought it would be nice to go on IRC today and see if anything is happening. But i went in and entered my username &quot;Paul Thompson&quot; as my name and halfway through logging on it went like this:<br />
<div style="margin:20px; margin-top:5px; "> <div class="smallfont" style="margin-bottom:2px">Quote:</div> <table cellpadding="5" cellspacing="0" border="0" width="100%"> <tr> <td class="alt2"> <hr />  +++ Paul Thompson set to mode +iwx<br />
(Something about this nic not being registered)<br />
You are banned from the channel #Daniweb  <hr /> </td> </tr> </table> </div>I tried using other names but it all seems to come out like this<br />
<div style="margin:20px; margin-top:5px; "> <div class="smallfont" style="margin-bottom:2px">Quote:</div> <table cellpadding="5" cellspacing="0" border="0" width="100%"> <tr> <td class="alt2"> <hr />  +++ Paul_Thompson set to mode +iwx<br />
You are banned from the channel #Daniweb  <hr /> </td> </tr> </table> </div>And seeing i have only been on daniweb irc 4 times, i am a bit confused as to how i got banned, as i hardly talked at all and it was certainly nothing bannable. :S<br />
<br />
Cheers<br />
Paul</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum26.html">DaniWeb Community Feedback</category>
			<dc:creator>Paul Thompson</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238376.html</guid>
		</item>
		<item>
			<title>Import all of folder</title>
			<link>http://www.daniweb.com/forums/thread238229.html</link>
			<pubDate>Fri, 13 Nov 2009 08:16:07 GMT</pubDate>
			<description><![CDATA[Hi guys, 
Im a making a program where i need to be able to specify a folder and have my program import every module from that folder into my program... I was wondering how i would go about it. I can't use something like eval. 
 
But yeah, help would be greatly appreciated :) 
 
Cheers 
Paul]]></description>
			<content:encoded><![CDATA[<div>Hi guys,<br />
Im a making a program where i need to be able to specify a folder and have my program import every module from that folder into my program... I was wondering how i would go about it. I can't use something like eval.<br />
<br />
But yeah, help would be greatly appreciated :)<br />
<br />
Cheers<br />
Paul</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Paul Thompson</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238229.html</guid>
		</item>
		<item>
			<title>Ever played Diplomacy?</title>
			<link>http://www.daniweb.com/forums/thread231476.html</link>
			<pubDate>Mon, 19 Oct 2009 20:11:46 GMT</pubDate>
			<description>Its a great boardgame, i am sure some of you are familiar with. I found a great site to play it online if 7 of us want to go for a game :) 
http://www.worldleadersthegame.com</description>
			<content:encoded><![CDATA[<div>Its a great boardgame, i am sure some of you are familiar with. I found a great site to play it online if 7 of us want to go for a game :)<br />
<a rel="nofollow" class="t" href="http://www.worldleadersthegame.com" target="_blank">http://www.worldleadersthegame.com</a></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum6.html"><![CDATA[Geeks' Lounge]]></category>
			<dc:creator>Paul Thompson</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231476.html</guid>
		</item>
		<item>
			<title>Change my username?</title>
			<link>http://www.daniweb.com/forums/thread231101.html</link>
			<pubDate>Sun, 18 Oct 2009 06:11:30 GMT</pubDate>
			<description><![CDATA[Hi, 
I have been here for about a year and a half. I originally was only going to stay for just one question but fell in love with the community. So i would like to change my username to something more identifying. 
 
So could i change it to "Paul Thompson"? I would just like people to know who i...]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
I have been here for about a year and a half. I originally was only going to stay for just one question but fell in love with the community. So i would like to change my username to something more identifying.<br />
<br />
So could i change it to &quot;Paul Thompson&quot;? I would just like people to know who i am when i am posting. Rather than getting called paulthom all the time :P<br />
<br />
cheers<br />
-Paul</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum26.html">DaniWeb Community Feedback</category>
			<dc:creator>Paul Thompson</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231101.html</guid>
		</item>
		<item>
			<title>Painting to screen</title>
			<link>http://www.daniweb.com/forums/thread231062.html</link>
			<pubDate>Sat, 17 Oct 2009 23:35:22 GMT</pubDate>
			<description><![CDATA[Hi,  
I have been trying to get a java program that draws a line directly on the screen. I have made ones that draw on JApplets and JFrame's but i cant work out how i can draw directly on the screen without having something in the way. 
 
I looked at using Java canvasses but couldn't see a way i...]]></description>
			<content:encoded><![CDATA[<div>Hi, <br />
I have been trying to get a java program that draws a line directly on the screen. I have made ones that draw on JApplets and JFrame's but i cant work out how i can draw directly on the screen without having something in the way.<br />
<br />
I looked at using Java canvasses but couldn't see a way i would do it with those so im a bit flummoxed. :S<br />
<br />
Is there a way to do this in java? :)</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>Paul Thompson</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231062.html</guid>
		</item>
		<item>
			<title>Help with applet</title>
			<link>http://www.daniweb.com/forums/thread230076.html</link>
			<pubDate>Wed, 14 Oct 2009 09:07:55 GMT</pubDate>
			<description><![CDATA[I am making a slider puzzle applet. And i have this problem when i display it as an applet my buttons do not seem to act the same was as they did before i made it into an applet by using a JApplet rather than a JFrame as my extension of the class (i'm sure there is terminology for that, im just new...]]></description>
			<content:encoded><![CDATA[<div>I am making a slider puzzle applet. And i have this problem when i display it as an applet my buttons do not seem to act the same was as they did before i made it into an applet by using a JApplet rather than a JFrame as my extension of the class (i'm sure there is terminology for that, im just new at java)<br />
<br />
What i want is my images on my buttons to take up the whole button rather than just part of it. Have a look at the attached image for reference.<br />
<br />
This is my code:<br />
 <pre style="margin:20px; line-height:13px">package Puzzle;<br />
<br />
/*<br />
&nbsp;* To change this template, choose Tools | Templates<br />
&nbsp;* and open the template in the editor.<br />
&nbsp;*/<br />
<br />
<br />
<br />
import java.awt.BorderLayout;<br />
import javax.swing.JApplet;<br />
import java.awt.Dimension;<br />
<br />
import java.awt.GridLayout;<br />
import java.awt.Image;<br />
import java.awt.event.ActionEvent;<br />
import java.awt.event.ActionListener;<br />
import java.awt.image.CropImageFilter;<br />
import java.awt.image.FilteredImageSource;<br />
<br />
import javax.swing.Box;<br />
import javax.swing.ImageIcon;<br />
import javax.swing.JButton;<br />
import javax.swing.JLabel;<br />
<br />
import javax.swing.JPanel;<br />
<br />
import java.util.Random;<br />
<br />
<br />
<br />
<br />
/**<br />
&nbsp;*<br />
&nbsp;* @author Owner<br />
&nbsp;*/<br />
public class Main extends JApplet implements ActionListener{<br />
<br />
&nbsp; &nbsp; private JPanel centerPanel;<br />
&nbsp; &nbsp; private JButton button;<br />
&nbsp; &nbsp; private JLabel label;<br />
&nbsp; &nbsp; private Image source;<br />
&nbsp; &nbsp; private Image image;<br />
&nbsp; &nbsp; private Image&#91;&#93; imlist;<br />
&nbsp; &nbsp; private JButton&#91;&#93; buttons;<br />
&nbsp; &nbsp; private Random generator;<br />
<br />
&nbsp; &nbsp; int&#91;&#93;&#91;&#93; pos;<br />
&nbsp; &nbsp; int width, height;<br />
<br />
&nbsp; &nbsp; public Main(){<br />
&nbsp; &nbsp; &nbsp; &nbsp; generator = new Random();<br />
&nbsp; &nbsp; &nbsp; &nbsp; imlist = new Image&#91;11&#93;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; buttons = new JButton&#91;11&#93;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; pos = new int&#91;&#93;&#91;&#93;{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {0,1,2},<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {3,4,5},<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {6,7,8},<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {9,10,11}<br />
&nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; centerPanel = new JPanel();<br />
&nbsp; &nbsp; &nbsp; &nbsp; centerPanel.setLayout((new GridLayout(4,4,0,0)));<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; ImageIcon sid = new ImageIcon(Main.class.getResource(&quot;Sid.jpg&quot;));<br />
&nbsp; &nbsp; &nbsp; &nbsp; source = sid.getImage();<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; width = sid.getIconWidth();<br />
&nbsp; &nbsp; &nbsp; &nbsp; height = sid.getIconHeight();<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; add(Box.createRigidArea(new Dimension(0,5)), BorderLayout.NORTH);<br />
&nbsp; &nbsp; &nbsp; &nbsp; add(centerPanel,BorderLayout.CENTER);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; int count = -1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; for(int i = 0; i&lt;4 ; i++ ){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for(int j = 0; j&lt;3; j++){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; count ++;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(j==2 &amp;&amp; i == 3){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; label = new JLabel(&quot;&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; centerPanel.add(label);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; button = new JButton();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; button.addActionListener(this);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; centerPanel.add(button);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; imlist&#91;count&#93; = createImage(new FilteredImageSource(source.getSource(),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; new CropImageFilter(j*width/3, i*height/4, width/3+1, height/4)));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buttons&#91;count&#93;&nbsp; = button;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; Image im;<br />
&nbsp; &nbsp; &nbsp; &nbsp; for(int i = 0; i&lt; buttons.length; i++){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try{ im = imlist&#91;generator.nextInt(imlist.length-1)&#93;;}<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; catch(Exception e){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; im = imlist&#91;0&#93;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; imlist = remove(im, imlist);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buttons&#91;i&#93;.setIcon(new ImageIcon(im));<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; setSize(325, 275);<br />
&nbsp; &nbsp; &nbsp; &nbsp; //setTitle(&quot;Puzzle&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; //setResizable(false);<br />
&nbsp; &nbsp; &nbsp; &nbsp; //setLocationRelativeTo(null);<br />
&nbsp; &nbsp; &nbsp; &nbsp; //setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);<br />
&nbsp; &nbsp; &nbsp; &nbsp; //setDefaultLookAndFeelDecorated(true);<br />
&nbsp; &nbsp; &nbsp; &nbsp; setVisible(true);<br />
<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; /**<br />
&nbsp; &nbsp;  * @param args the command line arguments<br />
&nbsp; &nbsp;  */<br />
&nbsp; &nbsp; @Override<br />
&nbsp; &nbsp; public void init() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; new Main();<br />
&nbsp; &nbsp; }<br />
<br />
<br />
<br />
&nbsp; &nbsp; public void actionPerformed(ActionEvent e) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; JButton but = (JButton) e.getSource();<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; Dimension size = but.getSize();<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; int LabelX = label.getX();<br />
&nbsp; &nbsp; &nbsp; &nbsp; int LabelY = label.getY();<br />
&nbsp; &nbsp; &nbsp; &nbsp; int ButtonX = but.getX();<br />
&nbsp; &nbsp; &nbsp; &nbsp; int ButtonY = but.getY();<br />
&nbsp; &nbsp; &nbsp; &nbsp; int ButtonPosX = ButtonX/size.width;<br />
&nbsp; &nbsp; &nbsp; &nbsp; int ButtonPosY = ButtonY / size.height;<br />
&nbsp; &nbsp; &nbsp; &nbsp; int buttonIndex = pos&#91;ButtonPosY&#93;&#91;ButtonPosX&#93;;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (LabelX == ButtonX &amp;&amp; (LabelY - ButtonY) == size.height ) {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  int labelIndex = buttonIndex + 3;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  centerPanel.remove(buttonIndex);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  centerPanel.add(label, buttonIndex);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  centerPanel.add(but,labelIndex);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  centerPanel.validate();<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if(LabelY == ButtonY &amp;&amp; (LabelX - ButtonX) == size.width){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int labelIndex = buttonIndex +1;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; centerPanel.remove(buttonIndex);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; centerPanel.add(label, buttonIndex);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; centerPanel.add(but,labelIndex);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; centerPanel.validate();<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if(LabelY == ButtonY &amp;&amp; (LabelX - ButtonX) == -size.width){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int labelIndex = buttonIndex -1;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; centerPanel.remove(buttonIndex);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; centerPanel.add(label, labelIndex);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; centerPanel.add(but, labelIndex);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; centerPanel.validate();<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (LabelX == ButtonX &amp;&amp; (LabelY - ButtonY) == -size.height){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int labelIndex = buttonIndex - 3;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; centerPanel.remove(labelIndex);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; centerPanel.add(but, labelIndex);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; centerPanel.add(label, buttonIndex);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; centerPanel.validate();<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; public Image&#91;&#93; remove(Image im, Image&#91;&#93; list){<br />
&nbsp; &nbsp; &nbsp; &nbsp; Image&#91;&#93; ret = new Image&#91;list.length-1&#93;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; int count = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; for(int i = 0; i &lt; list.length; i++){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(list&#91;i&#93;!= im){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ret&#91;count&#93; = list&#91;i&#93;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; count ++;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; return ret;<br />
&nbsp; &nbsp; }<br />
<br />
}</pre></div>  <br /> <div style="padding:5px">    <fieldset class="fieldset"> <legend>Attached Images</legend> <table cellpadding="0" cellspacing="5" border="0"> <tr> <td><img class="inlineimg" src="http://www.daniweb.com/forums/images/attach/bmp.gif" alt="File Type: bmp" width="16" height="16" border="0" style="vertical-align:baseline" /></td> <td><a href="http://www.daniweb.com/forums/attachment.php?attachmentid=12117&amp;d=1255511217" target="_blank">Help.bmp</a> (216.8 KB)</td> </tr> </table> </fieldset>   </div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>Paul Thompson</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread230076.html</guid>
		</item>
		<item>
			<title><![CDATA[Loads of Down's]]></title>
			<link>http://www.daniweb.com/forums/thread227541.html</link>
			<pubDate>Sun, 04 Oct 2009 09:18:17 GMT</pubDate>
			<description><![CDATA[I have noticed in the Python Forum there is nothing but -1's on all of the threads except one.  
 
So what i was wondering is can we limit the amount of down's a poster can do? 
 
For example a member such as myself could do up to 10 down points per day, while JBennet will be able to do 50 and a...]]></description>
			<content:encoded><![CDATA[<div>I have noticed in the Python Forum there is nothing but -1's on all of the threads except one. <br />
<br />
So what i was wondering is can we limit the amount of down's a poster can do?<br />
<br />
For example a member such as myself could do up to 10 down points per day, while JBennet will be able to do 50 and a new member will only be able to up ones that they fund useful. This will stop useless downing. <br />
<br />
Just hopefully that will stop a new person just going around stuffing up the system.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum26.html">DaniWeb Community Feedback</category>
			<dc:creator>Paul Thompson</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread227541.html</guid>
		</item>
		<item>
			<title>New Rep</title>
			<link>http://www.daniweb.com/forums/thread227521.html</link>
			<pubDate>Sun, 04 Oct 2009 03:39:31 GMT</pubDate>
			<description><![CDATA[Okay, first off. I have noticed that if i 'up' an answer that was at -1 it suddenly goes to 1. Does that mean my up vote is worth 2? Or does it just skip 0? 
 
As well, is this separate from rep? or will it add onto your rep? 
 
Just a bit confused about the whole system, thats all :P]]></description>
			<content:encoded><![CDATA[<div>Okay, first off. I have noticed that if i 'up' an answer that was at -1 it suddenly goes to 1. Does that mean my up vote is worth 2? Or does it just skip 0?<br />
<br />
As well, is this separate from rep? or will it add onto your rep?<br />
<br />
Just a bit confused about the whole system, thats all :P</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum26.html">DaniWeb Community Feedback</category>
			<dc:creator>Paul Thompson</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread227521.html</guid>
		</item>
		<item>
			<title>Code Snippet Recursive Fibonacci</title>
			<link>http://www.daniweb.com/code/snippet223695.html</link>
			<pubDate>Thu, 17 Sep 2009 07:22:26 GMT</pubDate>
			<description>This code shows an example of using recursion to simply solve a problem. Note though, it can take a long time to do larger numbers such as the 50th fibonacci numbers this way. 
 
Hope this helps! :)</description>
			<content:encoded><![CDATA[<div>This code shows an example of using recursion to simply solve a problem. Note though, it can take a long time to do larger numbers such as the 50th fibonacci numbers this way.<br />
<br />
Hope this helps! :)</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Paul Thompson</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread223695.html</guid>
		</item>
		<item>
			<title>Language + Tags</title>
			<link>http://www.daniweb.com/forums/thread223033.html</link>
			<pubDate>Mon, 14 Sep 2009 21:42:07 GMT</pubDate>
			<description>I was just wondering, on every software development forum we constantly see the largest, most bold tag being the language you are in, in the python forum there is a massive python, same for C++ 
 
I was just wondering if perhaps poasting a tag of Python in the python forum and C++ in the C++ forum...</description>
			<content:encoded><![CDATA[<div>I was just wondering, on every software development forum we constantly see the largest, most bold tag being the language you are in, in the python forum there is a massive python, same for C++<br />
<br />
I was just wondering if perhaps poasting a tag of Python in the python forum and C++ in the C++ forum because everyone already knows your post is about that language and all it does is mean the tag cloud down the bottom is out of proportion.<br />
<br />
Just puttin' it out there :)</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum26.html">DaniWeb Community Feedback</category>
			<dc:creator>Paul Thompson</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread223033.html</guid>
		</item>
		<item>
			<title>Confusing strings</title>
			<link>http://www.daniweb.com/forums/thread222599.html</link>
			<pubDate>Sun, 13 Sep 2009 00:24:10 GMT</pubDate>
			<description><![CDATA[Hi, 
Just wondering if someone could explain why this is happening: 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code Tags"...]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
Just wondering if someone could explain why this is happening:<br />
 <pre style="margin:20px; line-height:13px">&gt;&gt;&gt; example = &quot;&quot;<br />
&gt;&gt;&gt; example in &quot;Hello there&quot;<br />
True<br />
&gt;&gt;&gt;</pre>I'm confused as to why  <pre style="margin:20px; line-height:13px">example in &quot;hello there&quot;</pre> gives a True value as return.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Paul Thompson</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread222599.html</guid>
		</item>
		<item>
			<title>+ next to names</title>
			<link>http://www.daniweb.com/forums/thread221569.html</link>
			<pubDate>Tue, 08 Sep 2009 21:56:38 GMT</pubDate>
			<description>I was just looking at my user page and i noticed in the section that shows who has looked at your page it had: 
cscgal+ 
shadwickman+ 
and so on 
I was wondering what the plus sign means.</description>
			<content:encoded><![CDATA[<div>I was just looking at my user page and i noticed in the section that shows who has looked at your page it had:<br />
cscgal+<br />
shadwickman+<br />
and so on<br />
I was wondering what the plus sign means.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum26.html">DaniWeb Community Feedback</category>
			<dc:creator>Paul Thompson</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread221569.html</guid>
		</item>
		<item>
			<title>Removing Favourite Forum</title>
			<link>http://www.daniweb.com/forums/thread221246.html</link>
			<pubDate>Mon, 07 Sep 2009 21:13:06 GMT</pubDate>
			<description><![CDATA[Hello,  
Just quickly i was wondering if there was any way to remove a forum from the "My Favorite Forum" section. I have Software Development Job Offers in there just because on time in the python forum i posted on a thread saying it should get moved, then it did get moved and now it looks like i...]]></description>
			<content:encoded><![CDATA[<div>Hello, <br />
Just quickly i was wondering if there was any way to remove a forum from the &quot;My Favorite Forum&quot; section. I have Software Development Job Offers in there just because on time in the python forum i posted on a thread saying it should get moved, then it did get moved and now it looks like i have posted in that forum.<br />
<br />
So in essence im just wondering if there is anywhere in the control panel that i can use to unsubscribe from them.<br />
<br />
Cheers<br />
Paul</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum26.html">DaniWeb Community Feedback</category>
			<dc:creator>Paul Thompson</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread221246.html</guid>
		</item>
		<item>
			<title>Projects for non-beginners</title>
			<link>http://www.daniweb.com/forums/thread221030.html</link>
			<pubDate>Sun, 06 Sep 2009 23:02:33 GMT</pubDate>
			<description>Hi guys, 
I have been programming in python for just a bit over 2 years now. Being quite apt at it i was wondering, what can you do to really extend yourself in python? We have a lovely thread in the Projects for Beginners, but in some ways i have always thought it would be nice to find out some...</description>
			<content:encoded><![CDATA[<div>Hi guys,<br />
I have been programming in python for just a bit over 2 years now. Being quite apt at it i was wondering, what can you do to really extend yourself in python? We have a lovely thread in the Projects for Beginners, but in some ways i have always thought it would be nice to find out some ideas of projects for non-beginners who could maybe spent a week or more on an idea. <br />
<br />
So any ideas? Whats a project for the non-beginner? :)</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Paul Thompson</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread221030.html</guid>
		</item>
		<item>
			<title>Tags?</title>
			<link>http://www.daniweb.com/forums/thread220842.html</link>
			<pubDate>Sat, 05 Sep 2009 09:44:06 GMT</pubDate>
			<description>I was just wondering how the tags for threads worked? Is this to help with a site search or something?</description>
			<content:encoded><![CDATA[<div>I was just wondering how the tags for threads worked? Is this to help with a site search or something?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum26.html">DaniWeb Community Feedback</category>
			<dc:creator>Paul Thompson</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread220842.html</guid>
		</item>
	</channel>
</rss>
