<?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>Wed, 23 Dec 2009 16:56:47 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>Hand tool for text</title>
			<link>http://www.daniweb.com/forums/thread245644.html</link>
			<pubDate>Fri, 11 Dec 2009 17:23:45 GMT</pubDate>
			<description><![CDATA[Hi, 
I have created dynamic text on a button. How can I get the text to display the hand tool instead of the arrow tool. I have made the text not selectable and given it an instance name then used 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a...]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
I have created dynamic text on a button. How can I get the text to display the hand tool instead of the arrow tool. I have made the text not selectable and given it an instance name then used<br />
 <pre style="margin:20px; line-height:13px">itbl_text.buttonMode = true;</pre>it is all contained inside a movie clip called iTunes and in the main stage I have the code<br />
 <pre style="margin:20px; line-height:13px">iTunes.buttonMode = true;</pre>How can I make the hand tool come up?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum28.html">Graphics and Multimedia</category>
			<dc:creator>samarudge</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread245644.html</guid>
		</item>
		<item>
			<title>Time Slider</title>
			<link>http://www.daniweb.com/forums/thread245417.html</link>
			<pubDate>Thu, 10 Dec 2009 22:09:08 GMT</pubDate>
			<description><![CDATA[Hi, 
I have created a Flash MP3 player with a timeline, at the moment you have to click on the place in the timeline to move to but I would like people to be able to click and drag the time slider. 
The code I have for setting the position in the time slider is 
  <div class="codeblock"> <div...]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
I have created a Flash MP3 player with a timeline, at the moment you have to click on the place in the timeline to move to but I would like people to be able to click and drag the time slider.<br />
The code I have for setting the position in the time slider is<br />
 <pre style="margin:20px; line-height:13px">function setNewProgress(e:MouseEvent):void {<br />
&nbsp; &nbsp; &nbsp; &nbsp; var p:int = sndObject.length * e.currentTarget.mouseX / 166;<br />
&nbsp; &nbsp; &nbsp; &nbsp; chaObject.stop();<br />
&nbsp; &nbsp; &nbsp; &nbsp; chaObject = sndObject.play(p);<br />
&nbsp; &nbsp; &nbsp; &nbsp; this.btnPlay.visible = false;<br />
&nbsp; &nbsp; &nbsp; &nbsp; this.btnPause.visible = true;<br />
}</pre>which is called by<br />
 <pre style="margin:20px; line-height:13px">&nbsp; &nbsp; &nbsp; &nbsp; this.progressbar.addEventListener(MouseEvent.CLICK, setNewProgress);</pre>How do I make it click and drag<br />
Thanx,<br />
Sam Rudge</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum28.html">Graphics and Multimedia</category>
			<dc:creator>samarudge</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread245417.html</guid>
		</item>
		<item>
			<title>AS3 flash vars via URL</title>
			<link>http://www.daniweb.com/forums/thread244700.html</link>
			<pubDate>Tue, 08 Dec 2009 13:25:04 GMT</pubDate>
			<description><![CDATA[Hi, 
I know when passing vars to an AS3 movie you can use the query string like 
mymovie.swf?Var1=something&Var2=something_else 
but what about passing them via the URL? 
I know that YouTube does this, there embed SWFs are 
http://www.youtube.com/v/v3xYkyw86QM 
with the red bit being the video URL....]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
I know when passing vars to an AS3 movie you can use the query string like<br />
mymovie.swf?Var1=something&amp;Var2=something_else<br />
but what about passing them via the URL?<br />
I know that YouTube does this, there embed SWFs are<br />
<a rel="nofollow" class="t" href="http://www.youtube.com/v/" target="_blank">http://www.youtube.com/v/</a><span style="color:Red">v3xYkyw86QM</span><br />
with the red bit being the video URL. The server is Apache so it isn't something to do with FMS or any other Flash server<br />
and it can't be done with rewrites like you normaly would because its client side<br />
How can I do this with my flash movies?<br />
Thanx,<br />
Sam Rudge</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum28.html">Graphics and Multimedia</category>
			<dc:creator>samarudge</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread244700.html</guid>
		</item>
		<item>
			<title>Best way to update a comment count etc.</title>
			<link>http://www.daniweb.com/forums/thread243467.html</link>
			<pubDate>Thu, 03 Dec 2009 20:18:23 GMT</pubDate>
			<description>Hi guys, 
So I am developing a website which will allow users to comment on things. As part of this I need to display a comment count and I wanted to know what you thought was the best way of doing this: 
The two options are 
Every hour/day run a CRON that counts the comments on a certain item and...</description>
			<content:encoded><![CDATA[<div>Hi guys,<br />
So I am developing a website which will allow users to comment on things. As part of this I need to display a comment count and I wanted to know what you thought was the best way of doing this:<br />
The two options are<br />
Every hour/day run a CRON that counts the comments on a certain item and then updates the articles DB entry<br />
Or<br />
As soon as a comment is added +1 to the comment count<br />
<br />
I should mention that this will be a highly used site (estimating 1,000,000+ hits per month)<br />
<br />
Which is the best way of doing it?<br />
Thanx,<br />
Sam Rudge</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum17.html">PHP</category>
			<dc:creator>samarudge</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread243467.html</guid>
		</item>
		<item>
			<title>Odd problem with compiler</title>
			<link>http://www.daniweb.com/forums/thread243068.html</link>
			<pubDate>Wed, 02 Dec 2009 15:33:42 GMT</pubDate>
			<description>Hi, 
 
I downloaded the open source project Guitar Tuner (http://sourceforge.net/projects/guitartuner/) 
Inside it there is an index.html file, a TunerApplet.jar file and a TunerApplet.java file (As well as some images and GPL etc.) 
When i open index.html the applet displays as it should however...</description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
I downloaded the open source project Guitar Tuner (<a rel="nofollow" class="t" href="http://sourceforge.net/projects/guitartuner/" target="_blank">http://sourceforge.net/projects/guitartuner/</a>)<br />
Inside it there is an index.html file, a TunerApplet.jar file and a TunerApplet.java file (As well as some images and GPL etc.)<br />
When i open index.html the applet displays as it should however if I try to recompile (Even without making any changes to the code) I get an error.<br />
<br />
I am compiling with the command<br />
 <pre style="margin:20px; line-height:13px">Sam-Rudges-MacBook-Pro:GuitarTuner samarudge$ javac tunerapplet.java</pre><br />
then putting it all into a .jar archive using<br />
 <pre style="margin:20px; line-height:13px">Sam-Rudges-MacBook-Pro:GuitarTuner samarudge$ jar cvf TunerApplet.jar TunerApplet.class</pre><br />
But when I open the web page again (After closing FireFox and clearing cache) the applet displays but shows the error<br />
&quot;Error: Unable To Start Acquisition&quot;<br />
If you look in the code (below) the string from the error is on line 111<br />
 <pre style="margin:20px; line-height:13px">/*<br />
GuitarTuner : automatic Guitar Tuner on Applet <br />
Copyright (C) 2005 (Arnault PACHOT)<br />
<br />
This program is free software; you can redistribute it and/or<br />
modify it under the terms of the GNU General Public License<br />
as published by the Free Software Foundation; either version 2<br />
of the License, or any later version.<br />
<br />
This program is distributed in the hope that it will be useful,<br />
but WITHOUT ANY WARRANTY; without even the implied warranty of<br />
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.&nbsp; See the<br />
GNU General Public License for more details.<br />
<br />
You should have received a copy of the GNU General Public License<br />
along with this program; if not, write to the Free Software<br />
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA&nbsp; 02110-1301, USA.<br />
<br />
Contact : Arnault PACHOT<br />
&quot;OpenStudio, Editeur de logiciels libres&quot; <br />
Le bourg, 43160 Saint Pal de Senouire, FRANCE.<br />
info@openstudio.fr*/<br />
<br />
import java.applet.*;&nbsp; <br />
import java.awt.*;&nbsp; <br />
import java.awt.event.*;<br />
import javax.sound.sampled.*;<br />
<br />
import java.net.*;<br />
import java.io.*;<br />
<br />
<br />
<br />
<br />
<br />
<br />
public class TunerApplet extends Applet implements MouseListener, ActionListener, MouseMotionListener<br />
{&nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; Image img;<br />
&nbsp; &nbsp; &nbsp; &nbsp; Image imgE;<br />
&nbsp; &nbsp; &nbsp; &nbsp; Image imgA;<br />
&nbsp; &nbsp; &nbsp; &nbsp; Image imgD;<br />
&nbsp; &nbsp; &nbsp; &nbsp; Image imgG;<br />
&nbsp; &nbsp; &nbsp; &nbsp; Image imgB;<br />
&nbsp; &nbsp; &nbsp; &nbsp; Image imgSelected = null;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; TargetDataLine targetDataLine;<br />
&nbsp; &nbsp; &nbsp; &nbsp; CaptureThread captureThread;<br />
&nbsp; &nbsp; &nbsp; &nbsp; AudioFormat audioFormat;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; double freqMin = 77.781;<br />
&nbsp; &nbsp; &nbsp; &nbsp; double freqMax = 87.307;<br />
&nbsp; &nbsp; &nbsp; &nbsp; double freqOK = 82.406;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; int coordSelectedx = 70;<br />
&nbsp; &nbsp; &nbsp; &nbsp; int coordSelectedy = 134;<br />
&nbsp; &nbsp; &nbsp; &nbsp; int xPos = 171;<br />
&nbsp; &nbsp; &nbsp; &nbsp; int yPos = 98-40;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; int dispError = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; Panel infoPanel = new Panel();<br />
&nbsp; &nbsp; &nbsp; &nbsp; Button closeButton = new Button(&quot;Close&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; boolean bStopTuner = false;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp;  public void start ()<br />
&nbsp; &nbsp; &nbsp; &nbsp; {&nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; img = getImage(getCodeBase(),&quot;TunerApplet.jpg&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; imgE = getImage(getCodeBase(),&quot;Eselected.jpg&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; imgA = getImage(getCodeBase(),&quot;Aselected.jpg&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; imgD = getImage(getCodeBase(),&quot;Dselected.jpg&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; imgG = getImage(getCodeBase(),&quot;Gselected.jpg&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; imgB = getImage(getCodeBase(),&quot;Bselected.jpg&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; imgSelected = imgE;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; this.addMouseListener(this);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; this.addMouseMotionListener(this);&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; infoPanel.setLayout(new BorderLayout());<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Panel buttonPanel = new Panel();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Label titleLabel = new Label(&quot;GuitarTuner&quot;);<br />
<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TextArea infoArea = new TextArea(&quot;GuitarTuner has been developed by OpenStudio\nwww.openstudio.fr\nCopyright (2005) Arnault Pachot.\n\nThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. (see http://www.gnu.org/copyleft/gpl.html)\n\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA&nbsp; 02110-1301, USA.\n\nContact : Arnault PACHOT\nOpenStudio, Editeur de logiciels libres\nLe bourg, 43160 Saint Pal de Senouire, FRANCE.\ninfo@openstudio.fr\n&quot;, 8, 40, TextArea.SCROLLBARS_VERTICAL_ONLY );<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; infoArea.setBackground(Color.lightGray);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buttonPanel.add(closeButton);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buttonPanel.setBackground(Color.lightGray);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; closeButton.addActionListener(this);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //infoPanel.add(titleLabel);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; infoPanel.setBackground(Color.lightGray);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; infoPanel.add(infoArea);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; infoPanel.add(buttonPanel, BorderLayout.SOUTH);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; infoPanel.setVisible(false);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; add(infoPanel);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; audioFormat = new AudioFormat(8000.0F,8,1,true,false);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DataLine.Info dataLineInfo = new DataLine.Info(TargetDataLine.class,audioFormat);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; targetDataLine = (TargetDataLine)AudioSystem.getLine(dataLineInfo);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; targetDataLine.open(audioFormat);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; captureThread = new CaptureThread();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; captureThread.start();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; catch (Exception e2) <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dispError = 1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; repaint();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;Error : Unable to start acqusition -&gt; &quot;+e2);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
<br />
public class CaptureThread extends Thread<br />
{&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public void run()<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int cnt2 = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int spectreSize = 2048*2*2*2*2;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int sampleSize = 2048*2*2;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; double divi =&nbsp; 4*2*(4096/4000);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; byte data[] = new byte[spectreSize];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int valtemp = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  targetDataLine.start();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int nbValues = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; double tempValue = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int nbMesures = 1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; double[] ar = new double[spectreSize];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; double[] ai = new double[spectreSize];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while(((cnt2 = targetDataLine.read(data,0,sampleSize)) &gt; 0))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  for(int i = 0; i &lt; sampleSize; i++)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ar[i] = (double)data[i];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ai[i] = 0.0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (int i=sampleSize; i&lt;spectreSize; i++)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ar[i] = 0.0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ai[i] = 0.0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; computeFFT(1, spectreSize, ar, ai);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; double maxFreq = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; double maxAmpl = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; double maxIndex = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; double erreur = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (int i=(int)(freqMin*divi); i&lt;(freqMax*divi);i++)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (Math.abs(ai[i]) &gt; maxAmpl)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; maxFreq = ar[i];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; maxAmpl = Math.abs(ai[i]);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; maxIndex = i;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(maxAmpl &gt; 0.01)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; erreur = ((maxIndex/divi - freqOK) / (freqOK - freqMin));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tempValue += erreur;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nbValues+=1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (nbValues &gt; (nbMesures - 1))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; double angle =&nbsp; ((tempValue / nbMesures)) -0.25;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xPos = (int)(40*Math.sin(angle) + 171);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; yPos = (int)(98 - (40*Math.cos(angle) ) );<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nbValues = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tempValue = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; repaint();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; catch (Exception e2)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(e2);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; targetDataLine.flush();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; catch (Exception e) <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(e);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.exit(0);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
}<br />
&nbsp;  <br />
<br />
&nbsp;public static void computeFFT(int sign, int n, double[] ar, double[] ai)<br />
&nbsp;  {<br />
&nbsp; &nbsp; &nbsp; double scale = 2.0 / (double)n;<br />
&nbsp; &nbsp; &nbsp; int i, j;<br />
&nbsp; &nbsp; &nbsp; for(i = j = 0; i &lt; n; ++i)<br />
&nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp;  if (j &gt;= i)<br />
&nbsp; &nbsp; &nbsp; &nbsp;  {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; double tempr = ar[j] * scale;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; double tempi = ai[j] * scale;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ar[j] = ar[i] * scale;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ai[j] = ai[i] * scale;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ar[i] = tempr;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ai[i] = tempi;<br />
&nbsp; &nbsp; &nbsp; &nbsp;  }<br />
&nbsp; &nbsp; &nbsp; &nbsp;  int m = n/2;<br />
&nbsp; &nbsp; &nbsp; &nbsp;  while ((m &gt;= 1) &amp;&amp; (j &gt;= m))<br />
&nbsp; &nbsp; &nbsp; &nbsp;  {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; j -= m;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m /= 2;<br />
&nbsp; &nbsp; &nbsp; &nbsp;  }<br />
&nbsp; &nbsp; &nbsp; &nbsp;  j += m;<br />
&nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; int mmax, istep;<br />
&nbsp; &nbsp; &nbsp; for(mmax = 1, istep = 2 * mmax; mmax &lt; n; mmax = istep, istep = 2 * mmax)<br />
&nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp;  double delta = sign * Math.PI / (double)mmax;<br />
&nbsp; &nbsp; &nbsp; &nbsp;  for(int m = 0; m &lt; mmax; ++m)<br />
&nbsp; &nbsp; &nbsp; &nbsp;  {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; double w = m * delta;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; double wr = Math.cos(w);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; double wi = Math.sin(w);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for(i = m; i &lt; n; i += istep)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  j = i + mmax;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  double tr = wr * ar[j] - wi * ai[j];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  double ti = wr * ai[j] + wi * ar[j];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ar[j] = ar[i] - tr;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ai[j] = ai[i] - ti;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ar[i] += tr;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ai[i] += ti;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp;  }<br />
&nbsp; &nbsp; &nbsp; &nbsp;  mmax = istep;<br />
&nbsp; &nbsp; &nbsp; }<br />
&nbsp;  }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; public void paint(Graphics g) <br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (img!=null)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; g.drawImage(img,0,0,350, 200,this);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (imgSelected!=null)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; g.drawImage(imgSelected,coordSelectedx,coordSelectedy,this);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; g.setColor(Color.black);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; g.drawLine(xPos, yPos, 171, 98);<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; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; g.drawString(&quot;Loading...&quot;,20,60);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (dispError == 1)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; g.setColor(Color.black);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; g.drawString(&quot;Error : Unable to start acquisition&quot;,86,124);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp;  public void mouseClicked(MouseEvent e) <br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  int x = e.getX();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int y = e.getY();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int selectedNote = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (x &gt; 74 &amp;&amp; y &gt; 137 &amp;&amp; x &lt; 94 &amp;&amp; y &lt; 154)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; freqMin = 77.781;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; freqMax = 87.307;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; freqOK = 82.406;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; imgSelected = imgE;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; coordSelectedx = 70;<br />
&nbsp; &nbsp; &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; &nbsp; &nbsp; if (x &gt; 110 &amp;&amp; y &gt; 137 &amp;&amp; x &lt; 128 &amp;&amp; y &lt; 154)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; freqMin = 103.826;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; freqMax = 116.540;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; freqOK = 110.0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; imgSelected = imgA;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; coordSelectedx = 106;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (x &gt; 144 &amp;&amp; y &gt; 137 &amp;&amp; x &lt; 163 &amp;&amp; y &lt; 154)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; freqMin = 138.591;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; freqMax = 155.563;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; freqOK = 146.832;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; imgSelected = imgD;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; coordSelectedx = 141;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (x &gt; 180 &amp;&amp; y &gt; 137 &amp;&amp; x &lt; 199 &amp;&amp; y &lt; 154)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; freqMin = 184.997;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; freqMax = 207.652;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; freqOK = 195.997;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; imgSelected = imgG;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; coordSelectedx = 176;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (x &gt; 214 &amp;&amp; y &gt; 137 &amp;&amp; x &lt; 236 &amp;&amp; y &lt; 154)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; freqMin = 233.081;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; freqMax = 261.625;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; freqOK = 246.941;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; imgSelected = imgB;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; coordSelectedx = 212;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (x &gt; 248 &amp;&amp; y &gt; 137 &amp;&amp; x &lt; 268 &amp;&amp; y &lt; 154)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; freqMin = 311.126;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; freqMax = 349.228;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; freqOK = 329.627;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; imgSelected = imgE;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; coordSelectedx = 247;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (x &gt; 24 &amp;&amp; y &gt; 179 &amp;&amp; x &lt; 313 &amp;&amp; y &lt; 198)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; infoPanel.setVisible(true);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; validate();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; repaint();<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; repaint();<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; public void mouseMoved(MouseEvent e)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int x = e.getX();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int y = e.getY();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (x &gt; 24 &amp;&amp; y &gt; 179 &amp;&amp; x &lt; 313 &amp;&amp; y &lt; 198)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));<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; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp;  <br />
&nbsp; <br />
&nbsp; &nbsp; //========================================================== ignored<br />
&nbsp; &nbsp; //==== the other motion events must be here, but do nothing.<br />
&nbsp; &nbsp;  public void mouseDragged (MouseEvent e) {}&nbsp; // ignore<br />
&nbsp; &nbsp; //==== these &quot;slow&quot; mouse events are ignored.<br />
&nbsp; &nbsp; public void mouseEntered (MouseEvent e) {}&nbsp; // ignore<br />
&nbsp; &nbsp; public void mouseExited&nbsp; (MouseEvent e) {}&nbsp; // ignore<br />
&nbsp; &nbsp; public void mousePressed (MouseEvent e) {}&nbsp; // ignore<br />
&nbsp; &nbsp; public void mouseReleased(MouseEvent e) {}&nbsp; // ignore<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; public void actionPerformed(ActionEvent evt) <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (evt.getSource()==closeButton)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; infoPanel.setVisible(false);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; repaint();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
}</pre>I have even tried signing the file using<br />
 <pre style="margin:20px; line-height:13px">Sam-Rudges-MacBook-Pro:GuitarTuner samarudge$ keytool -genkey -alias Tuner -keypass authentic -keystore Tuner -storepass authentic</pre><br />
then<br />
 <pre style="margin:20px; line-height:13px">Sam-Rudges-MacBook-Pro:GuitarTuner samarudge$ jarsigner -keystore Tuner -storepass authentic -keypass authentic TunerApplet.jar Tuner</pre><br />
I am quite new to Java and was expecting just to be able to edit the file, compile and .jar it then possibly digitally sign it<br />
<br />
What am I doing wrong?<br />
Thanx,<br />
Sam Rudge</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>samarudge</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread243068.html</guid>
		</item>
		<item>
			<title>Can I do this in Java???</title>
			<link>http://www.daniweb.com/forums/thread242804.html</link>
			<pubDate>Tue, 01 Dec 2009 16:52:58 GMT</pubDate>
			<description><![CDATA[Hi, 
I'm trying to find a suitable language for developing an RIA to be able to tune an instrument via a website. I.E. what I need is: 
1) Live input from a microphone 
2) Get the volume level of different frequencies 
3) Find the average or loudest frequency 
4) Output the results 
 
I know that...]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
I'm trying to find a suitable language for developing an RIA to be able to tune an instrument via a website. I.E. what I need is:<br />
1) Live input from a microphone<br />
2) Get the volume level of different frequencies<br />
3) Find the average or loudest frequency<br />
4) Output the results<br />
<br />
I know that the last 2 are possible but could I do the first two in Java via an applet online?<br />
<br />
Thanx,<br />
Sam Rudge</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>samarudge</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread242804.html</guid>
		</item>
		<item>
			<title>Get a sound frequency</title>
			<link>http://www.daniweb.com/forums/thread242537.html</link>
			<pubDate>Mon, 30 Nov 2009 19:58:44 GMT</pubDate>
			<description><![CDATA[Hi, 
So I have the following code 
  <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" target="_blank">Help with Code Tags</a> </div>...]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
So I have the following code<br />
 <pre style="margin:20px; line-height:13px">m = Microphone.get();<br />
o = attachAudio(m);<br />
m.setUseEchoSuppression(true);<br />
onEnterFrame = function () {<br />
&nbsp; &nbsp; &nbsp; &nbsp; vol._xscale = m.activityLevel*100;<br />
&nbsp; &nbsp; &nbsp; &nbsp; soundvol = m.activityLevel;<br />
&nbsp; &nbsp; &nbsp; &nbsp; inputname = m.name;<br />
&nbsp; &nbsp; &nbsp; &nbsp; micgain = m.gain+&quot;%&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; outputvolume = m.;<br />
&nbsp; &nbsp; &nbsp;  freqvolume = \\something<br />
};</pre>As you can see, that code starts taking the input from a microhphone and visualizes the volume as a horizontal bar.<br />
I have the variable freqvolume and I want that to be set to the volume/activityLevel of a certain frequency say 256 Hz (Middle C)<br />
Is that possible?<br />
Thanx<br />
Sam Rudge</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum28.html">Graphics and Multimedia</category>
			<dc:creator>samarudge</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread242537.html</guid>
		</item>
		<item>
			<title>Create a shortening hash function</title>
			<link>http://www.daniweb.com/forums/thread240698.html</link>
			<pubDate>Mon, 23 Nov 2009 13:06:50 GMT</pubDate>
			<description><![CDATA[Hi, 
I need to create a function to shorten a numerical ID to a string of letters 
E.G. 
 
echo encode_num('1'); //Outputs a 
echo encode_num('3'); //Outputs c 
echo encode_num('26'); //Outputs z 
echo encode_num('27'); //Outputs A 
echo encode_num('52'); //Outputs Z 
echo encode_num('53');...]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
I need to create a function to shorten a numerical ID to a string of letters<br />
E.G.<br />
 <pre style="margin:20px; line-height:13px">echo encode_num('1'); //Outputs a<br />
echo encode_num('3'); //Outputs c<br />
echo encode_num('26'); //Outputs z<br />
echo encode_num('27'); //Outputs A<br />
echo encode_num('52'); //Outputs Z<br />
echo encode_num('53'); //Outputs aa<br />
echo encode_num('54'); //Outputs ab</pre>etc.<br />
<br />
But I also need to be able to decode them again like<br />
 <pre style="margin:20px; line-height:13px">echo decode_num('a'); //Outputs 1</pre><br />
Is this possible to do?<br />
Thanx,<br />
Sam Rudge</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum17.html">PHP</category>
			<dc:creator>samarudge</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread240698.html</guid>
		</item>
		<item>
			<title>Google Wave!?!</title>
			<link>http://www.daniweb.com/forums/thread236571.html</link>
			<pubDate>Fri, 06 Nov 2009 14:17:04 GMT</pubDate>
			<description><![CDATA[Hi, 
I have just got Google Wave but don't have any contacts (Appart from the person who invited me) I can't figure out how to invite people eather so I was wondering if people would like to post there GMail addresses here I can add you so I can finally start talking 2 ppl =) Just have a DaniWeb...]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
I have just got Google Wave but don't have any contacts (Appart from the person who invited me) I can't figure out how to invite people eather so I was wondering if people would like to post there GMail addresses here I can add you so I can finally start talking 2 ppl =) Just have a DaniWeb Wave<br />
My gmail is samarudge .-[at]-. gmail.com<br />
=)<br />
<br />
P.S.<br />
If anyone posts here saying &quot;Can you send me an invitation&quot; I WILL add negative rep points. This is for people who have Wave, not who want it.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum6.html"><![CDATA[Geeks' Lounge]]></category>
			<dc:creator>samarudge</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread236571.html</guid>
		</item>
		<item>
			<title>Function works and then says not defined</title>
			<link>http://www.daniweb.com/forums/thread235686.html</link>
			<pubDate>Tue, 03 Nov 2009 15:43:55 GMT</pubDate>
			<description>Hi, 
I have some code to dynamically retrieve one of three AJAX files and insert it into a DIV 
 
The Javascript is 
 
function createajax() { 
	var Ajax; 
	try{ 
		Ajax = new XMLHttpRequest(); 
	} catch (e){</description>
			<content:encoded><![CDATA[<div>Hi,<br />
I have some code to dynamically retrieve one of three AJAX files and insert it into a DIV<br />
<br />
The Javascript is<br />
 <pre style="margin:20px; line-height:13px">function createajax() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; var Ajax;<br />
&nbsp; &nbsp; &nbsp; &nbsp; try{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Ajax = new XMLHttpRequest();<br />
&nbsp; &nbsp; &nbsp; &nbsp; } catch (e){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Ajax = new ActiveXObject(&quot;Msxml2.XMLHTTP&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } catch (e) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Ajax = new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } catch (e){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; alert(&quot;Error!!!&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return false;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; return Ajax;<br />
}<br />
<br />
function basicAjaxSwitch(File, Recipient, Animate) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; if ( Animate == true ) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Animation(document.getElementById(Recipient)).duration(100).from('opacity', 1).to('opacity', 0).go();<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; basicAjaxSwitch = createajax();<br />
&nbsp; &nbsp; &nbsp; &nbsp; basicAjaxSwitch.onreadystatechange = function(){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(basicAjaxSwitch.readyState == 4){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ( Animate == true ) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Animation(document.getElementById(Recipient)).duration(100).checkpoint().duration(100).from('opacity', 0).to('opacity', 1).go();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setTimeout('document.getElementById(&quot;'+Recipient+'&quot;).innerHTML = basicAjaxSwitch.responseText;', 100);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(Recipient).innerHTML = basicAjaxSwitch.responseText;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; basicAjaxSwitch.open(&quot;GET&quot;, &quot;/ajax/&quot;+File, true);<br />
&nbsp; &nbsp; &nbsp; &nbsp; basicAjaxSwitch.send(null);<br />
}<br />
<br />
function changesidebarinfo(changeto) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; if ( changeto == 'login' ) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Animation(document.getElementById('main_layout_accountlinks_background')).to('left', '0px').duration(100).go();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Animation(document.getElementById('main_layout_accountlinks_login')).duration(100).to('color', '#FFF').go();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Animation(document.getElementById('main_layout_accountlinks_signup')).duration(100).to('color', '#000').go();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Animation(document.getElementById('main_layout_accountlinks_about')).duration(100).to('color', '#000').go();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; basicAjaxSwitch('contentinfo/login.php', 'main_layout_rsbinfo_container', true);<br />
&nbsp; &nbsp; &nbsp; &nbsp; } else if ( changeto == 'join' ) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Animation(document.getElementById('main_layout_accountlinks_background')).to('left', '50px').duration(100).go();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Animation(document.getElementById('main_layout_accountlinks_login')).duration(100).to('color', '#000').go();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Animation(document.getElementById('main_layout_accountlinks_signup')).duration(100).to('color', '#FFF').go();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Animation(document.getElementById('main_layout_accountlinks_about')).duration(100).to('color', '#000').go();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; basicAjaxSwitch('contentinfo/join.php', 'main_layout_rsbinfo_container', true);<br />
&nbsp; &nbsp; &nbsp; &nbsp; } else if ( changeto == 'about' ) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Animation(document.getElementById('main_layout_accountlinks_background')).to('left', '100px').duration(100).go();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Animation(document.getElementById('main_layout_accountlinks_login')).duration(100).to('color', '#000').go();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Animation(document.getElementById('main_layout_accountlinks_signup')).duration(100).to('color', '#000').go();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Animation(document.getElementById('main_layout_accountlinks_about')).duration(100).to('color', '#FFF').go();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; basicAjaxSwitch('contentinfo/about.php', 'main_layout_rsbinfo_container', true);<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
}</pre><br />
And the HTML that triggers the actions is<br />
 <pre style="margin:20px; line-height:13px">&lt;div id=&quot;main_layout_accountlinks&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div id=&quot;main_layout_accountlinks_background&quot;&gt;&amp;nbsp;&lt;/div&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div id=&quot;main_layout_accountlinks_login&quot; onclick=&quot;changesidebarinfo('login');&quot;&gt;Log In&lt;/div&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div id=&quot;main_layout_accountlinks_signup&quot; onclick=&quot;changesidebarinfo('join');&quot;&gt;Join&lt;/div&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div id=&quot;main_layout_accountlinks_about&quot; onclick=&quot;changesidebarinfo('about');&quot;&gt;About&lt;/div&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/div&gt;</pre><br />
When I click one of the 3 buttons (doesn't matter which) the result is exactly as intended. Then when I click another (or the same) button, nothing happens and Firebug gives the error<br />
 <pre style="margin:20px; line-height:13px">basicAjaxSwitch is not a function<br />
changesidebarinfo(&quot;login&quot;)site.js (line 61)<br />
function onclick(event) { changesidebarinfo(&quot;login&quot;); }(click clientX=816, clientY=41)2 (line 2)<br />
&#91;Break on this error&#93; basicAjaxSwitch('contentinfo/login.php...'main_layout_rsbinfo_container', true);\n</pre><br />
Regards,<br />
Sam Rudge</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum117.html">JavaScript / DHTML / AJAX</category>
			<dc:creator>samarudge</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235686.html</guid>
		</item>
		<item>
			<title>Remove layer data from Fireworks PNG</title>
			<link>http://www.daniweb.com/forums/thread235494.html</link>
			<pubDate>Mon, 02 Nov 2009 22:36:01 GMT</pubDate>
			<description>Hi, 
My friend has designed a website in Fireworks/HTML and has just saved all her images in Fireworks/PNG format. She has about 300 images all designed in Fireworks but they have all been saved in a format where someone can download them and open them in Fireworks and they will be editable (as...</description>
			<content:encoded><![CDATA[<div>Hi,<br />
My friend has designed a website in Fireworks/HTML and has just saved all her images in Fireworks/PNG format. She has about 300 images all designed in Fireworks but they have all been saved in a format where someone can download them and open them in Fireworks and they will be editable (as vectors).<br />
She wanted to know if there is any way to remove all the editable information from the FW images without re-saving them all.<br />
Regards,<br />
Sam Rudge (Oh and Sarah who apologizes for being useless =P)</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum28.html">Graphics and Multimedia</category>
			<dc:creator>samarudge</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235494.html</guid>
		</item>
		<item>
			<title>Blowfish Hashing?!?</title>
			<link>http://www.daniweb.com/forums/thread235201.html</link>
			<pubDate>Mon, 02 Nov 2009 01:37:03 GMT</pubDate>
			<description>Hi, 
On my websites, I encrypt passwords using a combination of hashing algorithm (Which I am obviously not going to post on a forum but its along the lines of md5(substr(whirlpool($Value), 0, 7));) 
 
What is blowfish, how do I use it and how much more secure is it than a function as shown above?...</description>
			<content:encoded><![CDATA[<div>Hi,<br />
On my websites, I encrypt passwords using a combination of hashing algorithm (Which I am obviously not going to post on a forum but its along the lines of  <pre style="margin:20px; line-height:13px">md5(substr(whirlpool($Value), 0, 7));</pre>)<br />
<br />
What is blowfish, how do I use it and how much more secure is it than a function as shown above?<br />
<br />
Regards,<br />
Sam Rudge</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum17.html">PHP</category>
			<dc:creator>samarudge</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235201.html</guid>
		</item>
		<item>
			<title>Permision issues with uploading files</title>
			<link>http://www.daniweb.com/forums/thread232544.html</link>
			<pubDate>Fri, 23 Oct 2009 09:02:11 GMT</pubDate>
			<description><![CDATA[Hi, 
I have created a script to upload files 
$filename = $_FILES['Filedata']['name'];	 
 
$filetmpname = $_FILES['Filedata']['tmp_name'];	 
 
$fileType = $_FILES["Filedata"]["type"]; 
 
$fileSizeMB = ($_FILES["Filedata"]["size"] / 1024 / 1000);]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
I have created a script to upload files<br />
 <pre style="margin:20px; line-height:13px">$filename = $_FILES&#91;'Filedata'&#93;&#91;'name'&#93;;&nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
$filetmpname = $_FILES&#91;'Filedata'&#93;&#91;'tmp_name'&#93;;&nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
$fileType = $_FILES&#91;&quot;Filedata&quot;&#93;&#91;&quot;type&quot;&#93;;<br />
<br />
$fileSizeMB = ($_FILES&#91;&quot;Filedata&quot;&#93;&#91;&quot;size&quot;&#93; / 1024 / 1000);<br />
<br />
//Irrelevant validation here<br />
<br />
move_uploaded_file($_FILES&#91;'Filedata'&#93;&#91;'tmp_name'&#93;, $_SERVER&#91;'DOCUMENT_ROOT'&#93;.&quot;/content/songs/file.mp3&quot;);</pre><br />
And that returns OK to the browser allong with my success message but the file doesn't exist, when I look in the sites error log i get<br />
 <pre style="margin:20px; line-height:13px">&#91;Fri Oct 23 09:53:44 2009&#93; &#91;error&#93; &#91;client 192.168.0.1&#93; PHP Warning:&nbsp; move_uploaded_file(Photo on 2009-10-09 at 22.51 #2.jpg) &#91;&lt;a href='function.move-uploaded-file'&gt;function.move-uploaded-file&lt;/a&gt;&#93;: failed to open stream: Permission denied in /var/www/html/development/scripts/open/signup/uploadtest.php on line 25, referer: http://dev-env-1.samrudge.co.uk/account/main<br />
&#91;Fri Oct 23 09:53:44 2009&#93; &#91;error&#93; &#91;client 192.168.0.1&#93; PHP Warning:&nbsp; move_uploaded_file() &#91;&lt;a href='function.move-uploaded-file'&gt;function.move-uploaded-file&lt;/a&gt;&#93;: Unable to move '/phptemp/phpTxmy2f' to 'Photo on 2009-10-09 at 22.51 #2.jpg' in /var/www/html/development/scripts/open/signup/uploadtest.php on line 25, referer: http://dev-env-1.samrudge.co.uk/account/main</pre><br />
/phptemp/ has CHMOD 777 and apache has read write access to the entire web directory<br />
<br />
Whats wrong?<br />
Thanx,<br />
Sam</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum17.html">PHP</category>
			<dc:creator>samarudge</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread232544.html</guid>
		</item>
		<item>
			<title>To the power of...</title>
			<link>http://www.daniweb.com/forums/thread231917.html</link>
			<pubDate>Wed, 21 Oct 2009 09:33:08 GMT</pubDate>
			<description><![CDATA[Hi, 
What is the function/opperator to calculate a power with C# 
 
I tryed 
 
powerof = anumber ^ anothernumber; 
 
and that clearly doesn't work (1^3 is 2, 2^3 is 1 etc.) 
 
How do I do it???]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
What is the function/opperator to calculate a power with C#<br />
<br />
I tryed<br />
 <pre style="margin:20px; line-height:13px">powerof = anumber ^ anothernumber;</pre><br />
and that clearly doesn't work (1^3 is 2, 2^3 is 1 etc.)<br />
<br />
How do I do it???<br />
<br />
I looked under  <pre style="margin:20px; line-height:13px">Math.</pre> functions and there was nothing and I spent ages Googleing<br />
<br />
Thanx,<br />
Sam</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum61.html">C#</category>
			<dc:creator>samarudge</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231917.html</guid>
		</item>
		<item>
			<title>Dynamicaly loading JPG (or other format image) into an Actionscript 3.0 Movie clip</title>
			<link>http://www.daniweb.com/forums/thread231469.html</link>
			<pubDate>Mon, 19 Oct 2009 19:56:14 GMT</pubDate>
			<description><![CDATA[Hi, 
 
I have a movie clip called dsp_albumcover (Already created and on the stage, instance name is dsp_albumcover) 
 
I also have a variable with a .jpg file (Can be changed to any other though) defined as 
 
var albumimg:String = '/albumcover.jpg'; 
 
How do I load this in to dsp_albumcover?...]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
I have a movie clip called  <pre style="margin:20px; line-height:13px">dsp_albumcover</pre> (Already created and on the stage, instance name is dsp_albumcover)<br />
<br />
I also have a variable with a .jpg file (Can be changed to any other though) defined as<br />
 <pre style="margin:20px; line-height:13px">var albumimg:String = '/albumcover.jpg';</pre><br />
How do I load this in to dsp_albumcover?<br />
dsp_albumcover is 128 pixles high x wide and the image is the same dimentions.<br />
<br />
Thanx,<br />
Sam<br />
<br />
P.S. Before anyone says that I should just include it in my libary, /albumcover.jpg?ID={ID} is the actual image that would be called and would be retrieved from a DB</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum28.html">Graphics and Multimedia</category>
			<dc:creator>samarudge</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231469.html</guid>
		</item>
		<item>
			<title>Word DIS-association game</title>
			<link>http://www.daniweb.com/forums/thread231378.html</link>
			<pubDate>Mon, 19 Oct 2009 11:11:22 GMT</pubDate>
			<description>You must post a compleatly disasociated word to the previous one I.E. 
 
Elephant, Battery is OK 
Elephant, Plant is OK 
Elephant, Giraph is NOT (Both Animals) 
Elephant, Table is NOT (4 Legs) 
 
Etc. 
 
Not allowed words: Universe, Plannet, Dictionary, Thesorus, Internet (Including Google :P) and...</description>
			<content:encoded><![CDATA[<div>You must post a compleatly disasociated word to the previous one I.E.<br />
<br />
Elephant, Battery is <span style="color:Green">OK</span><br />
Elephant, Plant is <span style="color:Green">OK</span><br />
Elephant, Giraph is <span style="color:Red">NOT </span>(Both Animals)<br />
Elephant, Table is <span style="color:Red">NOT </span>(4 Legs)<br />
<br />
Etc.<br />
<br />
Not allowed words: Universe, Plannet, Dictionary, Thesorus, Internet (Including Google :P) and any other words that are globaly associated<br />
<br />
Lets get started...<br />
<br />
 <pre style="margin:20px; line-height:13px">House</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum80.html">Posting Games</category>
			<dc:creator>samarudge</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231378.html</guid>
		</item>
		<item>
			<title>Word DIS-association game</title>
			<link>http://www.daniweb.com/forums/thread231375.html</link>
			<pubDate>Mon, 19 Oct 2009 11:02:27 GMT</pubDate>
			<description>--Moved This Post---</description>
			<content:encoded><![CDATA[<div>--Moved This Post---</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum80.html">Posting Games</category>
			<dc:creator>samarudge</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231375.html</guid>
		</item>
		<item>
			<title>Actionscript 3 XML help</title>
			<link>http://www.daniweb.com/forums/thread231155.html</link>
			<pubDate>Sun, 18 Oct 2009 12:14:56 GMT</pubDate>
			<description><![CDATA[Hi, I am trying to retrieve the contents of my XML file and use the variables later on in the script; 
I have the following actionscript code 
// Get XML Vars 
var xml:XML; 
var urlLoader = new URLLoader(); 
var songdataurl:String = '0'; 
urlLoader.addEventListener(Event.COMPLETE,onXMLLoaded);...]]></description>
			<content:encoded><![CDATA[<div>Hi, I am trying to retrieve the contents of my XML file and use the variables later on in the script;<br />
I have the following actionscript code<br />
 <pre style="margin:20px; line-height:13px">// Get XML Vars<br />
var xml:XML;<br />
var urlLoader = new URLLoader();<br />
var songdataurl:String = '0';<br />
urlLoader.addEventListener(Event.COMPLETE,onXMLLoaded);<br />
urlLoader.load(new&nbsp; URLRequest(&quot;data.xml&quot;));<br />
<br />
function onXMLLoaded(e:Event):void{<br />
&nbsp; &nbsp; &nbsp;  xml =&nbsp; new XML(e.target.data);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  GetSongData();<br />
}<br />
function GetSongData():void{<br />
&nbsp; &nbsp; &nbsp;  songdataurl = xml..song&#91;0&#93;;<br />
}<br />
trace(songdataurl);<br />
<br />
//Use songdataurl in script</pre><br />
and the following is the contents of data.xml<br />
 <pre style="margin:20px; line-height:13px">&lt;?xml version=&quot;1.0&quot;&nbsp; encoding=&quot;UTF-8&quot;?&gt;<br />
&lt;songs&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;song&nbsp; title=&quot;A Song&quot; artist=&quot;Joe Blogs&quot; album=&quot;An Album&quot;&gt;/getsong/?ID=12345&amp;Hash=12345678&amp;IP=0.0.0.0&lt;/song&gt;<br />
&lt;/songs&gt;</pre>I'm trying to get the contents of the  <pre style="margin:20px; line-height:13px">&lt;song&gt;&lt;/song&gt;</pre> tag and use it later on in my script.<br />
<br />
Thanx,<br />
Sam</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum28.html">Graphics and Multimedia</category>
			<dc:creator>samarudge</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231155.html</guid>
		</item>
		<item>
			<title>PHP Mail Error</title>
			<link>http://www.daniweb.com/forums/thread226005.html</link>
			<pubDate>Sat, 26 Sep 2009 20:13:22 GMT</pubDate>
			<description><![CDATA[Hi, 
I am having a problem with my PHP mail function. I am trying to send an email from user@site.com. This code is fine: 
 
mail($to, $subject, $body, 
    "From: user@site.com\n" . 
    "MIME-Version: 1.0\n" . 
    "Content-Type: multipart/alternative;\n" . 
    "     boundary=" ....]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
I am having a problem with my PHP mail function. I am trying to send an email from <a href="mailto:user@site.com">user@site.com</a>. This code is fine:<br />
 <pre style="margin:20px; line-height:13px">mail($to, $subject, $body,<br />
&nbsp; &nbsp; &quot;From: user@site.com\n&quot; .<br />
&nbsp; &nbsp; &quot;MIME-Version: 1.0\n&quot; .<br />
&nbsp; &nbsp; &quot;Content-Type: multipart/alternative;\n&quot; .<br />
&nbsp; &nbsp; &quot;&nbsp; &nbsp;  boundary=&quot; . $mime_boundary_header) or die('Mail Error');</pre>however this does not<br />
 <pre style="margin:20px; line-height:13px">mail($to, $subject, $body,<br />
&nbsp; &nbsp; &quot;From: Mr. User &lt;user@site.com&gt;\n&quot; .<br />
&nbsp; &nbsp; &quot;MIME-Version: 1.0\n&quot; .<br />
&nbsp; &nbsp; &quot;Content-Type: multipart/alternative;\n&quot; .<br />
&nbsp; &nbsp; &quot;&nbsp; &nbsp;  boundary=&quot; . $mime_boundary_header) or die('Mail Error');</pre>The exact error returned is<br />
 <pre style="margin:20px; line-height:13px">[Sat Sep 26 21:08:11 2009] [error] [client 127.0.0.1] PHP Warning:&nbsp; mail() [&lt;a href='function.mail'&gt;function.mail&lt;/a&gt;]: SMTP server response: 501 &amp;lt;&amp;lt;TubeTool&amp;gt; user@site&amp;gt;: missing or malformed local part in [removed for security]\\scripts\\0\\saccount\\signup.php on line 168, referer: [...]</pre>Please note that the &amp;lt; and &amp;gt; are exactly that in the error log not &lt; or &gt;<br />
Regards,<br />
Sam Rudge</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum17.html">PHP</category>
			<dc:creator>samarudge</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread226005.html</guid>
		</item>
		<item>
			<title>Get my site to NOT show up on certain keywords</title>
			<link>http://www.daniweb.com/forums/thread225837.html</link>
			<pubDate>Fri, 25 Sep 2009 23:12:12 GMT</pubDate>
			<description><![CDATA[This is probably one of the oddest SEO questions ever but here we go; 
My site is showing up fine on the keywords I want but it is also showing up top on keywords that I don't want it to show up on. Is there any way to get Google etc. to get my site not to show up on certain keywords. I have full...]]></description>
			<content:encoded><![CDATA[<div>This is probably one of the oddest SEO questions ever but here we go;<br />
My site is showing up fine on the keywords I want but it is also showing up top on keywords that I don't want it to show up on. Is there any way to get Google etc. to get my site not to show up on certain keywords. I have full Webmaster Tools access to the site as well as access to sitemaps, robots.txt and the pages themselves<br />
<br />
Regards,<br />
Sam Rudge</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum45.html">Search Engine Optimization</category>
			<dc:creator>samarudge</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread225837.html</guid>
		</item>
	</channel>
</rss>
