<?xml version="1.0" encoding="utf-8" ?><?xml-stylesheet type="text/xsl" href="http://www.daniweb.com/js/rss.xsl"?><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/</link>
		<description>Online discussion community for IT professionals and enthusiasts. Technology publication meets social media.</description>
		<language>en-US</language>
		<ttl>60</ttl>
		<!-- PubSubHubbub Discovery -->
		<link rel="hub" href="http://daniweb.superfeedr.com/" xmlns="http://www.w3.org/2005/Atom" />
		<link rel="self" href="http://www.daniweb.com/rss/pull" xmlns="http://www.w3.org/2005/Atom" />
		<!-- End Of PubSubHubbub Discovery -->
				<item>
			<title>stuck again - method to change text box value</title>
			<link>http://www.daniweb.com/software-development/csharp/threads/455073/stuck-again-method-to-change-text-box-value</link>
			<pubDate>Wed, 22 May 2013 02:04:11 +0000</pubDate>
			<description>i seem to get stuck a lot but... I want to have a method displayData() that when called will change richtTextBox.Text to a string value I have. But I don't know how to access the richt text box from within my method. I tried changing it to public using its ...</description>
			<content:encoded><![CDATA[ <p>i seem to get stuck a lot but... I want to have a method displayData() that when called will change richtTextBox.Text to a string value I have. But I don't know how to access the richt text box from within my method. I tried changing it to public using its properties but that didn't work . And Form3.richTextBox doesn't work either. I have a feeling this isn't actually possible, so if not what should I do to work around this problem?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/csharp/61">C#</category>
			<dc:creator>pwolf</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/csharp/threads/455073/stuck-again-method-to-change-text-box-value</guid>
		</item>
				<item>
			<title>Install Tiny7 onto a computer without an OS!!!</title>
			<link>http://www.daniweb.com/hardware-and-software/threads/455072/install-tiny7-onto-a-computer-without-an-os</link>
			<pubDate>Wed, 22 May 2013 01:40:48 +0000</pubDate>
			<description>**REALLY URGENT: Please help if you can!?!?!?!?!? So I decided to install Tiny 7 by eXPerience one day. I have a russian Roverbook Voyager CT5 W which is pretty old [2002-2004]. It has a 1.80 Ghz intel pentium 4 processer, 256 megabytes of ram, and a 27 gigabyte hard drive. ...</description>
			<content:encoded><![CDATA[ <p>**REALLY URGENT: Please help if you can!?!?!?!?!?<br />
So I decided to install Tiny 7 by eXPerience one day. I have a russian Roverbook Voyager CT5 W which is pretty old [2002-2004]. It has a 1.80 Ghz intel pentium 4 processer, 256 megabytes of ram, and a 27 gigabyte hard drive. As I was going to install it, I heard that you need a fresh partition on your hard drive to install Tiny 7. So I completely misunderstood that and thought that it ment you needed a fresh hard drive without any files on it [basically a computer without anything but bios]. I used some program that you boot at startup to completely wipe all the files off of the hard drive and completely screwed up. I later found that Tiny 7 won't install without bootcamp and without creating a partition. Which of course you need an os to perform that! So now I am left with a computer that is basically useless. Not only that, but it is my mom's very old laptop. Not to worry about files, I backed them up. Just that my parents might get pretty pissed that the laptop won't work [we have a family desktop so we basically forgot about this laptop, but I bet my parents will find out]. So maybe someone can tell me where i can get a pirated xp or something and how to boot it from usb, or maybe they have completely different advice for me. Maybe you can create a partition without an os????? Well now that you know my situation any and every response will be appreciated!!! Thanx :)</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/hardware-and-software/1">Hardware and Software</category>
			<dc:creator>temir</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/hardware-and-software/threads/455072/install-tiny7-onto-a-computer-without-an-os</guid>
		</item>
				<item>
			<title>unreachable code detected?</title>
			<link>http://www.daniweb.com/software-development/csharp/threads/455071/unreachable-code-detected</link>
			<pubDate>Wed, 22 May 2013 01:08:55 +0000</pubDate>
			<description>whats wrong with this code? It keeps giving me an &quot;unreachable code detected &quot; exception public static int search(string Registration) { // this method will search for registration, if found it will return the index value , else it will return max value + 1 for (int x = 0; ...</description>
			<content:encoded><![CDATA[ <p>whats wrong with this code? It keeps giving me an "unreachable code detected " exception</p>

<pre><code class="language-cs">public static int search(string Registration)
        {
            // this method will search for registration, if found it will return the index value , else it will return max value + 1          

            for (int x = 0; x &lt; numOfRowsCars; x++)
            {
                reg = ds1.Tables["tblCars"].Rows[x][2].ToString();
                MessageBox.Show(reg);
                if (Registration == reg)
                {
                    // Then return the index of the registration number 
                    return x;
                }
                else
                {
                    // Then return the max index + 1
                    return numOfRowsCars;
                }
            }                              
        }
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/csharp/61">C#</category>
			<dc:creator>pwolf</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/csharp/threads/455071/unreachable-code-detected</guid>
		</item>
				<item>
			<title>Suggestion: There should be a PHP forum</title>
			<link>http://www.daniweb.com/community-center/daniweb-community-feedback/threads/455070/suggestion-there-should-be-a-php-forum</link>
			<pubDate>Wed, 22 May 2013 00:13:40 +0000</pubDate>
			<description>I've noticed there isn't a php forum in the software development section. It would be cool if one could get created.</description>
			<content:encoded><![CDATA[ <p>I've noticed there isn't a php forum in the software development section. It would be cool if one could get created.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/community-center/daniweb-community-feedback/26">DaniWeb Community Feedback</category>
			<dc:creator>joshfizzle</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/community-center/daniweb-community-feedback/threads/455070/suggestion-there-should-be-a-php-forum</guid>
		</item>
				<item>
			<title>Up votes</title>
			<link>http://www.daniweb.com/community-center/daniweb-community-feedback/threads/455069/up-votes</link>
			<pubDate>Tue, 21 May 2013 22:05:42 +0000</pubDate>
			<description>I recently intended to upvote with a comment but accudently upvoted without comment. I then pressed the uparrow again to erase my previous upvote so that I could do it again. I added the comment, pressed uparrow and the comment was accepted, however after I refreshed the page I noticed ...</description>
			<content:encoded><![CDATA[ <p>I recently intended to upvote with a comment but accudently upvoted without comment.  I then pressed the uparrow again to erase my previous upvote so that I could do it again.  I added the comment, pressed uparrow and the comment was accepted, however after I refreshed the page I noticed that the member's rep was not changed.</p>

<p>Once an upvote without comment is made is it not possible to add comment so that the member's rep is increased?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/community-center/daniweb-community-feedback/26">DaniWeb Community Feedback</category>
			<dc:creator>Ancient Dragon</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/community-center/daniweb-community-feedback/threads/455069/up-votes</guid>
		</item>
				<item>
			<title>What does the while-statement mean and do?</title>
			<link>http://www.daniweb.com/software-development/cpp/threads/455068/what-does-the-while-statement-mean-and-do</link>
			<pubDate>Tue, 21 May 2013 20:41:17 +0000</pubDate>
			<description>Hi everyone I'm studying the part about while-statement but I don't understand the explanation in the book really well and the example doesn't work for me so I can't see it with my own eyes how it works. Can someone explain what the while-statement means and does? Also can you ...</description>
			<content:encoded><![CDATA[ <p>Hi everyone</p>

<p>I'm studying the part about while-statement but I don't understand the explanation in the book really well and the example doesn't work for me so I can't see it with my own eyes how it works.<br />
Can someone explain what the while-statement means and does? Also can you give an example that might work?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/cpp/8">C++</category>
			<dc:creator>Kareem Klas</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/cpp/threads/455068/what-does-the-while-statement-mean-and-do</guid>
		</item>
				<item>
			<title>Redirecting problem in the PHP code, Can you help</title>
			<link>http://www.daniweb.com/web-development/php/threads/455067/redirecting-problem-in-the-php-code-can-you-help</link>
			<pubDate>Tue, 21 May 2013 20:26:03 +0000</pubDate>
			<description>Hy All Im here again to ask for you help. I still in the begining to launch the site, and i found a major error. The theory is the following. I planning to start a Pay per download site, which mean the members upload a file and when somebody want ...</description>
			<content:encoded><![CDATA[ <p>Hy All</p>

<p>Im here again to ask for you help. I still in the begining to launch the site, and i found a major error. The theory is the following. I planning to start a Pay per download site, which mean the members upload a file and when somebody want to download it, they have to fill a short survey. After survey done, both me and them get money. The problem is i test the script, and when i open the donwload link  <a href="http://www.filemonster.org/download.php?id=11" rel="nofollow">http://www.filemonster.org/download.php?id=11</a> the page load, then immediately redirect and i get a following error "Stop trying to download without completing a survey." which is an anti cheat message. Its 100% wrong because its appears all the time. i paste here the code, do you know why its appear straight after the page load? Its just appear for me on the Firefox.</p>

<pre><code>&lt;?php 
ob_start();
session_start();
include_once('secure/core.php');
if (!isset($_GET['extra'])){    
    echo '&lt;script type="text/javascript"&gt;alert("Invalid access.");&lt;/script&gt;';
    die();
}
$path = $settings-&gt;getUploadPath();
$rand = mysql_real_escape_string($_GET['rand']);
$sql = "SELECT * FROM `conversions` WHERE `rand` = '$rand' and `converted` = '1'";
$result = mysql_query($sql);
$row = mysql_fetch_assoc($result);
$file = $row['file_id'];
if($row['converted'] == '1') {
if($row['downloaded'] == '0') {
$path = $settings-&gt;getUploadPath(); 
$sql5 = "select * from `uploads` where `id` = '$file'";
$row5 = $ado-&gt;fetch($ado-&gt;exec($sql5));
$sql6 = "UPDATE `conversions` SET `downloaded` = '1' WHERE `rand` = '$rand'";
$ado-&gt;exec($sql6);
set_time_limit(0);  

header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: public");
header("Content-Description: File Transfer");
header("Content-Type: application/force-download"); 
header("Content-Type: application/octet-stream"); 
header("Content-Type: application/download"); 
header("Content-Disposition: attachment; filename=\"".$row5['hash']."\"");
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($path.$row5['hash']));
ob_end_flush(); 
@readfile($path.$row5['hash']);
exit(0); 

} else {
echo '&lt;script type="text/javascript"&gt;alert("You have already downloaded this.");&lt;/script&gt;';
}
} else {
echo '&lt;script type="text/javascript"&gt;alert("Stop trying to download without completing a survey.");&lt;/script&gt;'; 
}
?&gt;
&lt;script type="text/javascript"&gt;
$('#myModal').modal('hide');
&lt;/script&gt;
</code></pre>

<p>Please if any of you have an idea, share with me</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/php/17">PHP</category>
			<dc:creator>rolanduk</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/php/threads/455067/redirecting-problem-in-the-php-code-can-you-help</guid>
		</item>
				<item>
			<title>Questions in Graphics</title>
			<link>http://www.daniweb.com/software-development/java/threads/455066/questions-in-graphics</link>
			<pubDate>Tue, 21 May 2013 20:14:02 +0000</pubDate>
			<description>Hello. I'm quite new to Java, but I've worked on Graphics before. I have a couple of questions which are: I want to make a night sky in Java with stars which randomly switch to big stars from small and back, repeating for a set time. I also want the ...</description>
			<content:encoded><![CDATA[ <p>Hello. I'm quite new to Java, but I've worked on Graphics before.</p>

<p>I have a couple of questions which are:</p>

<p>I want to make a night sky in Java with stars which randomly switch to big stars from small and back, repeating for a set time. I also want the changes of the star size to occur with opacity, so that they appeared to glisten.</p>

<p>Another thing I want to consider is I want to create a crescent moon, which will get off of the screen in a smooth movement across the screen, replaced with a smooth movement of sun with the background color to change in order to imitate the sky during the morning’s sunrise, and stars disappear as the sun gets to the center of the screen.</p>

<p>This is what I have so far, didn’t want to make any mistakes in the beginning in order to make the path easier to go.</p>

<pre><code class="language-java">import java.awt.*;
import java.applet.*;


public class NightSky extends Applet
{

    public void paint(Graphics g)
    {

    }
}
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/java/9">Java</category>
			<dc:creator>Start4me</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/java/threads/455066/questions-in-graphics</guid>
		</item>
				<item>
			<title>Read string in txt file</title>
			<link>http://www.daniweb.com/software-development/cpp/threads/455065/read-string-in-txt-file</link>
			<pubDate>Tue, 21 May 2013 19:56:03 +0000</pubDate>
			<description>Hi, imnewbie to c++ programming. Im want to read some txt file that have a data write inside. The data should be &quot;WAT1235&quot; which is the license plate number. Then if the programming read this data &quot;WTA1234&quot; it will give other information like the Roadtax, Colour of the car and ...</description>
			<content:encoded><![CDATA[ <p>Hi, imnewbie to c++ programming. Im want to read some txt file that have a data write inside. The data should be "WAT1235" which is the license plate number. Then if the programming read this data "WTA1234" it will give other information like the Roadtax, Colour of the car and etc. I want to display the output should be like :</p>

<p>OUTPUT DISPLAY:</p>

<p>WTA1235<br />
Information:<br />
Roadtax:.....<br />
ModelCar:.....<br />
etc..</p>

<p>This my coding for the fisrt step read the txt file, but have some error</p>

<pre><code class="language-cpp">Inline Code Example Here
#include &lt;iostream&gt;
#include &lt;fstream&gt;
#include &lt;string&gt;

using namespace std;

void main(){

    ifstream inFile;
    inFile.open("test.txt");

    //Check for Error
    if (inFile.fail()){
        cerr &lt;&lt; "Error Opening File" &lt;&lt; endl;
        exit(1);
    }
    return 0;
}
</code></pre>

<p>Any suggestion and discuss will very helpfull.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/cpp/8">C++</category>
			<dc:creator>sasukecold</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/cpp/threads/455065/read-string-in-txt-file</guid>
		</item>
				<item>
			<title>VC++: Catching an exception from MCIWndCreate</title>
			<link>http://www.daniweb.com/software-development/cpp/threads/455064/vc-catching-an-exception-from-mciwndcreate</link>
			<pubDate>Tue, 21 May 2013 19:26:34 +0000</pubDate>
			<description>I am using MCI controls to play media files within some software. For the most part, it works OK but sometimes things go poorly (e.g. when the media file is corrupt). How can I either put the code into a try/catch (i.e. what exception do I look for?) or how ...</description>
			<content:encoded><![CDATA[ <p>I am using MCI controls to play media files within some software.  For the most part, it works OK but sometimes things go poorly (e.g. when the media file is corrupt).</p>

<p>How can I either put the code into a try/catch (i.e. what exception do I look for?) or how can I check the file before running the code?  When it hits the MCIWndCreate... line it causes an MCI Error popup window that requires user interaction.  I would like for it stop trying to play the file (without any user interaction) and run another piece of code if the file is not playable.</p>

<pre><code class="language-cpp">HWND m_Video;
CString m_Path = "C:\\Path\\bad.mp3";
m_Video = NULL;

if(m_Video == NULL)
    m_Video = MCIWndCreate(this-&gt;GetSafeHwnd(), AfxGetInstanceHandle(), WS_CHILD | WS_VISIBLE|MCIWNDF_NOMENU,m_Path);
else
    MCIWndHome(m_Video);
int len = MCIWndGetLength(m_Video);
//code to modify len if needed is normally here
MCIWndPlayTo(m_Video, len);
</code></pre>

<p>Edit:  FWIW, it looks like the error that is being thrown is MCIERR_INVALID_FILE.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/cpp/8">C++</category>
			<dc:creator>donaldw</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/cpp/threads/455064/vc-catching-an-exception-from-mciwndcreate</guid>
		</item>
				<item>
			<title>Running .jar on Another pc in Department</title>
			<link>http://www.daniweb.com/software-development/java/threads/455063/running-.jar-on-another-pc-in-department</link>
			<pubDate>Tue, 21 May 2013 19:18:52 +0000</pubDate>
			<description>Hi All, I created a small executable that runs an SSIS project. It works on my system but when I tried using it on a colleagues system nothing happens. I'm not overly familiar with with part of Java so any suggestions will be most appreciated.</description>
			<content:encoded><![CDATA[ <p>Hi All,</p>

<p>I created a small executable that runs an SSIS project.  It works on my system but when I tried using it on a colleagues system nothing happens.  I'm not overly familiar with with part of Java so any suggestions will be most appreciated.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/java/9">Java</category>
			<dc:creator>Stuugie</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/java/threads/455063/running-.jar-on-another-pc-in-department</guid>
		</item>
				<item>
			<title>Rewarding Computer Science careers</title>
			<link>http://www.daniweb.com/community-center/geeks-lounge/threads/455062/rewarding-computer-science-careers</link>
			<pubDate>Tue, 21 May 2013 18:33:40 +0000</pubDate>
			<description>I'm soon to be a graduate in Computer Science with enough relevant experience to enter a good paying job as soon as I graduate. Having done software development however I'm not sure if it satisfies me on a personal level. The money's good... but the work is very repetitive and ...</description>
			<content:encoded><![CDATA[ <p>I'm soon to be a graduate in Computer Science with enough relevant experience to enter a good paying job as soon as I graduate. Having done software development however I'm not sure if it satisfies me on a personal level. The money's good... but the work is very repetitive and never feels like you're doing something that will have an impact in the world or the sciences. It will pay well but due to the hours one has to work in their life (8 hours per day) - I really don't think I can do software development for that long a period and be satisfied with my life when I look back, say when I'm 60 years old +.</p>

<p>What is a rewarding career that one can go on to from a degree like mine. Rewarding for me is something where a lot of people will benefit from something I'm producing OR it will make the world a better place OR it will give travel opportunities OR it will allow me more control over the work I'm doing OR it will provide me with the chance to do research into new interesting topics of study - any of those.</p>

<p>I've spoken to a few colleagues in the same profession and a lot of them seem to have the same view though they're hesitant to have it heard so to keep up an image but I hope some answers can be given that will be good advice to me and those with similar thoughts.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/community-center/geeks-lounge/6">Geeks' Lounge</category>
			<dc:creator>asif49</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/community-center/geeks-lounge/threads/455062/rewarding-computer-science-careers</guid>
		</item>
				<item>
			<title>How to repeat data entered to datagrid?</title>
			<link>http://www.daniweb.com/software-development/vbnet/threads/455061/how-to-repeat-data-entered-to-datagrid</link>
			<pubDate>Tue, 21 May 2013 18:06:41 +0000</pubDate>
			<description>Hey guys! Im making a orders system, I want to add a product individually into the datagrid,for example: If I add for example 5 gl of milk it will display like this: Quantity Description 5 GL Milk But I want it to display it like this: Quantity Description 1 GL ...</description>
			<content:encoded><![CDATA[ <p>Hey guys!</p>

<p>Im making a orders system, I want to add a product individually into the datagrid,for example:</p>

<p>If I add for example 5 gl of milk it will display like this:</p>

<pre><code class="language-vb">Quantity  Description
   5       GL Milk

  But I want it to display it like this:

  Quantity  Description
      1      GL Milk
      1      GL Milk
      1      GL Milk
      1      GL Milk
      1      GL Milk
</code></pre>

<p>I want to display the product in the datagrid the amount I entered in the quantity box.Do I have to make a loop?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/vbnet/58">VB.NET</category>
			<dc:creator>acepeda</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/vbnet/threads/455061/how-to-repeat-data-entered-to-datagrid</guid>
		</item>
				<item>
			<title>What did you all think of the xbox reveal?</title>
			<link>http://www.daniweb.com/community-center/geeks-lounge/threads/455060/what-did-you-all-think-of-the-xbox-reveal</link>
			<pubDate>Tue, 21 May 2013 18:05:42 +0000</pubDate>
			<description>What did you all think of the xbox reveal?</description>
			<content:encoded><![CDATA[ <p>What did you all think of the xbox reveal?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/community-center/geeks-lounge/6">Geeks' Lounge</category>
			<dc:creator>mat1998x</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/community-center/geeks-lounge/threads/455060/what-did-you-all-think-of-the-xbox-reveal</guid>
		</item>
				<item>
			<title>Does the RSS works well?</title>
			<link>http://www.daniweb.com/community-center/daniweb-community-feedback/threads/455059/does-the-rss-works-well</link>
			<pubDate>Tue, 21 May 2013 18:01:42 +0000</pubDate>
			<description>Hi everyone, I cannot subscribe to rss daniweb com/rss/pull/36/websites-for-sale at daniweb com/business-exchange/webmaster-marketplace/websites-for-sale/_/36 section May you help me with that?</description>
			<content:encoded><![CDATA[ <p>Hi everyone,</p>

<p>I cannot subscribe to rss daniweb com/rss/pull/36/websites-for-sale at  daniweb com/business-exchange/webmaster-marketplace/websites-for-sale/_/36 section</p>

<p>May you help me with that?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/community-center/daniweb-community-feedback/26">DaniWeb Community Feedback</category>
			<dc:creator>BestDeals</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/community-center/daniweb-community-feedback/threads/455059/does-the-rss-works-well</guid>
		</item>
				<item>
			<title>Scroll View</title>
			<link>http://www.daniweb.com/software-development/java/threads/455058/scroll-view</link>
			<pubDate>Tue, 21 May 2013 17:12:13 +0000</pubDate>
			<description>I'm trying to create a multiple choice quiz, and I need the content pane to scroll. If you run the program I've attached you'll see what I mean. Each question and the answers are place in a JPanel and the JPanels are place on the content pane. Thanks in advance ...</description>
			<content:encoded><![CDATA[ <p>I'm trying to create a multiple choice quiz, and I need the content pane to scroll.  If you run the program I've attached you'll see what I mean.  Each question and the answers are place in a JPanel and the JPanels are place on the content pane.  Thanks in advance for any help.</p>

<pre><code class="language-java">/*********************************************
        Multiple Choice Quiz
*********************************************/
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.border.EtchedBorder;

public class Quiz extends JFrame {
    /*********************
      Instance variables
    **********************/

        // Label and answer choices for question1 and JPanel to place components
    private JLabel header, question1;
    private JRadioButton answer1, answer2, answer3, answer4;
    private ButtonGroup question1Group;
    private JPanel question1JPanel;

        // question2
    private JLabel question2;
    private JRadioButton answer5, answer6, answer7, answer8;
    private ButtonGroup question2Group;
    private JPanel question2JPanel;

        // question3
    private JLabel question3;
    private JRadioButton answer9, answer10, answer11, answer12;
    private ButtonGroup question3Group;
    private JPanel question3JPanel;

        // question4
    private JLabel question4;
    private JRadioButton answer13, answer14, answer15, answer16;
    private ButtonGroup question4Group;
    private JPanel question4JPanel;

    /***********************
            Constructor
    ************************/
    public Quiz() {

        // get content pane for attaching GUI components
       Container contentPane = getContentPane();

        // enable explicit positioning of GUI components and set background color
       contentPane.setLayout( null );
        contentPane.setBackground(new Color(77, 0, 64));

        // Label for header
        header = new JLabel( "Linear Equations Quiz" );
        header.setBounds( 10, 5, 980, 24 );
        header.setOpaque( true );                      // for some components you must setOpaque
        header.setBackground( new Color(51, 0, 77) );  // to true before you can change the background color
        header.setForeground(Color.white);
        header.setBorder( BorderFactory.createRaisedBevelBorder() );
        contentPane.add( header );

        // Label for question1
        question1 = new JLabel("1) This is the question");
        question1.setBounds( 1, 5, 272, 24 );
        question1.setForeground(Color.white);
        question1.setBorder( BorderFactory.createEtchedBorder(EtchedBorder.RAISED) );

        // Create answer radioButtons for question1
        answer1 = new JRadioButton("answer #1");
        answer1.setBounds( 1, 30, 200, 24 );
        answer1.setForeground(Color.white);
        answer2 = new JRadioButton("answer #2");
        answer2.setBounds( 1, 55, 200, 24 );
        answer2.setForeground(Color.white);
        answer3 = new JRadioButton("answer #3");
        answer3.setBounds( 1, 80, 200, 24 );
        answer3.setForeground(Color.white);
        answer4 = new JRadioButton("answer #4");
        answer4.setBounds( 1, 105, 200, 24 );
        answer4.setForeground(Color.white);

        // Group answers for question1 together
        question1Group = new ButtonGroup();
        question1Group.add(answer1);
        question1Group.add(answer2);
        question1Group.add(answer3);
        question1Group.add(answer4);

        // set up JPanel (line 84: set place of object on contentPane(first parameter)
        // and line 88: enable explicit placement of GUI components)
      question1JPanel = new JPanel();
      question1JPanel.setBounds( 25, 35, 950, 150 );
        question1JPanel.setBackground( new Color(77, 0, 26) );
        question1JPanel.setForeground(Color.white);
      question1JPanel.setBorder( BorderFactory.createRaisedBevelBorder() );
      question1JPanel.setLayout( null );


        // add question label and add individual JRadioButtons to JPanel
        // (can't add ButtonGroup object to JPanel)
        question1JPanel.add( question1 );
        question1JPanel.add( answer1 );
        question1JPanel.add( answer2 );
        question1JPanel.add( answer3 );
        question1JPanel.add( answer4 );

        // add the question JPanel to the content pane
      contentPane.add( question1JPanel );

        /*************************************************
                    QUESTION2
        *************************************************/
        // Label for question2
        question2 = new JLabel("1) This is the  second question");
        question2.setBounds( 1, 5, 272, 24 );
        question2.setForeground(Color.white);
        question2.setBorder( BorderFactory.createEtchedBorder(EtchedBorder.RAISED) );

        // Create answer radioButtons for question2
        answer5 = new JRadioButton("answer #5");
        answer5.setBounds( 1, 30, 200, 24 );
        answer5.setForeground(Color.white);
        answer6 = new JRadioButton("answer #6");
        answer6.setBounds( 1, 55, 200, 24 );
        answer6.setForeground(Color.white);
        answer7 = new JRadioButton("answer #7");
        answer7.setBounds( 1, 80, 200, 24 );
        answer7.setForeground(Color.white);
        answer8 = new JRadioButton("answer #8");
        answer8.setBounds( 1, 105, 200, 24 );
        answer8.setForeground(Color.white);

        // Group answers for question2 together
        question2Group = new ButtonGroup();
        question2Group.add(answer5);
        question2Group.add(answer6);
        question2Group.add(answer7);
        question2Group.add(answer8);

        // set up JPanel (line 84: set place of object on contentPane(first parameter)
        // and line 88: enable explicit placement of GUI components)
      question2JPanel = new JPanel();
      question2JPanel.setBounds( 25, 195, 950, 150 );
        question2JPanel.setBackground( new Color(77, 0, 26) );
        question2JPanel.setForeground(Color.white);
      question2JPanel.setBorder( BorderFactory.createRaisedBevelBorder() );
      question2JPanel.setLayout( null );


        // add question label and add individual JRadioButtons to JPanel
        // (can't add ButtonGroup object to JPanel)
        question2JPanel.add( question2 );
        question2JPanel.add( answer5 );
        question2JPanel.add( answer6 );
        question2JPanel.add( answer7 );
        question2JPanel.add( answer8 );

        // add the question JPanel to the content pane
      contentPane.add( question2JPanel );

        /*************************************************
                    QUESTION3
        *************************************************/
        // Label for question3
        question3 = new JLabel("1) This is the  third question");
        question3.setBounds( 1, 5, 272, 24 );
        question3.setForeground(Color.white);
        question3.setBorder( BorderFactory.createEtchedBorder(EtchedBorder.RAISED) );

        // Create answer radioButtons for question3
        answer9 = new JRadioButton("answer #9");
        answer9.setBounds( 1, 30, 200, 24 );
        answer9.setForeground(Color.white);
        answer10 = new JRadioButton("answer #10");
        answer10.setBounds( 1, 55, 200, 24 );
        answer10.setForeground(Color.white);
        answer11 = new JRadioButton("answer #11");
        answer11.setBounds( 1, 80, 200, 24 );
        answer11.setForeground(Color.white);
        answer12 = new JRadioButton("answer #12");
        answer12.setBounds( 1, 105, 200, 24 );
        answer12.setForeground(Color.white);

        // Group answers for question2 together
        question3Group = new ButtonGroup();
        question3Group.add(answer9);
        question3Group.add(answer10);
        question3Group.add(answer11);
        question3Group.add(answer12);

        // set up JPanel 
      question3JPanel = new JPanel();
      question3JPanel.setBounds( 25, 355, 950, 150 );
        question3JPanel.setBackground( new Color(77, 0, 26) );
        question3JPanel.setForeground(Color.white);
      question3JPanel.setBorder( BorderFactory.createRaisedBevelBorder() );
      question3JPanel.setLayout( null );

        question3JPanel.add( question3 );
        question3JPanel.add( answer9 );
        question3JPanel.add( answer10 );
        question3JPanel.add( answer11 );
        question3JPanel.add( answer12 );

      contentPane.add( question3JPanel );
        /*************************************************
                    QUESTION4
        *************************************************/
        // Label for question4
        question4 = new JLabel("1) This is the fourth question");
        question4.setBounds( 1, 5, 272, 24 );
        question4.setForeground(Color.white);
        question4.setBorder( BorderFactory.createEtchedBorder(EtchedBorder.RAISED) );

        // Create answer radioButtons for question3
        answer13 = new JRadioButton("answer #13");
        answer13.setBounds( 1, 30, 200, 24 );
        answer13.setForeground(Color.white);
        answer14 = new JRadioButton("answer #14");
        answer14.setBounds( 1, 55, 200, 24 );
        answer14.setForeground(Color.white);
        answer15 = new JRadioButton("answer #15");
        answer15.setBounds( 1, 80, 200, 24 );
        answer15.setForeground(Color.white);
        answer16 = new JRadioButton("answer #16");
        answer16.setBounds( 1, 105, 200, 24 );
        answer16.setForeground(Color.white);

        // Group answers for question2 together
        question4Group = new ButtonGroup();
        question4Group.add(answer13);
        question4Group.add(answer14);
        question4Group.add(answer15);
        question4Group.add(answer16);

        // set up JPanel 
      question4JPanel = new JPanel();
      question4JPanel.setBounds( 25, 515, 950, 150 );
        question4JPanel.setBackground( new Color(77, 0, 26) );
        question4JPanel.setForeground(Color.white);
      question4JPanel.setBorder( BorderFactory.createRaisedBevelBorder() );
      question4JPanel.setLayout( null );

        question4JPanel.add( question4 );
        question4JPanel.add( answer13 );
        question4JPanel.add( answer14 );
        question4JPanel.add( answer15 );
        question4JPanel.add( answer16 );

      contentPane.add( question4JPanel );

        // set properties of application's window
       setTitle( "Quiz" );   // set title bar string
       setSize( 1000, 575 );  // set window size
       setVisible( true );   // display window
        setDefaultCloseOperation(EXIT_ON_CLOSE);// closes program when user exits

    }

    /************************
            Main Method
    *************************/
    public static void main( String[] args )
    {
        Quiz quiz = new Quiz();
    }

}
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/java/9">Java</category>
			<dc:creator>Dane2259</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/java/threads/455058/scroll-view</guid>
		</item>
				<item>
			<title>ImagickException memory allocation failed</title>
			<link>http://www.daniweb.com/web-development/php/threads/455057/imagickexception-memory-allocation-failed</link>
			<pubDate>Tue, 21 May 2013 17:05:50 +0000</pubDate>
			<description>Hi all, I have been getting ImagickException with imagick on my server but cannot reproduce it on my computer(localhost). This is when I try to call thumbnailImage(with, height, true) for a JPG exception 'ImagickException' with message 'Memory allocation failed `/tmp/funYYmdPl[0]' @ cache.c/AcquireCacheNexusPixels/416' This is when I call writeImages(path, true) for ...</description>
			<content:encoded><![CDATA[ <p>Hi all,</p>

<p>I have been getting ImagickException with imagick on my server but cannot reproduce it on my computer(localhost).</p>

<p>This is when I try to call thumbnailImage(with, height, true) for a JPG</p>

<p>exception 'ImagickException' with message 'Memory allocation failed <code>/tmp/funYYmdPl[0]' @ cache.c/AcquireCacheNexusPixels/416'
This is when I call writeImages(path, true) for a GIF
exception 'ImagickException' with message 'Memory allocation failed</code>/home/funsub/public_html/uploads/gif/45/45544.gif' @ gif.c/WriteGIFImage/1605'</p>

<p>These are my specs:<br />
ImageMagick 6.5.4-7 2012-05-07 Q16<br />
imagick module version 3.0.1<br />
PHP 5.3.24</p>

<p>I'm on VPS and have set disk usage and bandwidth for that cpanel to unlimited.</p>

<p>I've also tried increasing the php ram usage as well, the problem still occurs.</p>

<p>[root@server ~]# df -h<br />
Filesystem Size Used Avail Use% Mounted on<br />
/dev/vda3 72G 16G 54G 23% /<br />
tmpfs 427M 0 427M 0% /dev/shm<br />
/dev/vda1 195M 76M 110M 41% /boot<br />
/usr/tmpDSK 622M 50M 541M 9% /tmp</p>

<p>Any ideas why?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/php/17">PHP</category>
			<dc:creator>wplay</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/php/threads/455057/imagickexception-memory-allocation-failed</guid>
		</item>
				<item>
			<title>Help beginner with project</title>
			<link>http://www.daniweb.com/software-development/threads/455056/help-beginner-with-project</link>
			<pubDate>Tue, 21 May 2013 16:45:52 +0000</pubDate>
			<description>Need to do for school something that involves: &quot;Your final project must include at least two components from our study, which are CPU (ALU), memory (memory address, stack), and interface (input/output). Control part (Flag register application)is the optional choice.&quot; Any ideas or cool scripts in C/C++ or Linux HLA? Thanks ...</description>
			<content:encoded><![CDATA[ <p>Need to do for school something that involves: "Your final project must include at least two components from our study, which are CPU (ALU), memory (memory address, stack),  and interface (input/output). Control part (Flag register application)is the optional choice."</p>

<p>Any ideas or cool scripts in C/C++ or Linux HLA? Thanks for any help! :)</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/2">Software Development</category>
			<dc:creator>pabdylos</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/threads/455056/help-beginner-with-project</guid>
		</item>
				<item>
			<title>remove xmlurl from flash mp3 player</title>
			<link>http://www.daniweb.com/software-development/xml-xslt-and-xpath/threads/455055/remove-xmlurl-from-flash-mp3-player</link>
			<pubDate>Tue, 21 May 2013 16:38:07 +0000</pubDate>
			<description>Hi to all I got flash mp3 player from my friend and I wanna your help becuase I'm not well flash and my friend was moved to Africa, here the actionscripts 2.0 code. my question is I don't to use the plalist.xml file I want to use direct link in ...</description>
			<content:encoded><![CDATA[ <p>Hi to all I got flash mp3 player from my friend and I wanna your help becuase I'm not well flash and my friend was moved to Africa, here the actionscripts 2.0 code.</p>

<p>my question is I don't to use the plalist.xml file I want to use direct link in the embed code<br />
( name=flashvar value="xmlurl=song.mp3-- to value="mp3=<a href="http://mysite.com/song.mp3" rel="nofollow">http://mysite.com/song.mp3</a> instead"</p>

<p>player.fla<br />
player.swf<br />
playlist.xml</p>

<pre><code class="language-xml">stop();

var songs:Array = new Array();
var curtrack:Number = 0;
var playingsong:Sound = new Sound();
var _play:Boolean = false;
var playlistXml:XML = new XML();

if (_level0.xmlURL == undefined)
{
    xmlURL = _level0.xmlURL;
}
else
{
    xmlURL = _level0.xmlURL;
}

playlistXml.ignoreWhite = true;
playlistXml.load(xmlURL);
indicator.gotoAndStop(1);
progressslider._visible = false;
songtime._visible = false;
songtime_2._visible = false;
playpause.playpausebutton.onPress = function()
{
    load_song();
};

function load_song()
{
    loadSongs();
    loadSong(curtrack);
    _play = true;
    progressslider._visible = true;
    indicator.play();
    songtime._visible = true;
    songtime_2._visible = true;
}

function loadSongs()
{
    for (songIndex = 0; songIndex &lt; playlistXml.childNodes[0].childNodes[0].childNodes.length; songIndex++)
    {
        var songdata:Object = new Object();
        for (songNode = 0; songNode &lt; playlistXml.childNodes[0].childNodes[0].childNodes[songIndex].childNodes.length; songNode++)
        {
            switch (playlistXml.childNodes[0].childNodes[0].childNodes[songIndex].childNodes[songNode].nodeName)
            {
                case "creator" :
                    songdata.artist = playlistXml.childNodes[0].childNodes[0].childNodes[songIndex].childNodes[songNode].childNodes[0].nodeValue;
                    break;
                case "title" :
                    songdata.title = playlistXml.childNodes[0].childNodes[0].childNodes[songIndex].childNodes[songNode].childNodes[0].nodeValue;
                    break;
                case "location" :
                    songdata.location = playlistXml.childNodes[0].childNodes[0].childNodes[songIndex].childNodes[songNode].childNodes[0].nodeValue;
                    break;
            }
        }
        songs[songIndex] = songdata;
    }
}

function loadSong(track)
{
    playingsong = new Sound();
    playingsong.loadSound(songs[track].location,true);
    playingsong.start();
    updatevolume();
    playingsong.onSoundComplete = function()
    {
        playpause.gotoAndStop(1);
        indicator.gotoAndStop(1);
        playpause.playpausebutton.onPress = function()
        {
            loadSongs();
            loadSong(curtrack);
        };
    };
    playpause.gotoAndStop(2);
    indicator.play();
    playpause.playpausebutton.onPress = function()
    {
        toggleplaypause();
    };
    songdisplay.text = songs[track].artist + " - " + songs[track].title;
    eval("playlistbox.playlistitemcontainer.playlistitem" + curtrack + ".playlistitemhighlight")._alpha = 4;
    eval("playlistbox.playlistitemcontainer.playlistitem" + track + ".playlistitemhighlight")._alpha = 20;
    curtrack = track;
}

function toggleplaypause()
{
    if (playpause._currentframe == 1)
    {
        playpause.gotoAndStop(2);
        playpause.curpos = playingsong.position;
        playingsong.start(playpause.curpos / 1000,0);
        indicator.play();
    }
    else
    {
        playpause.gotoAndStop(1);
        playingsong.stop();
        indicator.stop();
    }
    playpause.playpausebutton.onPress = function()
    {
        toggleplaypause();
    };
}

onEnterFrame = function ()
{
    if (!draggingslider)
    {
        progressslider._x = (playingsong.position / playingsong.duration) * 249 + 130;
        if (progressslider._x == 0)
        {
            progressslider._x = 130;
        }
    }
    if (draggingvolmeslider)
    {
        updatevolume();
    }
    tempsongtime = "";
    if (Math.floor(playingsong.position / 60000) == 0)
    {
        tempsongtime += "0";
    }
    else
    {
        tempsongtime += Math.floor(playingsong.position / 60000);
    }
    tempsongtime += ":";
    if (Math.floor((playingsong.position / 1000) % 60) &lt; 10)
    {
        tempsongtime += "0";
    }
    tempsongtime += Math.floor((playingsong.position / 1000) % 60);
    tempsongtime += "                                                         ";
    if (Math.floor(playingsong.duration / 60000) == 0)
    {
        tempsongtime += "0";
    }
    else
    {
        tempsongtime += Math.floor(playingsong.duration / 60000);
    }
    tempsongtime += ":";
    if (Math.floor((playingsong.duration / 1000) % 60) &lt; 10)
    {
        tempsongtime += "0";
    }
    tempsongtime += Math.floor((playingsong.duration / 1000) % 60);
    songtime.text = tempsongtime;
    tempsongtime_2 = "";
    tempsongtime_2 += "";
    if (Math.floor(playingsong.duration / 60000) == 0)
    {
        tempsongtime_2 += "0";
    }
    else
    {
        tempsongtime_2 += Math.floor(playingsong.duration / 60000);
    }
    tempsongtime_2 += ":";
    if (Math.floor((playingsong.duration / 1000) % 60) &lt; 10)
    {
        tempsongtime_2 += "0";
    }
    tempsongtime_2 += Math.floor((playingsong.duration / 1000) % 60);
    songtime_2.text = tempsongtime_2;
};

progressslider.onPress = function()
{
    draggingslider = true;
    progressslider.startDrag(true,130,progressslider._y,374,progressslider._y);
};

progressslider.onRelease = progressslider.onReleaseOutside = function ()
{
    if (_play)
    {
        progressslider.stopDrag();
        playingsong.start(((progressslider._x - 130) / 249) * playingsong.duration / 1000,0);
        playpause.gotoAndStop(2);
        indicator.play();
        playpause.playpausebutton.onPress = function()
        {
            toggleplaypause();
        };
        draggingslider = false;
    }
};
progressbar.onPress = function()
{
    if (_play)
    {
        playingsong.start(((_xmouse - 130) / 249) * playingsong.duration / 1000,0);
        playpause.gotoAndStop(2);
        indicator.play();
        playpause.playpausebutton.onPress = function()
        {
            toggleplaypause();
        };
    }
};

volumebar.onPress = function()
{
    draggingvolmeslider = true;
    volumebar.volumeslider.startDrag(true,0,volumebar.volumeslider._y,47,volumebar.volumeslider._y);
};

volumebar.onRelease = volumebar.onReleaseOutside = function ()
{
    draggingvolmeslider = false;
    volumebar.volumeslider.stopDrag();
    updatevolume();
};

function updatevolume()
{
    playingsong.setVolume((volumebar.volumeslider._x / 47) * 100);
}stop();

var songs:Array = new Array();
var curtrack:Number = 0;
var playingsong:Sound = new Sound();
var _play:Boolean = false;
var playlistXml:XML = new XML();

if (_level0.xmlURL == undefined)
{
    xmlURL = _level0.xmlURL;
}
else
{
    xmlURL = _level0.xmlURL;
}

playlistXml.ignoreWhite = true;
playlistXml.load(xmlURL);
indicator.gotoAndStop(1);
progressslider._visible = false;
songtime._visible = false;
songtime_2._visible = false;
playpause.playpausebutton.onPress = function()
{
    load_song();
};

function load_song()
{
    loadSongs();
    loadSong(curtrack);
    _play = true;
    progressslider._visible = true;
    indicator.play();
    songtime._visible = true;
    songtime_2._visible = true;
}

function loadSongs()
{
    for (songIndex = 0; songIndex &lt; playlistXml.childNodes[0].childNodes[0].childNodes.length; songIndex++)
    {
        var songdata:Object = new Object();
        for (songNode = 0; songNode &lt; playlistXml.childNodes[0].childNodes[0].childNodes[songIndex].childNodes.length; songNode++)
        {
            switch (playlistXml.childNodes[0].childNodes[0].childNodes[songIndex].childNodes[songNode].nodeName)
            {
                case "creator" :
                    songdata.artist = playlistXml.childNodes[0].childNodes[0].childNodes[songIndex].childNodes[songNode].childNodes[0].nodeValue;
                    break;
                case "title" :
                    songdata.title = playlistXml.childNodes[0].childNodes[0].childNodes[songIndex].childNodes[songNode].childNodes[0].nodeValue;
                    break;
                case "location" :
                    songdata.location = playlistXml.childNodes[0].childNodes[0].childNodes[songIndex].childNodes[songNode].childNodes[0].nodeValue;
                    break;
            }
        }
        songs[songIndex] = songdata;
    }
}

function loadSong(track)
{
    playingsong = new Sound();
    playingsong.loadSound(songs[track].location,true);
    playingsong.start();
    updatevolume();
    playingsong.onSoundComplete = function()
    {
        playpause.gotoAndStop(1);
        indicator.gotoAndStop(1);
        playpause.playpausebutton.onPress = function()
        {
            loadSongs();
            loadSong(curtrack);
        };
    };
    playpause.gotoAndStop(2);
    indicator.play();
    playpause.playpausebutton.onPress = function()
    {
        toggleplaypause();
    };
    songdisplay.text = songs[track].artist + " - " + songs[track].title;
    eval("playlistbox.playlistitemcontainer.playlistitem" + curtrack + ".playlistitemhighlight")._alpha = 4;
    eval("playlistbox.playlistitemcontainer.playlistitem" + track + ".playlistitemhighlight")._alpha = 20;
    curtrack = track;
}

function toggleplaypause()
{
    if (playpause._currentframe == 1)
    {
        playpause.gotoAndStop(2);
        playpause.curpos = playingsong.position;
        playingsong.start(playpause.curpos / 1000,0);
        indicator.play();
    }
    else
    {
        playpause.gotoAndStop(1);
        playingsong.stop();
        indicator.stop();
    }
    playpause.playpausebutton.onPress = function()
    {
        toggleplaypause();
    };
}

onEnterFrame = function ()
{
    if (!draggingslider)
    {
        progressslider._x = (playingsong.position / playingsong.duration) * 249 + 130;
        if (progressslider._x == 0)
        {
            progressslider._x = 130;
        }
    }
    if (draggingvolmeslider)
    {
        updatevolume();
    }
    tempsongtime = "";
    if (Math.floor(playingsong.position / 60000) == 0)
    {
        tempsongtime += "0";
    }
    else
    {
        tempsongtime += Math.floor(playingsong.position / 60000);
    }
    tempsongtime += ":";
    if (Math.floor((playingsong.position / 1000) % 60) &lt; 10)
    {
        tempsongtime += "0";
    }
    tempsongtime += Math.floor((playingsong.position / 1000) % 60);
    tempsongtime += "                                                         ";
    if (Math.floor(playingsong.duration / 60000) == 0)
    {
        tempsongtime += "0";
    }
    else
    {
        tempsongtime += Math.floor(playingsong.duration / 60000);
    }
    tempsongtime += ":";
    if (Math.floor((playingsong.duration / 1000) % 60) &lt; 10)
    {
        tempsongtime += "0";
    }
    tempsongtime += Math.floor((playingsong.duration / 1000) % 60);
    songtime.text = tempsongtime;
    tempsongtime_2 = "";
    tempsongtime_2 += "";
    if (Math.floor(playingsong.duration / 60000) == 0)
    {
        tempsongtime_2 += "0";
    }
    else
    {
        tempsongtime_2 += Math.floor(playingsong.duration / 60000);
    }
    tempsongtime_2 += ":";
    if (Math.floor((playingsong.duration / 1000) % 60) &lt; 10)
    {
        tempsongtime_2 += "0";
    }
    tempsongtime_2 += Math.floor((playingsong.duration / 1000) % 60);
    songtime_2.text = tempsongtime_2;
};

progressslider.onPress = function()
{
    draggingslider = true;
    progressslider.startDrag(true,130,progressslider._y,374,progressslider._y);
};

progressslider.onRelease = progressslider.onReleaseOutside = function ()
{
    if (_play)
    {
        progressslider.stopDrag();
        playingsong.start(((progressslider._x - 130) / 249) * playingsong.duration / 1000,0);
        playpause.gotoAndStop(2);
        indicator.play();
        playpause.playpausebutton.onPress = function()
        {
            toggleplaypause();
        };
        draggingslider = false;
    }
};
progressbar.onPress = function()
{
    if (_play)
    {
        playingsong.start(((_xmouse - 130) / 249) * playingsong.duration / 1000,0);
        playpause.gotoAndStop(2);
        indicator.play();
        playpause.playpausebutton.onPress = function()
        {
            toggleplaypause();
        };
    }
};

volumebar.onPress = function()
{
    draggingvolmeslider = true;
    volumebar.volumeslider.startDrag(true,0,volumebar.volumeslider._y,47,volumebar.volumeslider._y);
};

volumebar.onRelease = volumebar.onReleaseOutside = function ()
{
    draggingvolmeslider = false;
    volumebar.volumeslider.stopDrag();
    updatevolume();
};

function updatevolume()
{
    playingsong.setVolume((volumebar.volumeslider._x / 47) * 100);
}
</code></pre>

<p>I hope you understand my question and will help me</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/xml-xslt-and-xpath/134">XML, XSLT and XPATH</category>
			<dc:creator>bashaash</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/xml-xslt-and-xpath/threads/455055/remove-xmlurl-from-flash-mp3-player</guid>
		</item>
				<item>
			<title>Thread tags and newbies</title>
			<link>http://www.daniweb.com/community-center/daniweb-community-feedback/threads/455053/thread-tags-and-newbies</link>
			<pubDate>Tue, 21 May 2013 15:36:47 +0000</pubDate>
			<description>Lately I have seen several threads that people have &quot;tagged&quot; as intended. Why is *tagged* in quotes? Because instead of putting *keywords* into the tags box, users are describing the question they're asking in the thread, and thus creating tags that look this way: **Time zone** `how` `to` `find` `frame` ...</description>
			<content:encoded><![CDATA[ <p>Lately I have seen several threads that people have "tagged" as intended. Why is <em>tagged</em> in quotes? Because instead of putting <em>keywords</em> into the tags box, users are describing the question they're asking in the thread, and thus creating tags that look this way:</p>

<p><strong>Time zone</strong><br /><code>how</code> <code>to</code> <code>find</code> <code>frame</code> <code>a</code> <code>standardize</code> <code>date</code> <code>time</code> <code>common</code> <code>for</code> <code>various</code> <code>zone?</code></p>

<p><strong>I cant create code login</strong><br /><code>3</code> <code>users</code> <code>using</code> <code>the</code> <code>login</code> <code>page</code></p>

<p><strong>How to cancel an add operation</strong><br /><code>cancel</code> <code>add</code> <code>operation</code> <code>and</code> <code>display</code> <code>last</code> <code>record</code> <code>from</code> <code>recordset</code></p>

<p>So, here's my suggestion: Make it so that when the user types a new tag, after hitting spacebar triggers an event that turns the last word into a 'tag' element/box/whatever. That way, there's a more clear idea that what you're inputting into the textbox are tags, and is not meant for a sentence or a description.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/community-center/daniweb-community-feedback/26">DaniWeb Community Feedback</category>
			<dc:creator>Nichito</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/community-center/daniweb-community-feedback/threads/455053/thread-tags-and-newbies</guid>
		</item>
				<item>
			<title>how to cancel an add operation</title>
			<link>http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/455052/how-to-cancel-an-add-operation</link>
			<pubDate>Tue, 21 May 2013 15:29:15 +0000</pubDate>
			<description>hi, i am working on development of a software project. i have used VB6.0 as frontend and MS Access as backend. In my project i have made a form in which i have to add,delete,search,move first,move last,move next and move previous options to keep tack of employee details. I want ...</description>
			<content:encoded><![CDATA[ <p>hi,<br />
i am working on development of a software project. i have used VB6.0 as frontend and MS Access as backend. In my project i have made a form in which i have to add,delete,search,move first,move last,move next and move  previous options to  keep tack of employee details. I want to know once i hve clicked on command button for "add record" and cancel he operation in between  what wil be the code for cancelling add operation.?<br />
how to cancel this operation and return back to  display the last recordd?<br />
need help as \soon as possible....thank you in advance</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/visual-basic-4-5-6/4">Visual Basic 4 / 5 / 6</category>
			<dc:creator>vinitatiska</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/455052/how-to-cancel-an-add-operation</guid>
		</item>
				<item>
			<title>i cant create the code to login</title>
			<link>http://www.daniweb.com/web-development/php/threads/455051/i-cant-create-the-code-to-login</link>
			<pubDate>Tue, 21 May 2013 15:00:01 +0000</pubDate>
			<description> &lt;!DOCTYPE html PUBLIC &quot;-//WAPFORUM//DTD XHTML Mobile 1.0//EN&quot; &quot;http://www.wapforum.org/DTD/xhtml-mobile10.dtd&quot;&gt; &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt; &lt;head&gt; &lt;link rel=&quot;icon&quot; type=&quot;image/png&quot; href=&quot;images/ump-logo.png&quot; /&gt; &lt;meta charset=&quot;utf-8&quot;&gt; &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot;&gt; &lt;title&gt;Universiti Malaysia Sabah&lt;/title&gt; &lt;link rel=&quot;stylesheet&quot; href=&quot;jquery.mobile-1.0.min.css&quot; /&gt; &lt;link rel=&quot;stylesheet&quot; href=&quot;_assets/css/jqm-docs.css&quot;/&gt; &lt;script src=&quot;jquery.js&quot;&gt;&lt;/script&gt; &lt;script src=&quot;_assets/js/jqm-docs.js&quot;&gt;&lt;/script&gt; &lt;script src=&quot;jquery.mobile-1.0.min.js&quot;&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div data-role=&quot;page&quot; class=&quot;type-index&quot;&gt; &lt;div data-role=&quot;header&quot; data-theme=&quot;f&quot;&gt; &lt;h1&gt;Sistem Kompaun Pelajar&lt;/h1&gt; &lt;a ...</description>
			<content:encoded><![CDATA[ <pre><code>&lt;!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "<a href="http://www.wapforum.org/DTD/xhtml-mobile10.dtd" rel="nofollow">http://www.wapforum.org/DTD/xhtml-mobile10.dtd</a>"&gt; 
&lt;html xmlns="<a href="http://www.w3.org/1999/xhtml" rel="nofollow">http://www.w3.org/1999/xhtml</a>"&gt;  
    &lt;head&gt;
        &lt;link rel="icon" 
      type="image/png" 
      href="images/ump-logo.png" /&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt; 
    &lt;title&gt;Universiti Malaysia Sabah&lt;/title&gt; 
    &lt;link rel="stylesheet"  href="jquery.mobile-1.0.min.css" /&gt;  
    &lt;link rel="stylesheet" href="_assets/css/jqm-docs.css"/&gt;
    &lt;script src="jquery.js"&gt;&lt;/script&gt;
    &lt;script src="_assets/js/jqm-docs.js"&gt;&lt;/script&gt;
    &lt;script src="jquery.mobile-1.0.min.js"&gt;&lt;/script&gt;
&lt;/head&gt; 
&lt;body&gt; 

    &lt;div data-role="page" class="type-index"&gt;

        &lt;div data-role="header" data-theme="f"&gt;
        &lt;h1&gt;Sistem Kompaun Pelajar&lt;/h1&gt;
            &lt;a href="index.php" data-icon="home" data-iconpos="notext" class="ui-btn-right"&gt;Home&lt;/a&gt;
    &lt;/div&gt;&lt;!-- /header --&gt;

    &lt;div data-role="content"&gt;

        &lt;ul data-role="listview" data-inset="true"&gt;
            &lt;li&gt;Login&lt;/li&gt;
            &lt;li&gt;
            &lt;form name="login" action="login-exec.php" method="post"&gt;
              &lt;label for="basic"&gt;Katanama&lt;/label&gt;

              &lt;label for="basic"&gt;:&lt;/label&gt;
            &lt;input type="text" name="login" id="login" value=""  /&gt;
            &lt;label for="basic"&gt;Katalaluan:&lt;/label&gt;
            &lt;input type="password" name="password" id="password" value=""  /&gt;
            &lt;select name="pilihan" id="pilihan" data-theme="b" data-overlay-theme="d" data-native-menu="false"&gt;
              &lt;option value=""&gt;Kategori&lt;/option&gt;
              &lt;option value="1"&gt;Pelajar&lt;/option&gt;
              &lt;option value="2"&gt;Staf&lt;/option&gt;
              &lt;option value="3"&gt;Admin&lt;/option&gt;
            &lt;/select&gt;
            &lt;button type="submit"&gt;Masuk&lt;/submit&gt;
            &lt;button type="reset"&gt;Padam&lt;/reset&gt;

              &lt;/form&gt;
            &lt;/li&gt;

        &lt;/ul&gt;

    &lt;/div&gt;&lt;!-- /ui-body wrapper --&gt;   
&lt;/div&gt;&lt;!-- /page --&gt;   
&lt;div align="right"&gt;


&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;




&lt;?php
    //Start session
    session_start();

    //Include database connection details
    include('config.php');

    //Array to store validation errors
    $errmsg_arr = array();

    //Validation error flag
    $errflag = false;

    //Connect to mysql server
    //$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
    //if(!$link) {
    //  die('Failed to connect to server: ' . mysql_error());
    //}

    //Select database
    $db = mysql_select_db($db_name);
    if(!$db) {
        die("Unable to select database");
    }

    //Function to sanitize values received from the form. Prevents SQL injection
    function clean($str) {
        $str = @trim($str);
        if(get_magic_quotes_gpc()) {
            $str = stripslashes($str);
        }
        return mysql_real_escape_string($str);
    }

    //Sanitize the POST values
    $login = clean($_POST['login']);
    $password = clean($_POST['password']);
    $pilihan = clean($_POST['pilihan']);

    //Input Validations
    if($login == '') {
        $errmsg_arr[] = 'Login ID missing';
        $errflag = true;
    }
    if($password == '') {
        $errmsg_arr[] = 'Password missing';
        $errflag = true;
    }
    if($pilihan == '') {
        $errmsg_arr[] = 'kesilapan';
        $errflag = true;
    }
    //If there are input validations, redirect back to the login form
    if($errflag) {
        $_SESSION['ERRMSG_ARR'] = $errmsg_arr;
        session_write_close();
        header("location: login.html");
        exit();
    }

    if($pilihan == 1){
    //Create query
    $qry="SELECT * FROM students WHERE user='$login' AND pwd='".md5($_POST['password'])."'";
    $result=mysql_query($qry);

    //Check whether the query was successful or not
    if($result) {
        if(mysql_num_rows($result) == 1) {
            //Login Successful
            session_regenerate_id();
            $member = mysql_fetch_assoc($result);
            $_SESSION['SESS_ID'] = $member['std_id'];
            $_SESSION['SESS_NAME'] = $member['nama'];
            session_write_close();
            header("location: students.php");
            exit();
        }else {
            //Login failed
            header("location: login-failed.html");
            exit();
        }
    }else {
        die("Query failed");
    }
    }
    if($pilihan == 2){
    //Create query
    $qry="SELECT * FROM staff WHERE username='$login' AND password='".md5($_POST['password'])."'";
    $result=mysql_query($qry);

    //Check whether the query was successful or not
    if($result) {
        if(mysql_num_rows($result) == 1) {
            //Login Successful
            session_regenerate_id();
            $member = mysql_fetch_assoc($result);
            $_SESSION['SESS_ID'] = $member['staff_id'];
            $_SESSION['SESS_NAME'] = $member['nama'];
            session_write_close();
            header("location: staff.php");
            exit();
        }else {
            //Login failed
            header("location: login-failed.html");
            exit();
        }
    }else {
        die("Query failed");
    }
    }
    else{
    header("location: login-failed.html");
    }
    if($pilihan == 3){
    //Create query
    $qry="SELECT * FROM admin WHERE username='$login' AND password='".md5($_POST['password'])."'";
    $result=mysql_query($qry);

    //Check whether the query was successful or not
    if($result) {
        if(mysql_num_rows($result) == 1) {
            //Login Successful
            session_regenerate_id();
            $member = mysql_fetch_assoc($result);
            $_SESSION['SESS_ID'] = $member['id'];
            $_SESSION['SESS_NAME'] = $member['nama'];
            session_write_close();
            header("location: admin.php");
            exit();
        }else {
            //Login failed
            header("location: login-failed.html");
            exit();
        }
    }else {
        die("Query failed");
    }
    }
    else{
    header("location: login-failed.html");
    }
?&gt;


//example for table student. the rest almost the same
` varchar(50) NOT NULL,
  `pwd` varchar(50) NOT NULL,
  `nama` varchar(50) NOT NULL,
  `std_id` varchar(50) NOT NULL,
  `std_ic` varchar(50) NOT NULL,
  `sekolah` varchar(50) NOT NULL,
  `kos` varchar(50) NOT NULL,
  `tahun` int(2) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=armscii8 COMMENT='student xda s d ujung k' AUTO_INCREMENT=2 ;





//config.php
&lt;?php
    define('DB_HOST', 'localhost');
    define('DB_USER', 'root');
    define('DB_PASSWORD', '');
    define('DB_DATABASE', 'ca10109');
?&gt;
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/php/17">PHP</category>
			<dc:creator>aqualove</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/php/threads/455051/i-cant-create-the-code-to-login</guid>
		</item>
				<item>
			<title>C programming</title>
			<link>http://www.daniweb.com/software-development/cpp/threads/455050/c-programming</link>
			<pubDate>Tue, 21 May 2013 14:42:57 +0000</pubDate>
			<description>Write a C++ program to compute and display a person's monthly salary as determined. If the status is Technician the person receives RM70 perday for 26 days work in a month. If the status is Lecturer the person receives RM200 perday for 26 days work in a month. if the ...</description>
			<content:encoded><![CDATA[ <p>Write a C++ program to compute and display a person's monthly salary as determined. If the status is Technician the person receives RM70 perday for 26 days work in a month. If the status is Lecturer the person receives RM200 perday for 26 days work in a month. if the status is Instructor the person receives RM150 perday for 26 days work in a month. The program should request the status as input and should display the salary ad output.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/cpp/8">C++</category>
			<dc:creator>selipar.jepun.712</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/cpp/threads/455050/c-programming</guid>
		</item>
				<item>
			<title>Best GIF resizing software</title>
			<link>http://www.daniweb.com/web-development/php/threads/455049/best-gif-resizing-software</link>
			<pubDate>Tue, 21 May 2013 14:40:01 +0000</pubDate>
			<description>Hi all, I'm currently using imagemagick to resize gifs for my site. But the compression doesn't seem really good. I've already tried optimizing it the best way I could, but it isn't satisfactory. Does anyone have recommendations for a better option? Tumblr's gif compression seems to be the best I've ...</description>
			<content:encoded><![CDATA[ <p>Hi all,</p>

<p>I'm currently using imagemagick to resize gifs for my site. But the compression doesn't seem really good.</p>

<p>I've already tried optimizing it the best way I could, but it isn't satisfactory. Does anyone have recommendations for a better option?</p>

<p>Tumblr's gif compression seems to be the best I've seen, was hoping if I could achieve similar results.</p>

<p>Thanks!</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/php/17">PHP</category>
			<dc:creator>wplay</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/php/threads/455049/best-gif-resizing-software</guid>
		</item>
				<item>
			<title>Ignoring event fires</title>
			<link>http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/455048/ignoring-event-fires</link>
			<pubDate>Tue, 21 May 2013 14:20:05 +0000</pubDate>
			<description>Hi I have an event listener attached to something which will fire a lot based on some user action that has occured on the page or some javscript change. Unfortunately it will be something like 5 or 6 fires in the space of 250ms and I am only interested in ...</description>
			<content:encoded><![CDATA[ <p>Hi</p>

<p>I have an event listener attached to something which will fire a lot based on some user action that has occured on the page or some javscript change. Unfortunately it will be something like 5 or 6 fires in the space of 250ms and I am only interested in the last fire so I can carry out the resource intensive processing. I'd like to ignore all of the fires before that.</p>

<p>Any way this can be achieved keeping in mind we don't know how many times it will fire.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/javascript-dhtml-ajax/117">JavaScript / DHTML / AJAX</category>
			<dc:creator>asif49</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/455048/ignoring-event-fires</guid>
		</item>
				<item>
			<title>Can you develop for iphone from windows?</title>
			<link>http://www.daniweb.com/hardware-and-software/apple/ios-iphone-os/threads/455047/can-you-develop-for-iphone-from-windows</link>
			<pubDate>Tue, 21 May 2013 13:56:12 +0000</pubDate>
			<description>So as I posted before I am thinking on buying an iphone. I want to get into mobile app dev. I dont have a mac (only windows) so I search and found a lot of articles that said that it is basicly imposible to write iphone apps from a windows ...</description>
			<content:encoded><![CDATA[ <p>So as I posted before I am thinking on buying an iphone. I want to get into mobile app dev. I dont have a mac (only windows) so I search and found a lot of articles that said that it is basicly imposible to write iphone apps from a windows OS. I really like the iphones but really dont want to buy a mac just to develop for iphone.</p>

<p>Is there realy no way or am I just missing it (as the same was said about c# on linux, then I found monoproject).<br />
And where can I get the development tools from then (for windows).</p>

<p>Thanks</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/hardware-and-software/apple/ios-iphone-os/101">iOS (iPhone OS)</category>
			<dc:creator>MasterHacker110</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/hardware-and-software/apple/ios-iphone-os/threads/455047/can-you-develop-for-iphone-from-windows</guid>
		</item>
				<item>
			<title>Login with other DB</title>
			<link>http://www.daniweb.com/web-development/php/threads/455046/login-with-other-db</link>
			<pubDate>Tue, 21 May 2013 13:42:52 +0000</pubDate>
			<description>Hey all, Been trying to work this out. But I'm stumped! Got a database running on Moodle. Want to create an external script which uses the usernames and passwords from the table moodle_user and the db Profiled_Moodle. Here is my page so far: &lt;?php include 'header/config.php';?&gt; &lt;div id=&quot;Container&quot;&gt; &lt;?php if ...</description>
			<content:encoded><![CDATA[ <p>Hey all,</p>

<p>Been trying to work this out. But I'm stumped!</p>

<p>Got a database running on Moodle. Want to create an external script which uses the usernames and passwords from the table moodle_user and the db Profiled_Moodle.</p>

<p>Here is my page so far:</p>

<pre><code>&lt;?php include 'header/config.php';?&gt;
&lt;div id="Container"&gt;
        &lt;?php
     if ($_POST['submit']) {

        //your dbname
        mysqli_select_db($con,'moodle_user') or die(mysql_error()); 

        $salt = '7(}AouN0sysQF#{]s@[F]Y~b]5E'; //change with your salt
        $password = md5($_POST['password'] . $salt);

    $username = $_POST['username'];


        $query = "SELECT * FROM moodle_user WHERE username = '{$_POST['username']}' AND password = '$password'";

        $result = mysql_query($query) or die(mysql_error());

        echo '&lt;pre&gt;' . $username ;

        while ($row = mysql_fetch_assoc($result)) {
            print_r($row);
            echo 'logged in as:' . $username;
        } 
    } else {
        echo "Not logged in";
    }
    ?&gt;
</code></pre>

<p>The reason I have that salt is because in moodle config.php I have that set.</p>

<pre><code>$CFG-&gt;passwordsaltmain = '7(}AouN0sysQF#{]s@[F]Y~b]5E';
</code></pre>

<p>When I login to the form. Nothing is happening? I'm not getting an echo or print</p>

<p>Thanks guys</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/php/17">PHP</category>
			<dc:creator>bradly.spicer</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/php/threads/455046/login-with-other-db</guid>
		</item>
				<item>
			<title>Recursion </title>
			<link>http://www.daniweb.com/software-development/csharp/threads/455045/recursion-</link>
			<pubDate>Tue, 21 May 2013 12:39:23 +0000</pubDate>
			<description>I wast just wondering guys how do you look at recursion , how do you apply it (i m not talking here about easy recursions like hannoi tower, factoriels, fibonnaci... wich are obvious). I m a beginner programmer and i understand the concept quite well but let s say a ...</description>
			<content:encoded><![CDATA[ <p>I  wast just wondering guys how do you look at recursion , how do you apply it (i m not talking here about easy recursions like  hannoi tower, factoriels, fibonnaci... wich are obvious). I m a beginner programmer and i understand the concept quite well but let s say a more complex problem appears than i would have to think hard and yet i would n t know how to apply recusion(in wich order to form the code so the recursion works on it). So my question is will i ever understand recursion, will it ever be the thing that i ll say that it s a piece of cake, and the other question is how did you guys get on with it, how did you understand it, how long did it  take to fully understand(i know that some of you have abstract minds and you pick it up fast..)<br />
PS. I know that tracing recursion is a bad idea.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/csharp/61">C#</category>
			<dc:creator>castajiz_2</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/csharp/threads/455045/recursion-</guid>
		</item>
				<item>
			<title>PC PROBLEM.</title>
			<link>http://www.daniweb.com/hardware-and-software/pc-hardware/motherboards-cpus-and-ram/threads/455044/pc-problem</link>
			<pubDate>Tue, 21 May 2013 12:27:55 +0000</pubDate>
			<description>needing some help about this matter. 1.) i changed the setting on BIOS pressed F10 then reboot and when i checked again the bios the setting i've changed wasn't saved. 2.) after the windows loading screen. it reboots by itself. please help me.</description>
			<content:encoded><![CDATA[ <p>needing some help about this matter.</p>

<p>1.) i changed the setting on BIOS pressed F10 then reboot and when i checked again the bios the setting i've changed wasn't saved.</p>

<p>2.) after the windows loading screen. it reboots by itself.</p>

<p>please help me.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/hardware-and-software/pc-hardware/motherboards-cpus-and-ram/104">Motherboards, CPUs and RAM</category>
			<dc:creator>aarviii</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/hardware-and-software/pc-hardware/motherboards-cpus-and-ram/threads/455044/pc-problem</guid>
		</item>
				<item>
			<title>&#039;Live&#039; updates of div without hammering server</title>
			<link>http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/455043/live-updates-of-div-without-hammering-server</link>
			<pubDate>Tue, 21 May 2013 12:18:08 +0000</pubDate>
			<description>We recently had our account suspended (without warning - thanks 1&amp;1) due to exceeding server load. The reason this happened was there were quite a few divs that were refreshing (via Ajax) every 9 seconds to give a 'live update' on the site (it is a sports site so this ...</description>
			<content:encoded><![CDATA[ <p>We recently had our account suspended (without warning - thanks 1&amp;1) due to exceeding server load.</p>

<p>The reason this happened was there were quite a few divs that were refreshing (via Ajax) every 9 seconds to give a 'live update' on the site (it is a sports site so this was to give live score updates etc).</p>

<p>Now I am looking for an alternative way of getting the same functionality without putting strain on the server and, ideally, not register a page hit on each refresh and hopefully someone can give me advice on the best way to go.</p>

<p>Currently, each of these divs call a seperate page which pulls data from a MySQL database. I have read that there are ways to check that file and only refresh the div if it has changed. Ideally, however, I would like to pull the data directly into the div, without using the middle page, and get that to update if the data in the database has changed.</p>

<p>Having said that, I am open to any suggestions or pointers that will give me the same live updates without running the risk of the host pulling the plug again!</p>

<p>Thanks<br />
Steve</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/javascript-dhtml-ajax/117">JavaScript / DHTML / AJAX</category>
			<dc:creator>MargateSteve</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/455043/live-updates-of-div-without-hammering-server</guid>
		</item>
				<item>
			<title>Schizophrenia and smoking</title>
			<link>http://www.daniweb.com/community-center/geeks-lounge/threads/455042/schizophrenia-and-smoking</link>
			<pubDate>Tue, 21 May 2013 12:08:06 +0000</pubDate>
			<description>http://en.wikipedia.org/wiki/Schizophrenia_and_smoking &gt; Studies across 20 countries show a strong association between schizophrenia and smoking.[1] For example, in the United States, 80% or more of schizophrenics smoke, compared to 20% of the general population in 2006.[2] &gt; Though it is well established that smoking is more prevalent among schizophrenics than the ...</description>
			<content:encoded><![CDATA[ <p><a href="http://en.wikipedia.org/wiki/Schizophrenia_and_smoking" rel="nofollow">http://en.wikipedia.org/wiki/Schizophrenia_and_smoking</a></p>

<blockquote>
  <p>Studies across 20 countries show a strong association between schizophrenia and smoking.[1] For example, in the United States, 80% or more of schizophrenics smoke, compared to 20% of the general population in 2006.[2]</p>
  
  <p>Though it is well established that smoking is more prevalent among schizophrenics than the general population as well as those with other psychiatric diagnoses, there is currently no definitive explanation for this difference.[3] Many social, psychological, and biological explanations have been proposed, but today research focuses on neurobiology.</p>
</blockquote>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/community-center/geeks-lounge/6">Geeks' Lounge</category>
			<dc:creator>Xantipius</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/community-center/geeks-lounge/threads/455042/schizophrenia-and-smoking</guid>
		</item>
				<item>
			<title>Global variables in Javascript class with functions?</title>
			<link>http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/455041/global-variables-in-javascript-class-with-functions</link>
			<pubDate>Tue, 21 May 2013 11:17:31 +0000</pubDate>
			<description>Hello I have this similar code: var SomeVar = Class.create({ one: null, two: null, three: null, initialize: function(one, two) { this.one = one; this.two = two; }, startListeners: function() { $j('#somediv1').mousedown(function(e) { this.three=3; three=&quot;hi&quot; }.bind(this)); $j('#somediv2').mousedown(function(e) { console.log(this.three); console.log(three); }.bind(this)); }, }); As you see there are more can one ...</description>
			<content:encoded><![CDATA[ <p>Hello</p>

<p>I have this similar code:</p>

<pre><code class="language-js">var SomeVar = Class.create({
    one: null,
    two: null,
    three: null,

initialize: function(one, two) {
        this.one = one;
        this.two = two;

    },

startListeners: function() {


        $j('#somediv1').mousedown(function(e) {


        this.three=3;
        three="hi"



        }.bind(this));


    $j('#somediv2').mousedown(function(e) {


        console.log(this.three);
        console.log(three);



        }.bind(this));
    },

});
</code></pre>

<p>As you see there are more can one variable called "three". What is the best way to have one common variable named three where I can modifiy it freely and it does not get deleted/destroyed everytime I do a mousedown on divone then on divtwo it comes out null.</p>

<p>It may be related but what the hell is "}.bind(this));"?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/javascript-dhtml-ajax/117">JavaScript / DHTML / AJAX</category>
			<dc:creator>riahc3</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/455041/global-variables-in-javascript-class-with-functions</guid>
		</item>
				<item>
			<title>How do I start out on Web Development?</title>
			<link>http://www.daniweb.com/web-development/threads/455040/how-do-i-start-out-on-web-development</link>
			<pubDate>Tue, 21 May 2013 10:59:28 +0000</pubDate>
			<description>I've been trying my best to read books on Java and Ajax no luck :/</description>
			<content:encoded><![CDATA[ <p>I've been trying my best to read books on</p>

<p>Java and Ajax no luck :/</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/31">Web Development</category>
			<dc:creator>napninjanx</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/threads/455040/how-do-i-start-out-on-web-development</guid>
		</item>
				<item>
			<title>Help, My DB do not insert more then three record.</title>
			<link>http://www.daniweb.com/web-development/php/threads/455039/help-my-db-do-not-insert-more-then-three-record</link>
			<pubDate>Tue, 21 May 2013 10:09:07 +0000</pubDate>
			<description>**Here is my code below:** &lt;?php if(isset($_POST['create'])) { // db connection $dbHost = &quot;localhost&quot;; $dbUser = &quot;root&quot;; $dbPass = &quot;&quot;; $dbName = &quot;emanage&quot;; $conn = mysql_connect($dbHost, $dbUser, $dbPass); if(!$conn){ die(mysql_error()); } mysql_select_db($dbName, $conn) or die(mysql_error()); // prevent mysql injection foreach ($_POST as $key =&gt; $value) { $_POST[$key] = mysql_real_escape_string(strip_tags($value)); } ...</description>
			<content:encoded><![CDATA[ <p><strong>Here is my code below:</strong></p>

<pre><code>&lt;?php

if(isset($_POST['create']))
{

    // db connection
    $dbHost = "localhost";
    $dbUser = "root";
    $dbPass = "";
    $dbName = "emanage";

    $conn = mysql_connect($dbHost, $dbUser, $dbPass);

    if(!$conn){
        die(mysql_error());
    }

    mysql_select_db($dbName, $conn) or die(mysql_error());

    // prevent mysql injection
    foreach ($_POST as $key =&gt; $value) {
        $_POST[$key] = mysql_real_escape_string(strip_tags($value));
    }

    // data container
    $name = $_POST['name'];
    $name = strtolower($name);
    $password = $_POST['password'];
    $password = md5($password);
    $type = $_POST['type'];
    $account = $_POST['account'];
    date_default_timezone_set('Asia/Dhaka');
    $time = date("h:i:s A");
    $date = date("D d M y");
    $create = ($date." @ ".$time);
    $ip = $_SERVER['REMOTE_ADDR'];
    $login = ($date." @ ".$time);
    $logout = ($date." @ ".$time);


    // error message
    $error = "";
    $success = "";          

    // check duplicate data
    $u_check = mysql_query('SELECT name FROM users WHERE name = "'. $name .'"');

    if(mysql_num_rows($u_check)&gt;0){             
     $error = "User name is already taken, try different one !!!";               
     mysql_close($conn);        
    }
    else{               

     // insert data into table
     mysql_query
     ("
        INSERT INTO users (id, name, password, type, account, create, ip, login, logout) 
        VALUES ('', '$name', '$password', '$type', '$account', '$create', '$ip', '$login', '$logout') 
     ");

     $id = mysql_insert_id();
     $get_id = mysql_query('SELECT * FROM users WHERE id = "'. $id .'"');
     $data = mysql_fetch_array($get_id);
     $success = '&lt;a class="u-name" href="add_info.php?id='.$data['id'].'"&gt;'.$data['name'].'&lt;/a&gt;'.' is created successfully.';
     mysql_close($conn);

    }
}

?&gt;
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" rel="nofollow">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>"&gt;
&lt;html xmlns="<a href="http://www.w3.org/1999/xhtml" rel="nofollow">http://www.w3.org/1999/xhtml</a>"&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;Add User&lt;/title&gt;

&lt;!-- Stylesheet --&gt;
&lt;link type="text/css" rel="stylesheet" href="css/reset.css" media="screen" /&gt;
&lt;link type="text/css" rel="stylesheet" href="css/style.css" media="screen" /&gt;
&lt;link rel="stylesheet" href="css/jquery-ui.css" /&gt;
&lt;style type="text/css"&gt;
#w-menu ul li .m_add_u{
    background: #FFFFFF url(img/add_u_hvr.png) top center no-repeat;
    color: #014949;
}
&lt;/style&gt;

&lt;!-- Javascript --&gt;
&lt;script type="text/javascript" src="js/jquery-1.9.1.min.js"&gt;&lt;/script&gt;
&lt;!-- Form Validation --&gt;
&lt;script type="text/javascript" src="js/jquery.bvalidator.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
    $(document).ready(function () {
        $('#create').bValidator();
    });
&lt;/script&gt;

&lt;/head&gt;

&lt;body&gt;

 &lt;div id="wrap"&gt;

  &lt;?php include 'admin_menu.php'; ?&gt;  

  &lt;div id="w-top-con"&gt;

   &lt;div class="top-con"&gt;



   &lt;/div&gt;

  &lt;/div&gt;

  &lt;div id="w-mid-con"&gt;

   &lt;div class="mid-con"&gt;

    &lt;h1&gt;Notice&lt;/h1&gt;

    &lt;ul class="font-style"&gt;Please read the guidance notes below, before completing the form :

     &lt;li class="pad-top"&gt;&lt;span&gt;•&lt;/span&gt; User Name must be &lt;span&gt;unique&lt;/span&gt;.&lt;/li&gt;
     &lt;li&gt;&lt;span&gt;•&lt;/span&gt; User Name can contain &lt;span&gt;alphabets&lt;/span&gt; &amp; &lt;span&gt;numbers&lt;/span&gt; only.&lt;/li&gt;
     &lt;li&gt;&lt;span&gt;•&lt;/span&gt; User Name characters length limit is from &lt;span&gt;4 to 20&lt;/span&gt;.&lt;/li&gt;
     &lt;li&gt;&lt;span&gt;•&lt;/span&gt; Password must be equal or more then &lt;span&gt;8 characters&lt;/span&gt; long.&lt;/li&gt;
     &lt;li&gt;&lt;span&gt;•&lt;/span&gt; Click on &lt;span&gt;underlined user name&lt;/span&gt; to add account information.&lt;/li&gt;
     &lt;li&gt;&lt;span&gt;•&lt;/span&gt; Marked ( &lt;span&gt;•&lt;/span&gt;) field can't be left empty.&lt;/li&gt;

    &lt;/ul&gt;

   &lt;/div&gt;

   &lt;div class="mid-con-2"&gt;

    &lt;h1&gt;Add User Account&lt;/h1&gt;

    &lt;form id="create" action="" method="post" enctype="multipart/form-data"&gt;
     &lt;ul&gt;

      &lt;?php if(!empty($success)) { ?&gt;
      &lt;li class="sc-notice"&gt;&lt;?php echo $success; ?&gt;&lt;/li&gt;
      &lt;?php } ?&gt;

      &lt;?php if(!empty($error)) { ?&gt;
      &lt;li class="er-notice"&gt;&lt;?php echo $error; ?&gt;&lt;/li&gt;
      &lt;?php } ?&gt;

      &lt;li&gt;
       &lt;small&gt;•&lt;/small&gt;
       &lt;label&gt;User Name&lt;/label&gt;
       &lt;span&gt;:&lt;/span&gt;
       &lt;input type="text" name="name" data-bvalidator="alphanum,rangelength[4:20],required" /&gt;
      &lt;/li&gt;
      &lt;li&gt;
       &lt;small&gt;•&lt;/small&gt;
       &lt;label&gt;Password&lt;/label&gt;
       &lt;span&gt;:&lt;/span&gt;
       &lt;input type="password" id="u_pass" name="password" data-bvalidator="minlength[8],required" /&gt;     
      &lt;/li&gt;
      &lt;li&gt;
       &lt;small&gt;•&lt;/small&gt;
       &lt;label&gt;Confirm Password&lt;/label&gt;
       &lt;span&gt;:&lt;/span&gt;
       &lt;input type="password"  data-bvalidator="equalto[u_pass],required" /&gt;     
      &lt;/li&gt;
      &lt;li&gt;
       &lt;small&gt;•&lt;/small&gt;
       &lt;label&gt;User Type&lt;/label&gt;
       &lt;span&gt;:&lt;/span&gt;
       &lt;select name="type" data-bvalidator="required,max[1],required" &gt;
        &lt;option value="" selected="selected"&gt;&lt;/option&gt;
        &lt;option value="admin"&gt;Admin&lt;/option&gt;
        &lt;option value="manager"&gt;Manager&lt;/option&gt;
        &lt;option value="stuff"&gt;Stuff&lt;/option&gt;
       &lt;/select&gt;    
      &lt;/li&gt;
      &lt;li&gt;
       &lt;small&gt;•&lt;/small&gt;
       &lt;label&gt;User Access&lt;/label&gt;
       &lt;span&gt;:&lt;/span&gt;
       &lt;select name="account" data-bvalidator="required,max[1],required" &gt;
        &lt;option value="" selected="selected"&gt;&lt;/option&gt;
        &lt;option value="activate"&gt;Activate&lt;/option&gt;
        &lt;option value="deactivate"&gt;Deactivate&lt;/option&gt;
       &lt;/select&gt;    
      &lt;/li&gt;
      &lt;li class="end-list"&gt;
       &lt;button type="reset"&gt;Clear&lt;/button&gt;
       &lt;button type="submit" name="create"&gt;Login&lt;/button&gt;     
      &lt;/li&gt;

     &lt;/ul&gt;
    &lt;/form&gt;

   &lt;/div&gt;

  &lt;/div&gt;

  &lt;?php include 'rit_content.php'; ?&gt;

 &lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p><strong>Here is my db structure</strong></p>

<p>CREATE TABLE IF NOT EXISTS <code>users</code> (<br /><code>id</code> int(11) NOT NULL AUTO_INCREMENT,<br /><code>name</code> varchar(30) NOT NULL,<br /><code>password</code> int(11) NOT NULL,<br /><code>type</code> varchar(30) NOT NULL,<br /><code>account</code> varchar(30) NOT NULL,<br /><code>create</code> varchar(30) NOT NULL,<br /><code>ip</code> varchar(30) NOT NULL,<br /><code>login</code> varchar(30) NOT NULL,<br /><code>logout</code> varchar(30) NOT NULL,<br />
  PRIMARY KEY (<code>id</code>)<br />
) ENGINE=InnoDB  DEFAULT CHARSET=latin1;</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/php/17">PHP</category>
			<dc:creator>adeeb.keyaam</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/php/threads/455039/help-my-db-do-not-insert-more-then-three-record</guid>
		</item>
				<item>
			<title>Specific Keyword URL Redirecting</title>
			<link>http://www.daniweb.com/web-development/php/threads/455038/specific-keyword-url-redirecting</link>
			<pubDate>Tue, 21 May 2013 09:40:10 +0000</pubDate>
			<description>I have script which has search engine to find mp3 songs, i need that if someone search the site with free mp3 songs or mp3 free songs both keywords has free keyword. i have redirected with header(); function through my coding in php but what about previously indexed urls with ...</description>
			<content:encoded><![CDATA[ <p>I have script which has search engine to find mp3 songs, i need that if someone search the site with free mp3 songs or mp3 free songs both keywords has free keyword.<br />
i have redirected with header(); function through my coding in php but what about previously indexed urls with these free kwyrod in google, if someone click on that url it will not redirecting to notfound.php page, i have to redirect those urls with .htacess file please help me<br />
my url pattern is <a href="http://mydomain.com/search/songs/free+mp3+songs.html" rel="nofollow">http://mydomain.com/search/songs/free+mp3+songs.html</a><br />
please help me, my redirecting is working if someone type in text box and hit the search button but its not working if you just directly implement this free keyword in already generated url and hit the enter button it will show up with results i need this too redirect to notfound.php page thanks!</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/php/17">PHP</category>
			<dc:creator>4fridi</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/php/threads/455038/specific-keyword-url-redirecting</guid>
		</item>
				<item>
			<title>Newest newbie</title>
			<link>http://www.daniweb.com/community-center/community-introductions/threads/455037/newest-newbie</link>
			<pubDate>Tue, 21 May 2013 09:26:52 +0000</pubDate>
			<description>I am a first year mechatronics student who is interested in sustainable buildings and home automation. I am therefore interested in learning a little more programming than necessary for my degree. Hoping to improve my beginner understanding of programming by finding friendly people happy to help an absolute newbie out.</description>
			<content:encoded><![CDATA[ <p>I am a first year mechatronics student who is interested in sustainable buildings and home automation. I am therefore interested in learning a little more programming than necessary for my degree. Hoping to improve my beginner understanding of programming by finding friendly people happy to help an absolute newbie out.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/community-center/community-introductions/165">Community Introductions</category>
			<dc:creator>mjtague</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/community-center/community-introductions/threads/455037/newest-newbie</guid>
		</item>
				<item>
			<title>how to copy string array dynamically </title>
			<link>http://www.daniweb.com/software-development/c/threads/455036/how-to-copy-string-array-dynamically-</link>
			<pubDate>Tue, 21 May 2013 09:13:18 +0000</pubDate>
			<description>hey guys I need help with this I have no idea how to work this out please help me with like atleast the starting coding i am trying to google too but i cannot find any info on this. ***&quot;char * copyString( const char * s ); copyString returns a ...</description>
			<content:encoded><![CDATA[ <p>hey guys I need help with this I have no idea how to work this out please help me with like atleast the starting coding i am trying to google too but i cannot find any info on this.</p>

<p><strong><em>"char * copyString( const char * s );<br />
copyString returns a dynamically allocated copy of the arg string.<br />
For instance, if s were “CAT”, then copyString allocated a 4-byte array, sets that array to “CAT”, and returns the address of the first element of the dynamically allocated array. As usual, deallocation is the caller’s responsibility."</em></strong></p>

<p>this is the function that i am suppose to have please can some one point me in the right direction.<br />
 thank you</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/c/118">C</category>
			<dc:creator>shark101</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/c/threads/455036/how-to-copy-string-array-dynamically-</guid>
		</item>
				<item>
			<title>1 JS to run across several unknown pages</title>
			<link>http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/455035/1-js-to-run-across-several-unknown-pages</link>
			<pubDate>Tue, 21 May 2013 08:52:13 +0000</pubDate>
			<description>I have script which will run across multiple pages I don't know about. Say I want to replace some text within it. I attempt to do it by looping through every element on the page and checking if it matches the regex before replacing it but keep getting this... SCRIPT5007: ...</description>
			<content:encoded><![CDATA[ <p>I have script which will run across multiple pages I don't know about. Say I want to replace some text within it. I attempt to do it by looping through every element on the page and checking if it matches the regex before replacing it but keep getting this...</p>

<p>SCRIPT5007: Unable to get value of the property 'go': object is null or undefined<br />
rs=AItRSTO5xlMcJYBeFTggpnLiO7-4oJljag, line 1533 character 260<br />
SCRIPT5007: Unable to get value of the property 'go': object is null or undefined<br />
rs=AItRSTO5xlMcJYBeFTggpnLiO7-4oJljag, line 1533 character 260</p>

<p>Or on some pages instead of 'go' it lists another property. Anyone know what this could mean?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/javascript-dhtml-ajax/117">JavaScript / DHTML / AJAX</category>
			<dc:creator>asif49</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/455035/1-js-to-run-across-several-unknown-pages</guid>
		</item>
				<item>
			<title>Update Label.Text during Buttons Click Event</title>
			<link>http://www.daniweb.com/software-development/vbnet/threads/455034/update-label.text-during-buttons-click-event</link>
			<pubDate>Tue, 21 May 2013 08:47:34 +0000</pubDate>
			<description>I have a label that I would like to update with the current operation being done in a button's click event. Sample code: Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click 'Process 1.... lblProcess.Text = &quot;Now processing process1&quot; 'Process 2.... lblProcess.Text = &quot;Now processing process2&quot; 'Process ...</description>
			<content:encoded><![CDATA[ <p>I have a label that I would like to update with the current operation being done in a button's click event. Sample code:</p>

<pre><code class="language-vb">Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
'Process 1....
 lblProcess.Text = "Now processing process1"
 'Process 2....
 lblProcess.Text = "Now processing process2"
'Process 3....
 lblProcess.Text = "Now processing process3"
End Sub
</code></pre>

<p>I have tried placing the label inside an update panel but it doesn't work. It only displays the last process. I have also tried calling a Javascript function to update the label.text but still no go.</p>

<p>What would be the best way to achieve this? Please help..</p>

<p>Thanks in advance.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/vbnet/58">VB.NET</category>
			<dc:creator>jiecerbo31</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/vbnet/threads/455034/update-label.text-during-buttons-click-event</guid>
		</item>
				<item>
			<title>Zip Command Error</title>
			<link>http://www.daniweb.com/software-development/python/threads/455033/zip-command-error</link>
			<pubDate>Tue, 21 May 2013 08:32:06 +0000</pubDate>
			<description> Hello , In this python script that do backup of folders , i just dont know why when i execute it printed : &gt; Sauvegarde reussie vers E:\20130521 &gt; Echec de la sauvegarde That means that this part : zip_command = &quot;zip -qr {0} {1}&quot;.format(target, ' '.join(source)) # lancement de ...</description>
			<content:encoded><![CDATA[ <p>Hello ,</p>

<p>In this python script that do backup of folders , i just dont know why when i execute it printed :</p>

<blockquote>
  <p>Sauvegarde reussie vers E:\20130521<br />
  Echec de la sauvegarde</p>
</blockquote>

<p>That means that this part :</p>

<pre><code class="language-py">zip_command = "zip -qr {0} {1}".format(target, ' '.join(source))

# lancement de la sauvegarde

if os.system(zip_command) == 0:
    print 'Sauvegarde reussite vers', target

else:
    print 'Echec de la sauvegarde'
</code></pre>

<p>don't work on windows xp , how can i use zip command in python , this is all the script :</p>

<pre><code class="language-py">#!/usr/bin/python
#-*- coding:Utf-8 -*-

import os
import time
import sys


source = []

# 1. Les fichiers et repertoires a sauver sont indiques dans une liste.

source = ['C:\Documents and Settings\Administrateur.PC\Bureau\Python' ]

# Notez qu'il faut utiliser des double quotes a l'interieur la chaine pour les noms de fichiers avec des espaces.
 # 2. la sauvegarde est rangee dans un repertoire a part.

target_dir = 'E:'

today = target_dir + os.sep + time.strftime('%Y%m%d')
now = time.strftime('%H%M%S')

# Creer le sous-repertoire s'il n'existe pas

if not os.path.exists(today):
    os.mkdir(today) # cree le repertoire


 # 3. Les fichiers sont places dans une archive zip.
# 4. Le jour courant est le nom du sous-repertoire dans le repertoire principal

today = target_dir + os.sep + time.strftime('%Y%m%d')

# L'heure courante est le nom de l'archive zip

now = time.strftime('%H%M%S')

 # Creer le sous-repertoire s'il n'existe pas

if not os.path.exists(today):
    os.mkdir(today) # cree le repertoire

print 'Sauvegarde reussie vers', today

 # Le nom du fichier zip

target = today + os.sep + now + '.zip'

# 5. Nous utilisons la commande zip pour creer une archive

zip_command = "zip -qr {0} {1}".format(target, ' '.join(source))

# lancement de la sauvegarde

if os.system(zip_command) == 0:
    print 'Sauvegarde reussite vers', target

else:
    print 'Echec de la sauvegarde'
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/python/114">Python</category>
			<dc:creator>Ismatus3</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/python/threads/455033/zip-command-error</guid>
		</item>
				<item>
			<title>Copying files in cmd</title>
			<link>http://www.daniweb.com/hardware-and-software/microsoft-windows/threads/455032/copying-files-in-cmd</link>
			<pubDate>Tue, 21 May 2013 08:27:06 +0000</pubDate>
			<description>I am wondering how to copy files in cmd, but it isn't that simple. I know how to copy normally, but I would like to combine multiple items(Which I also know how to do). My problem comes in when I try to organize the files into folders My file structure ...</description>
			<content:encoded><![CDATA[ <p>I am wondering how to copy files in cmd, but it isn't that simple. I know how to copy normally, but I would like to combine multiple items(Which I also know how to do). My problem comes in when I try to organize the files into folders</p>

<p>My file structure looks like this</p>

<pre><code>MainFolder
    -Output
    -Images
    -Files
</code></pre>

<p>and I would like to combine an image and a a file and put it into the output.</p>

<p>If I try</p>

<pre><code>copy /b Images/img.png+Files/file.zip Output/out.png
</code></pre>

<p>It does not work, and gives me a "The syntax of the command is incorrect"</p>

<p>If I try putting quotes around each of the directories in the above statement it says the file is not found. Is there any way accomplish this task without all the files being in the same folder?</p>

<p>Thanks for the help.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/hardware-and-software/microsoft-windows/99">Microsoft Windows</category>
			<dc:creator>sirlink99</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/hardware-and-software/microsoft-windows/threads/455032/copying-files-in-cmd</guid>
		</item>
				<item>
			<title>tftp server package is needed to run PXES of redhat 9.0 is?</title>
			<link>http://www.daniweb.com/hardware-and-software/linux-and-unix/threads/455031/tftp-server-package-is-needed-to-run-pxes-of-redhat-9.0-is</link>
			<pubDate>Tue, 21 May 2013 08:05:21 +0000</pubDate>
			<description>tftp server package is needed to run PXES of redhat 9.0 is?</description>
			<content:encoded><![CDATA[ <p>tftp server package is needed to run PXES of redhat 9.0 is?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/hardware-and-software/linux-and-unix/12">Linux and Unix</category>
			<dc:creator>billy.umpel</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/hardware-and-software/linux-and-unix/threads/455031/tftp-server-package-is-needed-to-run-pxes-of-redhat-9.0-is</guid>
		</item>
				<item>
			<title>Getting data from Vimeo XML</title>
			<link>http://www.daniweb.com/web-development/asp/threads/455030/getting-data-from-vimeo-xml</link>
			<pubDate>Tue, 21 May 2013 08:01:31 +0000</pubDate>
			<description>I am trying to parse the XML for Vimeo clips, so that I can populate the thumbnail, Title and description on an ASP page. I can set the tartget to the Vimeo XML file, but cannot for the life of me get the actual content, let alsone isolate and use ...</description>
			<content:encoded><![CDATA[ <p>I am trying to parse the XML for Vimeo clips, so that I can populate the thumbnail, Title and description on an ASP page.</p>

<p>I can set the tartget to the Vimeo XML file, but cannot for the life of me get the actual content, let alsone isolate and use the various elements.</p>

<p>The XML generated for any clip is the same, here is an example:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;videos&gt;
&lt;video&gt;
&lt;id&gt;32748327&lt;/id&gt;
&lt;title&gt;Crafty - short film&lt;/title&gt;
&lt;description&gt;
A crafty housewife gets more than she bargained for when an activist shows up at her door. Starring Jenny Hagel and Amy Phillips.&lt;br /&gt; &lt;br /&gt; Screenings include Palm Springs International Shortfest, Nashville Film Festival, and Frameline: The San Francisco LGBT Film Festival&lt;br /&gt; Broadcast on The Logo Channel (MTV Networks)&lt;br /&gt; DVD release through Strand Releasing
&lt;/description&gt;
&lt;url&gt;<a href="http://vimeo.com/32748327" rel="nofollow">http://vimeo.com/32748327</a>&lt;/url&gt;
&lt;upload_date&gt;2011-11-27 15:14:18&lt;/upload_date&gt;
&lt;mobile_url&gt;<a href="http://vimeo.com/m/32748327" rel="nofollow">http://vimeo.com/m/32748327</a>&lt;/mobile_url&gt;
&lt;thumbnail_small&gt;<a href="http://b.vimeocdn.com/ts/221/767/221767629_100.jpg" rel="nofollow">http://b.vimeocdn.com/ts/221/767/221767629_100.jpg</a>&lt;/thumbnail_small&gt;
&lt;thumbnail_medium&gt;<a href="http://b.vimeocdn.com/ts/221/767/221767629_200.jpg" rel="nofollow">http://b.vimeocdn.com/ts/221/767/221767629_200.jpg</a>&lt;/thumbnail_medium&gt;
&lt;thumbnail_large&gt;<a href="http://b.vimeocdn.com/ts/221/767/221767629_640.jpg" rel="nofollow">http://b.vimeocdn.com/ts/221/767/221767629_640.jpg</a>&lt;/thumbnail_large&gt;
&lt;user_id&gt;3116245&lt;/user_id&gt;
&lt;user_name&gt;Erik Gernand&lt;/user_name&gt;
&lt;user_url&gt;<a href="http://vimeo.com/erikgernand" rel="nofollow">http://vimeo.com/erikgernand</a>&lt;/user_url&gt;
&lt;user_portrait_small&gt;<a href="http://b.vimeocdn.com/ps/760/760227_30.jpg" rel="nofollow">http://b.vimeocdn.com/ps/760/760227_30.jpg</a>&lt;/user_portrait_small&gt;
&lt;user_portrait_medium&gt;<a href="http://b.vimeocdn.com/ps/760/760227_75.jpg" rel="nofollow">http://b.vimeocdn.com/ps/760/760227_75.jpg</a>&lt;/user_portrait_medium&gt;
&lt;user_portrait_large&gt;<a href="http://b.vimeocdn.com/ps/760/760227_100.jpg" rel="nofollow">http://b.vimeocdn.com/ps/760/760227_100.jpg</a>&lt;/user_portrait_large&gt;
&lt;user_portrait_huge&gt;<a href="http://b.vimeocdn.com/ps/760/760227_300.jpg" rel="nofollow">http://b.vimeocdn.com/ps/760/760227_300.jpg</a>&lt;/user_portrait_huge&gt;
&lt;stats_number_of_likes&gt;4&lt;/stats_number_of_likes&gt;
&lt;stats_number_of_plays&gt;4948&lt;/stats_number_of_plays&gt;
&lt;stats_number_of_comments&gt;0&lt;/stats_number_of_comments&gt;
&lt;duration&gt;499&lt;/duration&gt;
&lt;width&gt;640&lt;/width&gt;
&lt;height&gt;360&lt;/height&gt;
&lt;tags&gt;comedy, film, lesbian, activist&lt;/tags&gt;
&lt;embed_privacy&gt;anywhere&lt;/embed_privacy&gt;
&lt;/video&gt;
&lt;/videos&gt;
</code></pre>

<p>The code I use on a page, should be able to get all the bits and show a thumbnail of the clip, which will then become a link to a modal page which will then run the actual video.</p>

<p>The code I am trying to work with is as follows, which is on a test page to see if I can use both YouYube and Vimeo clips and the URL is checked to see if it contais "vimeo":</p>

<pre><code>  &lt;% 

 ClipURL=Request("Clip") %&gt;


  &lt;% If (InStr(ClipURL,"vimeo"))&lt;&gt;0 Then 
response.Write("Vimeo Clip")

ClipID=Replace(ClipURL, "<a href="http://vimeo.com/" rel="nofollow">http://vimeo.com/</a>", "")
' run the code to show the clip %&gt;
  &lt;br /&gt;
  &lt;% XML_file ="<a href="http://vimeo.com/api/v2/video/" rel="nofollow">http://vimeo.com/api/v2/video/</a>"&amp; ClipID&amp;".xml" %&gt;&lt;br /&gt;
  &lt;%=XML_file  %&gt; &lt;a href="&lt;%= XML_file %&gt;" target="_blank"&gt;Link to the XML file&lt;/a&gt;&lt;br /&gt;

 &lt;br /&gt;



  &lt;%' code snippet from existing example on DaniWeb - has not results
' Create new XML reader object
Dim xmlDoc
Set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")
' Load the specified XML file (returns XML output)
xmlDoc.load("<a href="http://vimeo.com/api/v2/video/" rel="nofollow">http://vimeo.com/api/v2/video/</a>"&amp; ClipID&amp;".xml")
' Parse XML
if xmlDoc.parseError.errorcode &lt;&gt; 0 then
  ' oops error in xml
  Response.Write("XML Error...&lt;br&gt;")
else
  ' get xml data
  Response.Write(xmlDoc.documentElement.childNodes(0).attributes.getNamedItem("code").nodeValue)
end if
%&gt;   

 &lt;% 'Thumbnail from the XML file to display here %&gt;

&lt;br /&gt;

&lt;/p&gt;
&lt;iframe src="<a href="http://player.vimeo.com/video/" rel="nofollow">http://player.vimeo.com/video/</a>&lt;%= ClipID %&gt;" width="500" height="281" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen&gt;&lt;/iframe&gt; 


So far I have had no luck at all with this and any assistance would be greatly appreciated.
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/asp/62">ASP</category>
			<dc:creator>HansK</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/asp/threads/455030/getting-data-from-vimeo-xml</guid>
		</item>
				<item>
			<title>how to create a dialog from a thread that is not a UI thread in android</title>
			<link>http://www.daniweb.com/software-development/mobile-development/threads/455029/how-to-create-a-dialog-from-a-thread-that-is-not-a-ui-thread-in-android</link>
			<pubDate>Tue, 21 May 2013 07:52:33 +0000</pubDate>
			<description>hey could anyone please tell me how to create a dialog from a background thread that is not a UI thread in Android?? something like this.. Thread t=new Thread(new Runnable() { @Override public void run() { Thread innerThread=new Thread(new Runnable() { @Override public void run() { /////***** i need to ...</description>
			<content:encoded><![CDATA[ <p>hey could anyone please tell me how to create a dialog from a background thread that is not a UI thread in Android??<br />
something like this..</p>

<pre><code>Thread t=new Thread(new Runnable() {
    @Override
    public void run() {
        Thread innerThread=new Thread(new Runnable() {
            @Override
            public void run() {
                /////***** i need to create a dialog here *****////
                /////***** but the dialog doesn't appear or it closes too soon
                /////      to be able to record a user input *****////
            }
        });
    }
});
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/mobile-development/181">Mobile Development</category>
			<dc:creator>cool_zephyr</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/mobile-development/threads/455029/how-to-create-a-dialog-from-a-thread-that-is-not-a-ui-thread-in-android</guid>
		</item>
				<item>
			<title>Google I/O 2013: an Android developer&#039;s preview</title>
			<link>http://www.daniweb.com/community-center/geeks-lounge/threads/455028/google-io-2013-an-android-developers-preview</link>
			<pubDate>Tue, 21 May 2013 07:00:11 +0000</pubDate>
			<description>The summer is approaching and that means one thing for mobile developers - a whole new set of toys, discoveries, and skills are on the horizon. Seemingly for continuity, Google I/O, Apple WWDC and Microsoft Build are all taking place at the Moscone Center (Moscone West pictured, top) in San ...</description>
			<content:encoded><![CDATA[ <p>The summer is approaching and that means one thing for mobile developers - a whole new set of toys, discoveries, and skills are on the horizon. Seemingly for continuity, Google I/O, Apple WWDC and Microsoft Build are all taking place at the Moscone Center (Moscone West pictured, top) in San Francisco, California. With Google being the first major event for developers this summer, the time is ripe to reflect on last year's conference and let you know what we expect to see at Google I/O 2013.<br />
Google parachuted into the headlines at I/O 2012 with Google Glass. It set a new level for innovation that set the pulses of developers racing in anticipation for the future of wearable technology. But some would argue that Google Glass was a clever tactic to divert attention away from one of the biggest challenges developers still face when building for Android - fragmentation.<br />
Despite the announcement of Android 4.1 Jelly Bean, 38.4 per cent of all Android phones are still running on the ageing Gingerbread (version 2.3x). This isn't entirely Google's fault, though - handset manufacturers and operators understandably want to ensure the services they add to Android work. This means end users have to wait for updates, and makes reaching those users more of a challenge for Android developers. As this is largely out of Google's control,<a href="http://www.epubconverter.com/" rel="nofollow">EPUB Converter</a> we don't expect this to change at I/O 2013. What we do expect is an unveiling of Android 5.0 Key Lime Pie.<br />
We can only speculate on Google I/O rumours, but with Key Lime Pie, we're expecting to see a raft of new features for Android, including Google Babel, a new Google Play Games centre, and a refreshed Google Maps interface. Cosmetically, Android receives extra polish with every new version that is released – a trend we fully expect to continue.<br />
One area where we hope to see improvements is security. With BYOD becoming more prevalent, the enterprise market needs to know that it can support Android devices without too much worry. When Samsung released KNOX on the Galaxy S4, members of Google's Android team must have felt a certain amount of unease: it's hardly the best endorsement of a platform's security when a manufacturer launches its own security apparatus to make the enterprise market feel more at ease. With BlackBerry now back in the game and offering its enterprise services on iOS and Android, now is certainly the time for Google to address this issue once and for all.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/community-center/geeks-lounge/6">Geeks' Lounge</category>
			<dc:creator>Khloe5495</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/community-center/geeks-lounge/threads/455028/google-io-2013-an-android-developers-preview</guid>
		</item>
				<item>
			<title>slide show in Joomla v1.5</title>
			<link>http://www.daniweb.com/web-development/threads/455027/slide-show-in-joomla-v1.5</link>
			<pubDate>Tue, 21 May 2013 06:52:37 +0000</pubDate>
			<description> Hello,everybody.I am designing a web site with Joomla v1.5 .And I want to display 10 images which are in .jpg format [1.jpg to 10.jpg] as a slide show on the top of all my web pages,I mean that;those images displayed one after one and repeatedly and automatically. Would you please ...</description>
			<content:encoded><![CDATA[ <p>Hello,everybody.I am designing a web site with Joomla v1.5 .And I want to display<br />
10 images which are in .jpg format [1.jpg to 10.jpg] as a slide show on the top<br />
of all my web pages,I mean that;those images displayed one after one and repeatedly<br />
and automatically.<br />
Would you please tell me how can I make that?<br />
And how can I add a music at my web pages?</p>

<pre><code>                                  Thanks,
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/31">Web Development</category>
			<dc:creator>bobyx</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/threads/455027/slide-show-in-joomla-v1.5</guid>
		</item>
				<item>
			<title>Get the Total Number of the records separated by $ sign in a text file</title>
			<link>http://www.daniweb.com/software-development/vbnet/threads/455026/get-the-total-number-of-the-records-separated-by-sign-in-a-text-file</link>
			<pubDate>Tue, 21 May 2013 06:42:23 +0000</pubDate>
			<description>Hello, Could someone please assist here? I have a program that reads a text file and copys the contents separated by a $ sign and writes the details to another new text file excluding the $ Sign. What I need assistance is to do a count and get the total ...</description>
			<content:encoded><![CDATA[ <p>Hello,<br />
 Could someone please assist here? I have a program that reads a text file and copys the contents separated by a $ sign and writes the details to another new text file excluding the $ Sign. What I need assistance is to do a count and get the total records separate by the $ sign. Eg. ajasasaj$testing%878788%%$lkshhajsjah<br />
 for the above the total count would be 3. What I want is the 3 value. so how could I get that 3? Please assist at your earliest.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/vbnet/58">VB.NET</category>
			<dc:creator>kipslem</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/vbnet/threads/455026/get-the-total-number-of-the-records-separated-by-sign-in-a-text-file</guid>
		</item>
				<item>
			<title>Step Count in Algorithm</title>
			<link>http://www.daniweb.com/software-development/computer-science/threads/455025/step-count-in-algorithm</link>
			<pubDate>Tue, 21 May 2013 06:35:28 +0000</pubDate>
			<description>What is the step count for this in terms of n ? SequentialSearch(a,x,n) { i=n; a [0]=x; while(a [i]!= x) do i = i-1 return i }</description>
			<content:encoded><![CDATA[ <p>What is the step count for this in terms of n ?</p>

<pre><code class="language-tex">SequentialSearch(a,x,n)
{
i=n;
a [0]=x;
while(a [i]!= x) do
i = i-1
return i
}
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/computer-science/14">Computer Science</category>
			<dc:creator>Om</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/computer-science/threads/455025/step-count-in-algorithm</guid>
		</item>
				<item>
			<title>improve response time of search engine</title>
			<link>http://www.daniweb.com/internet-marketing/search-engine-optimization/threads/455024/improve-response-time-of-search-engine</link>
			<pubDate>Tue, 21 May 2013 06:28:11 +0000</pubDate>
			<description>how to improve response time and throughput of search engine with web caching? Give me practicle example of this.? Thanks in advance..</description>
			<content:encoded><![CDATA[ <p>how to improve response time and throughput of search engine with web caching?<br />
Give me practicle example of this.?<br />
Thanks in advance..</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/internet-marketing/search-engine-optimization/45">Search Engine Optimization</category>
			<dc:creator>n5555</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/internet-marketing/search-engine-optimization/threads/455024/improve-response-time-of-search-engine</guid>
		</item>
				<item>
			<title>General</title>
			<link>http://www.daniweb.com/software-development/xml-xslt-and-xpath/threads/455023/general</link>
			<pubDate>Tue, 21 May 2013 06:22:25 +0000</pubDate>
			<description>Hai everyone. I am new to this discussion. Can anyone tell me about basic XML site map creation</description>
			<content:encoded><![CDATA[ <p>Hai everyone. I am new to this discussion. Can anyone tell me about basic XML site map creation</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/xml-xslt-and-xpath/134">XML, XSLT and XPATH</category>
			<dc:creator>lisaedward</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/xml-xslt-and-xpath/threads/455023/general</guid>
		</item>
				<item>
			<title>How to do the calculation with more flexible</title>
			<link>http://www.daniweb.com/software-development/csharp/threads/455022/how-to-do-the-calculation-with-more-flexible</link>
			<pubDate>Tue, 21 May 2013 05:54:21 +0000</pubDate>
			<description>Hi, Assume I am having following set of textbox controls in winform. 1. txt_subject1 with Alais &quot;S1&quot; 2. txt_subject2 with Alais &quot;S2&quot; 3. txt_subject3 with Alais &quot;S3&quot; 4. txt_totalCredit with Alais &quot;T1&quot; I am maintaining all the formulas in xml file. So that If anything changes in formula, no need ...</description>
			<content:encoded><![CDATA[ <p>Hi,</p>

<p>Assume I am having following set of textbox controls in winform.<br />
1. txt_subject1 with Alais "S1"<br />
2. txt_subject2 with Alais "S2"<br />
3. txt_subject3 with Alais "S3"<br />
4. txt_totalCredit with Alais "T1"</p>

<p>I am maintaining all the formulas in xml file. So that If anything changes in formula, no need to tocuh code, I can simply modify in XMl itself.</p>

<p>&lt;Formula&gt;<br />
  &lt;for name="Total Marks" value="S1+S2+S3"&gt;&lt;/for&gt;<br />
  &lt;for name="SGPA" value="(S1+S2+S3)/T1"&gt;&lt;/for&gt;<br />
&lt;/Formula&gt;</p>

<p>Now my objective is to calculte the Total Marks and SGPA based on that formula mentioned in XML file.</p>

<p>Please suggest me a way to proceed..(optimized way)</p>

<p>Thanks in Advance.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/csharp/61">C#</category>
			<dc:creator>visweswaran28</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/csharp/threads/455022/how-to-do-the-calculation-with-more-flexible</guid>
		</item>
				<item>
			<title>Please help..</title>
			<link>http://www.daniweb.com/software-development/csharp/threads/455020/please-help</link>
			<pubDate>Tue, 21 May 2013 05:16:49 +0000</pubDate>
			<description>I have 2 parameters ID - txtID.text Name - txtName.text I would like to select (SQL): SELECT ID ,NAME FROM TABLE WHERE If ID is not null read in txtID If Name is not null read in txtName If ID is null read all in select statement If Name not ...</description>
			<content:encoded><![CDATA[ <p>I have 2 parameters</p>

<p>ID - txtID.text<br />
Name - txtName.text</p>

<p>I would like to select (SQL):</p>

<pre><code class="language-cs">SELECT
    ID
    ,NAME
FROM 
    TABLE
WHERE
</code></pre>

<p>If ID is not null read in txtID<br />
If Name is not null read in txtName</p>

<p>If ID is null read all in select statement<br />
If Name not null read all in select statement</p>

<p>Please help. Thank you!</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/csharp/61">C#</category>
			<dc:creator>jaejoong</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/csharp/threads/455020/please-help</guid>
		</item>
				<item>
			<title>[ask]</title>
			<link>http://www.daniweb.com/software-development/vbnet/threads/455019/ask</link>
			<pubDate>Tue, 21 May 2013 05:00:25 +0000</pubDate>
			<description>Hello, who can help me to get the source code (VB.NET) from this application (http://www.4shared.com/file/fch3Wylw/InheritedForm2.html)</description>
			<content:encoded><![CDATA[ <p>Hello, who can help me to get the source code (VB.NET) from this application (<a href="http://www.4shared.com/file/fch3Wylw/InheritedForm2.html" rel="nofollow">http://www.4shared.com/file/fch3Wylw/InheritedForm2.html</a>)</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/vbnet/58">VB.NET</category>
			<dc:creator>ear92</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/vbnet/threads/455019/ask</guid>
		</item>
				<item>
			<title>How to replace email string on java</title>
			<link>http://www.daniweb.com/software-development/java/threads/455017/how-to-replace-email-string-on-java</link>
			<pubDate>Tue, 21 May 2013 03:22:51 +0000</pubDate>
			<description>i want to replace email string, so example@example.com become examplexxxxxxx i code like this but it did not work : String input=&quot;$!email&quot;; String output = input.replaceAll(&quot;@$&quot;, &quot;x&quot;); System.out.println(output); Please help</description>
			<content:encoded><![CDATA[ <p>i want to replace email string, so example@example.com become examplexxxxxxx</p>

<p>i code like this but it did not work :</p>

<pre><code class="language-java">String input="$!email";  
String output = input.replaceAll("@$", "x");
System.out.println(output);
</code></pre>

<p>Please help</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/java/9">Java</category>
			<dc:creator>silent lover</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/java/threads/455017/how-to-replace-email-string-on-java</guid>
		</item>
				<item>
			<title>How to Proceed</title>
			<link>http://www.daniweb.com/web-development/databases/ms-sql/threads/455016/how-to-proceed</link>
			<pubDate>Tue, 21 May 2013 03:01:01 +0000</pubDate>
			<description>I am trying to learn SQL programming in my spare time, but I'm running into some issues. I currently have Visual Basic Studio 2010 installed, as well as Microsoft SQL Server 2008/2012. I've been told that I should be using MySQL to practice the coding. Should I lean towards MySQL ...</description>
			<content:encoded><![CDATA[ <p>I am trying to learn SQL programming in my spare time, but I'm running into some issues.  I currently have Visual Basic Studio 2010 installed, as well as Microsoft SQL Server 2008/2012.  I've been told that I should be using MySQL to practice the coding.  Should I lean towards MySQL in order to learn the language? (I am currently installing MySQL Workbench as we speak)....</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/databases/ms-sql/127">MS SQL</category>
			<dc:creator>PDB1982</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/databases/ms-sql/threads/455016/how-to-proceed</guid>
		</item>
				<item>
			<title>Convert String value in property Datatype in Jena API</title>
			<link>http://www.daniweb.com/software-development/java/threads/455015/convert-string-value-in-property-datatype-in-jena-api</link>
			<pubDate>Tue, 21 May 2013 02:37:59 +0000</pubDate>
			<description>Hi all I have a piece of program in which i am taking input from another jframe and then using that input i am trying to show results from RDF/XML file, now the issue is that i am trying to convert that input(which is obviouslyin string) to Property datatype of ...</description>
			<content:encoded><![CDATA[ <p>Hi all<br />
I have a piece of program in which i am taking input from another jframe and then using that input i am trying to show results from RDF/XML file, now the issue is that i am trying to convert that input(which is obviouslyin string) to Property datatype of RDF Model in Jena API. here is the code</p>

<pre><code class="language-java"> bean bn = new bean();
 System.out.println(" bn.gettext()" +  bn.gettext());
 Property reqP = model.getProperty(bn.gettext());
</code></pre>

<p>in third line of this above code i have also tried<br /><code>Property reqP = (Property) model.read(in, bn.gettext());</code></p>

<p>but i am not getting the desired results so please someone help me with this issue. I need it solve ASAP :(</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/java/9">Java</category>
			<dc:creator>FaisalSarfraz</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/java/threads/455015/convert-string-value-in-property-datatype-in-jena-api</guid>
		</item>
				<item>
			<title>JAVA</title>
			<link>http://www.daniweb.com/software-development/java/threads/455014/java</link>
			<pubDate>Tue, 21 May 2013 02:14:30 +0000</pubDate>
			<description>hey guys, i'm new to java ,,,and i have a problem wish u to get ur answer ASAP i'm reading from a text file by PrintWriter , and there are 3 rows first row is ID second row is name and third row is address. and i want to get ...</description>
			<content:encoded><![CDATA[ <p>hey guys,<br />
i'm new to java ,,,and i have a problem wish u to get ur answer ASAP<br />
i'm reading from a text file by PrintWriter , and there are 3 rows first row is ID<br />
second row is name and third row is address. and i want to get the IDs into the java program so<br />
that i could call a name with it.for example : if in the text file 001 is linked to "name" i want to call<br />
that name by calling the id in the program....thanks.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/java/9">Java</category>
			<dc:creator>lody</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/java/threads/455014/java</guid>
		</item>
				<item>
			<title>Deleting an element from a struct array</title>
			<link>http://www.daniweb.com/software-development/c/threads/455013/deleting-an-element-from-a-struct-array</link>
			<pubDate>Tue, 21 May 2013 01:41:06 +0000</pubDate>
			<description>I'm working on a struct array and I need to dynamically delete elements from the struct. I have the added dynamically but I've run into some issues with deleting. I've researched different methods and tried a few. I found that one from here works, in that it will delete the ...</description>
			<content:encoded><![CDATA[ <p>I'm working on a struct array and I need to dynamically delete elements from the struct.  I have the added dynamically but I've run into some issues with deleting.  I've researched different methods and tried a few.  I found that one from here works, in that it will delete the entry but then using the view function won't print out the new array and crashes.  I think it needs to be sorted but when I add my sort function it crashes before returning to the menu.  The other method I tried also deleted the element through the index value but when viewed just outputted a bunch a symbols.  Here's what I have.  I commented out the 2nd method I used to see if that one in the end is easier to modify to work.  Any help in the right direction would be beneficial.</p>

<pre><code class="language-c">#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;string.h&gt;
#include &lt;sys/types.h&gt; /* not required for unix */
#include &lt;sys/stat.h&gt;  /* stat */

struct person {
   char firstname[12];
   char lastname[12];
   char birthdate[11];
};

void view(struct person *p, int max);
void swap(struct person *a, struct person *b);
void psort(struct person *p, int hi);

int add(struct person *p, int max);   /* prompt for first, last, and bd (in main) */ 
int del(struct person *p, int max);                               /* prompt for index value (in main)         */

int main(void)
{
   struct stat st;
   char choice;
   FILE *f;
   char filename[80] = "p19.db";
   int i, n, max=5, size, done = 0;

   struct person *p, *t;

   struct person porig[5] = {{"Jack","Smith","1993-05-05"},{"Julie","Allen","1992-05-09"},
                             {"Cori","Murdock","1990-05-11"},{"Suzi","Hall","1980-04-30"},
                             {"Sami","Sundance","1972-05-05"} };

   char menu[] = "(v)iew (+)add (-)del (?)search (a)ge (s)ave (q)uit ?  ";

   f = fopen(filename,"wb");       /* write binary file */
   fwrite(porig,sizeof(struct person),max,f);
   fclose(f);

   if( stat(filename,&amp;st)==0 )
   {
      if (st.st_mode &amp; S_IFREG )
      {
         int i;
         f = fopen(filename,"rb"); /* read binary file  */
         size = st.st_size;
         t = p = (struct person *) malloc(size);
         if ( fread(p,1,size,f)==size )
         {
            max = size/(sizeof(struct person)); 
            //printf("BEFORE sort()\n");
            //view(p,max);
            //psort(p,max);         /* test psort()       */
            //printf("AFTER sort()\n");
            //view(p,max);
            //free(p);
         }
         else
            printf("Error in reading %s\n", filename);
      }
      else
         printf("%s is not a regular file\n",filename);
   } 
   else
      printf("Unable to open %s\n", filename);

   while ( !done )
   {
      printf("%s", menu);
      scanf("%s", &amp;choice);
      switch(choice)
      {
         case 'v': view(p,max);        break;
         case '+': 
         //struct person *t = p;
         p = add(p,max);
         if ( p==t )
             ;
         else
             max = max + 1;
         break;
         case '-': 
            p = del(p,i);
            if(p==t)
            {
               ;
            }   
            else
            {
               max = max - 1;
            }
            //psort(p,max);   
         break;
         case 'q': done = 1;           break;
         default: printf("Invalid choice.\n");
      }
   }
   printf("Done.\n");



   getchar();
   getchar(); /* system pause hack */
   return 0;
}
void view(struct person *p, int max)
{
   int i=0;
   struct person *t = p; 
   for(i=0;i&lt;max;i++,t++)
      printf("[%d]%13s%13s%11s\n", i, t-&gt;firstname, t-&gt;lastname, t-&gt;birthdate);
}
void swap(struct person *a, struct person *b)
{
   struct person tempa = *a;
   *a = *b;
   *b = tempa;
}
int indexOfMin(struct person *p, int hi)
{
   int i, mindex = 0;
   for(i=1;i&lt;hi;i++)
   {
      if ( strcmp((p+i)-&gt;lastname,(p+mindex)-&gt;lastname )&lt; 0 )
         mindex = i;
      else
         ;
   }
   return mindex;
}
void psort(struct person *p, int hi)
{
   int i;
   struct person *t = p;
   for(i=0;i&lt;hi-1;i++,t++) {
      swap(t,t+indexOfMin(t,hi-i));
   }
}
int add(struct person *p, int max)
{
     int i;
     struct person *t = NULL, *t0 = NULL, *p0 = p;
     t = t0 = (struct person*)malloc(sizeof(struct person)*(max+1));

     if ( t!=NULL )
     {
        for(i=0;i&lt;max;i++)
            *t++ = *p++;
        printf("Enter a firstname, lastname and birthday (yyyy-mm-dd): ");
        if ( scanf("%s%s%s", &amp;t-&gt;firstname, &amp;t-&gt;lastname, &amp;t-&gt;birthdate)==3)
        {
            if ( p0==NULL )
                ;
            else
                free(p0);
            p = t0;
        }
        else
            p = p0;
     }
     else
        fprintf(stderr,"Error, unable to malloc\n");
    return add;
}
int del(struct person *p, int max)
{
    int i = 0;
    char deleteFirstname[12];  // Temp string to compare to existing array
    char deleteLastname[12];  //temp string
    char nullStr[11] = {"\0"};  // empty string to remove birthdate
    printf("\nEnter firstname: ");
    scanf("%s", deleteFirstname); //place into temp string
    printf("Enter lastname: ");
    scanf("%s", deleteLastname); //place into temp string
    for (i = 0; i &lt; max; i++)
    {
        if (strcmp(deleteFirstname, p[i].firstname) == 0) //compare deleteName to p.firstname
        {
            for (i = 0; i&lt; max; i++)
            {
                if (strcmp(deleteLastname, p[i].lastname) == 0) //If deleteSurname matches p.lastname
                {
                    strcpy(p[i].firstname, nullStr); //Put null into firstname
                    strcpy(p[i].lastname, nullStr); //Null into lastname
                    strcpy(p[i].birthdate, nullStr); //Null into birthdate
                    printf("Person removed from array.\n");
                    i--;
                }
            }
        }
        else printf("Invalid entry--try again.\n");
    }


    //int i, a;
    //printf("Enter index value: ");
    //scanf("%d", &amp;i);
    //if (i &gt;= max+1)
    //{
       //printf("Deletion not possible.\n");
    //}
    //else
    //{
       //for ( a = i - 1 ; a &lt; max - 1 ; a++ )
          //p[a] = p[a+1];
    //}
    return del;

}
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/c/118">C</category>
			<dc:creator>melonhed85</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/c/threads/455013/deleting-an-element-from-a-struct-array</guid>
		</item>
				<item>
			<title>convert stirng to XMLGregorianCalendar</title>
			<link>http://www.daniweb.com/software-development/java/threads/455012/convert-stirng-to-xmlgregoriancalendar</link>
			<pubDate>Tue, 21 May 2013 00:31:11 +0000</pubDate>
			<description>Hi how do i convert a strnig to XMLGregorianCalendar type. I used the below code for this but it throws an exception. userInput41 is a stirng parameter. XMLGregorianCalendar sdate=DatatypeFactory.newInstance().newXMLGregorianCalendar(userInput41); appreciate a reply thanks</description>
			<content:encoded><![CDATA[ <p>Hi<br />
how do i convert a strnig to XMLGregorianCalendar type.</p>

<p>I used the below code for this but it throws an exception. userInput41 is a stirng parameter.</p>

<p>XMLGregorianCalendar sdate=DatatypeFactory.newInstance().newXMLGregorianCalendar(userInput41);</p>

<p>appreciate a reply<br />
thanks</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/java/9">Java</category>
			<dc:creator>anisha.silva</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/java/threads/455012/convert-stirng-to-xmlgregoriancalendar</guid>
		</item>
				<item>
			<title>Animation Issues</title>
			<link>http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/455011/animation-issues</link>
			<pubDate>Tue, 21 May 2013 00:28:00 +0000</pubDate>
			<description>I am having trouble animating a div on the same page as the div that is not animating. Here is my code: Page 2 &lt;?php mysql_connect('127.0.0.1', 'root', ''); mysql_select_db('table'); $query = mysql_query(&quot;SELECT * FROM `blog`&quot;); ?&gt; &lt;script&gt; $('.post').click(function() { var value = $(this).attr('rel'); $('.load_post').html('Loading...').load('load_post.php?value='+value); $('.load_post').animate({&quot;left&quot;: &quot;-=1500px&quot;}, &quot;slow&quot;); $(&quot;.posts&quot;).animate({&quot;left&quot;: &quot;-=1500px&quot;}, &quot;slow&quot;); ...</description>
			<content:encoded><![CDATA[ <p>I am having trouble animating a div on the same page as the div that is not animating. Here is my code:</p>

<p>Page 2</p>

<pre><code class="language-js">&lt;?php

mysql_connect('127.0.0.1', 'root', '');
mysql_select_db('table');

$query = mysql_query("SELECT * FROM `blog`");

?&gt;

&lt;script&gt;
$('.post').click(function() {       
    var value = $(this).attr('rel');

    $('.load_post').html('Loading...').load('load_post.php?value='+value);
    $('.load_post').animate({"left": "-=1500px"}, "slow");
    $(".posts").animate({"left": "-=1500px"}, "slow");
    $(".blog_posts").animate({"left": "-=1500px"}, "slow");

});
&lt;/script&gt;

&lt;?php
while ($rows = mysql_fetch_array($query)){

$id = $rows['id'];
$date = str_replace("-", "/", $rows['date']);
$title = stripslashes($rows['title']);

?&gt;
&lt;a href="#" class="post" rel="&lt;?php echo $id; ?&gt;"&gt; &lt;h2 style="padding:0px; margin:0px;"&gt;&lt;?php echo $title; ?&gt;&lt;/h2&gt;&lt;/a&gt;
&lt;h6 style="padding:0px; margin:0px;"&gt;&lt;?php echo $date; ?&gt;&lt;/h6&gt;
&lt;?php
}
?&gt;
</code></pre>

<p>Page 1</p>

<pre><code class="language-js">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" rel="nofollow">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>"&gt;
&lt;html xmlns="<a href="http://www.w3.org/1999/xhtml" rel="nofollow">http://www.w3.org/1999/xhtml</a>"&gt;
&lt;?php
    include 'body/head.php';
?&gt;

&lt;body&gt;
    &lt;?php
        include 'body/nav.php';
    ?&gt;

    &lt;script&gt;
        $(document).ready(function() {
            $('.blog_posts').load('blog_feed.php');
        });
    &lt;/script&gt;

    &lt;div style="position:absolute; top:90px; left:1px; width:550px; background-color:lightblue;"&gt;

        &lt;h1&gt;Blog Posts&lt;/h1&gt;

        &lt;div class="blog_posts"&gt;

        &lt;/div&gt;

        &lt;div class="load_post" style="position:absolute; top:250px; left:1500px; width:550px; background-color:lightblue;"&gt;

        &lt;/div&gt;
    &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>I do not have anymore ideas of why this could be happening. Can anyone figure out this issue? Thanks for helping.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/javascript-dhtml-ajax/117">JavaScript / DHTML / AJAX</category>
			<dc:creator>Djmann1013</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/455011/animation-issues</guid>
		</item>
				<item>
			<title>Search several tables at the same time</title>
			<link>http://www.daniweb.com/web-development/php/threads/455010/search-several-tables-at-the-same-time</link>
			<pubDate>Mon, 20 May 2013 22:36:01 +0000</pubDate>
			<description>Hello, I did this search engine just for one table: &lt;?php $button = $_GET ['submit']; $search = $_GET ['search']; if(strlen($search)&lt;=1) echo &quot;Search term too short&quot;; else{ echo &quot;You searched for &lt;b&gt;$search&lt;/b&gt; &lt;hr size='1'&gt;&lt;/br&gt;&quot;; mysql_connect(&quot;localhost&quot;,&quot;root&quot;,&quot;&quot;); mysql_select_db(&quot;rmworshipers&quot;); $search_exploded = explode (&quot; &quot;, $search); $x=1; foreach($search_exploded as $search_each) { $x++; } $constructs =&quot;SELECT ...</description>
			<content:encoded><![CDATA[ <p>Hello,</p>

<p>I did this search engine just for one table:</p>

<pre><code>&lt;?php

$button = $_GET ['submit'];
$search = $_GET ['search']; 

if(strlen($search)&lt;=1)
echo "Search term too short";
else{
echo "You searched for &lt;b&gt;$search&lt;/b&gt; &lt;hr size='1'&gt;&lt;/br&gt;";



mysql_connect("localhost","root","");
mysql_select_db("rmworshipers");



$search_exploded = explode (" ", $search);
$x=1;

foreach($search_exploded as $search_each)
{
$x++;    
}

$constructs ="SELECT * FROM events WHERE event_name LIKE '%$search_each%'";
$run = mysql_query($constructs) or die(mysql_error());

$foundnum = mysql_num_rows($run);

if ($foundnum==0)
echo "Sorry, there are no matching result for &lt;b&gt;$search&lt;/b&gt;.";
else
{ 

echo "$foundnum results found !&lt;p&gt;";

$per_page = 10;
if(isset($_GET['start'])){
$start = $_GET['start'];
}
$max_pages = ceil($foundnum / $per_page);
if(!isset($_GET['start'])){
$start=0; 
}
$getquery = mysql_query("SELECT * FROM events WHERE event_name LIKE '%$search_each%' LIMIT $start, $per_page");
$runrows = mysql_fetch_assoc($getquery);

do{
    $id = $runrows ['event_id'];
    $nome = $runrows ['event_name'];
    echo "$id - &lt;a href='$id'&gt;$nome&lt;/a&gt;&lt;p&gt;";
}while($runrows = mysql_fetch_assoc($getquery));

//Pagination Starts
$prev = $start - $per_page;
$next = $start + $per_page;

$adjacents = 3;
$last = $max_pages - 1;

if($max_pages &gt; 1)
{   
//previous button
if (!($start&lt;=0)) 
echo " &lt;a href='search.php?search=$search&amp;submit=Search+source+code&amp;start=$prev'&gt;Prev&lt;/a&gt; ";    

//pages 
if ($max_pages &lt; 7 + ($adjacents * 2))   //not enough pages to bother breaking it up
{
$i = 0;   
for ($counter = 1; $counter &lt;= $max_pages; $counter++)
{
if ($i == $start){
echo " &lt;a href='search.php?search=$search&amp;submit=Search+source+code&amp;start=$i'&gt;&lt;b&gt;$counter&lt;/b&gt;&lt;/a&gt; ";
}
else {
echo " &lt;a href='search.php?search=$search&amp;submit=Search+source+code&amp;start=$i'&gt;$counter&lt;/a&gt; ";
}  
$i = $i + $per_page;                 
}
}
elseif($max_pages &gt; 5 + ($adjacents * 2))    //enough pages to hide some
{
//close to beginning; only hide later pages
if(($start/$per_page) &lt; 1 + ($adjacents * 2))        
{
$i = 0;
for ($counter = 1; $counter &lt; 4 + ($adjacents * 2); $counter++)
{
if ($i == $start){
echo " &lt;a href='search.php?search=$search&amp;submit=Search+source+code&amp;start=$i'&gt;&lt;b&gt;$counter&lt;/b&gt;&lt;/a&gt; ";
}
else {
echo " &lt;a href='search.php?search=$search&amp;submit=Search+source+code&amp;start=$i'&gt;$counter&lt;/a&gt; ";
} 
$i = $i + $per_page;                                       
}

}
//in middle; hide some front and some back
elseif($max_pages - ($adjacents * 2) &gt; ($start / $per_page) &amp;&amp; ($start / $per_page) &gt; ($adjacents * 2))
{
echo " &lt;a href='search.php?search=$search&amp;submit=Search+source+code&amp;start=0'&gt;1&lt;/a&gt; ";
echo " &lt;a href='search.php?search=$search&amp;submit=Search+source+code&amp;start=$per_page'&gt;2&lt;/a&gt; .... ";

$i = $start;                 
for ($counter = ($start/$per_page)+1; $counter &lt; ($start / $per_page) + $adjacents + 2; $counter++)
{
if ($i == $start){
echo " &lt;a href='search.php?search=$search&amp;submit=Search+source+code&amp;start=$i'&gt;&lt;b&gt;$counter&lt;/b&gt;&lt;/a&gt; ";
}
else {
echo " &lt;a href='search.php?search=$search&amp;submit=Search+source+code&amp;start=$i'&gt;$counter&lt;/a&gt; ";
}   
$i = $i + $per_page;                
}

}
//close to end; only hide early pages
else
{
echo " &lt;a href='search.php?search=$search&amp;submit=Search+source+code&amp;start=0'&gt;1&lt;/a&gt; ";
echo " &lt;a href='search.php?search=$search&amp;submit=Search+source+code&amp;start=$per_page'&gt;2&lt;/a&gt; .... ";

$i = $start;                
for ($counter = ($start / $per_page) + 1; $counter &lt;= $max_pages; $counter++)
{
if ($i == $start){
echo " &lt;a href='search.php?search=$search&amp;submit=Search+source+code&amp;start=$i'&gt;&lt;b&gt;$counter&lt;/b&gt;&lt;/a&gt; ";
}
else {
echo " &lt;a href='search.php?search=$search&amp;submit=Search+source+code&amp;start=$i'&gt;$counter&lt;/a&gt; ";   
} 
$i = $i + $per_page;              
}
}
}

//next button
if (!($start &gt;=$foundnum-$per_page))
echo " &lt;a href='search.php?search=$search&amp;submit=Search+source+code&amp;start=$next'&gt;Next&lt;/a&gt; ";    
}   
} 
} 
?&gt;
</code></pre>

<p>and now i want to Select the tables: Guests, News, Interviews. And also how do i do to if i search for a some guest or event it gives me the results of every news/interviews where the guest and/or event appears...</p>

<p>Thank you for your help</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/php/17">PHP</category>
			<dc:creator>PF2G</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/php/threads/455010/search-several-tables-at-the-same-time</guid>
		</item>
				<item>
			<title>Problem with mysql connection</title>
			<link>http://www.daniweb.com/web-development/php/threads/455009/problem-with-mysql-connection</link>
			<pubDate>Mon, 20 May 2013 22:27:31 +0000</pubDate>
			<description>Hi guys, I'm new here. I have a problem with connecting to my sql database. Everytime when I want to log in, I get this : Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: YES) in C:\xampp\htdocs\novi\funkcije.php on line 9 Warning: mysql_query() expects parameter 2 to be resource, boolean ...</description>
			<content:encoded><![CDATA[ <p>Hi guys, I'm new here. I have a problem with connecting to my sql database. Everytime when I want to log in, I get this :</p>

<p>Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: YES) in C:\xampp\htdocs\novi\funkcije.php on line 9</p>

<p>Warning: mysql_query() expects parameter 2 to be resource, boolean given in C:\xampp\htdocs\novi\funkcije.php on line 25<br />
Access denied for user ''@'localhost' to database 'photosend'</p>

<p>Please help mee,<br />
I would be very grateful.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/php/17">PHP</category>
			<dc:creator>Ridji</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/php/threads/455009/problem-with-mysql-connection</guid>
		</item>
				<item>
			<title>IP address changed on its own</title>
			<link>http://www.daniweb.com/hardware-and-software/microsoft-windows/threads/455008/ip-address-changed-on-its-own</link>
			<pubDate>Mon, 20 May 2013 22:12:45 +0000</pubDate>
			<description>A few weeks ago, I noticed that when I went to Yahoo Maps to look for directions, the site had me listed as a resident of Herndon, VA. I live in Sherman Oaks, CA. When I attempted to changed this default (that I did not apply), Yahoo told me that ...</description>
			<content:encoded><![CDATA[ <p>A few weeks ago, I noticed that when I went to Yahoo Maps to look for directions, the site had me listed as a resident of Herndon, VA. I live in Sherman Oaks, CA. When I attempted to changed this default (that I did not apply), Yahoo told me that my IP address indicated that my computer was based in Herndon. It never has been; I've always been based here in California. Up until a few weeks ago, my Sherman Oaks address was always the default. When I checked my network connections, it was set on "automatically set IP address".</p>

<p>What is the easiest way to correct this? My Lexmark printer can no longer retrieve my applications list to do scans.</p>

<p>Thank you!</p>

<p>Running Windows 7<br />
HP p6644y<br />
Time-Warner Cable - ISP</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/hardware-and-software/microsoft-windows/99">Microsoft Windows</category>
			<dc:creator>actfray</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/hardware-and-software/microsoft-windows/threads/455008/ip-address-changed-on-its-own</guid>
		</item>
				<item>
			<title>The best way to create documentation.</title>
			<link>http://www.daniweb.com/web-development/php/threads/455007/the-best-way-to-create-documentation</link>
			<pubDate>Mon, 20 May 2013 22:03:25 +0000</pubDate>
			<description>Hello! Currently I am working on a PHP project on my own that is slowly growing, before I really get it out there I want to begin working on some documentation. It's just that I'm unsure on how documentation is usually created, best practices on writing it, and how it ...</description>
			<content:encoded><![CDATA[ <p>Hello!  Currently I am working on a PHP project on my own that is slowly growing, before I really get it out there I want to begin working on some documentation.  It's just that I'm unsure on how documentation is usually created, best practices on writing it, and how it should be organized.  Wasn't sure where this should be posted, but thanks for any suggestions!</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/php/17">PHP</category>
			<dc:creator>NardCake</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/php/threads/455007/the-best-way-to-create-documentation</guid>
		</item>
				<item>
			<title>revisit How to Send Mail to Email Address on Mysql Database?</title>
			<link>http://www.daniweb.com/web-development/php/threads/455006/revisit-how-to-send-mail-to-email-address-on-mysql-database</link>
			<pubDate>Mon, 20 May 2013 20:46:59 +0000</pubDate>
			<description>Hi: i search as to why my database wont send out emails and find this forum. i find the exact code im using in this forum.. it originally is for xaamp. i need to have it work from my server: http://www.daniweb.com/web-development/php/threads/412468/how-to-send-mail-to-email-address-on-mysql-database. i posted on https://gist.github.com/amkaos/5608094 but i can post code ...</description>
			<content:encoded><![CDATA[ <p>Hi:<br />
i search as to why my database wont send out emails and find this forum.<br />
i find the exact code im using in this forum.. it originally is for xaamp.<br />
i need to have it work from my server:</p>

<p><a href="http://www.daniweb.com/web-development/php/threads/412468/how-to-send-mail-to-email-address-on-mysql-database." rel="nofollow">http://www.daniweb.com/web-development/php/threads/412468/how-to-send-mail-to-email-address-on-mysql-database.</a></p>

<p>i posted on <a href="https://gist.github.com/amkaos/5608094" rel="nofollow">https://gist.github.com/amkaos/5608094</a><br />
but i can post code here if need be..</p>

<p>this is what is going on:<br />
i have domain and web host.</p>

<p>i type in address to pull up a form that pulls all names and emails<br />
from mysql database. at top of page "connected successfully"</p>

<p>there is message box for me to type text.<br />
when i hit submit, i get all "connected successfully , emails processed"..<br />
But no emails are sent ..<br />
there are no errors..</p>

<p>my web host looked over my code and thinks it should be fine..<br />
they are not restricting any outgoing emails..<br />
they said i do not have to configure anything different.</p>

<p>i have a "Contact Form" on my domain and users fill out and submit to my email just fine.. i get the info sent to my gmail and it is added to Database..</p>

<p>i am desperate to fix this ..<br />
any help is greatly appreciated</p>

<p>thanks</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/php/17">PHP</category>
			<dc:creator>amkaos</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/php/threads/455006/revisit-how-to-send-mail-to-email-address-on-mysql-database</guid>
		</item>
				<item>
			<title>PyUSB problem</title>
			<link>http://www.daniweb.com/software-development/python/threads/455005/pyusb-problem</link>
			<pubDate>Mon, 20 May 2013 18:42:16 +0000</pubDate>
			<description> Hello all, This is a two parter. One is an error that I'm receiving and one is a question in general about the capabilities of PyUSB. 1) So I've installed libusb from the tar file by just doing ./configure &amp;&amp; make &amp;&amp; sudo make install and I have checked that ...</description>
			<content:encoded><![CDATA[ <p>Hello all,</p>

<p>This is a two parter.  One is an error that I'm receiving and one is a question in general about the capabilities of PyUSB.</p>

<p>1)  So I've installed libusb from the tar file by just doing ./configure &amp;&amp; make &amp;&amp; sudo make install and I have checked that the library is in my /usr/local/lib and that my LD_LIBRARY_PATH is looking there.  Out of frustration I also did sudo port install libusb as well.  In either case I'm receiving this error:</p>

<pre><code class="language-py">In [1]: import usb.core

In [2]: dev = usb.core.find(find_all=True)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
&lt;ipython-input-2-f185198e950d&gt; in &lt;module&gt;()
----&gt; 1 dev = usb.core.find(find_all=True)

/Users/matthewbray/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/usb/core.pyc in find(find_all, backend, custom_match, **args)
    854                 break
    855         else:
--&gt; 856             raise ValueError('No backend available')
    857 
    858     k, v = args.keys(), args.values()

ValueError: No backend available
</code></pre>

<p>I'm not sure how to get it to see the backend and google isn't really helping me that much.</p>

<p>2)  I'm looking to receive information from a thermometer that plugs in through USB (Fluke 568 IR thermometer) and was hoping that I could get the reading through some pyUSB interface.  Is that even something that is possible?  I was going to just play around with it and see if I could get anything, but I'm unable to even get anything to run as long as it can't find a backend.</p>

<p>Thanks for your time!</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/python/114">Python</category>
			<dc:creator>fatalaccidents</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/python/threads/455005/pyusb-problem</guid>
		</item>
				<item>
			<title>Problem in Java Game Development</title>
			<link>http://www.daniweb.com/software-development/java/threads/455004/problem-in-java-game-development</link>
			<pubDate>Mon, 20 May 2013 16:57:56 +0000</pubDate>
			<description>hey all I was watching a tutorial on java game development.In that video,the guy was making a window a on the screen,then making an oval,then moving it. His code worked fine and i am 100% sure that my code is similar to his(i checked it a few times). What my ...</description>
			<content:encoded><![CDATA[ <p>hey all</p>

<p>I was watching a tutorial on java game development.In that video,the guy was making a window a on the screen,then making an oval,then moving it.</p>

<p>His code worked fine and i am 100% sure that my code is similar to his(i checked it a few times).<br />
What my problem is that the window just display the image behind the window and not displays the blank screen.<br />
for eg. i use netbeans IDE.When i run the program,he window appears on the top left corner of the screen but what it displays is the things behind it such as : "file","edit","view","navigate","run"(basically,al the components behind the window) etc.<br />
THIS IS THE CODE:</p>

<pre><code class="language-java">package javaapplication1;

import javax.swing.JFrame;
import java.awt.Graphics;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;

public class JavaApplication1 extends JFrame{
int x,y;
    public class AL extends KeyAdapter{
        public void keyPressed(KeyEvent e){
            int keyCode = e.getKeyCode();
if(keyCode == e.VK_A){
        x-=5;
}
if(keyCode == e.VK_D){
    x+=5;
}
if(keyCode == e.VK_W){
    y-=5;
}
if(keyCode == e.VK_S){
    y+=5;
}

        }
        public void KeyReleased(KeyEvent e){

        }
    }

    public JavaApplication1(){
        addKeyListener(new AL());
         setTitle("Java Game");
    setSize(250,250);
    setVisible(true); 
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        x = 150;
        y = 150;
    }
    public void paint(Graphics g){    
        g.fillOval(x,y,15,15);
        repaint();
    }

    public static void main(String[] args) {
        new JavaApplication1();


    }
}
</code></pre>

<p>The ball is on the copied screen and is moving just fine.<br />
Please i am really going insane due to this frustration.I googles it but could'nt find any solution.Now, this is the place where i rely the most.</p>

<p>Thanks to all.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/java/9">Java</category>
			<dc:creator>Bhavya scripted</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/java/threads/455004/problem-in-java-game-development</guid>
		</item>
				<item>
			<title>Restrict site access to authenticated Active Directory users</title>
			<link>http://www.daniweb.com/web-development/aspnet/threads/455003/restrict-site-access-to-authenticated-active-directory-users</link>
			<pubDate>Mon, 20 May 2013 16:56:31 +0000</pubDate>
			<description>I'm trying to create a site security strategy that will allow authenticated AD users hit a site, without a login page, and deny access to users who are not authenticated. I have developed a proof-of-concept site based on http://www.christowles.com/2011/04/aspnet-forms-based-authentication-with.html but all I can make it do is authenticate against an ...</description>
			<content:encoded><![CDATA[ <p>I'm trying to create a site security strategy that will allow authenticated AD users hit a site, without a login page, and deny access to users who are not authenticated.  I have developed a proof-of-concept site based on <a href="http://www.christowles.com/2011/04/aspnet-forms-based-authentication-with.html" rel="nofollow">http://www.christowles.com/2011/04/aspnet-forms-based-authentication-with.html</a> but all I can make it do is authenticate against an Active Directory Membership Provider via a login page. I'd like to avoid that whole login thing. Does any one have any advice as to how I go about this?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/aspnet/18">ASP.NET</category>
			<dc:creator>christopher.baker.969952</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/aspnet/threads/455003/restrict-site-access-to-authenticated-active-directory-users</guid>
		</item>
				<item>
			<title>Need help really quick</title>
			<link>http://www.daniweb.com/software-development/csharp/threads/455002/need-help-really-quick</link>
			<pubDate>Mon, 20 May 2013 16:55:44 +0000</pubDate>
			<description>Main Module Declare itemName As String Declare itemQuantity As Integer Declare itemPrice As Real Declare itemTotal As Real Call GetInput(itemName,itemQuantity,itemPrice) itemTotal = Call CalculateTotalPrice(itemQuantity,itemPrice) Call DisplayResult(itemName,itemTotal) End Main Module GetInput (itemName As String,itemQuantity As Integer,itemPrice As Real) Display “Please enter item Name” Get itemName Display “Please enter quantity of item ...</description>
			<content:encoded><![CDATA[ <p>Main Module<br />
Declare itemName As String<br />
Declare itemQuantity As Integer<br />
Declare itemPrice As Real<br />
Declare itemTotal As Real<br />
Call GetInput(itemName,itemQuantity,itemPrice)<br />
itemTotal = Call CalculateTotalPrice(itemQuantity,itemPrice)<br />
Call DisplayResult(itemName,itemTotal)<br />
End Main</p>

<p>Module GetInput (itemName As String,itemQuantity As Integer,itemPrice As Real)<br />
Display “Please enter item Name”<br />
Get itemName<br />
Display “Please enter quantity of item bought”<br />
Get itemQuantity<br />
Display “Please enter item price”<br />
Get itemPrice<br />
End GetInput</p>

<p>Module CalculateTotalPrice (itemQuantity As Integer,itemPrice As Real)  As Real<br />
Declare itemTotal As Real<br />
itemTotal = itemQuantity * itemPrice<br />
Return itemTotal<br />
End CalculateTotalPrice</p>

<p>Module DisplayResult(itemName As String,itemTotal As Real)<br />
Display “The total price of “,itemName, “would be “, itemTotal<br />
End Module</p>

<p>All I need to do is add this in to my pseudocode The owner of the store now wants additional features for his application. He now wants to be able to give discounts to people who purchase more than 4 of a single item. The discount should apply to that item only and should be 10%. He also wants to be able to add tax, the current tax rate is 7.5 % Finally he wants to be able to continue to add new items to one order. When he is done entering the items for the order he should be able to see what the subtotal is, what the final tax is and what the final total is. This should be the only time the subtotal is displayed. Please I need someone to help me out sort of in a bind right now would really appreciate it.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/csharp/61">C#</category>
			<dc:creator>anibal.zuniga.5</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/csharp/threads/455002/need-help-really-quick</guid>
		</item>
				<item>
			<title>error in php code last insert id</title>
			<link>http://www.daniweb.com/web-development/php/threads/455001/error-in-php-code-last-insert-id</link>
			<pubDate>Mon, 20 May 2013 16:46:09 +0000</pubDate>
			<description>Hi, I am working on an hotel booking system for a small hotel.I finally found a nice tutorial on HTML.it.It is in Italian but that's not a problem for me as Italian is my mother tongue.The site consists of the usual tables like clients, reservations, etc.I ran all the scripts ...</description>
			<content:encoded><![CDATA[ <p>Hi, I am working on an hotel booking system for a small hotel.I finally found a nice tutorial on HTML.it.It is in Italian but that's not a problem for me as Italian is my mother tongue.The site consists of the usual tables like clients, reservations, etc.I ran all the scripts from the command line and everything works fine. I still am not too sure of what I am doing but I figured that once I deliver the finished site to the hotel people, they are not going to want to fiddle with the command line, phpMyAdmin,MySQL etc.when they have to insert a reservation.So I started creating some user interface like a form to insert clients data as below.The problem is that last insert id business which is very important for the site to work.I searched the Internet but could not find a solution, I think the problem is that insert_id into @codeclient.Can you help me?this is the code involved.</p>

<pre><code>INSERT INTO client SET
nominativo = 'Rossi Mario',
indirizzo = via Manzi 2 00153 Rome,
telefono ='06 86123920';
SELECT_LAST_INSERT_ID() INTO @codCliente;

&lt;table width="300" border="0" align="center" cellspacing="1" cellpadding="0"&gt;
&lt;tr&gt;&lt;td&gt;&lt;form name="form1" method="post" action="insert_ac.php"&gt;
&lt;table width="100" border="0" cellspacing="1" cellpadding="3"&gt;
&lt;tr&gt;&lt;td colspan="3"&gt;&lt;strong&gt;Insert Data into MySQL Database&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td width="71"&gt;Nominativo&lt;/td&gt;
&lt;td width="6"&gt;:&lt;/td&gt;
&lt;td width="301"&gt;&lt;input name="nominative" type="text" id="nominative"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Indirizzo&lt;/td&gt;
&lt;td&gt;:&lt;/td&gt;
&lt;td&gt;&lt;input name="indirizzo" type="text" id="indirizzo&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Telefono&lt;/td&gt;
&lt;td&gt;:&lt;/td&gt;
&lt;td&gt;&lt;input name="telefono" type="text" id="telefono&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan="3" align="center"&gt;&lt;input type="submit" name="submit" value="submit"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/form&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;



&lt;?php

 $host="localhost"; // Host name 
$username="root"; // Mysql username 
$password="Fiorentino##"; // Mysql password 
$db_name="hotel"; // Database name 
$tbl_name="clienti"; // Table name 

// Connect to server and select database.
 mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
 mysql_select_db("$db_name")or die("cannot select DB");

// Get values from form 
 $nominativo=$_POST['nominativo'];
 $indirizzo=$_POST['indirizzo'];
 $telefono=$_POST['telefono'];

 // Insert data into mysql 
 $sql="INSERT INTO $tbl_name SET(nominativo, indirizzo, telefono)VALUES('$nominativo', '$indirizzo', '$telefono')";
 SELECT LAST_INSERT_ID() INTO @codCliente;

 $result=mysql_query($sql);



// if successfully insert data into database, displays message "Successful". 
 if($result){
 echo "Successful";
 echo "&lt;BR&gt;";
 echo "&lt;a href='insert.php'&gt;Back to main page&lt;/a&gt;";
 }

 else {
 echo "ERROR";
 }
 ?&gt; 

 &lt;?php 
// close connection 
 mysql_close();
 ?&gt;

 And this is the error I get:Parse error: syntax error, unexpected 'LAST_INSERT_ID' (T_STRING) in C:\inetpub\wwwroot\Hotel Site\insert_ac.php on line 20
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/php/17">PHP</category>
			<dc:creator>Fiorentino01^</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/php/threads/455001/error-in-php-code-last-insert-id</guid>
		</item>
				<item>
			<title>Android access method second activity</title>
			<link>http://www.daniweb.com/software-development/mobile-development/threads/455000/android-access-method-second-activity</link>
			<pubDate>Mon, 20 May 2013 16:15:21 +0000</pubDate>
			<description>Hi. I have read a bunch of posts,articles and everything but i cant get a solution.. i make an android app.. i start the first activity(first class). then i have a button for the second activity which i load it like this: Intent i=new Intent(firstactivity.this,secondactivity.class); startActivity(i); in the second activity ...</description>
			<content:encoded><![CDATA[ <p>Hi. I have read a bunch of posts,articles and everything but i cant get a solution..<br />
i make an android app..<br />
i start the first activity(first class). then i have a button for the second activity which i load it like this:</p>

<pre><code>Intent i=new Intent(firstactivity.this,secondactivity.class);
startActivity(i);
</code></pre>

<p>in the second activity on click event to a button i want to call one method from the first activity:</p>

<pre><code>firstactivity f1= new firstactivity();
f1.MyMethod("my string goes here")
</code></pre>

<p>when i run this the application crashes..i tried the try catch exeption and i printed to exeption which is one error for null... i cant get it to work.....</p>

<p>thanks</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/mobile-development/181">Mobile Development</category>
			<dc:creator>christ123</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/mobile-development/threads/455000/android-access-method-second-activity</guid>
		</item>
				<item>
			<title>SMS gateways</title>
			<link>http://www.daniweb.com/software-development/java/threads/454999/sms-gateways</link>
			<pubDate>Mon, 20 May 2013 16:10:52 +0000</pubDate>
			<description>Am doing a project that involves exchanging sending sms via a website. Am told i can achieve this via sms gateway. Can i get some sample code please?</description>
			<content:encoded><![CDATA[ <p>Am doing a project that involves exchanging sending sms via a website. Am told i can achieve this via sms gateway. Can i get some sample code please?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/java/9">Java</category>
			<dc:creator>atabulwaire.john</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/java/threads/454999/sms-gateways</guid>
		</item>
				<item>
			<title>Need help badly </title>
			<link>http://www.daniweb.com/software-development/csharp/threads/454998/need-help-badly-</link>
			<pubDate>Mon, 20 May 2013 16:10:09 +0000</pubDate>
			<description>I have been struggling with this since yesterday and I really need to get it finished. I have no clue why its not working. THe porblem im facing at the moment is as follows: I have a method loadDB(); That is looks like this: public static void loadDB() { // ...</description>
			<content:encoded><![CDATA[ <p>I have been struggling with this since yesterday and I really need to get it finished. I have no clue why its not working. THe porblem im facing at the moment is as follows:</p>

<p>I have a method loadDB(); That is looks like this:</p>

<pre><code class="language-cs"> public static void loadDB()
        {
            // load data into datasets  - this will be called on form2 the login screen            

             loadTblStaff();
             loadTblCars();
             con.ConnectionString = dbProvider + dbSource;

        }
</code></pre>

<p>I have stepped into the program and placed breakpoints and the method never does anything other than call the first method. Then it jumps off to the next section of the program. I call this loadDb method in a login form on load, the program then runs the first line which is to call loadTblStaff, but then it does nothing and awaits user interaction. When I type in details and click login it should run a validate method which uses the data loaded into the dataset. The form for login and the Data.cs class look like this:</p>

<p>login form:</p>

<pre><code class="language-cs">using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.Common;
using System.Data.OleDb;  

namespace WindowsFormsApplication1
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }

        // Variables------------------------------------------------------------------------------------------------------------------------   

        private static string userName;
        private static string userPin;

        private static int load;

        // Program Logic Below -------------------------------------------------------------------------------------------------------------

        private void Form2_Load(object sender, EventArgs e)
        {
            // calls the method to load the database
            Data.loadDB();

        }

        private void btnLogin_Click(object sender, EventArgs e)
        {
            userName = txtBoxAccount.Text;
            userPin = txtBoxPass.Text;

            // determine if credentials are valid 
           load = Data.Validate(userName,userPin);

            // switch statement to determine which form to load if any 
           switch (load)
           {
               case 0: 
                   MessageBox.Show("Invalid Credentials '\n' Please try again");
                   txtBoxAccount.Clear();
                   txtBoxPass.Clear();                   
                   break;

               case 1:
                   MessageBox.Show("Valid Credentials! '\n' You will now be given Staff privelages");
                   loadForms.loadStaff();
                   this.Hide();
                   break;

               case 2:
                   MessageBox.Show("Valid Credentials! '\n' You will now be given Admin privelages");
                   loadForms.loadAdmin();
                   this.Hide();
                   break;

               default:
                   MessageBox.Show("Invalid credentials! '\n' Please try again.");
                   txtBoxAccount.Clear();
                   txtBoxPass.Clear();
                   break;
           }
        }

        private void btnQuit_Click(object sender, EventArgs e)
        {            
            this.Hide();
            loadForms.loadWelcome();
        }              

    }
}
</code></pre>

<p>and the Data class looks like this</p>

<pre><code class="language-cs">using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Data.Common;
using System.Data.OleDb;  


namespace WindowsFormsApplication1
{
    // This class will contain methods and fields needed to handle the data. 
    class Data
    {
        // Fields -----------------------------------------------------------------------------------------------------------------

        private static System.Data.OleDb.OleDbConnection con = new System.Data.OleDb.OleDbConnection();
        private static System.Data.OleDb.OleDbDataAdapter da;
        private static DataSet ds1; // tblCars
        private static DataSet ds2; //tblStaff

        private static string sql;
        private static string dbProvider = "PROVIDER=Microsoft.ACE.OLEDB.12.0;";
        private static string dbSource = "Data Source = E:\\cars.accdb'";

        private static string userName;
        private static string userPin; 

        private static bool valid;

        private static int numOfRowsCars;
        private static int numOfRowsStaff;

        // Methods -----------------------------------------------------------------------------------------------------------------

        public static void loadDB()
        {
            // load data into datasets  - this will be called on form2 the login screen            

             loadTblStaff();
             loadTblCars();
             con.ConnectionString = dbProvider + dbSource;

        }

        public static void loadTblStaff()
        {
            // prepare, open and load the staff table into dataset ds2

            con.Open();

                sql = "SELECT * FROM tblStaff";
                ds2 = new DataSet();

                da = new OleDbDataAdapter(sql, con);
                numOfRowsStaff = da.Fill(ds2, "tblStaff");
                MessageBox.Show("Number of staff rows: " + numOfRowsStaff.ToString());
            con.Close();

        }

        public static void loadTblCars()
        {
            // prepare, open and load the cars table into dataset ds1

            con.Open();

                sql = "SELECT * FROM tblCars";
                ds1 = new DataSet();

                da = new OleDbDataAdapter(sql, con);
                numOfRowsCars = da.Fill(ds1, "tblCars");
                MessageBox.Show("Number of car rows: " + numOfRowsCars.ToString());
            con.Close();
        }       

        public static int Validate(string Name, string Pin)
        {
            // this method will be used to validate login credentials - it will return 0 for invalid, 1 for staff privalages and 2 for admin

            // check to see if log in details are valid
            for (int count = 1; count &lt; numOfRowsStaff; count++)
            {
                userName = ds2.Tables["tblStaff"].Rows[count][0].ToString();
                userPin = ds2.Tables["tblStaff"].Rows[count][1].ToString();

                if (Name == userName &amp;&amp; Pin == userPin)
                {
                    valid = true;
                }
                else
                {
                    valid = false;
                }
            }          



            if (valid &amp;&amp; Pin == "9999")
            {
                // returning 2 will load the admin screen
               return 2;
            }
            else if (valid)
            {
                // returning 1 will load the staff screen
               return 1;
            }
            else
            {
                // returning 0 will clear the input fields and return an error message
                return 0;
            }
        }

    }
}
</code></pre>

<p>The program just  skips everything and when I click login it returns 0 clearing the input fields. i dont understand whats wrong with this program. I realize I'm not good at this at all... but I need to get this done. Any help is greatly appreciated.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/csharp/61">C#</category>
			<dc:creator>pwolf</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/csharp/threads/454998/need-help-badly-</guid>
		</item>
				<item>
			<title>HOW do I add A PHP Link</title>
			<link>http://www.daniweb.com/web-development/php/threads/454995/how-do-i-add-a-php-link</link>
			<pubDate>Mon, 20 May 2013 16:03:26 +0000</pubDate>
			<description>` $options[] = array( 'title' =&gt; __('Donate to the theme developers', 'default'), 'desc' =&gt; __('Note :Donate to the Developers of this theme, Donate any amount to keep the themes free ' , 'default'), 'id' =&gt; '', 'std' =&gt; '', 'type' =&gt; 'sep' ); How do I add a link to ...</description>
			<content:encoded><![CDATA[ <p>`</p>

<pre><code> $options[] = array( 'title' =&gt; __('Donate to the theme developers', 'default'),
                    'desc'  =&gt; __('Note :Donate to the Developers of this theme, Donate any amount to keep the themes free '  , 'default'),
                    'id'    =&gt; '',
                    'std'   =&gt; '',
                    'type'  =&gt; 'sep' );
</code></pre>

<p>How do I add a link to the text I want the word "Donate" to have a link</p>

<p>How do I do that. If anyone could help me I would really be grateful</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/php/17">PHP</category>
			<dc:creator>sambulo.senda</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/php/threads/454995/how-do-i-add-a-php-link</guid>
		</item>
				<item>
			<title>link comboxes with LINQ</title>
			<link>http://www.daniweb.com/software-development/csharp/threads/454994/link-comboxes-with-linq</link>
			<pubDate>Mon, 20 May 2013 15:59:00 +0000</pubDate>
			<description>So I have items displayed in 2 diffrent comboxes. I want it so when I select a customer in combobox 1, In combobox 2 it only shows the jobs to that customer. I tried it many diffrent ways but can not seem to get it to work. Any help would ...</description>
			<content:encoded><![CDATA[ <p>So I have items displayed in 2 diffrent comboxes.</p>

<p>I want it so when I select a customer in combobox 1, In combobox 2 it only shows the jobs to that customer.</p>

<p>I tried it many diffrent ways but can not seem to get it to work.</p>

<p>Any help would be appreciative.</p>

<p>Thanks..</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/csharp/61">C#</category>
			<dc:creator>Kratoswoo</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/csharp/threads/454994/link-comboxes-with-linq</guid>
		</item>
				<item>
			<title>Globalization Country tag for resources what the hell!</title>
			<link>http://www.daniweb.com/web-development/aspnet/threads/454993/globalization-country-tag-for-resources-what-the-hell</link>
			<pubDate>Mon, 20 May 2013 15:35:14 +0000</pubDate>
			<description>Hi all, So i was doing globalization with resources, what happened, i tried basica country identification: pt - portugal; pl - poland; es - spain; and so on so on, what happen didnt work and a very big crash, after I put portugal file as language.pt-PT.esrx, and that one worked, ...</description>
			<content:encoded><![CDATA[ <p>Hi all,</p>

<p>So i was doing globalization with resources, what happened, i tried basica country identification:<br />
pt - portugal;<br />
pl - poland;<br />
es - spain;<br />
and so on so on,</p>

<p>what happen didnt work and a very big crash, after I put portugal file as language.pt-PT.esrx, and that one worked, when i tried to put poland.pl-PL.esrx it crashed again.<br />
poland it still to resolve, so wento to put Language.en-GB.esrx, and it created code that went to the language.esrx file and give incompatible code, what is this, cant globalizasion be easy? is the an easy way.</p>

<p>Can anybody knows what the hell is this, we have to put the correct iso code for each country?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/aspnet/18">ASP.NET</category>
			<dc:creator>maxpaine69</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/aspnet/threads/454993/globalization-country-tag-for-resources-what-the-hell</guid>
		</item>
				<item>
			<title>help : adding multiple images on single add button click</title>
			<link>http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/454992/help-adding-multiple-images-on-single-add-button-click</link>
			<pubDate>Mon, 20 May 2013 15:15:49 +0000</pubDate>
			<description>help guys, i need to know how can i add multiple images in a single add button click for example and display it in multiple imageboxes..the project is also associated with an access database that when the user clicks on the button save..all the images inserted will be saved on ...</description>
			<content:encoded><![CDATA[ <p>help guys, i need to know how can i add multiple images in a single add button click for example and display it in multiple imageboxes..the project is also associated with an access database that when the user clicks on the button save..all the images inserted will be saved on to database..</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/visual-basic-4-5-6/4">Visual Basic 4 / 5 / 6</category>
			<dc:creator>raizuke.blademaster</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/454992/help-adding-multiple-images-on-single-add-button-click</guid>
		</item>
				<item>
			<title>Where can I download the random module?</title>
			<link>http://www.daniweb.com/software-development/python/threads/454991/where-can-i-download-the-random-module</link>
			<pubDate>Mon, 20 May 2013 15:10:43 +0000</pubDate>
			<description>Where can I download the random module, because I've been looking for weeks and can't find a site where I can download it.</description>
			<content:encoded><![CDATA[ <p>Where can I download the random module, because I've been looking for weeks and can't find a site where I can download it.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/python/114">Python</category>
			<dc:creator>entropic3105</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/python/threads/454991/where-can-i-download-the-random-module</guid>
		</item>
				<item>
			<title>Flex signature generation using Hmac sha 1</title>
			<link>http://www.daniweb.com/web-development/threads/454988/flex-signature-generation-using-hmac-sha-1</link>
			<pubDate>Mon, 20 May 2013 14:49:35 +0000</pubDate>
			<description>Do anyone here knows flex builder? I'm a beginner in this language. I have written a code for cloudstack api request and signature generation using hmac to authenticate the user account. here the command is 'listzones'. The output will be in xml shwing the list of zones available in the ...</description>
			<content:encoded><![CDATA[ <p>Do anyone here knows flex builder?<br />
I'm a beginner in this language. I have written a code for cloudstack api request and signature generation using hmac to authenticate the user account. here the command is 'listzones'. The output will be in xml shwing the list of zones available in the cloudstack i have installed. No error is showing while compiling. But when i run, the browser opens blank. The url is correct, ie it includes alla the commands and parameters and also the signature is genetated. I can see it in the url.But the orginal output is xml command it is not showing. the page is simply left blank. Can anyone help me?</p>

<p>the url generated will like as below:</p>

<p><a href="http://10.176.14.26:8080/client/api?apiKey=Qo9Qwfatwz9ARB328Btn9PftzL2Cf5LOWd8OFyJmiM513tpTIm-zKxJoWkWqf353Df397xcLdKXGk8_JO8nM3Q&amp;command=listZones&amp;signature=xmSZCr03SoBMgG%2Fr80tQB5n1RYY%3D" rel="nofollow">http://10.176.14.26:8080/client/api?apiKey=Qo9Qwfatwz9ARB328Btn9PftzL2Cf5LOWd8OFyJmiM513tpTIm-zKxJoWkWqf353Df397xcLdKXGk8_JO8nM3Q&amp;command=listZones&amp;signature=xmSZCr03SoBMgG%2Fr80tQB5n1RYY%3D</a></p>

<p>The signature generated may vary each time.</p>

<p>The code is as follows.</p>

<pre><code class="language-js">&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;s:Application xmlns:fx="<a href="http://ns.adobe.com/mxml/2009" rel="nofollow">http://ns.adobe.com/mxml/2009</a>" 
   xmlns:s="library://ns.adobe.com/flex/spark" 
   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:ns1="*"&gt;
&lt;fx:Declarations&gt;
&lt;!-- Place non-visual elements (e.g., services, value objects) here --&gt;
&lt;/fx:Declarations&gt;
&lt;fx:Script&gt;
&lt;![CDATA[
import com.adobe.crypto.HMAC;
import com.adobe.crypto.SHA1;
import com.adobe.utils.StringUtil;
import flash.net.navigateToURL;
import mx.controls.Alert;
import mx.utils.Base64Encoder;
import mx.utils.StringUtil;
private var urlAPI:String;
private var commandString:String;
private var apiKey:String;
private var apiKeyString:String;
private var secretKey:String = "-kgkBuBUrGFeIC4gUvngSK_3Ypmi7fuF8XdVXIusnyyiEP2YUcG3FnPUGJGy3rp3Bw5ZNnqgS-9tIfyV1QnK1g";
private var signature:String;
private var urlRequestString:String
[Bindable]
private var encryptedString:String = "";
[Bindable]
private var encryptedByteArray:String = "";
private function generateRequest():void
{
    urlAPI = "<a href="http://10.176.14.26/client/api" rel="nofollow">http://10.176.14.26/client/api</a>";
    commandString = "command=listZones";
    apiKey = "";
    apiKey = encodeURI(apiKey.toLowerCase());
    apiKeyString = "apiKey=" + apiKey;
    signature = generateSignature();
    urlRequestString = urlAPI +"?"+commandString+"&amp;"+apiKeyString+"&amp;signature="+signature;// "command=listZones&amp;apiKey=Qo9Qwfatwz9ARB328Btn9PftzL2Cf5LOWd8OFyJmiM513tpTIm-zKxJoWkWqf353Df397xcLdKXGk8_JO8nM3Q&amp;signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D";
    var urlRequestObj:URLRequest = new URLRequest(urlRequestString);
    navigateToURL(urlRequestObj,"_blank");
}
private function generateSignature():String
{
    var tempSignature:String = apiKey +"&amp;"+commandString;
    tempSignature = tempSignature.toLowerCase();
    return hashMessage(tempSignature,secretKey);
}
private function hashMessage(message:String, secretKey:String):String
{           
    var algorithm:Object = SHA1;
    var encoder:Base64Encoder = new Base64Encoder();
    if(message.length &gt; 0)
    {
        encryptedString = HMAC.hash(secretKey,message,algorithm);
        var messageBytes:ByteArray = new ByteArray();
        messageBytes.writeMultiByte(message,"utf-8");
        encryptedByteArray = HMAC.hashBytes(getByteArray(),messageBytes,algorithm);
        encoder.encode(encryptedByteArray); 
    }
    //Alert.show(encoder.toString());
    return encoder.toString();      
}
private var byteArray:ByteArray;
[Bindable("dummyEventType")]
private function  getByteArray():ByteArray
{
    if(!byteArray)
    {
        byteArray = new ByteArray();
        byteArray.writeMultiByte(secretKey,"utf-8");
        //byteArray.
    }
    return byteArray;
}   
]]&gt;
 &lt;/fx:Script&gt;
&lt;s:Button x="102" y="64" label="Button" click="generateRequest()"/&gt;
&lt;ns1:CloudInterfaceComp x="196" y="213"&gt;
&lt;/ns1:CloudInterfaceComp&gt;
 &lt;/s:Application&gt;
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/31">Web Development</category>
			<dc:creator>siss</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/threads/454988/flex-signature-generation-using-hmac-sha-1</guid>
		</item>
				<item>
			<title>ARRAY</title>
			<link>http://www.daniweb.com/software-development/cpp/threads/454986/array</link>
			<pubDate>Mon, 20 May 2013 14:33:41 +0000</pubDate>
			<description>Write a complete C program that asks the user to input two sets of integer numbers each of size 5 and store them in two arrays A and B. The program then outputs the elements that are common to both sets (available in both A and B). If there are ...</description>
			<content:encoded><![CDATA[ <p>Write a complete C program that asks the user to input two sets of integer numbers each of size 5 and store them in two arrays A and B. The program then outputs the elements that are common to both sets (available in both A and B). If there are no common elements, the program should output the message "No common elements ".</p>

<p>An example of the program RUN:<br />
Enter the values of A[0] and B[0] &gt;2 4<br />
Enter the values of A[1] and B[1] &gt;1 6<br />
Enter the values of A[2] and B[2] &gt;5 2<br />
Enter the values of A[3] and B[3] &gt;7 5<br />
Enter the values of A[4] and B[4] &gt;6 3<br />
The result is:<br />
2<br />
5<br />
6</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/cpp/8">C++</category>
			<dc:creator>saad.taj1</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/cpp/threads/454986/array</guid>
		</item>
				<item>
			<title>linux password msg</title>
			<link>http://www.daniweb.com/hardware-and-software/linux-and-unix/threads/454985/linux-password-msg</link>
			<pubDate>Mon, 20 May 2013 13:49:25 +0000</pubDate>
			<description>i have implemented new passwd policy and forced users to change their password the proble is they dont know what they should insert as new password. i want to display a message like this one &quot;passwd minimum length 8, must have 1 upper, 1 lower, 1 digit) or something like ...</description>
			<content:encoded><![CDATA[ <p>i have implemented new passwd policy and forced users to change their password the proble is they dont know what they should insert as new password. i want to display a message like this one "passwd minimum length 8, must have 1 upper, 1 lower, 1 digit) or something like this instead of "BAD PASSWRD: its WAY too short" ... any help will be appreciated<br />
tnx in advance</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/hardware-and-software/linux-and-unix/12">Linux and Unix</category>
			<dc:creator>moe2</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/hardware-and-software/linux-and-unix/threads/454985/linux-password-msg</guid>
		</item>
				<item>
			<title>Return value of custom property using VBA in Word 2007</title>
			<link>http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/454984/return-value-of-custom-property-using-vba-in-word-2007</link>
			<pubDate>Mon, 20 May 2013 13:14:09 +0000</pubDate>
			<description>Hello, How do I return the value of a custom property in Word 2007 using VBA? Depending on the custom property, I also need to automatically check a checkbox using VBA. Thanks!</description>
			<content:encoded><![CDATA[ <p>Hello,</p>

<p>How do I return the value of a custom property in Word 2007 using VBA? Depending on the custom property, I also need to automatically check a checkbox using VBA.</p>

<p>Thanks!</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/visual-basic-4-5-6/4">Visual Basic 4 / 5 / 6</category>
			<dc:creator>Chan2013</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/454984/return-value-of-custom-property-using-vba-in-word-2007</guid>
		</item>
				<item>
			<title>Time zone</title>
			<link>http://www.daniweb.com/web-development/php/threads/454983/time-zone</link>
			<pubDate>Mon, 20 May 2013 13:13:14 +0000</pubDate>
			<description>Guys, please let me know is anybody aware of the below doubt. php taking hosting server date and time but am in need to find the client time and date who accesing the site. otherwise how to find the date &amp; time in server time zone .</description>
			<content:encoded><![CDATA[ <p>Guys,</p>

<p>please let me know is anybody aware of the below doubt.</p>

<p>php taking hosting server date and time but am in need to find the client time and date who accesing the site.</p>

<p>otherwise how to find the date &amp; time in server time zone .</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/php/17">PHP</category>
			<dc:creator>varunsara</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/php/threads/454983/time-zone</guid>
		</item>
				<item>
			<title>read problem in c</title>
			<link>http://www.daniweb.com/software-development/c/threads/454982/read-problem-in-c</link>
			<pubDate>Mon, 20 May 2013 13:04:40 +0000</pubDate>
			<description>hi all; i have run this code and the first read and write work correctly. but and the second one is missed. the output log is: freez@JALALI:~$ ./a salam8a okok2freez@JALALI:~$ #include &lt;stdio.h&gt; int main() { write(1,&quot;salam&quot;,5); char a[2]; char b[5]; read(0,a,2); if(a[0]=='8') {write(1,&quot;ok&quot;,2); read(0,b,5); write(1,&quot;ok2&quot;,3); } return 0; }</description>
			<content:encoded><![CDATA[ <p>hi all;</p>

<p>i have run this code and the first read and write work correctly. but and the second one is missed.<br />
the output log is:</p>

<p>freez@JALALI:~$ ./a<br />
salam8a<br />
okok2freez@JALALI:~$</p>

<pre><code class="language-c">#include &lt;stdio.h&gt;

int main()
{
write(1,"salam",5);
char a[2];
char b[5];
read(0,a,2);
if(a[0]=='8')
{write(1,"ok",2);
read(0,b,5);
write(1,"ok2",3);
}
return 0;
}
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/c/118">C</category>
			<dc:creator>ferizhandi</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/c/threads/454982/read-problem-in-c</guid>
		</item>
				<item>
			<title>Assigment Problem-Hungarian Algorithm</title>
			<link>http://www.daniweb.com/web-development/php/threads/454981/assigment-problem-hungarian-algorithm</link>
			<pubDate>Mon, 20 May 2013 12:51:30 +0000</pubDate>
			<description>I am working on an Assignment Problem, a part of Operation Research but the problem am facing is how to assign the task to the agents and then the anomaly where the algorithm has to repeat it self when it is not able to perform the assignment.</description>
			<content:encoded><![CDATA[ <p>I am working on an Assignment Problem, a part of Operation Research but the problem am facing is how to assign the task to the agents and then the anomaly where the algorithm has to repeat it self when it is not able to perform the assignment.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/php/17">PHP</category>
			<dc:creator>Nero Basanta</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/php/threads/454981/assigment-problem-hungarian-algorithm</guid>
		</item>
				<item>
			<title>which consume more time : return STRUCT or return through call by reference</title>
			<link>http://www.daniweb.com/software-development/cpp/threads/454980/which-consume-more-time-return-struct-or-return-through-call-by-reference</link>
			<pubDate>Mon, 20 May 2013 12:09:39 +0000</pubDate>
			<description>please i want to return multiple values in c++ , and i have this peace of struct struct returns { int row_locs,col_locs; int row_descriptors,col_descriptors; double **locs; double **descriptors; }; and i have this pease of call by reference void returns (int &amp;row_locs,int &amp;col_locs,int &amp;row_descriptors,int &amp;col_descriptors,double **locs, double **descriptors){ } the ...</description>
			<content:encoded><![CDATA[ <p>please i want to return multiple values in c++ ,</p>

<p>and i have this peace of struct</p>

<pre><code class="language-cpp">struct returns {
int row_locs,col_locs;
int row_descriptors,col_descriptors;
double **locs;
double **descriptors;
};
</code></pre>

<p>and i have this pease of call by reference</p>

<pre><code class="language-cpp"> void returns (int &amp;row_locs,int &amp;col_locs,int &amp;row_descriptors,int &amp;col_descriptors,double  **locs, double  **descriptors){
 }
</code></pre>

<p>the question is</p>

<p>what doesn't consume more time struct or call by reference ??</p>

<p>Thanks in advanced</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/cpp/8">C++</category>
			<dc:creator>maml</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/cpp/threads/454980/which-consume-more-time-return-struct-or-return-through-call-by-reference</guid>
		</item>
				<item>
			<title>Draw phases of the moon On a form</title>
			<link>http://www.daniweb.com/software-development/csharp/code/454979/draw-phases-of-the-moon-on-a-form</link>
			<pubDate>Mon, 20 May 2013 11:13:14 +0000</pubDate>
			<description>Lately, I was reading [this snippet](http://www.daniweb.com/software-development/python/code/453788/moon-phase-at-a-given-date-python) by vegaseat. I thought, why not do it in C#? But I would also like to add lattitude and logitude in the celestial calculations and draw a picture of the moon at that moment and location. Now the calculations can get a bit involved ...</description>
			<content:encoded><![CDATA[ <p>Lately, I was reading <a href="http://www.daniweb.com/software-development/python/code/453788/moon-phase-at-a-given-date-python" rel="nofollow">this snippet</a> by vegaseat. I thought, why not do it in C#? But I would also like to add lattitude and logitude in the celestial calculations and draw a picture of the moon at that moment and location. Now the calculations can get a bit involved but are doable. So first I did a little try out about the drawing of a moon phase picture. Code for the main drawing method is given here. Just call it from a Paint event. A litte project file for a test app is included in a zip file as is a picture of how it looks.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/csharp/61">C#</category>
			<dc:creator>ddanbe</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/csharp/code/454979/draw-phases-of-the-moon-on-a-form</guid>
		</item>
				<item>
			<title>Complete AMD Gaming rig</title>
			<link>http://www.daniweb.com/hardware-and-software/threads/454978/complete-amd-gaming-rig</link>
			<pubDate>Mon, 20 May 2013 11:01:08 +0000</pubDate>
			<description>I have decided to make this rig. Here's my wishlist: http://www.amazon.com/gp/registry/wishlist/IOVE5X6Q4M85/ref=topnav_lists_1 I want a budget gaming PC and I love the performance of AMD at budget. So I guess I'll keep it approximately $600. CPU: AMD FX6300 GPU: Powercolor ATI Radeon HD 7770 1GB DDR5 RAM: Corsair Vengeance 8GB (2 ...</description>
			<content:encoded><![CDATA[ <p>I have decided to make this rig. Here's my wishlist: <a href="http://www.amazon.com/gp/registry/wishlist/IOVE5X6Q4M85/ref=topnav_lists_1" rel="nofollow">http://www.amazon.com/gp/registry/wishlist/IOVE5X6Q4M85/ref=topnav_lists_1</a></p>

<p>I want a budget gaming PC and I love the performance of AMD at budget. So I guess I'll keep it approximately $600.</p>

<p>CPU: AMD FX6300<br />
GPU: Powercolor ATI Radeon HD 7770 1GB DDR5<br />
RAM: Corsair Vengeance 8GB (2 x 4GB)<br />
Mobo: Gigabyte GA-970A<br />
HDD: Seagate Barracuda 1TB<br />
PSU: Corsair Builder Series CX 600Watt<br />
ODD: Asus internal 24x SATA DRW-24B3ST/BLK​/G (Black)<br />
Cab: Thermaltake V3 Black AMD Gaming Mid tower</p>

<p><strong>Please rate this out of 100.</strong></p>

<p>Q1. Will this have any bottleneck issues?<br />
Q2. Will this run games like Crysis 1,2,3, Mafia 2, Battlefield 3, Assasins Creed 3, GTA IV with ENB series, Halo series, Blur, Dirt 3, NFS MW2, Call Of Duty Black Ops 2, NFS The Run etc. in 1280 x 1024 resolution in HD in highest settings?<br />
Q3. Amazon.com says that shipping is free. Does that mean that the customs and duties will also not be charged? So price payed by me will be exactly the same as on the product page?</p>

<p>Awaiting answers for the above questions. Thank you in advance.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/hardware-and-software/1">Hardware and Software</category>
			<dc:creator>nmakes</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/hardware-and-software/threads/454978/complete-amd-gaming-rig</guid>
		</item>
				<item>
			<title>how to promotemy blog</title>
			<link>http://www.daniweb.com/internet-marketing/search-engine-optimization/threads/454977/how-to-promotemy-blog</link>
			<pubDate>Mon, 20 May 2013 10:59:42 +0000</pubDate>
			<description>hello i want to promote my blog but i don't know how to promote which activities i do</description>
			<content:encoded><![CDATA[ <p>hello i want to promote my blog but i don't know how to promote which activities i do</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/internet-marketing/search-engine-optimization/45">Search Engine Optimization</category>
			<dc:creator>spyindiarahul</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/internet-marketing/search-engine-optimization/threads/454977/how-to-promotemy-blog</guid>
		</item>
				<item>
			<title>Simple question</title>
			<link>http://www.daniweb.com/software-development/vbnet/threads/454976/simple-question</link>
			<pubDate>Mon, 20 May 2013 10:55:31 +0000</pubDate>
			<description>This program is to calculate commission and this is the pseudo I wrote for it. Tell me if I'm right. 1 Declare variables 2 get sales 3 calculate if sale &lt; 1500 Then commision= sale * 0,02 else commision= sale * 0,04 4 Dispaly commision</description>
			<content:encoded><![CDATA[ <p>This program is to calculate commission and this is the pseudo I wrote for it. Tell me if I'm right.<br />
1 Declare variables<br />
2 get sales<br />
3 calculate<br />
if sale &lt; 1500 Then<br />
commision= sale * 0,02<br />
else<br />
commision= sale * 0,04<br />
4 Dispaly commision</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/vbnet/58">VB.NET</category>
			<dc:creator>Vusumuzi</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/vbnet/threads/454976/simple-question</guid>
		</item>
				<item>
			<title>Morphological analysis of english verbs with python</title>
			<link>http://www.daniweb.com/software-development/python/threads/454975/morphological-analysis-of-english-verbs-with-python</link>
			<pubDate>Mon, 20 May 2013 10:46:42 +0000</pubDate>
			<description>i need small sample code using python which performs english verbs morphological analysis. Pls some body there, can you help your bro here?</description>
			<content:encoded><![CDATA[ <p>i need small sample code using python which performs english verbs morphological analysis. Pls some body there, can you help your bro here?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/python/114">Python</category>
			<dc:creator>derejetaffese</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/python/threads/454975/morphological-analysis-of-english-verbs-with-python</guid>
		</item>
				<item>
			<title>Globalization on Master Page</title>
			<link>http://www.daniweb.com/web-development/aspnet/threads/454974/globalization-on-master-page</link>
			<pubDate>Mon, 20 May 2013 10:39:34 +0000</pubDate>
			<description>Hi all, My problem is this, i want to do the globalization inside the master page, but not having luck, it works fine in the page but not in the master page.</description>
			<content:encoded><![CDATA[ <p>Hi all,</p>

<p>My problem is this,</p>

<p>i want to do the globalization inside the master page, but not having luck, it works fine in the page but not in the master page.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/aspnet/18">ASP.NET</category>
			<dc:creator>maxpaine69</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/aspnet/threads/454974/globalization-on-master-page</guid>
		</item>
				<item>
			<title>One of those stupid questions: What is &quot;+=&quot; and &quot;-=&quot;?</title>
			<link>http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/454973/one-of-those-stupid-questions-what-is-and-</link>
			<pubDate>Mon, 20 May 2013 10:23:36 +0000</pubDate>
			<description>Hello This is one of those stupid questions but you gotta ask to be sure What is var h=0; h += 5; var l=0; l -= 5; Is it the same as: var h=0; h = h+ 5; var l=0; l = l- 5; Thanks and sorry for the stupidity</description>
			<content:encoded><![CDATA[ <p>Hello</p>

<p>This is one of those stupid questions but you gotta ask to be sure</p>

<p>What is</p>

<p>var h=0;<br />
h += 5;</p>

<p>var l=0;<br />
l -= 5;</p>

<p>Is it the same as:</p>

<p>var h=0;<br />
h = h+ 5;</p>

<p>var l=0;<br />
l = l- 5;</p>

<p>Thanks and sorry for the stupidity</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/javascript-dhtml-ajax/117">JavaScript / DHTML / AJAX</category>
			<dc:creator>riahc3</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/454973/one-of-those-stupid-questions-what-is-and-</guid>
		</item>
				<item>
			<title>grouping data in php page</title>
			<link>http://www.daniweb.com/web-development/php/threads/454972/grouping-data-in-php-page</link>
			<pubDate>Mon, 20 May 2013 10:18:38 +0000</pubDate>
			<description>hi I have created the php report using below code. It works fine. But My problem is to group the data example # Date Code Name Rate Qty Amount# 15.01.2011 0001 Milk 4.01 50 200.50 15.01.2011 0125 Choklet 30.00 10 300.00 15.01.2011 0241 Drink 12.50 12 150.00 16.01.2011 5461 Meat ...</description>
			<content:encoded><![CDATA[ <p>hi<br />
I have created the php report using below code. It works fine. But My problem is to group the data<br />
example</p>

<pre><code># Date          Code   Name       Rate  Qty  Amount# 
 15.01.2011     0001   Milk       4.01  50    200.50
 15.01.2011     0125   Choklet   30.00  10    300.00
 15.01.2011     0241   Drink     12.50  12    150.00
 16.01.2011     5461   Meat      35.07  10    350.75
 16.01.2011     4587   Fish      17.80   5     89.00
                                    total    1090.25     
</code></pre>

<p>if I take the date range from 15.01.2011 to 16.01.2011,  it shows in php page look like above. But if i select<br />
 the date range as 15.01.2011 to 16.01.2011, i need look like below</p>

<p>Pls help me</p>

<pre><code> # Date          Code   Name       Rate  Qty  Amount# 
 15.01.2011     0001   Milk       4.01  50    200.50
 15.01.2011     0125   Choklet   30.00  10    300.00
 15.01.2011     0241   Drink     12.50  12    150.00
                             subtotal         650.50

 16.01.2011     5461   Meat      35.07  10    350.75
 16.01.2011     4587   Fish      17.80   5     89.00
                             subtotal         439.75 

                             grand total     1090.25 
</code></pre>

<p>it is my code</p>

<pre><code>    `&lt;?php //include '../templete/header.php'; ?&gt;
    &lt;script language="javascript" type="text/javascript"&gt;
     function printFunction(){

     window.print();
     }
    &lt;/script&gt;

    &lt;script language="javascript" type="text/javascript"&gt;

    function PrintGridData() {
        var prtGrid = document.getElementById('&lt;%=txtDocNo%&gt;');
        prtGrid.border = 0;
                            var prtwin = window.open('','PrintGridViewData','left=100,top=100,width=1000,height=1000,tollbar=0,scrollbars=1,status=0,resizable=1');
        prtwin.document.write(prtGrid.outerHTML);
        prtwin.document.close();
        prtwin.focus();
        prtwin.print();
        prtwin.close();
     &lt;/script&gt;

    &lt;table width="100%" align="center" cellpadding="4" cellspacing="1" class=tbl_table"&gt;
      &lt;tr&gt;
        &lt;td class="tbl_header"&gt;SO Date&lt;/td&gt;
        &lt;td class="tbl_header"&gt;MV CODE&lt;/td&gt;
        &lt;td class="tbl_header"&gt;MV NAME&lt;/td&gt;
        &lt;td class="tbl_header"&gt;RATE&lt;/td&gt;
        &lt;td class="tbl_header"&gt;SUPP.QTY&lt;/td&gt;
        &lt;td class="tbl_header"&gt;AMT&lt;/td&gt;
    &lt;/tr&gt;
    &lt;?php 
      if(isset($stmt))
        { 
            while($row = $stmt-&gt;fetch())
        {?&gt;
&lt;tr&gt;
&lt;td class="tbl_content"&gt;&lt;?php echo date("d-m-Y", strtotime($row['SODate']));?&gt;&lt;/td&gt;
  &lt;td class="tbl_content"&gt;&lt;?php echo $row['MVCode'];?&gt;&lt;/td&gt;
  &lt;td class="tbl_content"&gt;&lt;?php echo $row['MVName'];?&gt;&lt;/td&gt;

  &lt;td class="tbl_content_right"&gt;&lt;?php echo number_format($row['Rate'],2) ;?&gt;&lt;/td&gt;
  &lt;td class="tbl_content_right"&gt;&lt;?php echo number_format($row['Qty']) ;?&gt;&lt;/td&gt;
  &lt;td class="tbl_content_right"&gt;&lt;?php echo number_format($row['BalAmt'],2) ;?&gt;&lt;/td&gt;
  &lt;/tr&gt;

&lt;?php 
    $balamt+=$row['BalAmt'];
    $qty+=$row['Qty'];

}}?&gt; 

    &lt;tr&gt;&lt;td colspan="9"&gt;&lt;hr /&gt;&lt;/tr&gt;

    &lt;tr&gt;  

  &lt;td colspan="5"&gt;&lt;/td&gt;
  &lt;td class="tbl_content_total"&gt;  &lt;?php echo number_format($qty);?&gt;&lt;/td&gt;
  &lt;td class="tbl_content_total"&gt;  &lt;?php echo number_format($rtnqty);?&gt;&lt;/td&gt;
  &lt;td class="tbl_content_total"&gt;  &lt;?php echo number_format($balqty);?&gt;&lt;/td&gt;
  &lt;td class="tbl_content_total"&gt;  &lt;?php echo number_format($balamt,2);?&gt;&lt;/td&gt;

    &lt;/tr&gt;
    &lt;/table&gt;


    &lt;?php unset($dbh); unset($stmt); ?&gt;

    &lt;?php
    include '../templete/footer.php';
    ?&gt;
</code></pre>

<p>'<br />
Regards</p>

<p>Maideen</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/php/17">PHP</category>
			<dc:creator>Maideen</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/php/threads/454972/grouping-data-in-php-page</guid>
		</item>
				<item>
			<title>Hover popup that appears pointing to a button then disappears</title>
			<link>http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/454970/hover-popup-that-appears-pointing-to-a-button-then-disappears</link>
			<pubDate>Mon, 20 May 2013 09:58:23 +0000</pubDate>
			<description>Hello How can a small (I imagine jQuery UI popup) popup hover over a page then disappear after x seconds?</description>
			<content:encoded><![CDATA[ <p>Hello</p>

<p>How can a small (I imagine jQuery UI popup) popup hover over a page then disappear after x seconds?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/javascript-dhtml-ajax/117">JavaScript / DHTML / AJAX</category>
			<dc:creator>riahc3</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/454970/hover-popup-that-appears-pointing-to-a-button-then-disappears</guid>
		</item>
				<item>
			<title>PHP Error</title>
			<link>http://www.daniweb.com/web-development/php/threads/454969/php-error</link>
			<pubDate>Mon, 20 May 2013 09:46:00 +0000</pubDate>
			<description>What does the PHP error ‘Parse error in PHP – unexpected T_variable at line x’ means?</description>
			<content:encoded><![CDATA[ <p>What does the PHP error ‘Parse error in PHP – unexpected T_variable at line x’ means?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/php/17">PHP</category>
			<dc:creator>mohammed.ismail</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/php/threads/454969/php-error</guid>
		</item>
				<item>
			<title>PHP Thread</title>
			<link>http://www.daniweb.com/web-development/php/threads/454968/php-thread</link>
			<pubDate>Mon, 20 May 2013 09:43:49 +0000</pubDate>
			<description>How to run the interactive PHP shell from the command line interface?</description>
			<content:encoded><![CDATA[ <p>How to run the interactive PHP shell from the command line interface?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/php/17">PHP</category>
			<dc:creator>mohammed.ismail</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/php/threads/454968/php-thread</guid>
		</item>
				<item>
			<title>More information about String immutable</title>
			<link>http://www.daniweb.com/software-development/java/threads/454967/more-information-about-string-immutable</link>
			<pubDate>Mon, 20 May 2013 09:37:29 +0000</pubDate>
			<description>immutable objects cannot be altered,whereas in line 3 x contains xyzabc. I want to know what exactly is happening with the string object. Thanks in advance</description>
			<content:encoded><![CDATA[ <p>immutable objects cannot be altered,whereas in line 3 x contains xyzabc.</p>

<p>I want to know what exactly is happening with the string object. Thanks in advance</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/java/9">Java</category>
			<dc:creator>phani1092</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/java/threads/454967/more-information-about-string-immutable</guid>
		</item>
				<item>
			<title>help : how to store images on access database for vb6</title>
			<link>http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/454965/help-how-to-store-images-on-access-database-for-vb6</link>
			<pubDate>Mon, 20 May 2013 09:21:27 +0000</pubDate>
			<description>help guys, i need to know how to add images and video files (if its possible or just its file path) on access database to be retrieve in vb6 with every images and videos filename included (can be displayed on a separate label for example)</description>
			<content:encoded><![CDATA[ <p>help guys, i need to know how to add images and video files (if its possible or just its file path) on access database to be retrieve in vb6 with every images and videos filename included (can be displayed on a separate label for example)</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/visual-basic-4-5-6/4">Visual Basic 4 / 5 / 6</category>
			<dc:creator>raizuke.blademaster</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/454965/help-how-to-store-images-on-access-database-for-vb6</guid>
		</item>
				<item>
			<title>Wifi setup&gt;&gt;I need help(Recommendations)</title>
			<link>http://www.daniweb.com/hardware-and-software/networking/threads/454964/wifi-setupi-need-helprecommendations</link>
			<pubDate>Mon, 20 May 2013 08:38:11 +0000</pubDate>
			<description>I am about to set up a wifi network that would run for about 5km and would enable about 300 users to connect for highspeed internet access. please i need recommendation on the type of equipmenst to use and the amount of bandwidth to purchas I will be very grateful ...</description>
			<content:encoded><![CDATA[ <p>I am about to set up a wifi network that would run for about 5km and would enable about 300 users to connect for highspeed internet access. please i need recommendation on the type of equipmenst to use and the amount of bandwidth to purchas I will be very grateful if anybody can help me.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/hardware-and-software/networking/13">Networking</category>
			<dc:creator>xclusivekelly</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/hardware-and-software/networking/threads/454964/wifi-setupi-need-helprecommendations</guid>
		</item>
			</channel>
</rss>