<?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>

				<item>
			<title>Amost done</title>
			<link>http://www.daniweb.com/software-development/cpp/threads/424277/amost-done</link>
			<pubDate>Sun, 27 May 2012 20:56:54 +0000</pubDate>
			<description>The program runs but I can not get it to add the totals from the three employess. Then when i enter an employee info the totals show after each employee instead of the end. Please help. If you can please explain what I need to do in simple terms. Its ...</description>
			<content:encoded><![CDATA[ <p>The program runs but I can not get it to add the totals from the three employess. Then when i enter an employee info the totals show after each employee instead of the end. Please help. If you can please explain what I need to do in simple terms. Its my first class and I do not have it down yet, thank you.</p>

<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;string&gt;
#include &lt;iomanip&gt;

using namespace std;

//
//CLASS DECLARATION SECTION
//
class EmployeeClass 
{
public:
    void ImplementCalculations(string EmployeeName, int hours, double wage);
    void DisplayEmployInformation(void);
    void Addsomethingup (void);
    string EmployeeName ;
    int hours ;
    double wage ;
    double basepay ;
    double overtime_hours ;
    double overtime_pay ;
    double overtime_extra ;
    double iTotal_salaries ;
    double iIndividualSalary ;
    int iTotal_hours ;
    int iTotal_OvertimeHours ;
};

int main()
{   system("cls"); 

    cout &lt;&lt; "\nWelcome to the Employee Pay Center\n\n" ;

    EmployeeClass Employee [3];
    const int numEmployees = sizeof (Employee) / sizeof (Employee [0]);
    for (int i = 0; i &lt; numEmployees; ++i)


    {
    cout&lt;&lt;"\n\n Enter your employee name: ";
    cin &gt;&gt; Employee[i].EmployeeName;

    cout &lt;&lt; "Enter hours worked: ";
    cin &gt;&gt; Employee[i].hours;

    cout &lt;&lt; "Enter your hourly wage: ";
    cin &gt;&gt; Employee[i].wage;

    }

    for (int i = 0; i &lt; numEmployees; ++i )
    {
        Employee[i].ImplementCalculations(Employee[i].EmployeeName,Employee[i].hours, Employee[i].wage);
    }

}
void EmployeeClass::ImplementCalculations (string EmployeeName, int hours, double wage)
//Initialize overtime variables
{

    basepay=0.0;
    overtime_hours=0;
    overtime_pay=0.0;
    overtime_extra=0.0;
    iIndividualSalary=0.0;


    if (hours &gt; 40)// more than 40

    {

        basepay = (40 * wage);
        overtime_hours = hours-40;
        overtime_pay = wage * 1.5;
        overtime_extra = overtime_hours*overtime_pay;
        iIndividualSalary = (overtime_extra + basepay);

        DisplayEmployInformation();
    }
    else // less than 40 hours
    {
        basepay=hours*wage;
        iIndividualSalary=basepay;

        DisplayEmployInformation();
    }


} //End of Main Function


void EmployeeClass::DisplayEmployInformation () 

{
// This function displays all the employee output information.

    cout&lt;&lt;"n\n";
    cout&lt;&lt;"Employee Name ...................=" &lt;&lt; EmployeeName &lt;&lt; endl;

    cout&lt;&lt;"Base Pay ....................=" &lt;&lt; basepay &lt;&lt; endl;

    cout&lt;&lt;"Hours in Overtime ....................=" &lt;&lt; overtime_hours &lt;&lt; endl;

    cout&lt;&lt;"Overtime Pay ....................=" &lt;&lt; overtime_extra &lt;&lt; endl;

    cout&lt;&lt;"Total Pay ....................=" &lt;&lt; iIndividualSalary &lt;&lt; endl;

    Addsomethingup();

} // END OF Display Employee Information


void EmployeeClass::Addsomethingup ()

{

    iTotal_salaries=0;
    iTotal_hours=0;
    iTotal_OvertimeHours=0;


    {

    }

    cout &lt;&lt; "\n\n";

    cout &lt;&lt; "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" &lt;&lt; endl;
    cout &lt;&lt; "%%%% EMPLOYEE SUMMARY DATA%%%%%%%%%%%%%%%%%%%%%%%" &lt;&lt; endl;
    cout &lt;&lt; "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" &lt;&lt; endl;
    cout &lt;&lt; "%%%% Total Employee Salaries ..... =" &lt;&lt; iTotal_salaries &lt;&lt; endl;
    cout &lt;&lt; "%%%% Total Employee Hours ........ =" &lt;&lt; iTotal_hours &lt;&lt; endl;
    cout &lt;&lt; "%%%% Total Overtime Hours......... =" &lt;&lt; iTotal_OvertimeHours &lt;&lt; endl;
    cout &lt;&lt; "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" &lt;&lt; endl;
    cout &lt;&lt; "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" &lt;&lt; endl;

    system("Pause");




    } // End of function
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/cpp/8">C++</category>
			<dc:creator>s0urce</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/cpp/threads/424277/amost-done</guid>
		</item>
				<item>
			<title>How to put check to varifiy if data is available or not</title>
			<link>http://www.daniweb.com/software-development/csharp/threads/424276/how-to-put-check-to-varifiy-if-data-is-available-or-not</link>
			<pubDate>Sun, 27 May 2012 20:45:20 +0000</pubDate>
			<description> using System; using System.Configuration; using System.Web; using System.IO; using System.Data; using System.Data.SqlClient; public class ShowImage : IHttpHandler { public void ProcessRequest(HttpContext context) { Int32 empno; if (context.Request.QueryString[&quot;id&quot;] != null) empno = Convert.ToInt32(context.Request.QueryString[&quot;id&quot;]); else throw new ArgumentException(&quot;No parameter specified&quot;); context.Response.ContentType = &quot;image/jpeg&quot;; Stream strm = ShowEmpImage(empno); byte[] buffer = new byte[4096]; ...</description>
			<content:encoded><![CDATA[ <pre><code class="language-cs">using System;
using System.Configuration;
using System.Web;
using System.IO;
using System.Data;
using System.Data.SqlClient;

public class ShowImage : IHttpHandler
{
    public void ProcessRequest(HttpContext context)
    {
       Int32 empno;
       if (context.Request.QueryString["id"] != null)
            empno = Convert.ToInt32(context.Request.QueryString["id"]);
       else
            throw new ArgumentException("No parameter specified");

       context.Response.ContentType = "image/jpeg";
       Stream strm = ShowEmpImage(empno);
       byte[] buffer = new byte[4096];
       int byteSeq = strm.Read(buffer, 0, 4096);

       while (byteSeq &gt; 0)
       {
           context.Response.OutputStream.Write(buffer, 0, byteSeq);
           byteSeq = strm.Read(buffer, 0, 4096);
       }       
       //context.Response.BinaryWrite(buffer);
    }

    public Stream ShowEmpImage(int empno)
    {

        SqlConnection con = ConnectionManager.GetConnection();
        string sql = "SELECT emp_pic FROM employee WHERE emp_id = @ID";
        SqlCommand cmd = new SqlCommand(sql,con);
        cmd.CommandType = CommandType.Text;
        cmd.Parameters.AddWithValue("@ID", empno);
        con.Open();

        object img = cmd.ExecuteScalar();

        // how to verify if data is not available in database

        try
        {
            return new MemoryStream((byte[])img);
        }
        catch
        {
            return null;
        }
        finally
        {
            con.Close();
        }
    }

    public bool IsReusable
    {
        get
        {
            return false;
        }
    }


}
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/csharp/61">C#</category>
			<dc:creator>silent.saqi</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/csharp/threads/424276/how-to-put-check-to-varifiy-if-data-is-available-or-not</guid>
		</item>
				<item>
			<title>Problem with NETGEAR wireless adapter</title>
			<link>http://www.daniweb.com/hardware-and-software/microsoft-windows/windows-vista-and-windows-7/threads/424275/problem-with-netgear-wireless-adapter</link>
			<pubDate>Sun, 27 May 2012 20:32:08 +0000</pubDate>
			<description>I used the wireless adapter(Netgear - WG111v3) on my computer for weeks without any trouble at all. (At the time i installed it, I remember I found out it didn't work/didn't work well on windows 7 so I downloaded some driver or something -- Don't really remember -- and it ...</description>
			<content:encoded><![CDATA[ <p>I used the wireless adapter(Netgear - WG111v3) on my computer for weeks without any trouble at all.<br />
(At the time i installed it, I remember I found out it didn't work/didn't work well on windows 7 so I downloaded some driver or something -- Don't really remember -- and it worked fine.)</p>

<p>The setup file I'm using:<br />
<a href="http://support.netgear.com/app/answe...ail/a_id/12962" rel="nofollow">http://support.netgear.com/app/answe...ail/a_id/12962</a></p>

<p>The computer:<br />
Windows 7, 64 bit<br />
8 GB ram</p>

<p>Suddenly, today, it stopped working...<br />
I have tried a lot of drivers and even tried installing Vista 64 bit drivers (something that worked for someone in some thread), but it won't work..</p>

<p>The adapter is recognized by the computer, but the smart wizard won't launch.</p>

<p>I try to launch it and nothing seems to happen, although the process is listed in task manager..</p>

<p>----------</p>

<p>I tried installing it on my laptop - which is also using windows 7 64 bit and has 3 GB ram.</p>

<p>On my other computer it installed the software and then told me to plug in the adapter and press next.<br />
As I did so, a little box came up saying "System initialization..blabla.." and then it just shut down.</p>

<p>On my laptop however, after the "System initialization" box showed up, it continued. Asking me to either use WPS to connect, or manually enter the network info.</p>

<p>for some reason, my other computer(not the laptop) doesn't go as far as my laptop does..</p>

<p>-------------</p>

<p>I disabled the windows firewall and my third party firewall - it still does not work.</p>

<p>I come to the box saying "System initialization.. Please wait.." and it shuts down.<br />
The smart wizard launches (nothing shows on screen, but I can see it in the task manager, under processes) and a little notification comes up telling me that the drivers have been installed</p>

<p>-----------</p>

<p>I checked the driver installed on my laptop and my desktop computer.<br />
They were the same, exactly the same.<br />
Both from NETGEAR, both the same version, the same date.<br />
I also checked which drivers they used and it was the same 2<br />
(...\system32\DRIVERS\wg111v3.sys)<br />
and<br />
(...\System32\drivers\vwifibus.sys)</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/hardware-and-software/microsoft-windows/windows-vista-and-windows-7/38">Windows Vista and Windows 7</category>
			<dc:creator>sha11e</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/hardware-and-software/microsoft-windows/windows-vista-and-windows-7/threads/424275/problem-with-netgear-wireless-adapter</guid>
		</item>
				<item>
			<title>display data in html table</title>
			<link>http://www.daniweb.com/web-development/aspnet/threads/424274/display-data-in-html-table</link>
			<pubDate>Sun, 27 May 2012 20:12:20 +0000</pubDate>
			<description>hello my project is web discussion forum i want to show topics or articles title in table and make it hyperlink . i want get data from database table and display in html table how its poossible...?</description>
			<content:encoded><![CDATA[ <p>hello my project is web discussion forum i want to show topics  or articles title in table and make it hyperlink .</p>

<p>i want get data from database table and display in html table how its poossible...?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/aspnet/18">ASP.NET</category>
			<dc:creator>mani508</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/aspnet/threads/424274/display-data-in-html-table</guid>
		</item>
				<item>
			<title>Sum display error</title>
			<link>http://www.daniweb.com/web-development/databases/threads/424273/sum-display-error</link>
			<pubDate>Sun, 27 May 2012 19:52:01 +0000</pubDate>
			<description>Good evening I'm running a tipping competition, and am hoping to make the updating slightly less tedious. The code currently reads as follows: &lt;?php $query = &quot; SELECT SUM(comptipsterselections.profit) as Profit, comptipsterselections.stable, comptipsterboard.link FROM comptipsterselections INNER JOIN comptipsterboard ON comptipsterselections.stable=comptipsterboard.stable WHERE comptipsterselections.comp = 'aintree 2010' GROUP BY comptipsterselections.stable, comptipsterboard.link ORDER ...</description>
			<content:encoded><![CDATA[ <p>Good evening</p>

<p>I'm running a tipping competition, and am hoping to make the updating slightly less tedious.  The code currently reads as follows:</p>

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

    $query = " SELECT SUM(comptipsterselections.profit) as Profit, comptipsterselections.stable, comptipsterboard.link
       FROM comptipsterselections INNER JOIN comptipsterboard
       ON comptipsterselections.stable=comptipsterboard.stable
       WHERE comptipsterselections.comp = 'aintree 2010'
       GROUP BY comptipsterselections.stable, comptipsterboard.link
       ORDER BY SUM(comptipsterselections.profit) DESC";

    $result = mysql_query($query) or die(mysql_error());
    // Set-up table
       echo "&lt;table class='correctenglish' border='1' cellpadding='4' cellspacing='0' width='75%'&gt;";
       echo "&lt;tr class='toprow'&gt; &lt;th&gt;Stable&lt;/th&gt; &lt;th&gt;Daily Profit&lt;/th&gt;&lt;/tr&gt;";

    // Print out result
       while($row = mysql_fetch_array($result)){
       $link='/site/competitions/tipster'.$row[link];
       echo "&lt;tr&gt;&lt;td&gt;";
       echo "&lt;a href='$link'&gt;";
       echo $row[stable];
       echo "&lt;/td&gt;&lt;td&gt;";
       echo " &amp;#163;". $row[Profit];
       echo "&lt;/td&gt;&lt;/tr&gt;";
       }
       echo "&lt;/table&gt;";
       ?&gt;
</code></pre>

<p>The profit for each player is showing correctly for each player. However, the printed results now show links for each competition the player has taken part in, not just the Aintree 2010 competition:  <a href="http://www.further-flight.co.uk/site/competitions/tipster/aintr/sp/2010c.php" rel="nofollow">Click Here</a> I thought the WHERE clause would filter out anything that didn't have Aintree 2010 in the comp column, but this isn't the case. Is there any advice for getting this added to the code?</p>

<p>The two tables of data look like this:</p>

<p>comptipsterselections: <a href="http://www.further-flight.co.uk/site/competitions/tipster/aintr/sp/comptipsterselections.jpg" rel="nofollow">http://www.further-flight.co.uk/site/competitions/tipster/aintr/sp/comptipsterselections.jpg</a><br />
comptipsterboars: <a href="http://www.further-flight.co.uk/site/competitions/tipster/aintr/sp/comptipsterboard.jpg" rel="nofollow">http://www.further-flight.co.uk/site/competitions/tipster/aintr/sp/comptipsterboard.jpg</a></p>

<p>Any advice gratefully accepted!</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/databases/16">Databases</category>
			<dc:creator>Borderline</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/databases/threads/424273/sum-display-error</guid>
		</item>
				<item>
			<title>Help, cannot get a calculator to work</title>
			<link>http://www.daniweb.com/software-development/vbnet/threads/424272/help-cannot-get-a-calculator-to-work</link>
			<pubDate>Sun, 27 May 2012 19:50:12 +0000</pubDate>
			<description>Hey, i have to finished a cacluator, all my code seems to be working apart from the equals button and i do not understand why..i've tried several different things such as a case too but nothing seems to work to get the equals button working..please help!! This is my code, ...</description>
			<content:encoded><![CDATA[ <p>Hey, i have to finished a cacluator, all my code seems to be working apart from the equals button and i do not understand why..i've tried several different things such as a case too but nothing seems to work to get the equals button working..please help!!<br />
This is my code, no need for all the buttons they are the same and ive declared variables..help soon please!</p>

<pre><code class="language-vb">Private Sub btn0_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn0.Click
    If btnCalculation = 1 Or btnCalculation = 2 Then
        txtDisplay.Clear()
    End If
    txtDisplay.Text = txtDisplay.Text &amp; btn0.Text
End Sub

Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click

    If btnCalculation = 1 Or btnCalculation = 2 Then
        txtDisplay.Clear()
    End If

    txtDisplay.Text = txtDisplay.Text &amp; "+" 
    btnCalculation = 1
    Number1 = txtDisplay.text

End Sub


Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
    If btnClear.Enabled = True Then
        Number1 = 0
        Number2 = 0
        txtDisplay.Text = " "
    End If

End Sub

Private Sub btnMinus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMinus.Click
    Number1 = txtDisplay.Text
    If btnCalculation = 1 Or btnCalculation = 2 Then
        txtDisplay.Clear()
    End If

    txtDisplay.Text = txtDisplay.Text &amp; "-"
    btnCalculation = 2

End Sub

Private Sub btnEnter_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEnter.Click

    Number2 = txtDisplay.Text

    If btnCalculation = 1 Then
        txtDisplay.Text = Number1 + Number2
    ElseIf btnCalculation = 2 Then
        txtDisplay.Text = Number1 - Number2
    End If


End Sub
</code></pre>

<p>End Class</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/vbnet/58">VB.NET</category>
			<dc:creator>1234qwerty</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/vbnet/threads/424272/help-cannot-get-a-calculator-to-work</guid>
		</item>
				<item>
			<title>SimpleXML For Each Loop Problem</title>
			<link>http://www.daniweb.com/web-development/php/threads/424271/simplexml-for-each-loop-problem</link>
			<pubDate>Sun, 27 May 2012 19:32:15 +0000</pubDate>
			<description>Hello, Basically, I am trying to loop though an OPF document which is an XML document to link 2 children of different nodes together. If I do not use an if statement in the second for each loop, I can display all children from &lt;manifest&gt;, however I need the if ...</description>
			<content:encoded><![CDATA[ <p>Hello,</p>

<p>Basically, I am trying to loop though an OPF document which is an XML document to link 2 children of different nodes together. If I do not use an if statement in the second for each loop, I can display all children from &lt;manifest&gt;, however I need the if statement becuase I only want to display the children which match there id attribute with the previously gotten idref attribute which I have stored and I know is not empty and is definitley the same as the id, so I do not understand why this is not working as I have tested and tested...</p>

<p>Here's my PHP:</p>

<pre><code>&lt;?php
$xml = simplexml_load_file("content.opf");

$items = "";

echo "&lt;strong&gt;IDRefs:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;";
foreach ($xml-&gt;spine-&gt;children() as $idref) {
    $itemref1 = $idref['idref'];
    echo $itemref1."&lt;br /&gt;";
    echo "&lt;br /&gt;&lt;strong&gt;Items:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;";
    foreach ($xml-&gt;manifest-&gt;children() as $item) {
        if($idref['idref'] == $item['id']) {
            $items .= $item['href'].",";
            echo $item['id'].":".$item['href']."&lt;br /&gt;";
        }
    }
    echo "&lt;hr /&gt;";
}

echo "&lt;br /&gt;&lt;br /&gt;";

$title = $xml-&gt;metadata-&gt;children('dc', true)-&gt;title;
$creator = $xml-&gt;metadata-&gt;children('dc', true)-&gt;creator;
$description = $xml-&gt;metadata-&gt;children('dc', true)-&gt;description;
$publisher = $xml-&gt;metadata-&gt;children('dc', true)-&gt;publisher;
$date = $xml-&gt;metadata-&gt;children('dc', true)-&gt;date;
$rights = $xml-&gt;metadata-&gt;children('dc', true)-&gt;rights;
$language = $xml-&gt;metadata-&gt;children('dc', true)-&gt;language;

die($items."&lt;br /&gt;&lt;br /&gt;".$title."&lt;br /&gt;".$creator."&lt;br /&gt;".$description."&lt;br /&gt;".$publisher."&lt;br /&gt;".$date."&lt;br /&gt;".$rights."&lt;br /&gt;".$language);
?&gt; 
</code></pre>

<p>Here is the XML I am working with:</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;package xmlns="<a href="http://www.idpf.org/2007/opf" rel="nofollow">http://www.idpf.org/2007/opf</a>" xmlns:dc="<a href="http://purl.org/dc/elements/1.1/" rel="nofollow">http://purl.org/dc/elements/1.1/</a>"
         xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" rel="nofollow">http://www.w3.org/2001/XMLSchema-instance</a>"
         version="2.0"
         unique-identifier="bookid"&gt;
   &lt;metadata xmlns:dc="<a href="http://purl.org/dc/elements/1.1/" rel="nofollow">http://purl.org/dc/elements/1.1/</a>"  xmlns:opf="<a href="http://www.idpf.org/2007/opf" rel="nofollow">http://www.idpf.org/2007/opf</a>"&gt;
      &lt;dc:creator&gt;Brooke, Leslie&lt;/dc:creator&gt;
      &lt;dc:title&gt;Little Bo-Peep: A Nursery Rhyme Picture Book&lt;/dc:title&gt;
      &lt;dc:language xsi:type="dcterms:RFC3066"&gt;en-GB&lt;/dc:language&gt;
      &lt;dc:rights&gt;Public Domain&lt;/dc:rights&gt;
      &lt;dc:publisher&gt;Project Gutenberg (epub version: Bob DuCharme)&lt;/dc:publisher&gt;
      &lt;dc:identifier id="bookid"&gt;<a href="http://www.snee.com/epub/pg23598" rel="nofollow">http://www.snee.com/epub/pg23598</a>&lt;/dc:identifier&gt;
   &lt;/metadata&gt;
   &lt;manifest xmlns:opf="<a href="http://www.idpf.org/2007/opf" rel="nofollow">http://www.idpf.org/2007/opf</a>"&gt;
      &lt;item id="ncx" href="toc.ncx" media-type="text/xml"/&gt;
      &lt;item id="main" href="23598-h.htm" media-type="application/xhtml+xml"/&gt;
      &lt;item id="imgcover" href="images/imgcover.jpg" media-type="image/jpeg"/&gt;
      &lt;item id="img2" href="images/img2.jpg" media-type="image/jpeg"/&gt;
      &lt;item id="img4" href="images/img4.jpg" media-type="image/jpeg"/&gt;
      &lt;item id="img5" href="images/img5.jpg" media-type="image/jpeg"/&gt;
      &lt;item id="img6" href="images/img6.jpg" media-type="image/jpeg"/&gt;
      &lt;item id="img8" href="images/img8.jpg" media-type="image/jpeg"/&gt;
      &lt;item id="img9" href="images/img9.jpg" media-type="image/jpeg"/&gt;
      &lt;item id="img10" href="images/img10.jpg" media-type="image/jpeg"/&gt;
      &lt;item id="img11" href="images/img11.jpg" media-type="image/jpeg"/&gt;
      &lt;item id="img13" href="images/img13.jpg" media-type="image/jpeg"/&gt;
      &lt;item id="img14" href="images/img14.jpg" media-type="image/jpeg"/&gt;
      &lt;item id="img16" href="images/img16.jpg" media-type="image/jpeg"/&gt;
      &lt;item id="img17" href="images/img17.jpg" media-type="image/jpeg"/&gt;
      &lt;item id="img19" href="images/img19.jpg" media-type="image/jpeg"/&gt;
      &lt;item id="img20" href="images/img20.jpg" media-type="image/jpeg"/&gt;
      &lt;item id="img22" href="images/img22.jpg" media-type="image/jpeg"/&gt;
      &lt;item id="img23" href="images/img23.jpg" media-type="image/jpeg"/&gt;
      &lt;item id="img24" href="images/img24.jpg" media-type="image/jpeg"/&gt;
      &lt;item id="img25" href="images/img25.jpg" media-type="image/jpeg"/&gt;
      &lt;item id="img27" href="images/img27.jpg" media-type="image/jpeg"/&gt;
      &lt;item id="img28" href="images/img28.jpg" media-type="image/jpeg"/&gt;
      &lt;item id="img29" href="images/img29.jpg" media-type="image/jpeg"/&gt;
      &lt;item id="img31" href="images/img31.jpg" media-type="image/jpeg"/&gt;
      &lt;item id="img32" href="images/img32.jpg" media-type="image/jpeg"/&gt;
   &lt;/manifest&gt;
   &lt;spine toc="ncx"&gt;
      &lt;itemref idref="main"/&gt;
   &lt;/spine&gt;
&lt;/package&gt;
</code></pre>

<p>It displays the title, creator, etc fine, it's just that one if statment in the second for each that is not working right:</p>

<pre><code>if($idref['idref'] == $item['id']) {
</code></pre>

<p>Thanks for you time, any help will be greatly appreciated!</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/php/17">PHP</category>
			<dc:creator>BlueCharge</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/php/threads/424271/simplexml-for-each-loop-problem</guid>
		</item>
				<item>
			<title>Hindi Rock Bands</title>
			<link>http://www.daniweb.com/community-center/geeks-lounge/threads/424270/hindi-rock-bands</link>
			<pubDate>Sun, 27 May 2012 19:03:54 +0000</pubDate>
			<description>Rock Music has been always my favourite Genre and since Junoon (Pakistan) blew my mind away in the 90's ...it has been my earnest and honest chase to track down good hindi rock music from both India and Pakistan. I would like to start by introducing you to a really ...</description>
			<content:encoded><![CDATA[ <p>Rock Music has been always my favourite Genre and since Junoon (Pakistan) blew my mind away in the 90's ...it has been my earnest  and honest chase to track down good hindi rock music from both India and Pakistan.<br />
I would like to start by introducing you to a really superb and progressive Hindi Rock Band - Punkh (New Delhi) and their Germany produced hard hitting/edgy sound.<br />
Kindly comment and let us help this small but verile community to thrive despite the ''Bollywood Overdose". Long Live Desi Rock!<br />
<a href="http://soundcloud.com/punkh" rel="nofollow">http://soundcloud.com/punkh</a></p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/community-center/geeks-lounge/6">Geeks' Lounge</category>
			<dc:creator>maddogz</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/community-center/geeks-lounge/threads/424270/hindi-rock-bands</guid>
		</item>
				<item>
			<title>ToolbarH Application by conduit ltd</title>
			<link>http://www.daniweb.com/hardware-and-software/microsoft-windows/viruses-spyware-and-other-nasties/threads/424269/toolbarh-application-by-conduit-ltd</link>
			<pubDate>Sun, 27 May 2012 18:38:43 +0000</pubDate>
			<description>I keep getting this ToolbarH pop up Idon't know how to get rid. any answer's please. Thank you Jeffsden.</description>
			<content:encoded><![CDATA[ <p>I keep getting this ToolbarH pop up Idon't know how to get rid. any answer's please.<br />
Thank you<br />
Jeffsden.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/hardware-and-software/microsoft-windows/viruses-spyware-and-other-nasties/64">Viruses, Spyware and other Nasties</category>
			<dc:creator>jeffsden</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/hardware-and-software/microsoft-windows/viruses-spyware-and-other-nasties/threads/424269/toolbarh-application-by-conduit-ltd</guid>
		</item>
				<item>
			<title>read the backcolor of a textbox</title>
			<link>http://www.daniweb.com/software-development/vbnet/threads/424268/read-the-backcolor-of-a-textbox</link>
			<pubDate>Sun, 27 May 2012 18:06:49 +0000</pubDate>
			<description>I am trying to determine the backcolor of a textbox and have an event happen. I've been using: &quot;If txtbox.backcolor = System.Drawing.Color.Red Then End if&quot; But this dont work. Can somone help me? ml</description>
			<content:encoded><![CDATA[ <p>I am trying to determine the backcolor of a textbox and have an event happen.  I've been using:</p>

<p>"If txtbox.backcolor = System.Drawing.Color.Red Then</p>

<p>End if"</p>

<p>But this dont work.  Can somone help me?</p>

<p>ml</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/vbnet/58">VB.NET</category>
			<dc:creator>major_lost</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/vbnet/threads/424268/read-the-backcolor-of-a-textbox</guid>
		</item>
				<item>
			<title>how to convert toupper();</title>
			<link>http://www.daniweb.com/software-development/cpp/threads/424267/how-to-convert-toupper</link>
			<pubDate>Sun, 27 May 2012 16:57:04 +0000</pubDate>
			<description>erm i got a bit problem with toupper(); example: char ch = 'a'; char upper; upper = toupper(ch); if i use cout to show char &quot;upper&quot;, it shows the ascii code for uppercase.. in this case, it shows '65' in screen, i know it supposed to show 'A' instead of ...</description>
			<content:encoded><![CDATA[ <p>erm i got a bit problem with toupper();</p>

<p>example:</p>

<pre><code class="language-cpp">char ch = 'a';
char upper;

upper = toupper(ch);
</code></pre>

<p>if i use cout to show char "upper", it shows the ascii code for uppercase..<br />
in this case, it shows '65' in screen, i know it supposed to show 'A' instead of '65', how to makes it shows 'A' instead of '65' in the screen?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/cpp/8">C++</category>
			<dc:creator>mohur</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/cpp/threads/424267/how-to-convert-toupper</guid>
		</item>
				<item>
			<title>Need assistance with adding additional table rows --ajax</title>
			<link>http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/424266/need-assistance-with-adding-additional-table-rows-ajax</link>
			<pubDate>Sun, 27 May 2012 16:30:48 +0000</pubDate>
			<description>Hi: I was wondering if it is possible for an click() element for jquery to call another document.ready() element from within. Here is what I mean: I have: $('#addrow').click(function(){ $('.item-row:last').after('&lt;tr class=&quot;item-row&quot;&gt;&lt;td valign=&quot;top&quot; align=center style=&quot;border-left: 0px solid #cccccc;&quot; width=&quot;100%&quot; class=&quot;item-name&quot;&gt;&lt;div class=&quot;delete-wpr&quot;&gt;&lt;?php echo $dd2;?&gt;&lt;a class=&quot;delete&quot; href=&quot;javascript:;&quot; title=&quot;Remove row&quot;&gt;D&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; align=center &gt;&lt;select id=&quot;service_subcat_1&quot; ...</description>
			<content:encoded><![CDATA[ <p>Hi:</p>

<p>I was wondering if it is possible for an click() element for jquery to call another document.ready() element from within. Here is what I mean:<br />
 I have:</p>

<pre><code class="language-js"> $('#addrow').click(function(){
        $('.item-row:last').after('&lt;tr class="item-row"&gt;&lt;td valign="top" align=center style="border-left: 0px solid #cccccc;" width="100%" class="item-name"&gt;&lt;div class="delete-wpr"&gt;&lt;?php echo $dd2;?&gt;&lt;a class="delete" href="javascript:;" title="Remove row"&gt;D&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td valign="top" align=center &gt;&lt;select id="service_subcat_1" style="color:#003399; text-align:justify; font-size:1.0em; border-left: none; border-right: none; border-bottom: none"&gt;&lt;option&gt;Select Category&lt;/option&gt;&lt;/select&gt;&lt;/td&gt;&lt;td valign="top" align=center&gt;&lt;div id="invtbox_" name="invtbox_"&gt;---&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;textarea id="descbox_" name="descbox_" rows="8" cols="40" class="expand80-1000" style="color:#003399; text-align:justify; font-size:1.0em; border-left: none; border-right: none; border-bottom: none"&gt;Make A Service or Product Selection&lt;/textarea&gt;&lt;/td&gt;&lt;td valign="top" align=center&gt;&lt;input  type="text" id="qtybox_" name="qtybox_"  class="qty" size="3" maxlength="3" value="0" class="combo3" rel="code_id" title="" style="color:#003399; text-align:left; font-size:1.1em; border-left: none; border-right: none; border-bottom: none"&gt;&lt;/td&gt;&lt;td valign=top&gt;&lt;textarea id="costbox_" name="costbox_" class="costbox"rows="1" cols="5" style="color:#003399; text-align:justify; font-size:1.0em; border-left: none; border-right: none; border-bottom: none"&gt;&lt;/textarea&gt;&lt;/td&gt;&lt;input type="hidden" name="dimension2_id" value="0"&gt;&lt;td valign="top" align=center style="border-left: 0px solid #cccccc;" width="14%" align="left"&gt; &lt;span class="price" id="pricebox_" name="pricebox_"  style="color:#003399; text-align:left; font-size:1.4em; border-left: none; border-right: none; border-bottom: none, border-top: 2px gray"&gt;$0&lt;/span&gt;&lt;/td&gt;&lt;/td&gt;&lt;/tr&gt;');
        if ($('.delete').length &gt; 0) { $('.delete').show(); }
        bind();
    });
</code></pre>

<p>the select box id (id="service_subcat_1") within the $(.item-row:last).after()) is dependent on the following js to load addition list items:</p>

<pre><code class="language-js">&lt;!--addform script--&gt;
 &lt;script type="text/javascript"&gt;
// ajax for multiple dropdown boxes
$(document).ready(function() {
    var data_1 = &lt;?php echo $arr1;?&gt;;
    var id_1;
    function getData_1(pass_CatID){
        var content_1 = '';
        var content = '&lt;option name="specify id="specify" style="background: url() right no-repeat; width: 20px"&gt;------SPECIFY-----&lt;/option&gt;';
        var product_desc_ = '';
        var invt_ = '';
        var qty_ = '';
        var cost_ = '';
        id_1 = pass_CatID;
        $.each(data_1[id_1], function(key,value) {          
            if(invt_ == '')invt_ = value['invt_'];
            if(product_desc_ == '')product_desc_ = value['product_desc_'];
            if(cost_ == '')cost_ = value['cost_'];
             content_1 += '&lt;option value="' + key + '"&gt;' + value['subcat_label_1'] + '&lt;/option&gt;';

        });
        $('#service_subcat_1').html(content_1);
        $('#descbox_').html( product_desc_ );
        $('#invtbox_').html(invt_);
        $('#qtybox_').html( qty_);
        $('#costbox_').html(cost_);
    }
    function getDesc_1(pass_ItemID){
        var item_ID = pass_ItemID;
        var invt_ = data_1[id_1][item_ID]['invt_'];
        $('#invtbox_').html(invt_);  

         var product_desc_ = data_1[id_1][item_ID]['product_desc_'];
        $('#descbox_').html( product_desc_ ); 

        var qty_ = data_1[id_1][item_ID]['qty_'];
        $('#qtybox_').html( qty_ );   

        var cost_ = data_1[id_1][item_ID]['cost_'];
        $('#costbox_').html( cost_ );      
    }
    $('#categories_1').change(function(){
       id_1 = $('#categories_1').val();
       getData_1(id_1);
    });
    $('#service_subcat_1').change(function(){
       var item_ID = $('#service_subcat_1').val();
       getDesc_1(item_ID);
    });
});
&lt;/script&gt;
</code></pre>

<p>With the  current structure, I am unable to achieve the result. May I ask for some thoughts on this?</p>

<p>Mossa</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/javascript-dhtml-ajax/117">JavaScript / DHTML / AJAX</category>
			<dc:creator>mbarandao</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/424266/need-assistance-with-adding-additional-table-rows-ajax</guid>
		</item>
				<item>
			<title>Problem with PHP SQL Query </title>
			<link>http://www.daniweb.com/web-development/databases/threads/424265/problem-with-php-sql-query-</link>
			<pubDate>Sun, 27 May 2012 15:39:01 +0000</pubDate>
			<description>Dear experts, I am having a problem with my query as i am working in php myadmin sql . **Problem:-** Actually i want to show the record of fill and unfilled i.e NULL values in the table but only the record with the id is shown leaving the NULL fields. ...</description>
			<content:encoded><![CDATA[ <p>Dear experts,<br />
I am having a problem with my query as i am working in php myadmin sql .<br /><strong>Problem:-</strong> Actually i want to show the record of fill and unfilled i.e NULL values in the table but only the record with the id is shown leaving the NULL fields.<br />
my query which i am having is through dreamweaver cs4 ,get method for the concern id and show the record of it..</p>

<pre><code class="language-sql">SELECT date_format(currenttime, '%d-%m-%Y') as currenttime, complaint.currtime2, complaint.donetime, complaint.status, complaint.`description`, 

complaintitems.cmp_items, priority.prioirity, signup.name,signup.username FROM complaint, complaintitems, priority, signup WHERE 

complaint.user_fk_id ='$detid' AND complaint.id_cmp_items =complaintitems.id AND complaint.id_prip_fk =priority.id AND signup.id = complaint.uf_id_done
</code></pre>

<p>solution which is want:-<br />
I want to show the field uf_id_done record (which i have made a linkage with signup table )Including NULL values. If there's a need for a join, kindly write the code for it.<br />
thanks,<br /><img src="/attachments/fetch/L2ltYWdlcy9hdHRhY2htZW50cy8yL2RiMi5qcGc%3D/300" alt="db2" title="align-left" /></p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/databases/16">Databases</category>
			<dc:creator>khushhappy</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/databases/threads/424265/problem-with-php-sql-query-</guid>
		</item>
				<item>
			<title>how to make a relation between TextBox and CheckBoxList</title>
			<link>http://www.daniweb.com/web-development/aspnet/threads/424264/how-to-make-a-relation-between-textbox-and-checkboxlist</link>
			<pubDate>Sun, 27 May 2012 15:25:48 +0000</pubDate>
			<description>i Have a textbox and CheckBoxList If i enter orderid in TextBox(order id is the column name in my database) ,that time want to show the status of order id in CheckBox List In the CheckBoxList i have four items Renovated,completed,validated,cancelled how to show clicked ,for example the orderid renovated ...</description>
			<content:encoded><![CDATA[ <p>i Have a textbox and CheckBoxList</p>

<p>If i enter  orderid  in  TextBox(order id is the column name in my database) ,that time  want to show the status of order id in CheckBox List</p>

<p>In the CheckBoxList i have four items</p>

<p>Renovated,completed,validated,cancelled</p>

<p>how to show clicked  ,for example the orderid renovated or completed,validated,cancelled</p>

<p>Please give me a solution</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/aspnet/18">ASP.NET</category>
			<dc:creator>manshaf</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/aspnet/threads/424264/how-to-make-a-relation-between-textbox-and-checkboxlist</guid>
		</item>
				<item>
			<title>Deployment</title>
			<link>http://www.daniweb.com/software-development/vbnet/threads/424263/deployment</link>
			<pubDate>Sun, 27 May 2012 14:10:51 +0000</pubDate>
			<description>Hi, i had developed windows application with SQL Database. i had deployed the windows application and want to run the same on the client machine Could any one please help me in this issue...</description>
			<content:encoded><![CDATA[ <p>Hi,</p>

<p>i had developed windows application with SQL Database.</p>

<p>i had deployed the windows application and  want to run the same on the client machine</p>

<p>Could any one please help me in this issue...</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/vbnet/58">VB.NET</category>
			<dc:creator>mvnk12</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/vbnet/threads/424263/deployment</guid>
		</item>
				<item>
			<title>Convert Colored Image into Binary using OpenCv</title>
			<link>http://www.daniweb.com/software-development/computer-science/threads/424262/convert-colored-image-into-binary-using-opencv</link>
			<pubDate>Sun, 27 May 2012 13:19:55 +0000</pubDate>
			<description>Can anyone discuss how to convert a jpeg color image into binary using OpenCv and C++. I find it hard understanding it on my own. I found sample programs but that really doesn't help much if I don't understand the meaning of every line of code. At least a step ...</description>
			<content:encoded><![CDATA[ <p>Can anyone discuss how to convert a jpeg color image into binary using OpenCv and C++. I find it hard understanding it on my own. I found sample programs but that really doesn't help much if I don't understand the meaning of every line of code. At least a step by step guide on what I should do will be very helpful.</p>

<p>Thanks!!!</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/computer-science/14">Computer Science</category>
			<dc:creator>sandz24</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/computer-science/threads/424262/convert-colored-image-into-binary-using-opencv</guid>
		</item>
				<item>
			<title>Comment in a forum</title>
			<link>http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/424261/comment-in-a-forum</link>
			<pubDate>Sun, 27 May 2012 13:14:12 +0000</pubDate>
			<description> &lt;html&gt; &lt;head&gt; &lt;!--Load the jquery lib --&gt; &lt;script type=&quot;text/javascript&quot; src=&quot;jquery-1.7.2.js&quot;&gt;&lt;/script&gt; &lt;!--Use jquery --&gt; &lt;script type=&quot;text/javascript&quot;&gt; $var = 1; &lt;/script&gt; &lt;script type=&quot;text/javascript&quot;&gt; $(document).ready(function(){ $('#cont').click(function(){ $('&lt;p /&gt;').text(&quot;hye&quot;).appendTo($('#cont')); }); // $('p').live(&quot;click&quot;, function(){ // if($(this).text() == &quot;Good...1&quot;) // $(this).empty().appendTo($('#myDiv')); //}); }); &lt;/script&gt; --&gt; &lt;/head&gt; &lt;body&gt; &lt;!-- &lt;div id=&quot;myDiv&quot;&gt; &lt;p&gt;Hello world!&lt;/p&gt; &lt;/div&gt; &lt;a href=&quot;#&quot; id=&quot;myLink&quot;&gt;Change ...</description>
			<content:encoded><![CDATA[ <pre><code class="language-js">&lt;html&gt;

    &lt;head&gt;

        &lt;!--Load the jquery lib --&gt;

        &lt;script type="text/javascript" src="jquery-1.7.2.js"&gt;&lt;/script&gt;



        &lt;!--Use jquery --&gt;

        &lt;script type="text/javascript"&gt;
        $var = 1;
        &lt;/script&gt;

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

            $(document).ready(function(){

                $('#cont').click(function(){

                    $('&lt;p /&gt;').text("hye").appendTo($('#cont'));

                });


                // $('p').live("click", function(){

                //  if($(this).text() == "Good...1")
                //  $(this).empty().appendTo($('#myDiv'));

                //}); 

            }); 

        &lt;/script&gt;

        --&gt;
    &lt;/head&gt;



    &lt;body&gt;

    &lt;!--  &lt;div id="myDiv"&gt;  

            &lt;p&gt;Hello world!&lt;/p&gt;

        &lt;/div&gt;

        &lt;a href="#" id="myLink"&gt;Change text&lt;/a&gt;
        --&gt;

        &lt;form id="myform"&gt;
        &lt;input type="text" style="width: 400px ; height : 100px ;" id = "txt"&gt;
        &lt;input type="submit" name="button" id="btn"&gt;
        &lt;/form&gt;
        &lt;div id="cont"&gt;
        &lt;p&gt;Hello world!&lt;/p&gt;
        &lt;/div&gt;
    &lt;/body&gt;

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

<p>Here is my code . i want o click on button and create a paragraph with border in which text is written , any suggestions? Thanx in Advance , It will be like post box in face book.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/javascript-dhtml-ajax/117">JavaScript / DHTML / AJAX</category>
			<dc:creator>Majestics</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/424261/comment-in-a-forum</guid>
		</item>
				<item>
			<title>new to C</title>
			<link>http://www.daniweb.com/software-development/c/threads/424260/new-to-c</link>
			<pubDate>Sun, 27 May 2012 12:55:06 +0000</pubDate>
			<description>**Hi every body i m new to the computer science i dont know how to get started with C my friend advised me to creta account here so i do . i hope that u people will help me to cope up all the facts about C and C ++.**</description>
			<content:encoded><![CDATA[ <p><strong>Hi every body i m new to the computer science i dont know how to get started with C my friend advised me to creta account here so i do . i hope that u people will help me to cope up all the facts about C and C ++.</strong></p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/c/118">C</category>
			<dc:creator>firdousahmad</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/c/threads/424260/new-to-c</guid>
		</item>
				<item>
			<title>black screen</title>
			<link>http://www.daniweb.com/hardware-and-software/pc-hardware/monitors-displays-and-video-cards/threads/424259/black-screen</link>
			<pubDate>Sun, 27 May 2012 12:37:35 +0000</pubDate>
			<description>help my laptop turned black screen compaq cq61 .my laptop screen turned into black whenever i plug the battery charger please help me</description>
			<content:encoded><![CDATA[ <p>help my laptop turned black screen</p>

<p>compaq cq61 .my laptop screen turned into black whenever i plug the battery charger please help me</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/hardware-and-software/pc-hardware/monitors-displays-and-video-cards/121">Monitors, Displays and Video Cards</category>
			<dc:creator>mariaceline_21</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/hardware-and-software/pc-hardware/monitors-displays-and-video-cards/threads/424259/black-screen</guid>
		</item>
				<item>
			<title>Object of type &#039;System.Web.UI.WebControls.TextBox&#039; cannot be converted to t</title>
			<link>http://www.daniweb.com/web-development/aspnet/threads/424258/object-of-type-system.web.ui.webcontrols.textbox-cannot-be-converted-to-t</link>
			<pubDate>Sun, 27 May 2012 11:57:09 +0000</pubDate>
			<description>Object of type 'System.Web.UI.WebControls.TextBox' cannot be converted to type 'System.Int32' 6 minutes ago|LINK Hi, i started web application in Microsoft Visual Web Developer 2010 Express. I created few text boxes and dropdown lists. I connect them with my database in SQL management studio. When I click on SaveButton it should ...</description>
			<content:encoded><![CDATA[ <p>Object of type 'System.Web.UI.WebControls.TextBox' cannot be converted to type 'System.Int32'<br />
6 minutes ago|LINK</p>

<p>Hi, i started web application in Microsoft Visual Web Developer 2010 Express. I created few text boxes and dropdown lists. I connect them with my database in SQL management studio. When I click on SaveButton it should be saved in the base table, but it shouldn't. I write this code on the save button click and when I run project it says:</p>

<p>Failed to set one or more properties on type x.y.  Object of type 'System.Web.UI.WebControls.TextBox' cannot be converted to type 'System.Int32'.</p>

<p>How can I solve this. This is my first app, so if anyone could help with my trouble.... :D thanks</p>

<pre><code>protected void Button_Click(object sender, EventArgs e)
{
{
ListDictionary lstNewValues = new ListDictionary();
lstNewValues.Add("OfferID", txtOfferID);
lstNewValues.Add("OfferName", txtOfferName);
lstNewValues.Add("OfferPeriod", ddOfferPeriod);
lstNewValues.Add("OfferPrice", txtOfferPrice);
lstNewValues.Add("OfferDetails", ddAgencyName);
LinqDataSource1.Insert(lstNewValues);
Response.Redirect("PonudiNaAgencii.aspx");
}
}
</code></pre>

<p>Also I used LinqDataSource to connect dropdownlists.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/aspnet/18">ASP.NET</category>
			<dc:creator>kikiritce</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/aspnet/threads/424258/object-of-type-system.web.ui.webcontrols.textbox-cannot-be-converted-to-t</guid>
		</item>
				<item>
			<title>Is right my BSTree?</title>
			<link>http://www.daniweb.com/software-development/java/threads/424257/is-right-my-bstree</link>
			<pubDate>Sun, 27 May 2012 11:48:09 +0000</pubDate>
			<description>Hi coders, I create a BSTree but i don't know if it is right. I only want to create a bstree with Strings, nothing else. my code: import java.util.Scanner; class Node { private Node left; private String number; private Node right; public Node() { left = null; number = &quot;0&quot;; ...</description>
			<content:encoded><![CDATA[ <p>Hi coders,</p>

<p>I create a BSTree but i don't know if it is right.</p>

<p>I only want to create a bstree with Strings, nothing else.</p>

<p>my code:</p>

<pre><code class="language-java">import java.util.Scanner;

class Node {
    private Node left;
    private String number;
    private Node right;

    public Node() {
        left = null;
        number = "0";
        right = null;
    }

    public Node(String x) {
        left = null;
        number = x;
        right = null;
    }

    public String getNumber() {
        return number;
    }

    public Node getLeft() {
        return left;
    }

    public Node getRight() {
        return right;
    }

    public void setNum(String x){
        number = x;
    }

    public void setLeft(Node leftNode) {
        left = leftNode;
    }

    public void setRight(Node rightNode) {
        right = rightNode;
    }

}

  class BST{
    private Node root;

    public BST(){
        root = null;
    }



    public boolean isEmpty(){
            return root == null;
    }


    public void insert(String x){
        insertData(x, root);
    }


    private void insertData(String n, Node p){
        if(p == null){
            p = new Node(n);
            root = p;
        } else if(n.compareTo(p.getNumber()) &lt; 0){
            if(p.getLeft() == null){
                p.setLeft(new Node(n));
            } else {
                p = p.getLeft();
                insertData(n,p);
            }
        } else {
            if(p.getRight() == null){
                p.setRight(new Node(n));
            } else {
                p = p.getRight();
                insertData(n, p);
            }
        }
    }
}

 public class BinarySearchTree{
        public static void main(String[] args){
            BST tree = new BST();
            Scanner in = new Scanner(System.in);        
            for (int y=0; y&lt;5;y++){                      
                String x = in.nextLine();
                tree.insert(x);
}

        }
    }
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/java/9">Java</category>
			<dc:creator>Fotis_13</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/java/threads/424257/is-right-my-bstree</guid>
		</item>
				<item>
			<title>Has The WikiBoat been sunk?</title>
			<link>http://www.daniweb.com/hardware-and-software/microsoft-windows/viruses-spyware-and-other-nasties/news/424255/has-the-wikiboat-been-sunk</link>
			<pubDate>Sun, 27 May 2012 10:36:44 +0000</pubDate>
			<description>The FBI took claims by new hacking group The WikiBoat that it was going to bring down the likes of Apple and Tesco last Friday at 4pm so seriously that it sent email warnings to those targeted. It's now Sunday morning, and the threatened DDoS attacks do not appear to ...</description>
			<content:encoded><![CDATA[ <p>The FBI took claims by new hacking group The WikiBoat that it was going to bring down the likes of Apple and Tesco last Friday at 4pm so seriously that it sent email warnings to those targeted. It's now Sunday morning, and the threatened DDoS attacks do not appear to have happened. So has The WikiBoat been sunk and is #OpNewSon a failure?<br /><img src="/attachments/fetch/L2ltYWdlcy9hdHRhY2htZW50cy8wL2R3ZWItd2lraWJvYXQuanBn/300" alt="dweb-wikiboat" /><br />
The answers would appear to be that it was never actually launched, but that doesn't mean that #OpNewSon is a failure or that this is the last we will hear from The WikiBoat in my opinion.</p>

<p>Let's look at the declaration from The WikiBoat which started the whole thing off:</p>

<blockquote>
  <p>"We, #TheWikiBoat would like to introduce this press release on our very first operation: Operation NewSon (OpNewSon). As previously stated, we have no motives other then doing it all for the lulz. However this operation will be slightly different and will somewhat change our already stated objective on doing it for the lulz. On the day of the operation, we plan to hit and attack several high corporate entities. Shortly after the start of the operation, we plan to release precious classified data on the already set out list of targets we do have. Those targets are none other then the ones who ultimately rule: the high revenue making companies of the world. While attacking the major companies of this planet may seem lulzy, we also wish that this operation make a difference. We are "sticking it to the man" so to speak. Our hopes are set out on this being a major operation because after all, we will be hitting major corporate/incorporate associations.</p>
  
  <p>This operation has three parts to it.</p>
  
  <p>1 - Spread the word of OpNewSon</p>
  
  <p>This part is already in effect. We just need everyone to spread the word that a major operation is coming up real soon. The goal is for this message to get at least 5,000 views. Please spread the word of this operation in any way you can. Twitter, Facebook, YouTube, etc. Let the corporate entities know that we are coming.</p>
  
  <p>2 - The online protests</p>
  
  <p>This is where we need your help! Online protesting is simple and effective. All that's needed is enough people with the power to stand up to those who ultimately rule the world. We ask that you join us on the day of the 25th (May) in our IRC for further<br />
  instructions on our planned protesting.</p>
  
  <p>[instructions deleted by DaniWeb]</p>
  
  <p>Until then, here's how you can ready up...We're going to be DDoS'ing the targets. DDoS takes a website offline for a certain amount of time depending on how many people are participating in the attack. These easy meaningful attacks are actually quite effective and have huge impacts. The tool we will be using is called LOIC.</p>
  
  <p>Download here: [URL deleted by DaniWeb]</p>
  
  <p>We'll explain how to use LOIC as well as which targets we'll be hitting on the 25th of May. More information and updates will also become available on</p>
  
  <p>Twitter: @AnonymousWiki @AnonymouSpoon @MehIzDanneh @TibitXimer @Anonymau</p>
  
  <p>3 - The attacks</p>
  
  <p>This phase will be the most powerful. By the time this phase is initiated, all targets will have been downed (DDoS'd) for at least 2 hours. This phase is all about leaking highly classified data from the targets.</p>
  
  <p>THIS OPERATION WILL COMMENCE ON MAY 25th, 2012</p>
  
  <p>Spread the word as much as possible as we plan to take on the great elite."</p>
</blockquote>

<p>From this we can determine that TheWikiBoat has certainly succeeded with phase one, spreading the word about #OpNewSon and making a name for itself in the process. The online coverage in advance of the proposed attacks was plentiful, and the FBI seemed to take it very seriously indeed which gives the group added kudos. Phase two is a little more difficult to determine whether successful or not, chatter across an IRC channel is not a hugely anarchic tactic after all. That said, phase three does appear to have been a FAIL, assuming you believe that it was ever intended to be taken seriously in the first place.</p>

<p>I have grave doubts that it was. In fact I would go so far as to say that phase three and phase one were one and the same thing: generate as much publicity about TheWikiBoat as possible. After all, who announces details of sites that are going to be hit with a DDoS attack ahead of actually hitting them? It makes no sense at all, other than to perhaps create a sense of fear amongst those being named. All it would really accomplish is to ensure those sites, especially given the size of the ones so named, would get prepared and ensure that their defences were well and truly in place. No, I am convinced it was a publicity stunt, and as far as that goes it was far from a failure. The fact that the FBI took the step of sending out emails to warn large corporates of the risk is proof of that.</p>

<p>The inevitable associating of TheWikiBoat with Anonymous was probably all it took to get the attention of the FBI. Next time, I imagine that if any announcements are made they will be diversionary in nature and the real targets will be taken down without prior warning. I doubt very much that this is the last we will hear from TheWikiBoat...</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/hardware-and-software/microsoft-windows/viruses-spyware-and-other-nasties/64">Viruses, Spyware and other Nasties</category>
			<dc:creator>happygeek</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/hardware-and-software/microsoft-windows/viruses-spyware-and-other-nasties/news/424255/has-the-wikiboat-been-sunk</guid>
		</item>
				<item>
			<title>Performance</title>
			<link>http://www.daniweb.com/software-development/python/threads/424254/performance</link>
			<pubDate>Sun, 27 May 2012 10:23:03 +0000</pubDate>
			<description>Hi everybody, I've got a code which returns to a given text an inverse index. From a list of tokens, the function produces a list sorted by the frequency. Example: inverted_index(['the', 'house', ',', 'the', 'beer']) [('the', [0, 3]), ('beer', [4]), ('house', [1]), (',', [2])] Code: def outp(txt): ind = {} ...</description>
			<content:encoded><![CDATA[ <p>Hi everybody,</p>

<p>I've got a code which returns to a given text an inverse index. From a list of tokens, the function produces a list sorted by the frequency.</p>

<p>Example:<br />
inverted_index(['the', 'house', ',', 'the', 'beer'])<br />
[('the', [0, 3]), ('beer', [4]), ('house', [1]), (',', [2])]</p>

<p>Code:</p>

<pre><code class="language-py">def outp(txt):
    ind = {}
    for word in txt:
        if word not in ind.keys():
            i = txt.index(word)
            ind[word] = [i]
        else:
            i = txt.index(word, ind[word][-1]+1)
            ind[word].append(i)
        sorted_ind = sorted(ind.items(), key=lsort, reverse=True)
    return sorted_ind




def lsort(kv):
    return len(kv[1])
</code></pre>

<p>The code works, but it's very slow.<br />
So, my question is: How could it be written s.t. the code is faster?</p>

<p>Thanks for any propositions, Darek</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/python/114">Python</category>
			<dc:creator>Darek6</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/python/threads/424254/performance</guid>
		</item>
				<item>
			<title>How many number of elements can an array in PHP hold?</title>
			<link>http://www.daniweb.com/web-development/php/threads/424253/how-many-number-of-elements-can-an-array-in-php-hold</link>
			<pubDate>Sun, 27 May 2012 10:22:18 +0000</pubDate>
			<description>How many number of elements can an array in PHP hold? like 300? 10000? or 10000000000000000000000000000000000000000000000000000000 ???</description>
			<content:encoded><![CDATA[ <p>How many number of elements can an array in PHP hold? like 300? 10000? or<br />
10000000000000000000000000000000000000000000000000000000 ???</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/php/17">PHP</category>
			<dc:creator>unikorndesigns</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/php/threads/424253/how-many-number-of-elements-can-an-array-in-php-hold</guid>
		</item>
				<item>
			<title>Need new idea for my Final Project</title>
			<link>http://www.daniweb.com/software-development/computer-science/threads/424252/need-new-idea-for-my-final-project</link>
			<pubDate>Sun, 27 May 2012 09:38:13 +0000</pubDate>
			<description>First I want to say thank you to those who help me in my project last year espicially to sir ardav and to this site itself. now I'm in my (hopefully) last year of my college and now I'm thinking of &quot;Online Establishment Finder System&quot; as my final project. But ...</description>
			<content:encoded><![CDATA[ <p>First I want to say thank you to those who help me in my project last year espicially to sir ardav and to this site itself.<br />
now I'm in my (hopefully) last year of my college and now I'm thinking of "Online Establishment Finder System" as my final project.<br />
But my Professor declined it, he said  it's to simple, not suitable project for a CS, but I'm cool with that.<br />
Now my problem is what should I add (feature) in my system so my prof. will accept it. (a map is not posible.)<br />
suggestions of new system is appreciated..</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/computer-science/14">Computer Science</category>
			<dc:creator>kalaban</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/computer-science/threads/424252/need-new-idea-for-my-final-project</guid>
		</item>
				<item>
			<title>refresh JSP</title>
			<link>http://www.daniweb.com/web-development/jsp/threads/424251/refresh-jsp</link>
			<pubDate>Sun, 27 May 2012 09:24:56 +0000</pubDate>
			<description>i created a jsp page and put a javascript code &quot; window.onload=func(); &quot; in the header when the page is loading.In that func(),i set two objects to the session (using AJAX) and get them back into the jsp.After debugging the aplication everything is ok.but jsp page doesn't display the content ...</description>
			<content:encoded><![CDATA[ <p>i created a jsp page and put a javascript code " window.onload=func(); " in the header when the page is loading.In that func(),i set two objects to the session (using AJAX) and get them back into the jsp.After debugging the aplication everything is ok.but jsp page doesn't display the content of the passed objects.i have to refresh the page for showing them.it is a headache for me.what can i do for that?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/jsp/24">JSP</category>
			<dc:creator>divsok</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/jsp/threads/424251/refresh-jsp</guid>
		</item>
				<item>
			<title>transfer data in perl script to a different program</title>
			<link>http://www.daniweb.com/software-development/perl/threads/424250/transfer-data-in-perl-script-to-a-different-program</link>
			<pubDate>Sun, 27 May 2012 07:38:38 +0000</pubDate>
			<description>I have a exe file named file.exe When it is run through command line, it takes some data and process it and creates an output file. I want to feed data to file.exe within a perl script and want the output file. Please let me know the commands to do ...</description>
			<content:encoded><![CDATA[ <p>I have a exe file named file.exe When it is run through command line, it takes some data and process it and creates an output file.<br />
I want to feed data to file.exe within  a perl script and want the output file.</p>

<p>Please let me know the commands to do it. I am using windows operating system. I was reading about pipes, but unable to find the solution.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/perl/112">Perl</category>
			<dc:creator>PhoenixInsilico</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/perl/threads/424250/transfer-data-in-perl-script-to-a-different-program</guid>
		</item>
				<item>
			<title>Change VB Webbrowser</title>
			<link>http://www.daniweb.com/software-development/vbnet/threads/424249/change-vb-webbrowser</link>
			<pubDate>Sun, 27 May 2012 07:17:32 +0000</pubDate>
			<description>When you create a webbrowser it obviously uses Internet Explorer. Can you change this to Chrome? Cheers Phil</description>
			<content:encoded><![CDATA[ <p>When you create a webbrowser it obviously uses Internet Explorer. Can you change this to Chrome?</p>

<p>Cheers</p>

<p>Phil</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/vbnet/58">VB.NET</category>
			<dc:creator>JohnBo</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/vbnet/threads/424249/change-vb-webbrowser</guid>
		</item>
				<item>
			<title>what is the physical difference of 64bit and 32 bit processors? more regist</title>
			<link>http://www.daniweb.com/software-development/assembly/threads/424248/what-is-the-physical-difference-of-64bit-and-32-bit-processors-more-regist</link>
			<pubDate>Sun, 27 May 2012 07:01:19 +0000</pubDate>
			<description>more registers or something? I know about the advantages and disadvantages of 32 and 64bit bit what is the big difference between processors?</description>
			<content:encoded><![CDATA[ <p>more registers or something? I know about the advantages and disadvantages of 32 and 64bit bit what is the big difference between processors?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/assembly/125">Assembly</category>
			<dc:creator>silvercats</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/assembly/threads/424248/what-is-the-physical-difference-of-64bit-and-32-bit-processors-more-regist</guid>
		</item>
				<item>
			<title>Report Generator for SQlite</title>
			<link>http://www.daniweb.com/web-development/databases/threads/424247/report-generator-for-sqlite</link>
			<pubDate>Sun, 27 May 2012 06:53:55 +0000</pubDate>
			<description>Was wondering if anyone could recommend both free and not free report generator programs for use with SQlite. I'll need charts, colours and the ability to generate some pretty flexible reports. Any suggestions? Thanks danny2000</description>
			<content:encoded><![CDATA[ <p>Was wondering if anyone could recommend both free and not free report generator programs for use with SQlite.<br />
I'll need charts, colours and the ability to generate some pretty flexible reports.  Any suggestions?</p>

<p>Thanks<br />
danny2000</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/databases/16">Databases</category>
			<dc:creator>danny2000</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/databases/threads/424247/report-generator-for-sqlite</guid>
		</item>
				<item>
			<title>modular programming in C &amp; compiling multiple files on command line</title>
			<link>http://www.daniweb.com/software-development/c/threads/424246/modular-programming-in-c-compiling-multiple-files-on-command-line</link>
			<pubDate>Sun, 27 May 2012 06:40:32 +0000</pubDate>
			<description>Hello everyone, I am sort of new in C programming and since I programmed mostly in C++, I may have some mix up on my program which is giving me some errors. I have written a small code , in modular fashion i.e. I have split the .h, definition.c , ...</description>
			<content:encoded><![CDATA[ <p>Hello everyone,<br />
I am sort of new in C programming and since I programmed mostly in C++, I may have some mix up on my program which is giving me some errors. I have written a small code , in modular fashion i.e. I have split the .h, definition.c , and main.c files.<br />
The program currently has only one function and all that does is read from a text file. My problem is when I compile each file separately I get the error: 'Undefined reference to ReadFromfFile()" (Note: ReadFromFile is a function defined in definition.c and I get this error when I compile the main.c file)<br />
And when  I compile the definition.c file I get the error 'Undefined reference to main'.<br />
And when I compile all my files together as such: gcc DeliveryServices.h DeliveryServices.c main.c -o Servrices: I get the error 'Segmentation fault(core dumped)'.</p>

<p>Please someone point me out what am I doing wrong and how can I fix it.</p>

<p>Thank you.<br />
//Header File</p>

<pre><code class="language-c">#ifndef DeliveryServices_H
#define DeliveryServices_H


#include &lt;stdio.h&gt;
#include &lt;string.h&gt;

 struct DeliveryServices{
                        char* ItemType;
                        char* PickUpAdd;
                        char* DropOffAdd;
                      };
                      typedef struct DeliveryServices ServiceSlip;
#endif   

//Definition File

#include "DeliveryServices.h"
#include &lt;stdio.h&gt;
#include &lt;string.h&gt;



char ReadFromFile()
{
        FILE *ReadFrom;
        char lineRead;

        printf("Hello");
        ReadFrom = fopen("datafile.txt","r");
        while(fgets(lineRead,120,ReadFrom))
        {
                printf("%s",lineRead);
        }
return 0;
}

//Main.c

#include "DeliveryServices.h"
#include &lt;stdio.h&gt;
#include &lt;string.h&gt;

int main()
{       
        FILE *ReadFile;
        char lineRead;

        ServiceSlip  PackageSlips;


        ReadFromFile();
        //PackageSlips.ItemType ="Package";
        //printf("%s",PackageSlips.ItemType);

return 0; 
}
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/c/118">C</category>
			<dc:creator>robgeek</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/c/threads/424246/modular-programming-in-c-compiling-multiple-files-on-command-line</guid>
		</item>
				<item>
			<title>help deprecated php</title>
			<link>http://www.daniweb.com/web-development/php/threads/424245/help-deprecated-php</link>
			<pubDate>Sun, 27 May 2012 06:18:21 +0000</pubDate>
			<description>help im getting this Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\Config.php on line 80 Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\Config.php on line 166&quot; &lt;?php error_reporting(0); ini_set('display_errors', 'On'); //ob_start(&quot;ob_gzhandler&quot;); error_reporting(E_ALL); // start the session session_start(); // database connection ...</description>
			<content:encoded><![CDATA[ <p>help im getting this</p>

<p>Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\Config.php on line 80</p>

<p>Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\Config.php on line 166"</p>

<pre><code>&lt;?php
error_reporting(0);
ini_set('display_errors', 'On');
//ob_start("ob_gzhandler");
error_reporting(E_ALL);

// start the session
session_start();

// database connection config
$dbHost = 'localhost';
$dbUser = 'root';
$dbPass = '';
$dbName = 'phpwebco_shop';

// setting up the web root and server root for
// this shopping cart application
$thisFile = str_replace('\\', '/', __FILE__);
$docRoot = $_SERVER['DOCUMENT_ROOT'];

$webRoot  = str_replace(array($docRoot, 'library/config.php'), '', $thisFile);
$srvRoot  = str_replace('library/config.php', '', $thisFile);

define('WEB_ROOT', $webRoot);
define('SRV_ROOT', $srvRoot);

// these are the directories where we will store all
// category and product images
define('CATEGORY_IMAGE_DIR', 'images/category/');
define('PRODUCT_IMAGE_DIR',  'images/product/');

// some size limitation for the category
// and product images

// all category image width must not 
// exceed 75 pixels
define('MAX_CATEGORY_IMAGE_WIDTH', 75);

// do we need to limit the product image width?
// setting this value to 'true' is recommended
define('LIMIT_PRODUCT_WIDTH',     true);

// maximum width for all product image
define('MAX_PRODUCT_IMAGE_WIDTH', 300);

// the width for product thumbnail
define('THUMBNAIL_WIDTH',         75);

if (!get_magic_quotes_gpc()) {
    if (isset($_POST)) {
        foreach ($_POST as $key =&gt; $value) {
            $_POST[$key] =  trim(addslashes($value));
        }
    }

    if (isset($_GET)) {
        foreach ($_GET as $key =&gt; $value) {
            $_GET[$key] = trim(addslashes($value));
        }
    }   
}

// since all page will require a database access
// and the common library is also used by all
// it's logical to load these library here
require_once 'database.php';
require_once 'common.php';

// get the shop configuration ( name, addres, etc ), all page need it
$shopConfig = getShopConfig();
?&gt;
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/php/17">PHP</category>
			<dc:creator>mariaceline_21</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/php/threads/424245/help-deprecated-php</guid>
		</item>
				<item>
			<title>c++ program</title>
			<link>http://www.daniweb.com/software-development/cpp/threads/424244/c-program</link>
			<pubDate>Sun, 27 May 2012 05:19:49 +0000</pubDate>
			<description>any one knows how to write this program:- given two arrays A and B . array 'A' contains all the elements of 'B' but one more element extra. write a c++ function which accepts array 'A' and 'B' and its size as arguments/parameters and find out the extra element in ...</description>
			<content:encoded><![CDATA[ <p>any one knows how to write this program:-</p>

<p>given two arrays A and B . array 'A' contains all the elements of 'B' but one more element extra. write a c++ function which accepts array 'A' and 'B' and its size as arguments/parameters and find out the extra element in array A.(restriction:-array elemts are not in order).</p>

<p>help me if you know the answer...............</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/cpp/8">C++</category>
			<dc:creator>arushi.05</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/cpp/threads/424244/c-program</guid>
		</item>
				<item>
			<title>matrix program</title>
			<link>http://www.daniweb.com/software-development/cpp/threads/424243/matrix-program</link>
			<pubDate>Sun, 27 May 2012 05:15:05 +0000</pubDate>
			<description>can any body tell me a udf program in c++ which accepts a squared integer matrix with odd dimensions(like 3*3,5*5....) &amp; display the sum of the middle row and middle column elements. please help me if you can................</description>
			<content:encoded><![CDATA[ <p>can any body tell me a udf program in c++ which accepts a squared integer matrix with odd dimensions(like 3<em>3,5</em>5....) &amp; display the sum of the middle row and middle column elements.<br />
please help me if you can................</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/cpp/8">C++</category>
			<dc:creator>arushi.05</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/cpp/threads/424243/matrix-program</guid>
		</item>
				<item>
			<title>Under what architectures do assembly programs run? I mean,what processors c</title>
			<link>http://www.daniweb.com/software-development/assembly/threads/424242/under-what-architectures-do-assembly-programs-run-i-meanwhat-processors-c</link>
			<pubDate>Sun, 27 May 2012 04:56:08 +0000</pubDate>
			<description>Under what architectures do assembly programs run? I mean,what processors can run the same assembly program? program written for p4 processor,on a core 2 duo ,core i3 .and core i 3 on a p4,p2 etc...... program written for an Intel processor on a AMD processor..... and i7 and a core ...</description>
			<content:encoded><![CDATA[ <p>Under what architectures do assembly programs run? I mean,what processors can run the same assembly program?</p>

<p>program written for p4 processor,on a core 2 duo ,core i3 .and core i 3 on a p4,p2 etc......<br />
program written for an Intel processor on a AMD processor.....</p>

<p>and i7 and a core 2 duo. I think their processor registers are totally different from each others because i7 physically has 8/4 cores and core 2 duo only has 2 cores.<br />
answer all the questions if you can.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/assembly/125">Assembly</category>
			<dc:creator>silvercats</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/assembly/threads/424242/under-what-architectures-do-assembly-programs-run-i-meanwhat-processors-c</guid>
		</item>
				<item>
			<title>A program written on assembly is machine dependent but a program written in</title>
			<link>http://www.daniweb.com/software-development/assembly/threads/424241/a-program-written-on-assembly-is-machine-dependent-but-a-program-written-in</link>
			<pubDate>Sun, 27 May 2012 04:55:16 +0000</pubDate>
			<description>A program written in assembly is machine dependent but a program written in Java ,python etc.. are not. why is that at the end don't they all get converted in to machine language?</description>
			<content:encoded><![CDATA[ <p>A program written in assembly is machine dependent but a program written in Java ,python etc.. are not. why is that</p>

<p>at the end don't they all get converted in to machine language?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/assembly/125">Assembly</category>
			<dc:creator>silvercats</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/assembly/threads/424241/a-program-written-on-assembly-is-machine-dependent-but-a-program-written-in</guid>
		</item>
				<item>
			<title>Windows Performance counters</title>
			<link>http://www.daniweb.com/software-development/threads/424240/windows-performance-counters</link>
			<pubDate>Sun, 27 May 2012 04:26:24 +0000</pubDate>
			<description> Hi all ! I tried a lot of time to find something useful to get disk and network usage (separately) for a Windows process. Actualy I make use of [Windows Performance Counters](http://msdn.microsoft.com/en-us/library/windows/desktop/aa373083(v=vs.85).aspx) but it can't provide separated statistics, it provide me all IO activity. A disadvantage in Performance Counters are ...</description>
			<content:encoded><![CDATA[ <pre><code>Hi all ! I tried a lot of time to find something useful to get disk and network usage (separately) for a Windows process. Actualy I make use of [Windows Performance Counters](<a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa373083" rel="nofollow">http://msdn.microsoft.com/en-us/library/windows/desktop/aa373083</a>(v=vs.85).aspx) but it can't provide separated statistics, it provide me all IO activity. 
A disadvantage in Performance Counters are , they cannot be accessed using process id (PID), this deficiency is complemented by [WMI](<a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa394582" rel="nofollow">http://msdn.microsoft.com/en-us/library/windows/desktop/aa394582</a>(v=vs.85).aspx), but the same situation here, I can get only all IO activity. WMI has a lot of classes [WMI Classes](<a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa394084" rel="nofollow">http://msdn.microsoft.com/en-us/library/windows/desktop/aa394084</a>(v=vs.85).aspx) and I don't know if I missing something.
Perfmon in Windows 7 appear to make use of WMI, but what kind of API make use Resource Monitor ?
Many Thanks !
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/2">Software Development</category>
			<dc:creator>dorinpaunescu</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/threads/424240/windows-performance-counters</guid>
		</item>
				<item>
			<title>Site down on local network</title>
			<link>http://www.daniweb.com/hardware-and-software/networking/threads/424239/site-down-on-local-network</link>
			<pubDate>Sun, 27 May 2012 03:32:32 +0000</pubDate>
			<description>Whenever I try to connect to my website over my network (from any device), my browser gives me an error saying that it could not connect to the host. I've tried a proxy, as well as downorjustme, and it works fine. I've recently performed some database work, nothing too important, ...</description>
			<content:encoded><![CDATA[ <p>Whenever I try to connect to my website over my network (from any device), my browser gives me an error saying that it could not connect to the host. I've tried a proxy, as well as downorjustme, and it works fine. I've recently performed some database work, nothing too important, but between the last time I could access my site and now, I haven't altered anything, except dropping all my tables and erasing my databases after finding out that my site was experiencing downtime, although, as I mentioned before, only on my network. My site's still experiencing that same problem, how do I fix it? (My host is 1and1, and the message never gets more specific than "could not connect to host")</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/hardware-and-software/networking/13">Networking</category>
			<dc:creator>julesmazur</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/hardware-and-software/networking/threads/424239/site-down-on-local-network</guid>
		</item>
				<item>
			<title>get file extention from url</title>
			<link>http://www.daniweb.com/web-development/php/threads/424238/get-file-extention-from-url</link>
			<pubDate>Sun, 27 May 2012 02:52:53 +0000</pubDate>
			<description>Hi all i am a bit stuck lol I am trying to get the file extention from a url say yoursite.com/file.zip in the data base the full link will be there, i am looking for a function that will take the full url take &quot;.zip&quot; and then will output &quot;(file ...</description>
			<content:encoded><![CDATA[ <p>Hi all</p>

<p>i am a bit stuck lol<br />
I am trying to get the file extention from a url say<br />
yoursite.com/file.zip</p>

<p>in the data base the full link will be there, i am looking for a function that will take the full url<br />
take ".zip" and then will output "(file type = ZIP )"</p>

<p>some help would be great</p>

<p>cheers</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/php/17">PHP</category>
			<dc:creator>dualzNZ</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/php/threads/424238/get-file-extention-from-url</guid>
		</item>
				<item>
			<title>Client-Server with Database but no Winsock</title>
			<link>http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/424237/client-server-with-database-but-no-winsock</link>
			<pubDate>Sun, 27 May 2012 02:34:23 +0000</pubDate>
			<description>Good Day Everyone: I am creating a tabulating system for a bikini open. How can you create a client-sever application with database on server without using winsock control? One server for monitoring and document printing. I need client for multiple judges (atleat 5) you can add and remove. And a ...</description>
			<content:encoded><![CDATA[ <p>Good Day Everyone:</p>

<p>I am creating a tabulating system for a bikini open. How can you create a client-sever application with database on server without using winsock control? One server for monitoring and document printing. I need client for multiple judges (atleat 5) you can add and remove. And a profile for multiple contestants.</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>twistercool</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/424237/client-server-with-database-but-no-winsock</guid>
		</item>
				<item>
			<title>Markdown discrepancy</title>
			<link>http://www.daniweb.com/community-center/daniweb-community-feedback/threads/424235/markdown-discrepancy</link>
			<pubDate>Sat, 26 May 2012 23:48:40 +0000</pubDate>
			<description>When I use **bold** followed immediately by *italic*, the WYSIWYG box shows the post properly. When posted it does not. **Bold***Italic* The above shows properly before posting.</description>
			<content:encoded><![CDATA[ <p>When I use <strong>bold</strong> followed immediately by <em>italic</em>, the WYSIWYG box shows the post properly.  When posted it does not.</p>

<p>**Bold***Italic*<br />
The above shows properly before posting.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/community-center/daniweb-community-feedback/26">DaniWeb Community Feedback</category>
			<dc:creator>WaltP</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/community-center/daniweb-community-feedback/threads/424235/markdown-discrepancy</guid>
		</item>
				<item>
			<title>Novelty Detection, know anything?</title>
			<link>http://www.daniweb.com/software-development/computer-science/threads/424234/novelty-detection-know-anything</link>
			<pubDate>Sat, 26 May 2012 23:01:17 +0000</pubDate>
			<description>Hello forum, I have been asign a presentation in novelty detection. I'm searching the internet and many of the articles I find are either too advance or too simple. Does anyone have/ known good articles about novelty detection?</description>
			<content:encoded><![CDATA[ <p>Hello forum,</p>

<p>I have been asign a presentation in novelty detection. I'm searching the internet and many of the articles I find are either too advance or too simple. Does anyone have/ known good articles about novelty detection?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/computer-science/14">Computer Science</category>
			<dc:creator>vaironl</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/computer-science/threads/424234/novelty-detection-know-anything</guid>
		</item>
				<item>
			<title>ASp.Net Payment Gate way</title>
			<link>http://www.daniweb.com/web-development/aspnet/threads/424233/asp.net-payment-gate-way</link>
			<pubDate>Sat, 26 May 2012 21:58:52 +0000</pubDate>
			<description>Hi all i got one project to build web site for engineering shope i have done with all the things but they are looking for online functionality for that they want that any one can purchase product online by creadit card as we regularly perchase from flipkart,Ebay and all sites ...</description>
			<content:encoded><![CDATA[ <p>Hi all i got one project to build web site for engineering shope i have done with all the things but they are looking for online functionality for that they want that any one can purchase product online by creadit card as we regularly perchase from flipkart,Ebay and all sites<br />
i dont have any idea how to implement this feature in web site so any buddy have any idea so Please Help Me out from this</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/aspnet/18">ASP.NET</category>
			<dc:creator>hirenpatel53</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/aspnet/threads/424233/asp.net-payment-gate-way</guid>
		</item>
				<item>
			<title>Column count doesn&#039;t match value count at row 1</title>
			<link>http://www.daniweb.com/web-development/php/threads/424232/column-count-doesnt-match-value-count-at-row-1</link>
			<pubDate>Sat, 26 May 2012 21:52:06 +0000</pubDate>
			<description>Okay, so I'm getting a MySQL Error that says &quot;Column count doesn't match value count at row 1&quot;. I'm not sure what the problem is. Here is the code &lt;?php if( !preg_match( &quot;/index.php/i&quot;, $_SERVER['PHP_SELF'] ) ) { die(); } if( $_GET['id'] ) { $id = $core-&gt;clean( $_GET['id'] ); $query = ...</description>
			<content:encoded><![CDATA[ <p>Okay, so I'm getting a MySQL Error that says "Column count doesn't match value count at row 1". I'm not sure what the problem is. Here is the code</p>

<pre><code>&lt;?php

    if( !preg_match( "/index.php/i", $_SERVER['PHP_SELF'] ) ) { die(); }

    if( $_GET['id'] ) {

        $id = $core-&gt;clean( $_GET['id'] );

        $query = $db-&gt;query( "SELECT * FROM users WHERE id = '{$id}'" );
        $data  = $db-&gt;assoc( $query );

        $data['ugroups'] = explode( ",", $data['usergroups'] );

        $editid = $data['id'];

    }

?&gt;
&lt;form action="" method="post" id="addUser"&gt;

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

        &lt;div class="square title"&gt;
            &lt;strong&gt;Add user&lt;/strong&gt;
        &lt;/div&gt;

        &lt;?php

            if( $_POST['submit'] ) {

                try {

                    $username = $core-&gt;clean( $_POST['username'] );
                    $password = $core-&gt;clean( $_POST['password'] );
                    $email    = $core-&gt;clean( $_POST['email'] );
                    $habbo    = $core-&gt;clean( $_POST['habbo'] );
                    $dgroup   = $core-&gt;clean( $_POST['dgroup'] );
                                        $banned   = $core-&gt;clean( $_POST['banned'] );
                    $warnings = $core-&gt;clean( $_POST['totalWarnings'] );
                    $infractions = $core-&gt;clean( $_POST['totalInfractions'] );

                    $query    = $db-&gt;query( "SELECT * FROM usergroups" );

                    while( $array = $db-&gt;assoc( $query ) ) {

                        if( $_POST['ugroup-' . $array['id']] ) {

                            $ugroups .= $array['id'] . ",";

                        }

                    }

                    $password_enc = $core-&gt;encrypt( $password );

                    if( !$username or ( !$password and !$editid ) or !$dgroup or !$ugroups ) {

                        throw new Exception( "All fields are required." );

                    }
                    else {

                        if( $editid ) {

                            if( $password ) {

                                $password = ", password = '{$password_enc}'";

                            }
                            else {

                                unset( $password );

                            }

                            $db-&gt;query( "UPDATE users SET username = '{$username}'{$password}, email = '{$email}', habbo = '{$habbo}', displaygroup = '{$dgroup}', usergroups = '{$ugroups}', banned = '{$banned}', totalInfractions = '{$infractions}', totalWarnings = '{$warnings}' WHERE id = '{$editid}'" );


                        }
                        else {

                            $db-&gt;query( "INSERT INTO users VALUES (NULL, '{$username}', '{$password_enc}', '{$email}', '{$habbo}', '{$dgroup}', '{$ugroups}', '{$banned}', '{$infractions}', '{$warnings}', 0);" );

                        }

                        echo "&lt;div class=\"square good\"&gt;";
                        echo "&lt;strong&gt;Success&lt;/strong&gt;";
                        echo "&lt;br /&gt;";
                        echo "User added!";
                        echo "&lt;/div&gt;";

                    }

                }
                catch( Exception $e ) {

                    echo "&lt;div class=\"square bad\"&gt;";
                    echo "&lt;strong&gt;Error&lt;/strong&gt;";
                    echo "&lt;br /&gt;";
                    echo $e-&gt;getMessage();
                    echo "&lt;/div&gt;";

                }

            }

        ?&gt;

        &lt;table width="100%" cellpadding="3" cellspacing="0"&gt;
            &lt;?php
            if ($data['banned'] == "1") {
            ?&gt;
            &lt;div style="background: red; border: 1px solid black; padding: 5px;"&gt;&lt;strong&gt;User is currently banned!&lt;/strong&gt;&lt;/div&gt;
            &lt;?php
            }

                $query = $db-&gt;query( "SELECT * FROM usergroups" );

                while( $array = $db-&gt;assoc( $query ) ) {

                    if( in_array( $array['id'], $data['ugroups'] ) ) {

                        $groups[$array['id'] . '_active'] = $array['name'];

                    }
                    else {

                        $groups[$array['id']] = $array['name'];

                    }

                    if( $array['id'] == $data['displaygroup'] ) {

                        $dgroups[$array['id'] . '_active']  = $array['name'];

                    }
                    else {

                        $dgroups[$array['id']]  = $array['name'];

                    }

                }

                $opt_banned = Array (
                            "0" =&gt; "Unbanned",
                            "1" =&gt; "Banned"
                );

                echo $core-&gt;buildField( "text",
                                        "required",
                                        "username",
                                        "Username",
                                        "The new username.",
                                        $data['username'] );

                echo $core-&gt;buildField( "password",
                                        "&lt;?php if( !$editid ) { ?&gt;required&lt;?php } ?&gt;",
                                        "password",
                                        "Password",
                                        "The new password." );

                echo $core-&gt;buildField( "text",
                                        "",
                                        "email",
                                        "Email",
                                        "The new email (optional).",
                                        $data['email'] );

                echo $core-&gt;buildField( "text",
                                        "",
                                        "totalInfractions",
                                        "Infractions",
                                        "Number of infractions the user has",
                                        $data['totalInfractions'] );

                echo $core-&gt;buildField( "text",
                                        "",
                                        "totalWarnings",
                                        "Warnings",
                                        "Number of warnings the user has",
                                        $data['totalWarnings'] );

                echo $core-&gt;buildField( "text",
                                        "",
                                        "habbo",
                                        "Habbo name",
                                        "The new Habbo name (optional).",
                                        $data['habbo'] );

                echo $core-&gt;buildField( "select",
                                        "",
                                        "banned",
                                        "Banned",
                                        "To ban a user, enter 1, thus restricting them from logging in or 0 to not ban.",
                                        $opt_banned );

                echo $core-&gt;buildField( "select",
                                        "required",
                                        "dgroup",
                                        "Display group",
                                        "The user's display group.",
                                        $dgroups );

                echo $core-&gt;buildField( "checkbox",
                                        "required",
                                        "ugroup",
                                        "Active usergroups",
                                        "The user's active groups.",
                                        $groups );


            ?&gt;
        &lt;/table&gt;

    &lt;/div&gt;

    &lt;div class="box" align="right"&gt;

        &lt;input class="button" type="submit" name="submit" value="Submit" /&gt;

    &lt;/div&gt;

&lt;/form&gt;

&lt;?php
    echo $core-&gt;buildFormJS('addUser');

?&gt;
</code></pre>

<p>So any idea whats wrong in this? Please help.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/php/17">PHP</category>
			<dc:creator>Daddy-Dope</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/php/threads/424232/column-count-doesnt-match-value-count-at-row-1</guid>
		</item>
				<item>
			<title>Help with some arrays</title>
			<link>http://www.daniweb.com/software-development/cpp/threads/424231/help-with-some-arrays</link>
			<pubDate>Sat, 26 May 2012 20:57:46 +0000</pubDate>
			<description> #include &lt;Stdafx.h&gt; #include &lt;iostream&gt; #include &lt;stdlib.h&gt; #include &lt;time.h&gt; #include &lt;math.h&gt; using namespace std; int rand_0toN1(int n); int hits[10]; int main() { int n; int i; int r; srand( static_cast&lt;unsigned int&gt;(time(NULL))); // set seed for random numbers cout&lt;&lt; &quot;Enter number of trials to run &quot;; cout&lt;&lt; &quot;and press ENTER: &quot;; cin&gt;&gt; ...</description>
			<content:encoded><![CDATA[ <pre><code class="language-cpp">#include &lt;Stdafx.h&gt;
#include &lt;iostream&gt;
#include &lt;stdlib.h&gt;
#include &lt;time.h&gt;
#include &lt;math.h&gt;
using namespace std;

int rand_0toN1(int n);

int hits[10];

int main()
{
    int n;
    int i;
    int r;

    srand( static_cast&lt;unsigned int&gt;(time(NULL)));           // set seed for random numbers

    cout&lt;&lt; "Enter number of trials to run ";
    cout&lt;&lt; "and press ENTER: ";
    cin&gt;&gt; n;

    // run n trials. for each trial, get a number from 0 to 9 and then
    // increment the corresponding element in the hits array

    for(i = 1; i &lt;= n; i++)
    {
        r = rand_0toN1(10);
        hits[r]++;
    }

    // print all the elements in the hits array, along with the ratio
    // of hits to the EXPECTED hits (n / 10)

    for(i = 0; i &lt; 10; i++)
    {
        cout&lt;&lt; i &lt;&lt; ": " &lt;&lt; hits[i] &lt;&lt; " Accuracy: ";
        cout&lt;&lt; static_cast&lt;double&gt;(hits[i]) / (n / 10)
            &lt;&lt; endl;
    }

    system("pause");
    return 0;
}

// random 0-to-N1 function
// generate a random integer from 0 to N - 1

int rand_0toN1(int n)
{
    return rand() % n;
}
</code></pre>

<p>I'M having a little trouble understanding the program above. The function rand_0toN1 returns rand() % n, in this case I believe that it's returning a random number from 1-10 because 10 was passed as an argument through n, which is not the same n that was declared at the beggining of the program but local to the function only. DId I get that part right.<br />
Secondly was going on with these two lines?</p>

<pre><code class="language-cpp">hits[r]++;
</code></pre>

<p>&amp;</p>

<pre><code class="language-cpp">cout&lt;&lt; static_cast&lt;double&gt;(hits[i]) / (n / 10)
</code></pre>

<p>Thanks.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/cpp/8">C++</category>
			<dc:creator>Garrett85</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/cpp/threads/424231/help-with-some-arrays</guid>
		</item>
				<item>
			<title>wxPython DatePickerCtrl problem</title>
			<link>http://www.daniweb.com/software-development/python/threads/424230/wxpython-datepickerctrl-problem</link>
			<pubDate>Sat, 26 May 2012 20:31:00 +0000</pubDate>
			<description>I have a wx.DatePickerCtrl with the dropdown popup window that allows the user to pick a date from the calendar. What I would l like to have my program do is process an event when the user has clicked on a day in the dropdown calendar. Unfortunately the only native ...</description>
			<content:encoded><![CDATA[ <p>I have a wx.DatePickerCtrl with the dropdown popup window that allows the user to pick a date from the calendar. What I would l like to have my program do is process an event when the user has clicked on a day in the dropdown calendar. Unfortunately the only native event for this control is EVT_DATE_CHANGED and that event gets fired every time the user scrolls the month/year while looking for the date of their choice (firing the event many more times than I would like). I can't seem to access the popup window that is created below the datepickerctrl to see if the window is shown or to bind events directly to it. It isn't created as a child of the datepickerctrl.  Basically I'm trying to have the user 1.Click the dropdown button,  2.navigate through the popupwindow calendar, 3. Click on a date, have the popupwindow disappear, 4. Process the event</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/python/114">Python</category>
			<dc:creator>ihatehippies</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/python/threads/424230/wxpython-datepickerctrl-problem</guid>
		</item>
				<item>
			<title>Facebook login button won&#039;t show on IE 8 or 9</title>
			<link>http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/424229/facebook-login-button-wont-show-on-ie-8-or-9</link>
			<pubDate>Sat, 26 May 2012 20:26:02 +0000</pubDate>
			<description> &lt;html&gt; &lt;head&gt; &lt;title&gt;My Facebook Login Page&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;div id=&quot;fb-root&quot;&gt;&lt;/div&gt; &lt;script&gt; window.fbAsyncInit = function() { FB.init({ appId : '220467641404829', status : true, cookie : true, xfbml : true, oauth : true, }); }; (function(d){ var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;} js = d.createElement('script'); js.id = id; js.async = ...</description>
			<content:encoded><![CDATA[ <pre><code class="language-js">&lt;html&gt;
    &lt;head&gt;
      &lt;title&gt;My Facebook Login Page&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;div id="fb-root"&gt;&lt;/div&gt;
      &lt;script&gt;
        window.fbAsyncInit = function() {
          FB.init({
            appId      : '220467641404829',
            status     : true, 
            cookie     : true,
            xfbml      : true,
            oauth      : true,
          });
        };
        (function(d){
           var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
           js = d.createElement('script'); js.id = id; js.async = true;
           js.src = "//connect.facebook.net/en_US/all.js";
           d.getElementsByTagName('head')[0].appendChild(js);
         }(document));
      &lt;/script&gt;
       &lt;fb:login-button autologoutlink='true'  perms='email,user_birthday,status_update,publish_stream'&gt;&lt;/fb:login-button&gt;
    &lt;/body&gt;
 &lt;/html&gt;
</code></pre>

<p>So the code above works just fine with OPera and FireFox, but not IE.   Anyone have any ideas why?  On IE I just get the text for the button, but no button at all.</p>

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

<p>Many thanks,</p>

<p>Sergio</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/javascript-dhtml-ajax/117">JavaScript / DHTML / AJAX</category>
			<dc:creator>SergioQ</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/424229/facebook-login-button-wont-show-on-ie-8-or-9</guid>
		</item>
				<item>
			<title>AVIWriter problem</title>
			<link>http://www.daniweb.com/software-development/csharp/threads/424228/aviwriter-problem</link>
			<pubDate>Sat, 26 May 2012 20:10:37 +0000</pubDate>
			<description>hello, I am trying to record video by aviwriter class in aforge but the resulting avi file is either 0Kb or the whole video is viewing only one picture 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 AForge.Video; using AForge.Video.DirectShow; using ...</description>
			<content:encoded><![CDATA[ <p>hello,<br />
I am trying to record video by aviwriter class in aforge but the resulting avi file is either 0Kb or the whole video is viewing only one picture</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 AForge.Video;
using AForge.Video.DirectShow;
using AForge.Video.FFMPEG;
using AForge.Video.VFW;
using System.IO;
namespace WindowsFormsApplication12
{
    public partial class Form1 : Form
    {
        private FilterInfoCollection videocapturedevices;
        private VideoCaptureDevice finalvideo;
        public Form1()
        {
            InitializeComponent();
        }
        private void pictureBox1_Click(object sender, EventArgs e)
        {
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            videocapturedevices = new FilterInfoCollection(FilterCategory.VideoInputDevice);
            foreach (FilterInfo VideoCaptureDevice in videocapturedevices)
            {
                comboBox1.Items.Add(VideoCaptureDevice.Name);
            }
            comboBox1.SelectedIndex = 0;
        }
        private void button1_Click(object sender, EventArgs e)
        {
            finalvideo = new VideoCaptureDevice(videocapturedevices[comboBox1.SelectedIndex].MonikerString);
            finalvideo.NewFrame+=new NewFrameEventHandler(finalvideo_NewFrame);
            finalvideo.Start();
        }
        void finalvideo_NewFrame(object sender, NewFrameEventArgs eventArgs)
        {
            //FilterInfoCollection x = new FilterInfoCollection(FilterCategory.VideoCompressorCategory);
            //foreach (FilterInfo y in x)
            //{
            //    MessageBox.Show(y.Name);
            //}
            Bitmap video = (Bitmap)eventArgs.Frame.Clone();
            //MessageBox.Show(video.Width.ToString());
            //MessageBox.Show(video.Height.ToString());
            pictureBox1.Image = video;
            // instantiate AVI writer, use WMV3 codec
            AVIWriter writer = new AVIWriter("DivX");
            // create new AVI file and open it
            writer.Open("test1.avi", 640, 480);
            // create frame image
            for (int i = 0; i &lt; 576; i++)
            {
                // update image
                // add the image as a new frame of video file
                writer.AddFrame(video);
            }
            writer.Close();
        }
        private void button2_Click(object sender, EventArgs e)
        {
            if (finalvideo.IsRunning)
            {
                finalvideo.Stop();
            }
            this.Close();
        }
    }
}
</code></pre>

<p>can u help me?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/csharp/61">C#</category>
			<dc:creator>suneye</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/csharp/threads/424228/aviwriter-problem</guid>
		</item>
				<item>
			<title>How to get content and make money with music website?</title>
			<link>http://www.daniweb.com/internet-marketing/threads/424227/how-to-get-content-and-make-money-with-music-website</link>
			<pubDate>Sat, 26 May 2012 20:10:07 +0000</pubDate>
			<description>Hi, Firstly, this is my 1st post and I'm so sorry if I post on the wrong thread. I got a couple of questions here and I do need help from you guys. **Question 1.** The Content/Files I've music website and I need to know where can I get musician ...</description>
			<content:encoded><![CDATA[ <p>Hi,</p>

<p>Firstly, this is my 1st post and I'm so sorry if I post on the wrong thread. I got a couple of questions here and I do need help from you guys.</p>

<p><strong>Question 1.</strong></p>

<p>The Content/Files</p>

<p>I've music website and I need to know where can I get musician lists that must be a starter band. I check on my country in Malaysia and there a some website make music community like myspace and music portal too. I already talked with them about what I need and they said the content can be share but must have the credit on my website. I can do that, just I dont like other people work. So, do someone know international music site that allowed other webmaster share the music files (mp3, audio, video)? I do not host this files on my server, but I host it on other hosting provider that give me some revenue in this industry for covering my cost on this project.</p>

<p><strong>Question 2.</strong></p>

<p>How to make money/revenue using music website?</p>

<p>I search all about music on google, mmd, bhw, other music community too. Sure they make money with Advertise using PPC from Google Adsense or other PPC too. I'm afraid if I put my content from other website and google ban me because of the copyright. What I have in my mind now is PPV and PPD. Can anyone here tell me what will you do for making money using music website?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/internet-marketing/25">Internet Marketing</category>
			<dc:creator>inswins</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/internet-marketing/threads/424227/how-to-get-content-and-make-money-with-music-website</guid>
		</item>
				<item>
			<title>formal concept analysis</title>
			<link>http://www.daniweb.com/software-development/csharp/threads/424226/formal-concept-analysis</link>
			<pubDate>Sat, 26 May 2012 19:24:23 +0000</pubDate>
			<description>hello..i'm really appreciate of what both of u did to help me..but this is my real problem. i'm trying to build fca tool and until today i only can browse the data, load the data n show it on space. i try to build a context table based on the ...</description>
			<content:encoded><![CDATA[ <p>hello..i'm really appreciate of what both of u did to help me..but this is my real problem. i'm trying to build fca tool and until today i only can browse the data, load the data n show it on space. i try to build a context table based on the data after clicking button 'context'.</p>

<p>then, based on the table, the tool will produce a lattice tree after click button 'lattice'..in the folder i attached below, i provide my project..together with the data and example of table that i trying to buil. hope all of u can help me..thanks</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/csharp/61">C#</category>
			<dc:creator>celop</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/csharp/threads/424226/formal-concept-analysis</guid>
		</item>
				<item>
			<title>Check data exist</title>
			<link>http://www.daniweb.com/software-development/vbnet/threads/424225/check-data-exist</link>
			<pubDate>Sat, 26 May 2012 19:20:43 +0000</pubDate>
			<description>anyone can help? i want to check whether the data has been exist or not. but its shows some error in this code. error :No value given for one or more required parameters. Public Sub doSave() Dim con As New OleDb.OleDbConnection(My.Settings.KK3DB) Dim cmd As New OleDb.OleDbCommand Dim adap As New ...</description>
			<content:encoded><![CDATA[ <p>anyone can help? i want to check whether the data has been exist or not. but its shows some error in this code.</p>

<p>error :No value given for one or more required parameters.</p>

<pre><code class="language-vb">Public Sub doSave()
        Dim con As New OleDb.OleDbConnection(My.Settings.KK3DB)
        Dim cmd As New OleDb.OleDbCommand
        Dim adap As New OleDb.OleDbDataAdapter
        Dim ds As New DataSet
        Dim dr As OleDb.OleDbDataReader

        con = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\backup project\KK3MailingSystem\KK3MailingSystem\KK3MailingSystem\db\KK3MailingSystem.mdb;Persist Security Info=True")
        con.Open()
        cmd.CommandText = "SELECT * FROM Staff WHERE Staff_Id =" &amp; txtId.Text &amp; ""
        cmd = New OleDbCommand(cmd.CommandText, con)
        dr = cmd.ExecuteReader()
        If Not dr.HasRows Then
            cmd.CommandText = " INSERT INTO Staff (Staff_Id,Staff_Name, Staff_IC,Staff_Ext,Staff_HP,Staff_Email,Staff_Position,Staff_Username) VALUES ('" + txtId.Text + "','" + txtName.Text + "','" + txtIC.Text + "','" + txtExt.Text + "','" + txtHP.Text + "','" + txtEmail.Text + "','" + cboPosition.Text + "','" + txtId.Text + "')"
            cmd = New OleDbCommand(cmd.CommandText, con)
            Dim icount As Integer = cmd.ExecuteNonQuery
            MessageBox.Show(icount)
        Else
            MsgBox(" Record exists")
        End If
    End Sub
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/vbnet/58">VB.NET</category>
			<dc:creator>mie.ilani</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/vbnet/threads/424225/check-data-exist</guid>
		</item>
				<item>
			<title>PHP installation</title>
			<link>http://www.daniweb.com/web-development/php/threads/424224/php-installation</link>
			<pubDate>Sat, 26 May 2012 18:59:46 +0000</pubDate>
			<description>Hi, I am trying to install PHP and have had no sucsess; the steps I have taken are shown below. 1. Download .msi PHP installer 2. Run Installer 3. Download .msi APACHE installer 4. I don't have a webserver! 5. Open PHP 6. Console comes up. 7. Try following code: ...</description>
			<content:encoded><![CDATA[ <p>Hi,</p>

<p>I am trying to install PHP and have had no sucsess; the steps I have taken are shown below.</p>

<ol><li>Download .msi PHP installer</li>
<li>Run Installer</li>
<li>Download .msi APACHE installer</li>
<li>I don't have a webserver!</li>
<li>Open PHP</li>
<li>Console comes up.</li>
<li><p>Try following code:</p>

<p>&lt;?php echo '&lt;p&gt;Hello World&lt;/p&gt;'; ?&gt;</p></li>
<li><p>Save as hello.php</p></li>
<li>Open hello.php</li>
<li>Does not work, instead displays:</li>
</ol>

<p>Hello World</p>

<p>'; ?&gt;</p>

<p>Yeah, its not supposed to show the "'; ?&gt;"</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/php/17">PHP</category>
			<dc:creator>HTMLperson5</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/php/threads/424224/php-installation</guid>
		</item>
				<item>
			<title>Beginner help needed please!!</title>
			<link>http://www.daniweb.com/software-development/cpp/threads/424223/beginner-help-needed-please</link>
			<pubDate>Sat, 26 May 2012 18:46:35 +0000</pubDate>
			<description>Hi all, I've just started learning C++. Basically I wish to try out some basic C++ codes and operations in Codeblocks. I created a project under which I intend to put all the C++ programs in. The default ''Hello world'' program runs fine- but whenever I try to run the ...</description>
			<content:encoded><![CDATA[ <p>Hi all,<br />
I've just started learning C++. Basically I wish to try out some basic C++ codes and operations in Codeblocks. I created a project under which I intend to put all the C++ programs in. The default ''Hello world'' program runs fine- but whenever I try to run the second program that I have written under the same project, I get an error saying <strong>''multiple definition of 'main'...first defined here..''</strong> .<br />
Does this mean I have to create a new project everytime I want to run a single program? :/ Is there a better way to do what I'm trying to do here?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/cpp/8">C++</category>
			<dc:creator>whileiforelse</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/cpp/threads/424223/beginner-help-needed-please</guid>
		</item>
				<item>
			<title>JFrame from JApplet not opening in Google Chrome</title>
			<link>http://www.daniweb.com/software-development/java/threads/424221/jframe-from-japplet-not-opening-in-google-chrome</link>
			<pubDate>Sat, 26 May 2012 18:26:38 +0000</pubDate>
			<description>Hey all, I have a JApplet that runs in browser and I can't get it to create a new JFrame popup when a button is clicked. It works fine in my IDE (Eclipse) but not when I upload it. Here's the code for the JFrame I'm trying to create: import ...</description>
			<content:encoded><![CDATA[ <p>Hey all,</p>

<p>I have a JApplet that runs in browser and I can't get it to create a new JFrame popup when a button is clicked. It works fine in my IDE (Eclipse) but not when I upload it. Here's the code for the JFrame I'm trying to create:</p>

<pre><code class="language-java">import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import org.jdesktop.swingx.*;

public class SchedWind {

    private String selectedDate;
    private PHPHandler phpMain;
    private ResponseObj[] serverPHPresponse;
    private final JLabel hotStatus;

    public SchedWind() {
        hotStatus = new JLabel("Waiting for user...");
        serverPHPresponse = null;
        selectedDate = null;
        phpMain = new PHPHandler();
        showGUI();
    }

    public void showGUI() {
        final JFrame frame = new JFrame("Schedule");
        frame.setLocationRelativeTo(null);
        frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        frame.setResizable(false);
        GridBagLayout gLayout = new GridBagLayout();
        frame.setLayout(gLayout);
        GridBagConstraints c = new GridBagConstraints();

        hotStatus.setForeground(Color.BLUE);
        hotStatus.setVerticalAlignment(JLabel.CENTER);
        hotStatus.setHorizontalAlignment(JLabel.CENTER);

        JLabel selectDayLabel = new JLabel("Please select day:");
        selectDayLabel.setOpaque(false);
        selectDayLabel.setPreferredSize(new Dimension(170,30));
        selectDayLabel.setHorizontalAlignment(JLabel.CENTER);
        selectDayLabel.setVerticalAlignment(JLabel.CENTER);
        c.fill = GridBagConstraints.HORIZONTAL;
        c.gridx = 0;
        c.gridy = 0;
        frame.add(selectDayLabel, c);

        final JXDatePicker datePicker = new JXDatePicker();
        datePicker.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                selectedDate = datePicker.getDate().toString();
                //System.out.println(selectedDate);
            }
        });
        c.gridx = 1;
        c.gridy = 0;
        frame.add(datePicker, c);

        JButton grabSched = new JButton("OK");
        c.gridx = 0;
        c.gridy = 1;
        c.anchor = GridBagConstraints.CENTER;
        c.insets = new Insets(20,10,0,0);
        grabSched.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if(selectedDate == null) {
                    hotStatus.setText("Please enter a date.");
                    hotStatus.setForeground(Color.RED);
                }
                else {
                    hotStatus.setText("Contacting server...");
                    hotStatus.setForeground(Color.BLUE);
                    //System.out.println(selectedDate);
                    grabSchedFromServer();
                }
            }
        });
        frame.add(grabSched, c);

        JButton cancel = new JButton("Cancel");
        c.gridx = 1;
        c.gridy = 1;
        frame.add(cancel, c);
        cancel.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                frame.dispose();
            }
        });


        c.gridx = 0;
        c.gridy = 3;
        c.gridwidth = 2;
        frame.add(hotStatus, c);

        frame.pack();
        frame.setVisible(true);
    }

    protected void grabSchedFromServer() {
        String[] conArr = selectedDate.split(" ");
        String mo = conArr[1];
        String con = conArr[5] + "-";
        if(mo.equals("Jan"))
            con += "01-";
        else if(mo.equals("Feb"))
            con += "02-";
        else if(mo.equals("Mar"))
            con += "03-";
        else if(mo.equals("Apr"))
            con += "04-";
        else if(mo.equals("May"))
            con += "05-";
        else if(mo.equals("Jun"))
            con += "06-";
        else if(mo.equals("Jul"))
            con += "07-";
        else if(mo.equals("Aug"))
            con += "08-";
        else if(mo.equals("Sep"))
            con += "09-";
        else if(mo.equals("Oct"))
            con += "10-";
        else if(mo.equals("Nov"))
            con += "11-";
        else if(mo.equals("Dec"))
            con += "12-";
        con += conArr[2];
        con += "@BREAK";
        con += con.substring(0,con.indexOf("@BREAK"));
        VideoDate sel = new VideoDate(con);
        serverPHPresponse = phpMain.sendPOSTReadRequest(sel);
        hotStatus.setText("Query successful!");
        hotStatus.setForeground(Color.GREEN);
        //System.out.println(serverPHPresponse[0].printPretty());
        if(serverPHPresponse[0].blank) {
            hotStatus.setText("No video requests were found for the selected day.");
            hotStatus.setForeground(Color.BLACK);
        }
        else {
            reportWind pop = new reportWind(serverPHPresponse);
            pop.toString();
        }
    }
}
</code></pre>

<p>And it's triggered by this in another class:</p>

<pre><code class="language-java">seeSched.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                SchedWind main = new SchedWind();
                main.toString();
            }
        });
</code></pre>

<p>The thing is, if I try and get it to open an extremely simple JFrame with nothing in it, it works. Can anyone help?</p>

<p>Thanks!</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/java/9">Java</category>
			<dc:creator>Kremlin</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/java/threads/424221/jframe-from-japplet-not-opening-in-google-chrome</guid>
		</item>
				<item>
			<title>Remove text between two symbols and the symbols</title>
			<link>http://www.daniweb.com/software-development/vbnet/threads/424220/remove-text-between-two-symbols-and-the-symbols</link>
			<pubDate>Sat, 26 May 2012 18:17:38 +0000</pubDate>
			<description>Hello everyone, Im new here and may i have answer to my question since i been looking for sutoliton a long time ago, I had a database looks like that user:pass (&lt;IP&gt;) user:pass (220.135.70.173:3128) that i need is to remove the text between ( and ) and the symbols too. ...</description>
			<content:encoded><![CDATA[ <p>Hello everyone,</p>

<p>Im new here and may i have answer to my question since i been looking for sutoliton a long time ago,</p>

<p>I had a database looks like that</p>

<p>user:pass (&lt;IP&gt;)</p>

<p>user:pass       (220.135.70.173:3128)</p>

<p>that i need is to remove the text between ( and ) and the symbols too.</p>

<p>to look like that</p>

<p>user:pass</p>

<p>Any help please, and if works with richtextbox, im using VB.NET 2010</p>

<p>Thanks in advance!</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/vbnet/58">VB.NET</category>
			<dc:creator>elackops</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/vbnet/threads/424220/remove-text-between-two-symbols-and-the-symbols</guid>
		</item>
				<item>
			<title>ternary tree</title>
			<link>http://www.daniweb.com/software-development/c/threads/424219/ternary-tree</link>
			<pubDate>Sat, 26 May 2012 18:09:31 +0000</pubDate>
			<description>A Ternary Tree (T) is a tree in which every non terminal node has at most 3 children. We will use T to simulate the following activity: A set of P candidates must pass a set of exams ordered in an array of N exam codes (an exam code is ...</description>
			<content:encoded><![CDATA[ <p>A Ternary Tree (T) is a tree in which every non terminal node has at most 3 children.<br />
We will use T to simulate the following activity:<br />
A set of P candidates must pass a set of exams ordered in an array of N exam codes (an exam code is an array of char). For a given exam, a candidate can be in one of the 3 following cases: success, failure or non-passed exam yet. Thus, every T node represents an exam with: exam code as root, succeeded candidates as left child, failed candidates as right child and in the middle whose didn’t pass exam yet. The following figure depicts 2 exams and the situation of 10 candidates: how to write it :)</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/c/118">C</category>
			<dc:creator>bgraw</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/c/threads/424219/ternary-tree</guid>
		</item>
				<item>
			<title>changing master and slave hard disks</title>
			<link>http://www.daniweb.com/hardware-and-software/pc-hardware/storage/threads/424216/changing-master-and-slave-hard-disks</link>
			<pubDate>Sat, 26 May 2012 18:03:48 +0000</pubDate>
			<description>My pc has two hard disk drives. The primary hard disk has become corrupted(or it has got some virus so that pc turns off abruptly). I have win 98 installed in the slave hard disk so i can run win 98 when i disconnect the primary HD. Is there a ...</description>
			<content:encoded><![CDATA[ <p>My pc has two hard disk drives. The primary hard disk has become corrupted(or it has got some virus so that pc turns off abruptly).<br />
I have win 98 installed in the slave hard disk so i can run win 98 when i disconnect the primary HD.<br />
Is there a way to change the primary hard disk to secondary and vice versa so that i can boot from slave hard disk and format the primary<br />
hard disk?<br />
since whenever both hard drives are connected the ,pc always boots from primary HD and turns off int the middle.</p>

<p>i have already tried safe mode and ........</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/hardware-and-software/pc-hardware/storage/105">Storage</category>
			<dc:creator>profyou</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/hardware-and-software/pc-hardware/storage/threads/424216/changing-master-and-slave-hard-disks</guid>
		</item>
				<item>
			<title>Help reading number at the end of file</title>
			<link>http://www.daniweb.com/software-development/c/threads/424215/help-reading-number-at-the-end-of-file</link>
			<pubDate>Sat, 26 May 2012 17:39:17 +0000</pubDate>
			<description>Hi to everyone, this is my first post in this site. I hope you'll be able to help me with mi little issue, as I've been trying to solve it for hours without results. The question is simple: I have a text file, and at the end of it there's ...</description>
			<content:encoded><![CDATA[ <p>Hi to everyone, this is my first post in this site. I hope you'll be able to help me with mi little issue, as I've been trying to solve it for hours without results.</p>

<p>The question is simple: I have a text file, and at the end of it there's a number. I want to be able to read that number, and use it as an int variable. I don't know the size of the number, only that it's at the end of the file.</p>

<p>I'm in kind of a rush right now, as this is a school job, so every help would be appreciated.</p>

<p>Thanks in advance!</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/c/118">C</category>
			<dc:creator>tuputavieja</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/c/threads/424215/help-reading-number-at-the-end-of-file</guid>
		</item>
				<item>
			<title>Calculate algorithm complexity</title>
			<link>http://www.daniweb.com/software-development/computer-science/threads/424214/calculate-algorithm-complexity</link>
			<pubDate>Sat, 26 May 2012 17:31:03 +0000</pubDate>
			<description>Please can you help me to calc the complexity of this algorithm it may looks easy but i am new to all that int f=1; int x=2; for (int i = 1; i &lt;= n; i*=2) for (int j = 1; j &lt;= i * i; j++) if (j % ...</description>
			<content:encoded><![CDATA[ <p>Please can you help me to calc the complexity of this algorithm it may looks easy but i am new to all that</p>

<pre><code class="language-tex">int f=1;
int x=2;
for (int i = 1; i &lt;= n; i*=2) 
   for (int j = 1; j &lt;= i * i; j++) 
      if (j % i == 0) 
      for (int k = 1; k &lt;= j*i; k++) 
         f=x*f;
</code></pre>

<p>thanks in advance</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/computer-science/14">Computer Science</category>
			<dc:creator>thedarklord</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/computer-science/threads/424214/calculate-algorithm-complexity</guid>
		</item>
				<item>
			<title>Difftime return 0</title>
			<link>http://www.daniweb.com/software-development/c/threads/424213/difftime-return-0</link>
			<pubDate>Sat, 26 May 2012 17:28:44 +0000</pubDate>
			<description>Hye i am running difftime tu different 2 time values, but unfortunately when i run on my laptop it does return values, but when i pass it to my friend the value returned is 0... and also when i run in windows the value returned also zero.. here is a ...</description>
			<content:encoded><![CDATA[ <p>Hye i am running difftime tu different 2 time values, but unfortunately when i run on my laptop it does return values, but when i pass it to my friend the value returned is 0... and also when i run in windows the value returned also zero.. here is a part of my code:</p>

<pre><code class="language-c">FILE *cfPtr;
        struct budget newBudget={0, "", 0};
        if ((cfPtr = fopen("parking_budget.dat", "rb"))==NULL) {

        printf("File Could Not Open.\n");}
        else{
        printf("Enter parking no : ");
        int p;
        scanf("%d", &amp;p);
            fseek(cfPtr, (p-1) * sizeof(struct budget), SEEK_SET);
            fread(&amp;newBudget, sizeof (struct budget), 1, cfPtr);
            time_t rawtime, timein, timeout;
            struct tm * timeinfo;
            int year, month, day, hour, min;
            double dif;
            printf("Date and Time (year/month/day hour:minute) (EG: 2012/6/30 23:11) : ");
            fscanf(stdin, "%d/%d/%d %d:%d", &amp;year, &amp;month, &amp;day, &amp;hour, &amp;min);

            timein = mktime(newBudget.timeinfo);
            printf("Car Number : %s\n", newBudget.plat);
            printf("Date &amp; time of entry : %d/%d/%d at %d:%d\n", newBudget.timeinfo-&gt;tm_year, newBudget.timeinfo-&gt;tm_mon, newBudget.timeinfo-&gt;tm_mday, newBudget.timeinfo-&gt;tm_hour, newBudget.timeinfo-&gt;tm_min);

            time ( &amp;rawtime );
            timeinfo = localtime ( &amp;rawtime );
            timeinfo-&gt;tm_year = year;
            timeinfo-&gt;tm_mon = month;
            timeinfo-&gt;tm_mday = day;
            timeinfo-&gt;tm_hour = hour;
            timeinfo-&gt;tm_min = min;

            timeout = mktime(timeinfo);
            dif = difftime(timeout, timein);

            printf("Date &amp; time out : %d/%d/%d at %d:%d\n", timeinfo-&gt;tm_year, timeinfo-&gt;tm_mon, timeinfo-&gt;tm_mday, timeinfo-&gt;tm_hour, timeinfo-&gt;tm_min);
            char * weekday[] = { "Sunday", "Monday",
                       "Tuesday", "Wednesday",
                       "Thursday", "Friday", "Saturday"};

            if(weekday[timeinfo-&gt;tm_wday]=="Sunday"){
                total=p_time*1.00;  
            }
            else if(weekday[timeinfo-&gt;tm_wday]=="Monday"|| "Tuesday"){
                total=p_time*1.00;  
            }
            else{
            total=p_time*2.00;  
            }
            printf("%s",weekday[timeinfo-&gt;tm_wday]);
            printf("Parking time : %.2f hours \n", p_time);
            printf("Total amount: Rm %.2f \n", total);      


            fseek(cfPtr, (p-1) * sizeof(struct budget), SEEK_SET);
            fwrite(&amp;newBudget, sizeof (struct budget), 1, cfPtr);
}           
        fclose(cfPtr);
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/c/118">C</category>
			<dc:creator>wan632</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/c/threads/424213/difftime-return-0</guid>
		</item>
				<item>
			<title>question about fstream</title>
			<link>http://www.daniweb.com/software-development/cpp/threads/424212/question-about-fstream</link>
			<pubDate>Sat, 26 May 2012 16:54:45 +0000</pubDate>
			<description>i read c++ ebook, then i make a code to open a file using fstream and use ios::in flag here's the code : #include &lt;iostream&gt; #include &lt;fstream&gt; using namespace std; bool openFileIn(fstream&amp;, string); int main() { fstream dataFile; if(openFileIn(dataFile, &quot;sendy.txt&quot;)) { cout&lt;&lt;&quot;succes&quot;; } else cout&lt;&lt;&quot;fail&quot;; return 0; } bool openFileIn(fstream ...</description>
			<content:encoded><![CDATA[ <p>i read c++ ebook, then i make a code to open a file using fstream and use ios::in flag<br />
here's the code :</p>

<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;fstream&gt;

using namespace std;

bool openFileIn(fstream&amp;, string);
int main()
{
    fstream dataFile;
        if(openFileIn(dataFile, "sendy.txt"))
        {
            cout&lt;&lt;"succes";
        }
        else
        cout&lt;&lt;"fail";

        return 0;
}

bool openFileIn(fstream &amp;file, string name)
{
    bool status;
    file.open(name, ios::in);

    if (file.fail())
    status = false;

    else
    status = true;

    return status;
}
</code></pre>

<p>the code has problem with</p>

<pre><code class="language-cpp">file.open(name, ios::in);
</code></pre>

<p>then i read again, the problem can be solved by converting name(string object) to cstring :</p>

<pre><code class="language-cpp">file.open(name.c_str(), ios::in);
</code></pre>

<p>but there's no further explanation why i must convert the it to cstring, anyone knows?<br />
and 1 more question, why do i should use reference variable to pass a fstream object?</p>

<p>edited :</p>

<p>i just tried the code using visual c++, and there's no problem with the string "name", is the problem because of the compiler?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/cpp/8">C++</category>
			<dc:creator>mohur</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/cpp/threads/424212/question-about-fstream</guid>
		</item>
				<item>
			<title>PHP error</title>
			<link>http://www.daniweb.com/web-development/php/threads/424211/php-error</link>
			<pubDate>Sat, 26 May 2012 16:32:41 +0000</pubDate>
			<description>I'm trying to set up a GPT-site. When I want to test the redeem method, I get the following error: &gt; Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in (blabla-link, not imporant)/redeem.php on line 39 I've tried some stuff, but nothing seems to be working. Does ...</description>
			<content:encoded><![CDATA[ <p>I'm trying to set up a GPT-site. When I want to test the redeem method, I get the following error:</p>

<blockquote>
  <p>Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in (blabla-link, not imporant)/redeem.php on line 39</p>
</blockquote>

<p>I've tried some stuff, but nothing seems to be working. Does anybody know what the problem is? All tables and rows exist.</p>

<p>redeem.php code:</p>

<pre><code>&lt;?php include("function.php"); ?&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;Inwisselen • &lt;?php echo $siteName; ?&gt;&lt;/title&gt; 
&lt;?php include("headscript.php"); ?&gt;
    &lt;?php include("logscr.php"); ?&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id="wrapper"&gt;
  &lt;div id="header"&gt;
    &lt;div class="header_top"&gt;
      &lt;div class="top"&gt;
        &lt;div class="logo"&gt; &lt;a href="#"&gt;&lt;/a&gt; &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="clear"&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="header_bottom"&gt;
&lt;?php include("buttons.php"); ?&gt;
       &lt;?php include("menu.php"); ?&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div id="body"&gt;
    &lt;div class="box"&gt;
        &lt;?php
        if(isset($_SESSION["user"])){
        if(isset($_GET['id'])){ 
            $rewardId = mysql_real_escape_string($_GET['id']);
            $userId = $_SESSION["user"];
             $myPoints = mysql_result(mysql_query("SELECT points FROM balances WHERE userId = '$userId'"), 0);
             $rewardPoints = mysql_result(mysql_query("SELECT points FROM rewards WHERE rewardId = '$rewardId'"), 0);
             if($rewardPoints &gt; $myPoints) {
                echo  "&lt;h2&gt;Inwisselen mislukt!&lt;/h2&gt;&lt;p&gt;Geen genoeg punten voor dit item.&lt;/p&gt;";
             } else {
                  $reward = mysql_query("SELECT * FROM rewards WHERE rewardId = $rewardId");
                 echo "&lt;h2&gt;Bevestig koop!&lt;/h2&gt;";
                 echo "&lt;div style=\"padding:10px; border:1px solid #557453; background:url(../images/boxbg.png);\"&gt;";
                 while($row = mysql_fetch_array($reward))
  {
      echo "&lt;h3&gt;".$row['title']."&lt;/h3&gt; &lt;img style=\"margin:5px;\" src=\"". $row['img']."\" width=\"150\" height=\"150\" /&gt;&lt;br /&gt;" .$row['desc']. "&lt;br&gt;&lt;h4 style=\"display:inline\"&gt;Huidig aantal punten:&lt;/h4&gt; $myPoints &lt;img src=\"images/point.png\" /&gt;&lt;br&gt; &lt;h4 style=\"display:inline\"&gt;Punten:&lt;/h4&gt; ". $row['points']." &lt;img src=\"images/point.png\" /&gt;&lt;br&gt; &lt;h4 style=\"display:inline\"&gt;Punten over:&lt;/h4&gt; ". ($myPoints - $row['points'])." &lt;img src=\"images/point.png\" /&gt;&lt;br&gt;&lt;br&gt;";

      echo "&lt;form id=\"orderForm\" action=\"order.php\" method=\"post\"&gt; 
      &lt;input type=\"hidden\"
      name=\"userId\" 
      value=\"$userId\"
      &gt;
          &lt;input type=\"hidden\"
      name=\"rewardId\" 
      value=\"$rewardId\"
      &gt;
          &lt;input type=\"hidden\"
      name=\"rewardTitle\" 
      value=\"".$row['title']."\"
      &gt;
      ";
      if($row['type'] == "email"){
          echo "&lt;input type=\"hidden\"
      name=\"type\" 
      value=\"email\"
      &gt;";
          $userEmail = mysql_result(mysql_query("SELECT email FROM users WHERE userId = '$userId'"), 0);
        echo "&lt;div class=\"box contactbox\"&gt;&lt;h3 style='display:inline;'&gt;Versturen naar...&lt;/h3&gt;&lt;label&gt;&lt;h4&gt;Emailadres:&lt;/h4&gt;&lt;input name=\"sendto\" value=\"$userEmail\" type=\"text\"&gt;&lt;/label&gt;&lt;/div&gt;";
      } else if($row['type'] == "ship"){
                  echo "&lt;input type=\"hidden\"
      name=\"type\" 
      value=\"ship\"
      &gt;";
          $userEmail = mysql_result(mysql_query("SELECT email FROM users WHERE userId = '$userId'"), 0);
        echo "&lt;div class=\"box contactbox\"&gt;&lt;h3 style='display:inline;'&gt;Versturen naar...&lt;/h3&gt;&lt;label&gt;&lt;h4&gt;Straat + Huisnummer:&lt;/h4&gt;&lt;input name=\"street\" value=\"\" type=\"text\"&gt;&lt;/label&gt;&lt;label&gt;&lt;h4&gt;Stad:&lt;/h4&gt;&lt;input name=\"city\" value=\"\" type=\"text\"&gt;&lt;/label&gt;&lt;label&gt;&lt;h4&gt;Provincie:&lt;/h4&gt;&lt;input name=\"state\" value=\"\" type=\"text\"&gt;&lt;/label&gt;&lt;label&gt;&lt;h4&gt;Postcode:&lt;/h4&gt;&lt;input name=\"zip\" value=\"\" type=\"text\"&gt;&lt;/label&gt;&lt;/div&gt;";
      }



      echo "&lt;a href=\"#\" onclick=\"javascript: document.forms['orderForm'].submit();\" &gt;&lt;img border:0px\" src=\"/images/purchase.png\" /&gt;&lt;/a&gt;&lt;br&gt;&lt;p&gt;Na de aankoop worden de punten direct van je account afgehaald. Je krijgt een email binnen 24 uur met details. Als het product niet kan worden geleverd, worden je punten teruggestort.&lt;/p&gt;";
  }
                echo "&lt;/form&gt;&lt;/div&gt;"; 

             }




        } else {
            echo "&lt;h2&gt;Inwisselen mislukt!&lt;/h2&gt;&lt;p&gt;Je hebt op een ongeldige link geklikt.&lt;/p&gt;";   
        }

        } else {
        echo "&lt;h2&gt;Inwisselen mislukt!&lt;/h2&gt;&lt;p&gt;Je moet hiervoor ingelogd zijn.&lt;/p&gt;";  
        }

    ?&gt;
    &lt;/div&gt;
&lt;/div&gt;

  &lt;div id="footer"&gt;
        &lt;ul&gt;
    &lt;?php include("footlinks.php"); ?&gt;

    &lt;/ul&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;?php include("footer.php"); ?&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/php/17">PHP</category>
			<dc:creator>public</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/php/threads/424211/php-error</guid>
		</item>
				<item>
			<title>Help with script</title>
			<link>http://www.daniweb.com/web-development/php/threads/424210/help-with-script</link>
			<pubDate>Sat, 26 May 2012 15:47:56 +0000</pubDate>
			<description>Hi, I have a backup script for a reseller hosting account. The idea is that all the accounts in a reseller account can be backed up every day to an external server. The only problem is the scripts seems to start backing up all the accounts at once. Is it ...</description>
			<content:encoded><![CDATA[ <p>Hi,</p>

<p>I have a backup script for a reseller hosting account. The idea is that all the accounts in a reseller account can be backed up every day to an external server. The only problem is the scripts seems to start backing up all the accounts at once. Is it possible to add some kind of timer to the script to slow down this process i.e. one account backs up - wait say 5 minutes - another account backs up - wait 5 minutes etc.</p>

<p>Any help you can offer would be appreciated.</p>

<p>script:-</p>

<pre><code>&lt;?php 
/*** BEGIN CONFIG ***/ 

$reseller = 'www.reseller_url';//your reseller url 
$whmUser = 'user';//your web host manager user name 
$whmPass = 'pass';//your web host manager password 
$bkUpReseller = false;//backup the reseller account also? (it's not in the listaccts page) 
$resellerCpTheme = 'bluelagoon';//if you want to back up reseller, we need the reseller cpanel theme 

/* 
Destination for the backup... 

$destType = '/';// Home Directory 
$destType = 'ftp';// Remote FTP Server 
$destType = 'passiveftp'; //Remove FTP Server (Passive mode transfer) 
*/ 
$destType = 'ftp';//^^^ 
$destPort = '21'; 
$destServer = 'ftpserver.adr';//only if $destServer = 'ftp' or 'passiveftp' 
$destUser = 'user';//only if $destServer = 'ftp' or 'passiveftp' 
$destPass = 'pass';//only if $destServer = 'ftp' or 'passiveftp' 
$destEmail = 'YOUR_EMAIL_ADDRESS';//optional; cpanel will send an email when generation is complete 

$logType = 'file';//output a log to 'file' or 'echo' or 'none'(no log) 
$logFileName = 'bkup_full_log.txt';//can include a path too; only makes sense if $logType = 'file' 
$useSsl = false;//if true, requires SSL on your site, or modify this script to use the shared SSL; this hasn't really been tested 
$day = strtolower(date('l')); 

$dst_dir = 'backups/'.$day; 
$dir = $dst_dir; 

$conn_id = ftp_connect($destServer) or die("Couldn't connect to $destServer"); 

// try to login 
if (@ftp_login($conn_id, $destUser, $destPass)) 
    { 
    echo "Connected as $destUser@$destServer\n"; 

    $ar_files = ftp_nlist($conn_id, $dst_dir); 
    //var_dump($ar_files); 
    if (is_array($ar_files)) 
        { // makes sure there are files 
        for ($i=0;$i&lt;sizeof($ar_files);$i++) 
            { // for each file 
            $st_file = basename($ar_files[$i]); 
            if($st_file == '.' || $st_file == '..') continue; 
            if (ftp_size($conn_id, $dst_dir.'/'.$st_file) == -1) 
                { // check if it is a directory 
                ftp_rmAll($conn_id,  $dst_dir.'/'.$st_file); // if so, use recursion 
                } 
            else 
                { 
                ftp_delete($conn_id,  $dst_dir.'/'.$st_file); // if not, delete the file 
                } 
            } 
        } 
    $flag = ftp_rmdir($conn_id, $dst_dir); // delete empty directories 

    } 
else 
    { 
    header ("location : <a href="http://simplywebhost.com/backup/backup_full.php" rel="nofollow">http://simplywebhost.com/backup/backup_full.php</a>"); 
    } 

if ( @ftp_chdir( $conn_id, $dir ) ) 
    { 
    $original_directory = ftp_pwd( $conn_id ); 
    // If it is a directory, then change the directory back to the original directory 
    ftp_chdir( $conn_id, $original_directory ); 
    } 
else 
    { 
    // try to create the directory $dir 
    if (ftp_mkdir($conn_id, $dir)) 
        { 
        echo '&lt;p&gt;successfully created '.$dir.'&lt;/p&gt;'; 
        } 
    else 
        { 
        echo '&lt;p&gt;There was a problem while creating '.$dir.'&lt;/p&gt;'; 
        } 
    } 
// close the connection 
ftp_close($conn_id); 

/* 
A comma-separated list of domain names to backup; 
Leave blank to backup all domains found in reseller WHM 
If not blank, ONLY the domains listed will be backed up. 
If listed, the domains must be listed EXACTLY like they appear on the 
list accounts page in WHM, i.e. usually without 'www.' 
$domains = 'example1.com,example2.net'; 
*/ 
$domains = ''; 

/*** END CONFIG ***/ 

/*** BEGIN MAIN ***/ 
set_time_limit(0); 
$time_start = getMicroTime(); 

if (!extension_loaded('curl')) { 
  dl('php_curl.' .PHP_SHLIB_SUFFIX) or die("Could not load curl extension"); 
} 

if($useSsl) { 
  $protocol = 'https://'; 
  $cpPort = '2083'; 
  $whmPort = '2087'; 
  writeLog("Using SSL.\n"); 
} 
else { 
  $protocol = 'http://'; 
  $cpPort = '2082'; 
  $whmPort = '2086'; 
  writeLog("Not using SSL.\n"); 
}  

$domains = trim($domains); 
if(!empty($domains)){ 
  $chkDoms = true; 
  $domains = explode(',',$domains); 
  foreach($domains as $d){ 
    $domains[] = trim($d); 
  } 
} 
else { 
  $chkDoms = false; 
  $domains = array(); 
} 
//$postFields = urlencode("dest=$destType&amp;server=$destServer&amp;user=$destPass&amp;pass=$destPass&amp;port=$destPort&amp;rdir=$dir&amp;email=$destEmail"); 
$postFields = ''; 
$postArray = array(); 
$postArray['dest'] = $destType; 
$postArray['server'] = $destServer; 
$postArray['user'] = $destUser; 
$postArray['pass'] = $destPass; 
$postArray['email'] = $destEmail; 
$postArray['port'] = $destPort; 
$postArray['rdir'] = $dir; 



$thingy = ''; 
foreach ($postArray as $k=&gt;$v) 
{ 
 $thingy.= "$k=".utf8_encode($v).'&amp;'; 
} 
$postFields = substr($thingy,0,-1); 


//get the WHM 'list accounts' page 
writeLog("Retrieving WHM accounts page...\n"); 
$acctsPage = getByCurl("$protocol$reseller:$whmPort/scripts/fetchcsv",$whmUser,$whmPass); 
//var_dump($acctsPage); 

$accounts = array(); 

$accounts = explode("\n", trim($acctsPage)); 

//var_dump($accounts); 

$account_records = array(); 

foreach ($accounts as $row) { 
    $account_records[] = explode(',', $row); 
} 

writeLog("Parsing accounts...\n"); 

//var_dump($account_records); 

//die('here'); 

foreach($account_records as $match) { 

    $accDom = ''; 
    $accUser = ''; 
    $accTheme = ''; 
    $r = ''; 
    $fullUrl = ''; 

    $accDom = strip_tags(trim($match[0]));//domain 
    if($chkDoms) 
      if(!in_array($accDom,$domains)) continue; 
    $accUser = strip_tags(trim($match[2]));//username 
    $accTheme = strip_tags(trim($match[9]));//cpanel theme 

    $fullUrl = "$protocol$accDom:$cpPort/frontend/$accTheme/backup/dofullbackup.html"; 
    writeLog("Requesting backup of $accDom...\n"); 
    $r =&amp; getByCurl($fullUrl,$accUser,$whmPass,array('CURLOPT_POST'=&gt;$postFields)); 
    if($r === false){ 
      writeLog("Backup request of $accDom caused an unknown error.\n"); 
    } 
    else { 
      writeLog("Backup request of $accDom complete.\n"); 
    } 
    //writeLog("\n\n--$accDom--\n\n$r\n\n------\n\n"); 

} 

if($bkUpReseller){ 
  $fullUrl = "$protocol$reseller:$cpPort/frontend/$resellerCpTheme/backup/dofullbackup.html"; 
  writeLog("Requesting backup of $reseller...\n"); 
  $r =&amp; getByCurl($fullUrl,$accUser,$whmPass,array('CURLOPT_POST'=&gt;$postFields)); 
} 

$time_end = getMicroTime(); 
$time = $time_end - $time_start; 
writeLog("Elapsed time: ".round($time,2)." seconds.\n"); 

/*** BEGIN FUNCTIONS ***/ 

function getByCurl($url, $user = '', $pass = '',$extra = '') { 
  global $useSsl; 

  $ch = curl_init(); 
  //tells curl to save result in a variable instead of outputing to page 
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
  curl_setopt($ch, CURLOPT_URL, $url);   
  curl_setopt($ch, CURLOPT_USERPWD, "$user:$pass"); 
  curl_setopt ($ch, CURLOPT_COOKIEJAR, './cookie.txt'); 
  curl_setopt ($ch, CURLOPT_FOLLOWLOCATION,1); 
  if(!empty($extra) &amp;&amp; is_array($extra)){ 
    foreach($extra as $opt=&gt;$val){ 
      switch($opt){ 
        case 'CURLOPT_REFERER': 
          curl_setopt($ch,CURLOPT_REFERER,$val); 
        break; 
        case 'CURLOPT_POST': 
        case 'CURLOPT_POSTFIELDS': 
          curl_setopt($ch,CURLOPT_POST,1); 
          curl_setopt($ch,CURLOPT_POSTFIELDS,$val); 
        break; 
      } 
    } 
  } 
  if($useSsl){ 
    curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0); 
    curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0); 
  } 
  $result = curl_exec($ch); 
  curl_close($ch); 

  return $result; 
} 

function writeLog($entry) { 
  global $logType,$logFileName; 

  $method = strtolower($logType); 

  $entry = date('r').' - '.$entry; 

  if($method == 'file') { 
    $fp = fopen($logFileName,'ab'); 
    fwrite($fp, $entry); 
    fclose($fp); 
  } elseif($method == 'echo'){ 
      echo nl2br($entry);//browser 

      flush(); 
  } 

  return; 
} 

function getMicroTime(){ 
  list($usec, $sec) = explode(" ",microtime()); 
  return ((float)$usec + (float)$sec); 
} 

$text = file_get_contents('bkup_full_log.txt'); 

echo $text; 

$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/")); 

$message = stripslashes($text); 

mail("YOUR_EMAIL_ADDRESS","text",$message,"Account Backups"); 

unlink('bkup_full_log.txt'); 

?&gt; 
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/php/17">PHP</category>
			<dc:creator>stu7mcc</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/php/threads/424210/help-with-script</guid>
		</item>
				<item>
			<title>pop-up div behind minimized webpage</title>
			<link>http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/424209/pop-up-div-behind-minimized-webpage</link>
			<pubDate>Sat, 26 May 2012 14:51:50 +0000</pubDate>
			<description>Hi, I got a problem. I'm new to $ and i want to make a div to be displayed 3 seconds after the page loaded but i want it displayed on the desktop( behind the webpage). I made the part where the div slides from the right-bottom corner but i ...</description>
			<content:encoded><![CDATA[ <p>Hi,</p>

<p>I got a problem. I'm new to $ and i want to make a div to be displayed 3 seconds after the page loaded but i want it displayed on the desktop( behind the webpage).</p>

<p>I made the part where the div slides from the right-bottom corner but i can't make it slide behind the browser page.So if you minimize the webpage  stil slides but it slides on your desktop.</p>

<p>Can someone help me and explain ( link or own words) what it takes and what i need to learn.</p>

<p>Thanks.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/javascript-dhtml-ajax/117">JavaScript / DHTML / AJAX</category>
			<dc:creator>easterbunny</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/424209/pop-up-div-behind-minimized-webpage</guid>
		</item>
				<item>
			<title>What&#039;s wrong with this code? PHP&amp;MYSQL</title>
			<link>http://www.daniweb.com/web-development/php/threads/424208/whats-wrong-with-this-code-phpmysql</link>
			<pubDate>Sat, 26 May 2012 14:50:29 +0000</pubDate>
			<description>What is wrong with this signup code? &gt; process.php: &lt;?php $host=&quot;&quot;; // Host name $username=&quot;&quot;; // Mysql username $password=&quot;&quot;; // Mysql password $db_name=&quot;&quot;; // Database name $tbl_name=&quot;&quot;; // Table name // Connect to server and select database. mysql_connect(&quot;$host&quot;, &quot;$username&quot;, &quot;$password&quot;)or die(&quot;Cannot connect to server. Try again later.&quot;); mysql_select_db(&quot;$db_name&quot;)or die(&quot;Cannot connect ...</description>
			<content:encoded><![CDATA[ <p>What is wrong with this signup code?</p>

<blockquote>
  <p>process.php:</p>
</blockquote>

<pre><code>&lt;?php

$host=""; // Host name 
$username=""; // Mysql username 
$password=""; // Mysql password 
$db_name=""; // Database name 
$tbl_name=""; // Table name


// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("Cannot connect to server. Try again later."); 
mysql_select_db("$db_name")or die("Cannot connect to the Website. Try again later.");


function insert() {
//VARS from form
$username=$_POST['username'];
$password=$_POST['password'];
$email=$_POST['email'];
$encrypt=md5($password);
$tbl_name="members";
// Insert data into mysql 
$sql="INSERT INTO $tbl_name(username, password, email)VALUES('$username', '$encrypt', '$email')";
$result=mysql_query($sql);
};

//Name
$name = $_POST['username'];
$query = "select username from $tbl_name where username='$name';"; 
$resulti = mysql_query($query) or die(mysql_error()); 
  if ($resulti == $query) {
echo "Sorry! That username is already taken!";
echo "&lt;br /&gt;";
echo "&lt;a href='website.com/signup.php'&gt;Go Back&lt;/a&gt;";
} else {
//Insert 'username'
insert();
echo "You are now a member!";
echo "&lt;br /&gt;";
echo "&lt;a href='website.com/login/login.php'&gt;Go to login page&lt;/a&gt;";
}


// close connection 
mysql_close();
?&gt;
&lt;html&gt;
&lt;style type="text/css"&gt;
body
{
background-color:#16D0F5;
}
&lt;/style&gt;
&lt;body&gt;




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

<blockquote>
  <p>signup.php:</p>
</blockquote>

<pre><code>&lt;html&gt;
&lt;meta name="viewport" content="width=device-width" /&gt;&lt;script src="<a href="http://code.jquery.com/jquery-1.7.1.min.js" rel="nofollow">http://code.jquery.com/jquery-1.7.1.min.js</a>"&gt;&lt;/script&gt;&lt;script&gt;did = 0;&lt;/script&gt;
&lt;head&gt;&lt;center&gt;&lt;img src="<a href="http://www.aphpsite.comuv.com/Login/header-logo.gif" rel="nofollow">http://www.aphpsite.comuv.com/Login/header-logo.gif</a>" /&gt;&lt;/center&gt;&lt;/head&gt;
&lt;title&gt;Join Fun Chat&lt;/title&gt;
&lt;body&gt;
&lt;style type="text/css"&gt;
body
{
background-color:#16D0F5;
}
img
{
background-color:#3BED74;
}
tbody
{
background-color:#FFFFFF;
}
#back
{
background-color:#FF0000;
}
#footer
{
background-color:#1633F0;
color:#FFFFFF;
}
&lt;/style&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table width="300" border="0" align="center" cellpadding="0" cellspacing="1"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;form name="form1" method="post" action="process.php"&gt;
&lt;table width="100%" border="0" cellspacing="1" cellpadding="3"&gt;
&lt;tr&gt;
&lt;div id="Back"&gt;
&lt;center&gt;&lt;a href="loginpage.php"&gt;Go to the login page&lt;/a&gt;&lt;/center&gt;
&lt;/div&gt;
&lt;td colspan="3"&gt;&lt;strong&gt;Sign-up below: &lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="71"&gt;Username&lt;/td&gt;
&lt;td width="6"&gt;:&lt;/td&gt;
&lt;td width="301"&gt;&lt;input name="username" type="text" id="username"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Password&lt;/td&gt;
&lt;td&gt;:&lt;/td&gt;
&lt;td&gt;&lt;input name="password" type="password" id="password"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Email&lt;/td&gt;
&lt;td&gt;:&lt;/td&gt;
&lt;td&gt;&lt;input name="email" type="text" id="email"&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;/tbody&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div id="footer"&gt;
&lt;center&gt;&lt;b&gt;Copyright stuff&lt;/b&gt;&lt;/center&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>When I execute this on my server, it says "You are now a member" even though the username is in use by someone else. Help?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/php/17">PHP</category>
			<dc:creator>Djmann1013</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/php/threads/424208/whats-wrong-with-this-code-phpmysql</guid>
		</item>
				<item>
			<title>Toshiba Satellite Laptop not booting past Toshiba Splash Screen</title>
			<link>http://www.daniweb.com/hardware-and-software/threads/424207/toshiba-satellite-laptop-not-booting-past-toshiba-splash-screen</link>
			<pubDate>Sat, 26 May 2012 14:39:14 +0000</pubDate>
			<description>My Toshiba Satellite Laptop doesn't boot (Windows) past the &quot;Toshiba&quot; post screen. If I push F12 quickly after first powering up, it will then ask what boot sequence I want to use. Then, all I have to do is hit the &quot;Enter&quot; button and it will boot up; otherwise, it ...</description>
			<content:encoded><![CDATA[ <p>My Toshiba Satellite Laptop doesn't boot (Windows) past the "Toshiba" post screen.  If I push F12 quickly after first powering up, it will then ask what boot sequence I want to use.  Then, all I have to do is hit the "Enter" button and it will boot up; otherwise, it just hangs displaying the "Toshiba" post screen.  Any ideas?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/hardware-and-software/1">Hardware and Software</category>
			<dc:creator>gentleben</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/hardware-and-software/threads/424207/toshiba-satellite-laptop-not-booting-past-toshiba-splash-screen</guid>
		</item>
				<item>
			<title>Pointer</title>
			<link>http://www.daniweb.com/software-development/c/threads/424206/pointer</link>
			<pubDate>Sat, 26 May 2012 14:33:32 +0000</pubDate>
			<description>` Below Code not working :- #include&lt;stdio.h&gt; void main() { char *s; gets(s); printf(&quot;%c&quot;,s); }</description>
			<content:encoded><![CDATA[ <p>`</p>

<p>Below Code not working :-</p>

<pre><code class="language-c">#include&lt;stdio.h&gt;
void main()
{
    char *s;
    gets(s);
    printf("%c",s);

}
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/c/118">C</category>
			<dc:creator>nee_88</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/c/threads/424206/pointer</guid>
		</item>
				<item>
			<title>Cin Help</title>
			<link>http://www.daniweb.com/software-development/cpp/threads/424205/cin-help</link>
			<pubDate>Sat, 26 May 2012 14:24:50 +0000</pubDate>
			<description>Hi again, I am working on a small project which sort of resembles a makeshift programming language, in which if the user types &quot;print&quot; and then a value, the console will write the value, and not the string, for example, if I write *Print &quot;Hello&quot;*, it will output the string ...</description>
			<content:encoded><![CDATA[ <p>Hi again,<br />
I am working on a small project which sort of resembles a makeshift programming language, in which if the user types "print" and then a value, the console will write the value, and not the string, for example, if I write <em>Print "Hello"</em>, it will output the string "hello". It is sort of like a makeshift language that I want touse to teach the basics of programming, here is my code:</p>

<pre><code class="language-cpp">#include &lt;iostream&gt;
using namespace std;

int main (void)
{
string firstword, secondword;

cout&lt;&lt;"Input: ";
firstword = cin.get();
cin.ignore(1,' ');
secondword = cin.get();
if (firstword == "print")
{
    secondword = firstword + secondword;
    cout &lt;&lt; secondword;
}
return 0;
}
</code></pre>

<p>Thankyou!</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/cpp/8">C++</category>
			<dc:creator>Dasttann777</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/cpp/threads/424205/cin-help</guid>
		</item>
				<item>
			<title>Difference between interface and abstract classes</title>
			<link>http://www.daniweb.com/software-development/java/threads/424204/difference-between-interface-and-abstract-classes</link>
			<pubDate>Sat, 26 May 2012 14:11:06 +0000</pubDate>
			<description>I think they can be used to do the same things, Right ?</description>
			<content:encoded><![CDATA[ <p>I think they can be used to do the same things, Right ?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/java/9">Java</category>
			<dc:creator>GeekTool</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/java/threads/424204/difference-between-interface-and-abstract-classes</guid>
		</item>
				<item>
			<title>is there a way to edit contents of rdbuf()?</title>
			<link>http://www.daniweb.com/software-development/cpp/threads/424203/is-there-a-way-to-edit-contents-of-rdbuf</link>
			<pubDate>Sat, 26 May 2012 14:02:51 +0000</pubDate>
			<description>here is the code, that reads a file. Currently i am able to print contents of the file but i want to edit its contents. how can i do this? #include&lt;iostream&gt; #include&lt;fstream&gt; using namespace std; void main() { wfstream file; file.open(&quot;hello.exe&quot;,ios::binary | ios::in); if (!file) { cout&lt;&lt;&quot;ERROR&quot;&lt;&lt;endl; exit(0); } wcout&lt;&lt;file.rdbuf(); ...</description>
			<content:encoded><![CDATA[ <p>here is the code, that reads a file. Currently i am able to print contents of the file but i want to edit its contents. how can i do this?</p>

<pre><code class="language-cpp">#include&lt;iostream&gt;
#include&lt;fstream&gt;
using namespace std;
void main()
{

wfstream file;
file.open("hello.exe",ios::binary | ios::in);

if (!file)
{
    cout&lt;&lt;"ERROR"&lt;&lt;endl;
    exit(0);
}

wcout&lt;&lt;file.rdbuf();

}
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/cpp/8">C++</category>
			<dc:creator>Humayoon Khan</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/cpp/threads/424203/is-there-a-way-to-edit-contents-of-rdbuf</guid>
		</item>
				<item>
			<title>How to read a file into wstring instead of char array?</title>
			<link>http://www.daniweb.com/software-development/cpp/threads/424202/how-to-read-a-file-into-wstring-instead-of-char-array</link>
			<pubDate>Sat, 26 May 2012 13:49:52 +0000</pubDate>
			<description>i know how to read a file into array, however i want to perform some search operations which is difficult to do on array. if someway i am able to read a file to string then it becomes easier. i have 2 methods of reading a file into wstring but ...</description>
			<content:encoded><![CDATA[ <p>i know how to read a file into array, however i want to perform some search operations which is difficult to do on array.<br />
if someway i am able to read a file to string then it becomes easier. i have 2 methods of reading a file into wstring but i don't get all the contents of a file. the file reading is stopped upon the occurence of first null character. how can i stop this from happening?<br />
please note that i am reading a file that consits of all characters (ascii 0-255) therefore i must use wstring instead of string..<br />
here is what i have tried so far..</p>

<pre><code class="language-cpp">#include &lt;sstream&gt;
#include &lt;fstream&gt;
#include&lt;iostream&gt;
using namespace std;
wstring readfile(const char* filename)
{
    wifstream wif(filename,ios::binary);
    wstringstream wss;
    wss &lt;&lt; wif.rdbuf();
    return wss.str();
//is there a way i can perform search operations on rdbuf()?
}

void main()
{
    wstring wstr = readfile("hello.exe");
    wcout&lt;&lt;wstr;//here i get less than 10 characters, while file consists of 200 bytes =(

}
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/cpp/8">C++</category>
			<dc:creator>Humayoon Khan</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/cpp/threads/424202/how-to-read-a-file-into-wstring-instead-of-char-array</guid>
		</item>
				<item>
			<title>Reading Bytes in java</title>
			<link>http://www.daniweb.com/software-development/java/threads/424201/reading-bytes-in-java</link>
			<pubDate>Sat, 26 May 2012 13:26:15 +0000</pubDate>
			<description>I am facing some problems in a project regarding to byte fetching from a file and storing. Problem in java bytes is they are number, instead of char. In file i have seen a byte is like a char... Also how to make bytes unsigned , because signed bytes creates ...</description>
			<content:encoded><![CDATA[ <p>I am facing some problems in a project regarding to byte fetching from a file and storing. Problem in java bytes is they are number, instead of char. In file i have seen a byte is like a char... Also how to make bytes unsigned , because signed bytes creates alot problem. Thanx in Advance.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/java/9">Java</category>
			<dc:creator>Majestics</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/java/threads/424201/reading-bytes-in-java</guid>
		</item>
				<item>
			<title>Erroneous answer in greatest divisor algorithm</title>
			<link>http://www.daniweb.com/software-development/c/threads/424200/erroneous-answer-in-greatest-divisor-algorithm</link>
			<pubDate>Sat, 26 May 2012 12:26:07 +0000</pubDate>
			<description>Hi All, I am writing a program to find the number between 1 and 100 that has the greatest number of distinct divisors. Below is my code for the same. It is returning an erroneous answer, i.e. 8 for greatest number of distinct divisors and 4 as the number for ...</description>
			<content:encoded><![CDATA[ <p>Hi All,</p>

<p>I am writing a program to find the number between 1 and 100 that has the greatest number of distinct divisors. Below is my code for the same. It is returning an erroneous answer, i.e. 8 for greatest number of distinct divisors and 4 as the number for which the greatest divisors are occurring:</p>

<p>Please point out modifications and mistakes. Thank you.</p>

<pre><code class="language-c">/*program to find a number in the range 1 to 100 that has the largest number of distinct divisors*/
#include&lt;stdio.h&gt;
#include&lt;stdlib.h&gt;
#include&lt;math.h&gt;
//this loop counts the number of distinct divisors

int main()
{
int countstore[100]={0},result,i,j,num,halfnum,count=1,index;
for(num=4;num&lt;=100;num++)
{
  halfnum=floor(num/2);
  count=1;                      
  for(i=2;i&lt;=halfnum;i++)
  {
      if(num%i==0)
      {
        count+=1;
      }
  }
  for(j=1;j&lt;=97;j++)
  {
    countstore[j]=count;                
  }
}

//result stores the number of distinct divisors, index stores the number for which the greatest distinct divisors have been found

result=0;
for(i=1;i&lt;=97;i++)
{
 if(result&lt;countstore[i])
 {
 result=countstore[i];
 index=i+3;
 }
}
printf("the integer between 0 and 100 with %d number of distinct divisors is %d",result,index);
system("pause");
return 0;
}
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/c/118">C</category>
			<dc:creator>abhishekagrawal</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/c/threads/424200/erroneous-answer-in-greatest-divisor-algorithm</guid>
		</item>
				<item>
			<title>selection range, position inside each element included in range</title>
			<link>http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/424199/selection-range-position-inside-each-element-included-in-range</link>
			<pubDate>Sat, 26 May 2012 12:19:11 +0000</pubDate>
			<description>Dear All, Please suppose that I have this line of code, and that my selection range goes from div element with id=1, starting at '2', to div element with id='2', ending at '8'. `&lt;div id='1'&gt;1`2`3&lt;/div&gt;456&lt;div id='2'&gt;7`8`9&lt;/div&gt;`. I'm using chrome, I would like to get the position of the cursor inside ...</description>
			<content:encoded><![CDATA[ <p>Dear All,</p>

<p>Please suppose that I have this line of code, and that my selection range goes from div element with id=1, starting at '2', to div  element with id='2', ending at '8'.</p>

<p><code>&lt;div id='1'&gt;1</code>2<code>3&lt;/div&gt;456&lt;div id='2'&gt;7</code>8<code>9&lt;/div&gt;</code>.</p>

<p>I'm using chrome, I would like to get the position of the cursor inside each element. I would get position 1 in div with  id='1', and position 1 as well in div with  id='2'.</p>

<p>Thank you so much for yout help,</p>

<p>Regards</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/javascript-dhtml-ajax/117">JavaScript / DHTML / AJAX</category>
			<dc:creator>softDeveloper</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/424199/selection-range-position-inside-each-element-included-in-range</guid>
		</item>
				<item>
			<title>if statement no output</title>
			<link>http://www.daniweb.com/web-development/php/threads/424198/if-statement-no-output</link>
			<pubDate>Sat, 26 May 2012 12:07:53 +0000</pubDate>
			<description>I've just started php and mysql.trying this code to check if mysql account is correct or not. &lt;?php $usr=$_POST['username']; $psw=$_POST['passwd']; echo ' body tag, other things and a message: Logging in! '; echo $usr; $connection = myqsl_connect('localhost',$usr,$psw); if (!$connection){ die('&lt;p&gt;Stopped : ' . mysql_error()); echo '&lt;br /&gt;&lt;a href=&quot;index.html&quot;&gt;Retry&lt;/a&gt;&lt;/p&gt;'; } else ...</description>
			<content:encoded><![CDATA[ <p>I've just started php and mysql.trying this code to check if mysql account is correct or not.</p>

<pre><code>&lt;?php
    $usr=$_POST['username'];
    $psw=$_POST['passwd'];

echo ' body tag, other things and a message: Logging in! '; echo $usr;

$connection = myqsl_connect('localhost',$usr,$psw);
if (!$connection){
    die('&lt;p&gt;Stopped : ' . mysql_error());
    echo '&lt;br /&gt;&lt;a href="index.html"&gt;Retry&lt;/a&gt;&lt;/p&gt;';
}
else echo '&lt;p&gt;Logged on!&lt;br /&gt;&lt;a href="something.php"&gt;Continue&lt;/a&gt;&lt;/p&gt;';
//planning to add mysql_close($connection) here
?&gt;
</code></pre>

<p>page has nothing else but the endings of tags started in first "echo" and some &lt;head&gt;&lt;/head&gt; configuraiton. code is between &lt;/head&gt; and &lt;/body&gt; tags. (it includes the &lt;body&gt; tag in an "echo"). this writes no output from the if - else statement; but rest of the html and css is shown. post variables can be seen when I write them to page with echo. please help. thx.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/php/17">PHP</category>
			<dc:creator>ferit1223</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/php/threads/424198/if-statement-no-output</guid>
		</item>
				<item>
			<title>List box not showing database</title>
			<link>http://www.daniweb.com/software-development/vbnet/threads/424197/list-box-not-showing-database</link>
			<pubDate>Sat, 26 May 2012 11:37:40 +0000</pubDate>
			<description>Hello, I have two linked tables in my database (access), one is for the student and one is the ages(selection drop list ). When I have transfered the data in vb form, a simple text box is shown with numbers in it. How can I have the drop down list ...</description>
			<content:encoded><![CDATA[ <p>Hello,</p>

<p>I have two linked  tables in my database (access), one is for the student and one is the ages(selection drop list ).</p>

<p>When I have transfered the data in vb form, a simple text box is shown with numbers in it. How can I have the drop down list shown with the data I need instead of the numbers?</p>

<p>Thanks.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/vbnet/58">VB.NET</category>
			<dc:creator>london-G</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/vbnet/threads/424197/list-box-not-showing-database</guid>
		</item>
				<item>
			<title>Lysco  Contracting</title>
			<link>http://www.daniweb.com/community-center/community-introductions/threads/424196/lysco-contracting</link>
			<pubDate>Sat, 26 May 2012 11:25:40 +0000</pubDate>
			<description>Hello Everyone, I am David Novan working in Lysco Contracting I am new here, I am here to learn about seo and found that it is great source of knowledge. Hope to get more help by you guys.I am happy to join here. Have a nice time. All thanks Lysco ...</description>
			<content:encoded><![CDATA[ <p>Hello Everyone, I am David Novan working in Lysco Contracting<br />
I am new here, I am here to learn about seo and found that it is great source of knowledge.<br />
Hope to get more help by you guys.I am happy to join here. Have a nice time.</p>

<p>All thanks<br />
Lysco Contracting</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/community-center/community-introductions/165">Community Introductions</category>
			<dc:creator>davidnovan</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/community-center/community-introductions/threads/424196/lysco-contracting</guid>
		</item>
				<item>
			<title>Regular expression for finding a word</title>
			<link>http://www.daniweb.com/software-development/csharp/threads/424195/regular-expression-for-finding-a-word</link>
			<pubDate>Sat, 26 May 2012 10:53:57 +0000</pubDate>
			<description>I have a long string of characters as input and I want to count the number of words in that string. How can I do it through regular expression?</description>
			<content:encoded><![CDATA[ <p>I have a long string of characters as input and I want to count the number of words in that string. How can I do it through regular expression?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/csharp/61">C#</category>
			<dc:creator>coder389</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/csharp/threads/424195/regular-expression-for-finding-a-word</guid>
		</item>
				<item>
			<title>Get Form Name in other module....</title>
			<link>http://www.daniweb.com/software-development/vbnet/threads/424194/get-form-name-in-other-module</link>
			<pubDate>Sat, 26 May 2012 10:47:56 +0000</pubDate>
			<description>Hello Friends....One more doubt... I have a connection module in which I have written the open and close database connection.... if database connection is an error it will return false else if success it will return true the function of the modules will be called from the form code.... what ...</description>
			<content:encoded><![CDATA[ <p>Hello Friends....One more doubt...</p>

<p>I have a connection module in which I have written the open and close database connection....</p>

<p>if database connection is an error it will return false else if success it will return true</p>

<p>the function of the modules will be called from the form code....</p>

<p>what I need is if the connection is an error the module should also get the form name which returned the error...is it possible???</p>

<p>check my below code....</p>

<p>DBConnection.module</p>

<pre><code class="language-vb">Imports System.Data.SqlClient

Module DBConnection
    Public Connection As SqlConnection = New SqlConnection()
    Public Function Open_DB_Connection() As String
        Try
            Connection.ConnectionString = "Data Source = LocalHost\;Initial Catalog = Database;Integrated Security  = True"
            Connection.Open()
            Return "Success"
        Catch ex As Exception
            MsgBox("Connection Error: " + ex.Message)
            Return "Fail"
            Exit Function
        End Try
    End Function

    Public Function Close_DB_Connection() As String
        Try
            Connection.Close()
            Return "Success"
        Catch ex As Exception
            MsgBox("Connection Error: " + ex.Message)
            Return "Fail"
            Exit Function
        End Try
    End Function
End Module
</code></pre>

<p>Call from the function is this way....</p>

<pre><code class="language-vb">Dim Open_DB_Con As String
Dim Close_DB_Con As String

Open_DB_Con = Open_DB_Connection()

'other stuff required like queries....

Close_DB_Con = Close_DB_Connection()
</code></pre>

<p>now what I need is if the functions Open_DB_Connection() or Close_DB_Connection() returns error it should prompt the form name....</p>

<p>is it possible?? to code it in module....</p>

<p>thanks for help in advance....</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/vbnet/58">VB.NET</category>
			<dc:creator>poojavb</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/vbnet/threads/424194/get-form-name-in-other-module</guid>
		</item>
				<item>
			<title>Select Item from webbrowser dropdown list</title>
			<link>http://www.daniweb.com/software-development/vbnet/threads/424193/select-item-from-webbrowser-dropdown-list</link>
			<pubDate>Sat, 26 May 2012 10:21:04 +0000</pubDate>
			<description>Hello, I'm working on a webpage automation project. And I am very new in this. I want to use Webbrowser control to select an item in the dropdownlist. Now,how do I programmetically select an item from the HTML snippet below. I would like to select,say for example,&quot;2009&quot; from this HTML ...</description>
			<content:encoded><![CDATA[ <p>Hello,</p>

<p>I'm working on a webpage automation project. And I am very new in this. I want to use Webbrowser control to select an item in the dropdownlist. Now,how do I programmetically select an item from the HTML snippet below. I would like to select,say for example,"2009" from this HTML code :</p>

<pre><code class="language-vb">&lt;select name = "yr"&gt;
&lt;option value= ""&gt;Year&lt;/option&gt;
&lt;option&gt;2009&lt;/option&gt;
&lt;option&gt;2010&lt;/option&gt;
&lt;option&gt;2011&lt;/option&gt;
&lt;option&gt;2012&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>I am trying the following code :</p>

<pre><code class="language-vb">      For Each element As HtmlElement In WebBrowser1.Document.GetElementsByTagName("select")
                If element.GetAttribute("name") = "yr" Then
                    element.SetAttribute("value", "2011")
                End If




    Next
</code></pre>

<p>Thanks in advance for any help.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/vbnet/58">VB.NET</category>
			<dc:creator>elitely</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/vbnet/threads/424193/select-item-from-webbrowser-dropdown-list</guid>
		</item>
				<item>
			<title>Call to undefined function mysql_selected_db() in</title>
			<link>http://www.daniweb.com/web-development/php/threads/424192/call-to-undefined-function-mysql_selected_db-in</link>
			<pubDate>Sat, 26 May 2012 09:43:59 +0000</pubDate>
			<description>Hello, I know very little about programming, means what ever learn, i learnt it from the you tube, so in order to explain my problem i am writing every thing so when i get the reply i can understand it. first i try to download apache, mysql and phpmyadminn but ...</description>
			<content:encoded><![CDATA[ <p>Hello,</p>

<p>I know very little about programming, means what ever learn, i learnt it from the you tube, so in order to explain my problem i am writing every thing so when i get the reply i can understand it.</p>

<p>first i try to download apache, mysql and phpmyadminn but did not succed.</p>

<p>after that i downloaded XAMPP 1.7.7</p>

<p>In XAMPP 1.7.7 I gave this information for my security</p>

<p>**MYSQL SECTION: "ROOT" PASSWORD (This line was already there as a heading) **</p>

<p><strong>MYSQL super user : root (it was already there so i cant change)</strong><br />
password : bluebus<br />
PhpMyAdmin authentification: http or cokie (i select cokie),<br />
Safe plain password in text file? ((File: C:\xampp\security\security\mysqlrootpasswd.txt): there was a check box i did not click,</p>

<p><strong>XAMPP DIRECTORY PROTECTION (.htaccess)</strong> (this line was already there as a heading)</p>

<p>User: root<br />
Password : redbus,<br />
Safe plain password in text file? ((File: C:\xampp\security\security\mysqlrootpasswd.txt): there was a check box i did not click,</p>

<p><strong>after that i went to phpmyadmin</strong></p>

<p>user: root<br />
Password : redbus,</p>

<p>after this i created a database, DATABASE NAME: CAR,</p>

<p>After this i added a new user for this database, NEW USER NAME: Member, and password i gave  "<strong>redblue</strong>", and i created a table,</p>

<p>after this i created a new file in notpad++, the coding is</p>

<pre><code>&lt;?php

define ('DB_NAME', 'car');
define ('DB_USER', 'member');
define ('DB_PASSWORD', 'redblue');
define ('DB_HOST', 'localhost');

$link= mysql_connect (DB_HOST,DB_USER,DB_PASSWORD);

if (!$link) {
die ('could not connect:' . mysql_error () );
}

$db_selected=mysql_selected_db (DB_NAME, $link);

if (!$db_selected) {
die ('cant user' . ':' . mysql_error ());
}

$value = $_post ['input1'];

$sql= "INSERT INTO demo (input1) VALUES ('$value')";

if (!mysql_query ($sql)) {
die ('error:' . mysql_error () );
}

mysql_close ();
?&gt;
</code></pre>

<p>when i try to run this its shows the error</p>

<p>Fatal error: Call to undefined function mysql_selected_db() in C:\xampp\htdocs\PhpProject1\index.php on line 14</p>

<p>please help thx</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/php/17">PHP</category>
			<dc:creator>arifsuhail1</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/php/threads/424192/call-to-undefined-function-mysql_selected_db-in</guid>
		</item>
				<item>
			<title>problem with input validation</title>
			<link>http://www.daniweb.com/software-development/cpp/threads/424190/problem-with-input-validation</link>
			<pubDate>Sat, 26 May 2012 07:42:55 +0000</pubDate>
			<description>Hi! i have problems with input validation, so here goes the problem : Write a program that uses a structure to store the following data about a customer account: Name Address City, State, and ZIP Telephone Number Account Balance Date of Last Payment VideoNote Solving the Weather Statistics Problem Review ...</description>
			<content:encoded><![CDATA[ <p>Hi! i have problems with input validation, so here goes the problem :</p>

<p>Write a program that uses a structure to store the following data about a customer<br />
account:<br />
Name<br />
Address<br />
City, State, and ZIP<br />
Telephone Number<br />
Account Balance<br />
Date of Last Payment<br />
VideoNote<br />
Solving the<br />
Weather<br />
Statistics<br />
Problem<br />
Review Questions and Exercises 647<br />
The program should use an array of at least 20 structures. It should let the user enter<br />
data into the array, change the contents of any element, and display all the data stored<br />
in the array. The program should have a menu-driven user interface.<br />
Input Validation:** When the data for a new account is entered, be sure the user enters<br />
data for all the fields.** No negative account balances should be entered.</p>

<p>so here's my code :</p>

<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;string&gt;


using namespace std;

struct Customer
{
    string name;
    string adress;
    string city, state, ZIP;
    int telp;
    double accBal;
    string date;
};

void getdata(Customer[]);

int main()
{
    Customer bank[5];
    getdata(bank);

}

void getdata(Customer b[])
{
    for(int count = 0; count &lt; 5; count++)
    {
        cout&lt;&lt;"enter name for person "&lt;&lt;count+1&lt;&lt;" = ";
        getline(cin, b[count].name);
        cout&lt;&lt;"enter adress for person "&lt;&lt;count+1&lt;&lt;" = ";
        getline(cin, b[count].adress);
        cout&lt;&lt;"enter city for person "&lt;&lt;count+1&lt;&lt;" = ";
        getline(cin, b[count].city);
        cout&lt;&lt;"enter state for person "&lt;&lt;count+1&lt;&lt;" = ";
        getline(cin, b[count].state);
        cout&lt;&lt;"enter ZIP for person "&lt;&lt;count+1&lt;&lt;" = ";
        getline(cin, b[count].ZIP);
        cout&lt;&lt;"enter telephone number for person "&lt;&lt;count+1&lt;&lt;" = ";
        cin&gt;&gt;b[count].telp;
        cout&lt;&lt;"enter account balance for person "&lt;&lt;count+1&lt;&lt;" = ";
        cin&gt;&gt;b[count].accBal;
        cout&lt;&lt;"enter date of last payment for person "&lt;&lt;count+1&lt;&lt;" = ";
        cin.ignore();
        getline(cin, b[count].date);
    }
}
</code></pre>

<p>the problem is i dont know how to make sure <strong>the user enters data for all fields</strong><br />
anyone can help me? :D</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/cpp/8">C++</category>
			<dc:creator>mohur</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/cpp/threads/424190/problem-with-input-validation</guid>
		</item>
				<item>
			<title>What was your First Password??</title>
			<link>http://www.daniweb.com/community-center/geeks-lounge/threads/424189/what-was-your-first-password</link>
			<pubDate>Sat, 26 May 2012 07:03:37 +0000</pubDate>
			<description>Yeah! Everyone must be having a first password which is quiet not strange. The moment you are asked to make a new password is quiet a memorable one. Like mine, it was during a Class, and i quiet took some time to get one. And voila when i finally made ...</description>
			<content:encoded><![CDATA[ <p>Yeah! Everyone must be having a first password which is quiet not strange. The moment you are asked to make a new password is quiet a memorable one. Like mine, it was during a Class, and i quiet took some time to get one. And voila when i finally made one, it was the obvious 123456789. So whats yours???</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/community-center/geeks-lounge/6">Geeks' Lounge</category>
			<dc:creator>Captain Jake</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/community-center/geeks-lounge/threads/424189/what-was-your-first-password</guid>
		</item>
				<item>
			<title>frnds plz help me my look up form not loading</title>
			<link>http://www.daniweb.com/software-development/vbnet/threads/424188/frnds-plz-help-me-my-look-up-form-not-loading</link>
			<pubDate>Sat, 26 May 2012 07:01:34 +0000</pubDate>
			<description> Imports System.Data Imports System.Data.SqlClient Public Class LookupForm Dim stable As String Dim SelectQuery As String Dim cs As String Dim htKeys As Hashtable Property FKeyWithTable() As Hashtable Get Return htKeys End Get Set(ByVal value As Hashtable) htKeys = value End Set End Property Public Event LoadRecord(ByVal CurrentRow As Hashtable) Private ...</description>
			<content:encoded><![CDATA[ <pre><code class="language-vb">Imports System.Data
Imports System.Data.SqlClient

Public Class LookupForm
    Dim stable As String
    Dim SelectQuery As String
    Dim cs As String
    Dim htKeys As Hashtable

    Property FKeyWithTable() As Hashtable
        Get
            Return htKeys
        End Get
        Set(ByVal value As Hashtable)
            htKeys = value
        End Set
    End Property

    Public Event LoadRecord(ByVal CurrentRow As Hashtable)
    Private Sub LookupForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        LoadFields()
    End Sub
    Property ConnectionString() As String
        Get
            Return cs
        End Get
        Set(ByVal value As String)
            cs = value
        End Set
    End Property
    Property TableName() As String
        Get
            Return stable
        End Get
        Set(ByVal value As String)
            stable = value
            SelectQuery = "Select * From " &amp; stable
        End Set
    End Property
    Private Sub mbtnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mbtnOK.Click
        Dim ht As New Hashtable
        Dim dgc As DataGridViewCell
        If dgData.CurrentRow IsNot Nothing Then
            For Each dgc In dgData.CurrentRow.Cells
                ht.Add(dgc.ColumnIndex, dgc.Value.ToString)
            Next
        End If
        RaiseEvent LoadRecord(ht)
        Me.Close()
    End Sub

    Private Sub mbtnShowAll_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mbtnShowAll.Click
        If cboOp.Text.ToUpper = "MASTER DATA" Then
            If htKeys(cboFields.Text) IsNot Nothing Then
                dgData.DataSource = ShowData("Select * From " &amp; htKeys(cboFields.Text))
            Else
                MsgBox("Specify Foreign/PrimaryKey And Its Master Table ")
            End If
        Else
            dgData.DataSource = ShowData(SelectQuery)
        End If
    End Sub

    Function ShowData(ByVal Query As String) As DataTable
        Dim con As New SqlConnection(My.Settings.DatabaseICICIConnectionString)
        Dim cmd As New SqlCommand(Query, con)
        Dim dt As DataTable = Nothing
        Try
            con.Open()
            dt = New DataTable
            dt.Load(cmd.ExecuteReader)
            con.Close()

        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
        Return dt
    End Function
    Sub LoadFields()
        con.Open()
        Dim dt As DataTable = ShowData(SelectQuery &amp; " Where 1 &lt;&gt; 1")
        Dim dc As New DataColumn
        For Each dc In dt.Columns
            dt.Load(dc)
            cboFields.Items.Add(dc.ColumnName)
        Next
        con.Close()
    End Sub

    Function IsNumericType(ByVal ColName As String) As Boolean
        Dim dt As DataTable = ShowData(SelectQuery &amp; " Where 1 &lt;&gt; 1")
        If dt.Columns(ColName).DataType Is GetType(Integer) Then
            Return True
        End If
        Return False
    End Function

    Private Sub mbtnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mbtnSearch.Click
        Dim query As String
        If IsNumericType(cboFields.Text) Then
            query = String.Format("{0} Where {1} {2} {3} ", SelectQuery, cboFields.Text, cboOp.Text, txtValue.Text)
        Else
            If cboOp.Text.ToUpper = "LIKE" Or cboOp.Text.ToUpper = "NOT LIKE" Then
                query = String.Format("{0} Where {1} {2} '{3}%' ", SelectQuery, cboFields.Text, cboOp.Text, txtValue.Text)
            Else
                query = String.Format("{0} Where {1} {2} '{3}' ", SelectQuery, cboFields.Text, cboOp.Text, txtValue.Text)
            End If
        End If
        dgData.DataSource = ShowData(query)
    End Sub

    Private Sub mbtnCResult_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mbtnCResult.Click
        dgData.DataSource = Nothing
    End Sub

    Private Sub cboOp_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboOp.SelectedIndexChanged
        If cboOp.Text.ToUpper = "MASTER DATA" Then
            mbtnSearch.Enabled = False
        Else
            mbtnSearch.Enabled = True
        End If
    End Sub

    Private Sub dgData_MouseDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles dgData.MouseDoubleClick
        If cboOp.Text.ToUpper = "MASTER DATA" Then
            txtValue.Text = dgData.CurrentRow.Cells(cboFields.Text).Value
        End If
    End Sub
    Private Sub mbtnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mbtnCancel.Click
        Me.Close()
    End Sub
End Class
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/vbnet/58">VB.NET</category>
			<dc:creator>salman_hundekar</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/vbnet/threads/424188/frnds-plz-help-me-my-look-up-form-not-loading</guid>
		</item>
				<item>
			<title>Java Applet</title>
			<link>http://www.daniweb.com/software-development/java/threads/424187/java-applet</link>
			<pubDate>Sat, 26 May 2012 07:01:21 +0000</pubDate>
			<description>When &quot;ENTER&quot; button in value class clicked the show class wil be run. but nothing happend import java.applet.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; /*&lt;applet code =&quot;value&quot; width=200 height=200&gt; &lt;/applet&gt;*/ public class value extends Applet { private JLabel lab1; private JButton btn1; public void init () { // Construct the ...</description>
			<content:encoded><![CDATA[ <p>When "ENTER" button in value class clicked the show class wil be run. but nothing happend</p>

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


/*&lt;applet code ="value" width=200 height=200&gt;
&lt;/applet&gt;*/

public class value extends Applet {

     private JLabel lab1;
    private JButton btn1;

      public void init () {

        // Construct the TextFields
     this.lab1 = new JLabel("Press the button");
     this.btn1 = new JButton("ENTER");

     // add the button to the layout
     this.add(lab1);
     this.add(btn1);

     transfer tran=new transfer();
     btn1.addActionListener(tran);

      }

      private class transfer implements ActionListener
        {
            public void actionPerformed(ActionEvent e)
                {
                    show sh = new show();
                    sh.setVisible(true);
                }

        }


}




import java.applet.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;




public class show extends Applet {

     private JLabel lab2;
     private JButton btn2;
     private JTextField txt2;
     String s1,s2;

      public void init () {

     // Construct the TextFields
     this.lab2 = new JLabel("Enter a number");
     this.btn2 = new JButton("DOUBLE");
     this.txt2 = new JTextField(20);
     this.txt2.setEditable(true);

     // add the button to the layout
     this.add(lab2);
     this.add(txt2);
      this.add(btn2);

      summation sa = new summation(txt2);
     btn2.addActionListener(sa);
     this.txt2.addActionListener(sa);

     }
      private int checkInput(String inString) {

        StringBuffer tStringBuf;
        int flag=0; 
        tStringBuf=new StringBuffer(inString);
        //check each input character to see if it is a number
        for(int index=0; index&lt;tStringBuf.length(); index++){
            char ch=tStringBuf.charAt(index);
            if( (ch&lt;'0' || ch&gt;'9') &amp;&amp; (ch !='.')){
                flag=1;
                break;
            }
        }
        if(flag==1) return 0;
        //not a number input
        else return 1;  //input is right

    }

    class summation implements ActionListener {
         private JTextField txt3;

         public summation(JTextField txt3)
         {
            this.txt3=txt3;

         }

         public void actionPerformed(ActionEvent ae) {
            if(ae.getSource()==btn2)
        {
            s1=txt3.getText();
            int i = Integer.parseInt(s1);
            int result=i*2;
            s2 = new Integer(result).toString();
            txt3.setText(s2);

        }
         }

    }
}
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/java/9">Java</category>
			<dc:creator>subrat_p</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/java/threads/424187/java-applet</guid>
		</item>
				<item>
			<title>SQL query</title>
			<link>http://www.daniweb.com/software-development/vbnet/threads/424186/sql-query</link>
			<pubDate>Sat, 26 May 2012 05:49:10 +0000</pubDate>
			<description>hey i am having three columns &quot;fname&quot;, &quot;mname&quot;, &quot;lname&quot; in one table... i want to take each column's DISTINCT value without relating fields in one query.. i mean distinct of &quot;fname&quot; in first column, distinct of &quot;mname&quot; in second column and distinct of &quot;lname&quot; in third column can anyone help ...</description>
			<content:encoded><![CDATA[ <p>hey i am having three columns "fname", "mname", "lname" in one table...</p>

<p>i want to take each column's DISTINCT value without relating fields in one query..</p>

<p>i mean distinct of "fname" in first column, distinct of "mname" in second column and distinct of "lname" in third column</p>

<p>can anyone help me to write that query...</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/vbnet/58">VB.NET</category>
			<dc:creator>sanket044</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/vbnet/threads/424186/sql-query</guid>
		</item>
				<item>
			<title>Change directory (commandline window)</title>
			<link>http://www.daniweb.com/software-development/python/threads/424185/change-directory-commandline-window</link>
			<pubDate>Sat, 26 May 2012 05:39:01 +0000</pubDate>
			<description>Ok, for some strange reason I cannot move from the &quot;Python27&quot; folder: I have tried this... Python 2.7.3 (default, Apr 10 2012, 23:31:26) Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information. &gt;&gt;&gt; from os import system &gt;&gt;&gt; system('cd') C:\Python27 0 &gt;&gt;&gt; system('cd ..') 0 &gt;&gt;&gt; system('cd') C:\Python27 0 It ...</description>
			<content:encoded><![CDATA[ <p>Ok, for some strange reason I cannot move from the "Python27" folder:<br />
I have tried this...</p>

<pre><code class="language-py">Python 2.7.3 (default, Apr 10 2012, 23:31:26) 
Type "help", "copyright", "credits" or "license" for more information.

&gt;&gt;&gt; from os import system
&gt;&gt;&gt; system('cd')
C:\Python27
0
&gt;&gt;&gt; system('cd ..')
0
&gt;&gt;&gt; system('cd')
C:\Python27
0
</code></pre>

<p>It did not change directory; why?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/python/114">Python</category>
			<dc:creator>HTMLperson5</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/python/threads/424185/change-directory-commandline-window</guid>
		</item>
				<item>
			<title>Inverse Matrix</title>
			<link>http://www.daniweb.com/software-development/cpp/threads/424184/inverse-matrix</link>
			<pubDate>Sat, 26 May 2012 05:31:38 +0000</pubDate>
			<description>Can anyone please help me that how this program works?? i have got this Program on internet and i want it to run..... #include &lt;cstdlib&gt; double** gauss(double **matrix, int dimension) { double **inverse; inverse = (double**) malloc(dimension * sizeof (double *)); for (int i = 0; i &lt; dimension; i++) ...</description>
			<content:encoded><![CDATA[ <p>Can anyone please help me that how this program works??<br />
i have got this Program on  internet and i want it to run.....</p>

<pre><code class="language-cpp">#include &lt;cstdlib&gt;
double** gauss(double **matrix, int dimension)
{
    double **inverse;
    inverse = (double**) malloc(dimension * sizeof (double *));
    for (int i = 0; i &lt; dimension; i++)
        inverse[i] = (double*) malloc(dimension * sizeof (double));


    for (int i = 0; i &lt; dimension; i++)
        for (int j = 0; j &lt; dimension; j++)
            inverse[i][j] = 0;

    for (int i = 0; i &lt; dimension; i++)
        inverse[i][i] = 1;

    for (int k = 0; k &lt; dimension; k++)
    {
        for (int i = k; i &lt; dimension; i++)
        {
            double valInv = 1.0 / matrix[i][k];
            for (int j = k; j &lt; dimension; j++)
                matrix[i][j] *= valInv;
            for (int j = 0; j &lt; dimension; j++)
                inverse[i][j] *= valInv;
        }
        for (int i = k + 1; i &lt; dimension; i++)
        {
            for (int j = k; j &lt; dimension; j++)
                matrix[i][j] -= matrix[k][j];
            for (int j = 0; j &lt; dimension; j++)
                inverse[i][j] -= inverse[k][j];
        }
    }

    for (int i = dimension - 2; i &gt;= 0; i--)
    {
        for (int j = dimension - 1; j &gt; i; j--)
        {
            for (int k = 0; k &lt; dimension; k++)
                inverse[i][k] -= matrix[i][j] * inverse[j][k]; 
            for (int k = 0; k &lt; dimension; k++)
                matrix[i][k] -= matrix[i][j] * matrix[j][k]; 
        }
    }
    return inverse;
}
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/cpp/8">C++</category>
			<dc:creator>Avenger_123</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/cpp/threads/424184/inverse-matrix</guid>
		</item>
				<item>
			<title>Arrays</title>
			<link>http://www.daniweb.com/software-development/java/threads/424183/arrays</link>
			<pubDate>Sat, 26 May 2012 05:19:35 +0000</pubDate>
			<description> The application should have one method that populates the multidimensional array with data and another method that shows the contents of the multi dimensional array. Both methods should be triggered from the main method. Assist because am been notified that the code below is not correct public class ArrayExample { ...</description>
			<content:encoded><![CDATA[ <p>The application should have one method that populates the multidimensional array with data and another method that shows the contents<br />
  of the multi dimensional array. Both methods should be triggered from the main method. Assist because am been notified that the code below  is not correct</p>

<pre><code class="language-java">public class ArrayExample {



    // Getting logger used for logging statements.
    public Logger logger =
        Logger.getLogger( ArrayExample.class );


    /**
     * Constructor
     */
    public ArrayExample() {
        super();
    }

     /**
     * Demonstates initializing and populating a multi-dimensional array in
     * several statements
     * multi dimensional array that stores 
     * information for 5 people:
     * First Name
     * Last Name
     * Date of Birth
     */

      private String [][] personalDetails() {

        logger.debug( "personalDetails()" );

        String personArray[][]= {

        { "John","Kamau", "30 march 1984" },
        { "Kevin","Kubai", "30 March 1988" },
        { "Suzzie","Gichia","23 December 1992" },
        { "Wayne","Rooney","1 August 1986" },
        { "Bob","Marley", "16 February 1945" }
        };

    return personArray;
}   

     /**Shows the contents of the multidimesional Array
       * 
       */
       private void personalDetailsContent( ) {

      logger.debug( "personalDetailsContent()" );

        String [][] personArray= personalDetails();

         for(int i=0; i&lt;personArray.length; i++){

         for(int x=0; x&lt;personArray[i].length; x++){
         System.out.print(personArray[i][x]+"\t");

       }
        System.out.println();
       }

    }

    /**
     * This is the starting execution point of the program.
     *
     * @param args the args are parameters passed into this java program from
     * the command line. 
     */
    public static void main( String[] args ) {

        // Configure the logger to print to the screen
        BasicConfigurator.configure();


        ArrayExample arrayExample = new ArrayExample();
        arrayExample.personalDetails();
        arrayExample.personalDetailsContent( );

    }
}
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/java/9">Java</category>
			<dc:creator>NestaMarley</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/java/threads/424183/arrays</guid>
		</item>
				<item>
			<title>Same Code For Different Events</title>
			<link>http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/424182/same-code-for-different-events</link>
			<pubDate>Sat, 26 May 2012 05:07:10 +0000</pubDate>
			<description>is it possible to run one code on differet events of different controls like vb.net??? how???</description>
			<content:encoded><![CDATA[ <p>is it possible to run one code on differet events of different controls like vb.net???<br />
how???</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>sanket044</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/424182/same-code-for-different-events</guid>
		</item>
				<item>
			<title>Delete Method</title>
			<link>http://www.daniweb.com/software-development/java/threads/424181/delete-method</link>
			<pubDate>Sat, 26 May 2012 05:07:04 +0000</pubDate>
			<description>The Application should be able to add an entry , view an entry and delete and entry.. All other functions are working properly but my applica tion cannot delete.. Please assit where i shuld place my delete method import com.jjpeople.addressbook.action.actionresult.ShowAddressActionResult; import com.jjpeople.addressbook.actionargument.ShowAddressActionArgument; import com.jjpeople.addressbook.actionargument.DeleteAddressActionArgument; import com.jjpeople.addressbook.businessdelegate.AddressBookDelegate; import com.jjpeople.addressbook.businessdelegate.AddressBookDelegateException; import com.jjpeople.addressbook.businessdelegate.AddressBookDelegateImpl; ...</description>
			<content:encoded><![CDATA[ <p>The Application should be able to add an entry , view an entry and delete and entry.. All other functions are working properly but my applica tion  cannot delete.. Please assit where i shuld place my delete method</p>

<pre><code class="language-java">import com.jjpeople.addressbook.action.actionresult.ShowAddressActionResult;
import com.jjpeople.addressbook.actionargument.ShowAddressActionArgument;
import com.jjpeople.addressbook.actionargument.DeleteAddressActionArgument;
import com.jjpeople.addressbook.businessdelegate.AddressBookDelegate;
import com.jjpeople.addressbook.businessdelegate.AddressBookDelegateException;
import com.jjpeople.addressbook.businessdelegate.AddressBookDelegateImpl;
import com.jjpeople.addressbook.businessdelegate.AddressBookEntry;
import com.jjpeople.serviceworker.action.AbstractAction;
import com.jjpeople.serviceworker.action.ActionException;
import com.jjpeople.serviceworker.controller.Controller;

/**
 * This application uses a Service to Worker pattern which is located in the
 * package: com.jjpeople.serviceworker
 * &lt;p&gt;
 * This action adds addresses to the address book. The AddressBookDelegateImpl
 * is responsible for persisting the addresses.
 * &lt;p&gt;
 * AddressBookDelegateImpl serializes and deserializes AddressBookEntryImpl
 * to and from files respectively.
 *
 * @author JDickerson
 * Created on 5 Aug 2008
 */
public class DeleteAddressAction extends AbstractAction {

    private AddressBookDelegate addressBookDelegate;



    /**
     * Initializes AddressBookDelegateImpl. The initialisation includes
     * creating a directory un der the user's home directory for this
     * application if it does not exist already
     */
    private void initialize() {

        try {
            addressBookDelegate = new AddressBookDelegateImpl();
        }
        catch( AddressBookDelegateException e ) {

            throw new RuntimeException(
                    "Fatal Exception initializing Address Book", e );
        }
    }


    /**
     * Constructor
     *
     * @param controller the controller to set in thisn action
     */
    public DeleteAddressAction( Controller controller ) {

        super( controller );
        initialize();
    }


    /* (non-Javadoc)
     * @see com.jjpeople.serviceworker.action.AbstractAction#execute()
     */

    public void execute() throws ActionException {


        DeleteAddressActionArgument deleteAddressActionArgument =
            ( DeleteAddressActionArgument )actionArgument;

       String name=deleteAddressActionArgument.getName();


        try {
            AddressBookEntry addressBookEntry =
            addressBookDelegate.deleteAddressBookEntry( name );
        }
        catch( AddressBookDelegateException e ) {

            throw new ActionException( "Could not delete Address Book Entry,= " +
                    name, e );
        }
    }
}

  package com.jjpeople.addressbook.actionargument;

import com.jjpeople.addressbook.action.ActionConstants;
import com.jjpeople.addressbook.businessdelegate.AddressBookEntry;
import com.jjpeople.serviceworker.action.actionargument.AbstractActionArgument;

/**
 * This application uses a Service to Worker pattern which is located in the
 * package: com.jjpeople.serviceworker
 * &lt;p&gt;
 * Before calling the execute method on the AddAddressAction, the controller,
 * AbstractController sets this class in the action. This class encapsulates
 * the arguments required to run the processing in the execute method of the
 * AddAddressAction.
 *
 * @author JDickerson
 * Created on 5 Aug 2008
 */
public class DeleteAddressActionArgument extends AbstractActionArgument
    implements ActionConstants {


   String name;



    /**
     * Constructor
     */
    public DeleteAddressActionArgument(String name) {

      super();
      this.name=name;

        setActionCommand( DELETE_ADDRESS_ACTION );
    }



 /**
  * Gets the name of the person we want to delete the address details
  * for
  *
  * @return the name of the person we want to delete the address details
  * for
  */
    public String getName(){
     return name;
    }



}

package com.jjpeople.addressbook.gui;

import java.io.File;
import java.io.*;
import com.jjpeople.addressbook.action.actionresult.ShowAddressActionResult;
import com.jjpeople.addressbook.action.actionresult.ShowAllNamesInAddressBookActionResult;
import com.jjpeople.addressbook.actionargument.AddAddressActionArgument;
import com.jjpeople.addressbook.actionargument.DeleteAddressActionArgument;
import com.jjpeople.addressbook.actionargument.ShowAddressActionArgument;
import com.jjpeople.addressbook.actionargument.ShowAllNamesInAddressBookActionArgument;
import com.jjpeople.addressbook.businessdelegate.AddressBookEntry;
import com.jjpeople.addressbook.businessdelegate.AddressBookEntryImpl;
import com.jjpeople.serviceworker.action.actionresult.ActionResult;
import com.jjpeople.serviceworker.controller.Controller;
import com.jjpeople.serviceworker.controller.ControllerException;
import com.jjpeople.serviceworker.gui.AbstractCommandlineGui;
import com.jjpeople.serviceworker.gui.GuiException;

/**
 * This application uses a Service to Worker pattern which is located in the
 * package: com.jjpeople.serviceworker
 * &lt;p&gt;
 * This class models the Gui.
 *
 * @author JDickerson
 * Created on 4 Aug 2008
 */
public class AddressBookGuiImpl extends AbstractCommandlineGui
    implements AddressBookGui {



    /**
     * If the Add Addresses option is chosen this method is executed
     *
     * @throws GuiException
     */
    private void showAddAddress() throws GuiException {

        AddressBookEntry addressBookEntry = new AddressBookEntryImpl();

        StringBuffer sb = new StringBuffer( LINE_SEPARATOR );
        sb.append( LINE_SEPARATOR ).append( LINE_SEPARATOR );
        sb.append( DIVIDER ).append( LINE_SEPARATOR );
        sb.append( "Address Book: Adding Entry" ).append( LINE_SEPARATOR );
        sb.append( DIVIDER ).append( LINE_SEPARATOR );
        sb.append( LINE_SEPARATOR );
        sb.append( "Please enter the following details:" );
        sb.append( LINE_SEPARATOR ).append( LINE_SEPARATOR );
        sb.append( "Name : " );

        print( sb.toString() );
        addressBookEntry.setName( readInput() );

        print( "Mobile Number : " );
        addressBookEntry.setMobileNumber( readInput() );

        print( "Landline Number : " );
        addressBookEntry.setLandlineNumber( readInput() );

        print( "First line Address : " );
        addressBookEntry.setFirstLineAddress( readInput() );

        print( "Second line Address : " );
        addressBookEntry.setSecondLineAddress( readInput() );

        print( "Town or City : " );
        addressBookEntry.setTownOrCity( readInput() );

        print( "Postcode : " );
        addressBookEntry.setPostcode( readInput() );

        print( "Country : " );
        addressBookEntry.setCountry( readInput() );

        AddAddressActionArgument addAddressActionArgument =
            new AddAddressActionArgument();

        addAddressActionArgument.setAddressBookEntry( addressBookEntry );

        try {
            controller.execute( addAddressActionArgument );
        }
        catch( ControllerException e ) {

            throw new GuiException( "Could not add address", e );
        }
    }


    /**
     * If the View Address option is found this method is called
     */
    private void showViewAddress() throws GuiException{

        StringBuffer sb = new StringBuffer( LINE_SEPARATOR );
        sb.append( LINE_SEPARATOR ).append( LINE_SEPARATOR );
        sb.append( DIVIDER ).append( LINE_SEPARATOR );
        sb.append( "Address Book" ).append( LINE_SEPARATOR );
        sb.append( DIVIDER ).append( LINE_SEPARATOR );
        sb.append( LINE_SEPARATOR );

        sb.append( "Please enter the name of the person you wish " +
                "to view the address details of:" );

        sb.append( LINE_SEPARATOR ).append( LINE_SEPARATOR );

        print( sb.toString() );

        String name = readInput();

        ShowAddressActionArgument showAddressActionArgument =
            new ShowAddressActionArgument( name );

        try {
            ActionResult actionResult =
                controller.execute( showAddressActionArgument );

            ShowAddressActionResult showAddressActionResult
                = ( ShowAddressActionResult )actionResult;

            AddressBookEntry addressBookEntry =
                    showAddressActionResult.getAddressBookEntry();

            renderAddressBookEntry( addressBookEntry );
        }
        catch( ControllerException e ) {

            throw new GuiException( "Could not retrieve address entry", e );
        }
    }






    /**
     * Renders an address book entry to the Gui
     *
     * @param addressBookEntry
     */
    private void renderAddressBookEntry(
            AddressBookEntry addressBookEntry ) {

        print( LINE_SEPARATOR );

        if ( addressBookEntry != null ) {

            print( addressBookEntry.toString() );
        }
        else {

            print( "Could not find entry" );
        }
    }


    /**
     * If the Delete Address option is found this method is called
     */
    private void  showDeleteAddress() throws GuiException{

       // AddressBookEntry addressBookEntry = new AddressBookEntryImpl(); 

        StringBuffer sb = new StringBuffer( LINE_SEPARATOR );
        sb.append( LINE_SEPARATOR ).append( LINE_SEPARATOR );
        sb.append( DIVIDER ).append( LINE_SEPARATOR );
        sb.append( "Address Book" ).append( LINE_SEPARATOR );
        sb.append( DIVIDER ).append( LINE_SEPARATOR );
        sb.append( LINE_SEPARATOR );

        sb.append( "Please enter the name of the person you wish " +
        "to delete the address details of:" );

        sb.append( LINE_SEPARATOR ).append( LINE_SEPARATOR );

        //print( sb.toString() );

        String name = readInput();

        DeleteAddressActionArgument deleteAddressActionArgument =
        new DeleteAddressActionArgument(name );


        try {

            controller.execute( deleteAddressActionArgument );


        }
        catch( ControllerException e ) {

            throw new GuiException( "Could not delete address", e );
        }
        catch (NullPointerException e){           
           throw new GuiException( "The Entry Does Not Exist", e ); 
         }
         }

        /**private boolean removeAddressBookEntry(AddressBookEntry addressBookEntry ) {

        if ( addressBookEntry != null ) {

         File deleted=new File(addressBookEntry,name);


        return deleted.delete();

        }  
         else {

          print( "Could not find entry" ); 
          }
          }



      private void endApplication() throws GuiException {  


        System.exit(0); 

         }*/





    /**
     * Shows all names in the address book
     */
    private void showViewAllNamesInAddressBook() throws GuiException {

        ShowAllNamesInAddressBookActionArgument
            showAllNamesInAddressBookActionArgument =
                  new ShowAllNamesInAddressBookActionArgument();

        try {
            ActionResult actionResult =
                controller.execute( showAllNamesInAddressBookActionArgument );

            ShowAllNamesInAddressBookActionResult
                showAllNamesInAddressBookActionResult
                    = ( ShowAllNamesInAddressBookActionResult )actionResult;

            String[] addressBookNames =
                showAllNamesInAddressBookActionResult.getAddressBookNames();

            renderAllAddressBookNames( addressBookNames );
        }
        catch( ControllerException e ) {

            throw new GuiException(
                    "Could not show all address book name", e );
        }
    }



    /**
     * Renders all adress book names
     *
     * @param addressBookNames addressBookNames to render
     */
    private void renderAllAddressBookNames( String[] addressBookNames ) {

        StringBuffer sb = new StringBuffer();

        for ( String name : addressBookNames ) {
            sb.append( name ).append( LINE_SEPARATOR );
        }

        print( sb.toString() );
    }


    /**
     * Constructor
     */
    public AddressBookGuiImpl( Controller controller ) {

        super( controller );
    }


    /* (non-Javadoc)
     * @see com.jjpeople.addressbook.gui.AddressBookGui#start()
     */
    public void start() throws GuiException {

        showMenu();
    }


    /* (non-Javadoc)
     * @see com.jjpeople.addressbook.gui.AddressBookGui#showMenu()
     */
    public void showMenu() throws GuiException {

        String entryNumber = "-1";

        while ( true ) {

            if ( entryNumber.equals( "1" ) ) {

                showAddAddress();
                entryNumber = "-1";
            }
            else if ( entryNumber.equals( "2" ) ) {

                showViewAddress();
                entryNumber = "-1";
            }
            else if ( entryNumber.equals( "3" ) ) {

                showViewAllNamesInAddressBook();
                entryNumber = "-1";
            }
            else if ( entryNumber.equals( "4" ) ) {

                showDeleteAddress();
                entryNumber = "-1";
            }
            else {

                StringBuffer sb = new StringBuffer( LINE_SEPARATOR );
                sb.append( LINE_SEPARATOR ).append( LINE_SEPARATOR );
                sb.append( DIVIDER ).append( LINE_SEPARATOR );
                sb.append( "Address Book" ).append( LINE_SEPARATOR );
                sb.append( DIVIDER ).append( LINE_SEPARATOR );
                sb.append( LINE_SEPARATOR );

                sb.append( "1. Add Address " ).append( LINE_SEPARATOR );
                sb.append( "2. View Address of one person" );
                sb.append( LINE_SEPARATOR );
                sb.append( "3. View all Names in Address book" );
                sb.append( LINE_SEPARATOR );

                sb.append( "4. Delete Address" );
                sb.append( LINE_SEPARATOR );

                sb.append( LINE_SEPARATOR ).append( LINE_SEPARATOR );

                sb.append( "Please enter a number of the action " +
                        "you wish to perform" );

                print( sb.toString() );

                entryNumber = readInput();
            }
        }
    }
}
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/java/9">Java</category>
			<dc:creator>NestaMarley</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/java/threads/424181/delete-method</guid>
		</item>
				<item>
			<title>Urgent ! ! ! Please help....Cannot delete bank account in my programming</title>
			<link>http://www.daniweb.com/software-development/cpp/threads/424180/urgent-please-help....cannot-delete-bank-account-in-my-programming</link>
			<pubDate>Sat, 26 May 2012 05:04:08 +0000</pubDate>
			<description> #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;string.h&gt; #include &lt;malloc.h&gt; struct account { char AccName[20]; int Age; double AccBalance; struct account *Next; }; typedef struct account BankAcc; void init( struct Account **headOfList ); void insert(struct account **headOfList, char *name, int age, double balance); int Delete(struct account **headOfList, char *name ); void print(struct ...</description>
			<content:encoded><![CDATA[ <pre><code class="language-cpp">#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;string.h&gt;
#include &lt;malloc.h&gt;

struct account {
    char AccName[20];
    int Age;
    double AccBalance;
    struct account *Next;
};

typedef struct account BankAcc;

void init( struct Account **headOfList );
void insert(struct account **headOfList, char *name, int age, double balance);
int Delete(struct account **headOfList, char *name );
void print(struct account *headOfList );



void main() {
    BankAcc *startPtr = NULL;

    int selection;
    printf("Enter selection and following below: \n");
    printf("1. Insert Account \n2. Delete Account \n3. Print All \n");
    printf("Enter your selection : ");
    scanf("%d",&amp;selection);

    while(selection != 5) {
        switch(selection) {
            case 1:
                char *Username;
                char TmpName[20];
                int UserAge;
                double UserBalance;



                // Enter Account Name
                printf("Enter Account Name : ");
                scanf("%s",&amp;TmpName);
                Username = TmpName;
                // Enter Age
                printf("Enter Age : ");
                scanf("%d",&amp;UserAge);
                // Enter Account Balance
                printf("Enter Account Balance :  ");
                scanf("%d",&amp;UserBalance);

                insert(&amp;startPtr,Username,UserAge,UserBalance);
            break;

            case 2:
                char *del;
                char tmpdelete[20];

                printf("Enter Account Name : ");
                scanf("%s",&amp;tmpdelete);
                del = tmpdelete;
                Delete(&amp;startPtr,del);
            break;

            case 3:
                print(startPtr);
            break;

        }

        printf("---------------------------------------------------------\n");
        printf("Enter selection and following below: \n");
        printf("1. Insert Account \n2. Delete Account \n3. Print All\n");
        printf("Enter your selection : ");
        scanf("%d",&amp;selection);
    }

}
void init( struct Account **headOfList ){

}

void insert(struct account **headOfList, char *name, int age, double balance) {
    struct account *newPtr;
    struct account *previousPtr;
    struct account *currentPtr;

    newPtr = (account*) malloc(sizeof(account));

    if(newPtr != NULL) {

        //newPtr-&gt;AccName = (char *)malloc(40 * sizeof(char));
        strcpy (newPtr-&gt;AccName,name);

        newPtr-&gt;Age = age;
        newPtr-&gt;AccBalance = balance;
        newPtr-&gt;Next = NULL;


        previousPtr = NULL;
        currentPtr = *headOfList;



        while(currentPtr != NULL &amp;&amp; balance &lt; currentPtr-&gt;AccBalance) {
            previousPtr = currentPtr;
            currentPtr = currentPtr-&gt;Next;
        }

        if(previousPtr == NULL) {
            newPtr-&gt;Next = *headOfList;
            *headOfList = newPtr;
        } else {
            previousPtr-&gt;Next = newPtr;
            newPtr-&gt;Next = currentPtr;
        }
    }

    //printf("%s\n",headOfList-&gt;AccName);

}


int Delete(struct account **headOfList, char *name ){



    char mm[20];
    strcpy (mm,name);
    printf("%s\n",mm);

    char m2[20];
    strcpy (m2,(*headOfList)-&gt;AccName);
    printf("%s\n",m2);
    //printf("%s\n",(*headOfList)-&gt;AccName);

    while (strcmp (mm,m2)!=0);
    printf("Valid\n");

    return 0;
}

void print(struct account *headOfList ) {
    if(headOfList == NULL) {
        printf("List is empty. \n");
    } else {
        printf("Account Name Age Account Balance\n");
        printf("_________________________________________________\n");

        while(headOfList != NULL) {
            printf("%s\t%d\t%d\n",headOfList-&gt;AccName,headOfList-&gt;Age,headOfList-&gt;AccBalance);
            headOfList = headOfList-&gt;Next;
        }
    }
}
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/cpp/8">C++</category>
			<dc:creator>vicsong93</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/cpp/threads/424180/urgent-please-help....cannot-delete-bank-account-in-my-programming</guid>
		</item>
				<item>
			<title>How to begin: Project othello. </title>
			<link>http://www.daniweb.com/software-development/cpp/threads/424179/how-to-begin-project-othello.-</link>
			<pubDate>Sat, 26 May 2012 04:28:00 +0000</pubDate>
			<description>I have studied functions, pointers, recursive(I suck at it though), file handling(slightly), loops and a bit of data structures. My final project of my semester is due very soon. I chose othello. Before I was able to succesfully make hangman. Now, this is my first time that I am trying ...</description>
			<content:encoded><![CDATA[ <p>I have studied functions, pointers, recursive(I suck at it though), file handling(slightly), loops and a bit of data structures. My final project of my semester is due very soon. I chose othello. Before I was able to succesfully make hangman. Now, this is my first time that I am trying a two player game. I would at least like to make human vs. human game in due time.</p>

<p>have been able to make the board of the game using char and I shall identity the positions of every block in the board by the row and coloumn number of the board which the user shall enter for that board 2D array. My question is, how do I get started with the player moves? A little push in the right direction would be very nice.</p>

<p>Thank you.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/cpp/8">C++</category>
			<dc:creator>postbagoblivion</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/cpp/threads/424179/how-to-begin-project-othello.-</guid>
		</item>
				<item>
			<title>sql developer connection name?</title>
			<link>http://www.daniweb.com/web-development/databases/mysql/threads/424178/sql-developer-connection-name</link>
			<pubDate>Sat, 26 May 2012 04:10:09 +0000</pubDate>
			<description>hi, iam not sure if this is sql question or not. but i just download &quot;sql developer&quot;. from oracle website. and i need help setting it up. i want to connection to my localhost (myphpadmin). how can i find these things. connection name: no idea username: using myphpadmin username which ...</description>
			<content:encoded><![CDATA[ <p>hi, iam not sure if this is sql question or not. but i just download "sql developer". from oracle website.<br />
and i need help setting it up. i want to connection to my localhost (myphpadmin).</p>

<pre><code class="language-sql">how can i find these things.
connection name:        no idea
username:               using myphpadmin username which is "root"
password:                no password
hostname:                "localhost" i think
port:                    "1521"? not sure
SID                     "xe"? not sure
service name:           no idea
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/databases/mysql/126">MySQL</category>
			<dc:creator>hwoarang69</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/databases/mysql/threads/424178/sql-developer-connection-name</guid>
		</item>
				<item>
			<title>URGENT HELP needed! BST Output the popular words</title>
			<link>http://www.daniweb.com/software-development/cpp/threads/424177/urgent-help-needed-bst-output-the-popular-words</link>
			<pubDate>Sat, 26 May 2012 03:54:39 +0000</pubDate>
			<description>Sorry, this might be abit of a rush and sudden. I have to finish this program in 3 hours time. I would appreciate if there's any kind soul willing to help me with the code. Thank you. Output of the program should be like this. Top popular 12 words 1 ...</description>
			<content:encoded><![CDATA[ <p>Sorry, this might be abit of a rush and sudden. I have to finish this program in 3 hours time. I would appreciate if there's any kind soul willing to help me with the code. Thank you.</p>

<p>Output of the program should be like this.</p>

<p>Top popular 12 words</p>

<p>1 of 6</p>

<p>2 the 5</p>

<p>3 all 3</p>

<p>4 people 3</p>

<p>5 some 3</p>

<p>6 times 3</p>

<p>7 and 2</p>

<p>8 can 1</p>

<p>9 fool 1</p>

<p>10 not 1</p>

<p>11 them 1</p>

<p>12 you 1</p>

<p>Below is the text file I'm suppose to read.</p>

<p>===infile.txt===<br />
you can fool some of the people<br />
some of the times, and all of the people some of<br />
the times and not all of the people all of them times.</p>

<p>===Word.h===</p>

<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;fstream&gt;

using namespace std;

class Word
{
    public:
        Word();
        Word (char *);

        int getSumASCII () const;
        void increment ();
        int getCount () const;
        char* getWord () const;
        int getKey () const;

        void setCount (int);
        void setWord (char*);
        void setKey (int);



    private:
        char *w;
        int count;

        int sumASCII () const;
        int n;
};
</code></pre>

<p>===Word.cpp===</p>

<pre><code class="language-cpp">#include "Word.h"

Word::Word()
{
    count = 0;
}

Word::Word (char *w)
{
    this -&gt; w = new char [strlen(w) + 1];
    strcpy(this -&gt; w, w);
    count = 1;
}

int Word::getSumASCII () const
{
    int sum = 0;
    char * p = &amp;w[0];
    while(*p != '\0')
    {
        sum += *p;
        p++;
    }
    return sum;    
}

void Word::increment ()
{
    ++count;
}

int Word::getCount () const
{
    return count;
}

char* Word::getWord () const
{
    return w;
}

int Word::getKey () const
{
    return n;
}

void Word::setCount (int count)
{
    this -&gt; count = count;
}

void Word::setWord (char *p)
{
        w = p;
}

void Word::setKey (int n)
{
    this -&gt; n = n;
}
</code></pre>

<p>===HashTable.h===</p>

<pre><code class="language-cpp">#include "Word.h"

class HashTable
{
    public:
        HashTable();
        HashTable(int);

        void insertion (Word);
        void printTable () const;

    private:
        Word* wordArray;
        int size;
};
</code></pre>

<p>===HashTable.cpp===</p>

<pre><code class="language-cpp">#include "HashTable.h"

HashTable::HashTable()
{

}

HashTable::HashTable(int size)
{
    wordArray = new Word[size]; // insertion the size of the table

    char *ww = new char [20];

    for(int i = 0; i &lt; size; i++)
    {

        wordArray[i].setWord ("\0");
        wordArray[i].setCount(0);
    }

    this-&gt; size = size;
}        

void HashTable::insertion (Word w)
{
    int n = w.getSumASCII () % size;
    int i = n;

    bool found = false;
    bool collision = false;

    while (!found)
    {

        if (wordArray [i].getCount() == 0)
        {

            cout &lt;&lt; w.getWord () &lt;&lt; "\t";

            cout &lt;&lt; "with % value = " &lt;&lt; n &lt;&lt; " inserted"
                &lt;&lt; endl;

            wordArray [i] = w;
            wordArray[i].setKey (n);
            found = true;
        }
        else if (strcmp (wordArray[i].getWord (), w.getWord ()) == 0 &amp;&amp; w.getCount() != 0)
        {
            wordArray [i].increment ();
            cout &lt;&lt; w.getWord () &lt;&lt; "\t";


            cout &lt;&lt; "increase count" &lt;&lt; endl;

            found = true;
        }
        else
        {
            collision = true;
            ++i;
            i = i % size;
        }
    }

    if (collision)
    {
        cout &lt;&lt; w.getWord () &lt;&lt; "\t";

        cout &lt;&lt; "with % value = " &lt;&lt; n 
            &lt;&lt; " inserted with collisions"
            &lt;&lt; endl; 
    }
}

void HashTable::printTable () const
{    
    double num, rate;

    cout &lt;&lt;endl
        &lt;&lt; "Summary of Hash table, position occupied" 
        &lt;&lt; endl &lt;&lt; endl;

    cout &lt;&lt; "Element" 
        &lt;&lt; "\t" &lt;&lt; "\t"
        &lt;&lt; "Word" &lt;&lt; "\t"
        &lt;&lt; "Sum ASCII" &lt;&lt; "\t"
        &lt;&lt; "Mod 15" &lt;&lt; "\t" &lt;&lt; "\t"
        &lt;&lt; "Count" &lt;&lt; endl;

    for (int i = 0; i &lt; size; i++)
    {
        if(wordArray[i].getCount () == 0)
        {

        }
        else
        {
        cout &lt;&lt; "Table ["
             &lt;&lt; i &lt;&lt; "]\t"
             &lt;&lt; wordArray [i].getWord () &lt;&lt; "\t"
             &lt;&lt; wordArray [i].getSumASCII ()
             &lt;&lt; "\t" &lt;&lt; "\t"
             &lt;&lt; wordArray [i].getKey () &lt;&lt; "\t" &lt;&lt; "\t"
             &lt;&lt; wordArray [i].getCount () &lt;&lt; "\t"
             &lt;&lt; endl; 
             ++num;
        }     
    }
    cout &lt;&lt; endl;
    rate = (num /size) * 100;
    cout &lt;&lt; "Occupancy rate: " &lt;&lt; rate &lt;&lt; "%";
}
</code></pre>

<p>===BST.h===</p>

<pre><code class="language-cpp">#include "HashTable.h"

class BST
{
    public:
        BST ();
        ~BST ();

        void insert (Word *); //insert hash table
        bool findNode (Word) const;
        void printBST () const;

    private:
        struct Node;
        typedef Node* NodePtr;

        struct Node
        {
            Word data;
            NodePtr left, right;
        };

        NodePtr root;

        int compareWP (Word, Word) const;

        void insert (NodePtr&amp;, Word);
        bool findNode (NodePtr, Word) const;
        void inorderPrint (NodePtr) const;
};
</code></pre>

<p>===BST.cpp===</p>

<pre><code class="language-cpp">#include "BST.h"

BST::BST()
{
    root = NULL;
}

BST::~BST()
{
    destroy (root);
        //destroy not declared
}

void BST::insert (Word * w) //inserting hash table
{
    insert (root, w);
        //Error will occur - resulted no matching function for call to 'BST::insert (BST::Node*&amp;, Word*&amp;)'

}

bool BST::findNode (Word w) const
{
    return findNode (root, w);
}

void BST::printBST () const
{
    inorderPrint (root);
}

/*int BST::compareWP (Word w1, Word w2) const
{
    //I'm wondering must I really compare the words?
}*/

void BST::insert (NodePtr&amp; root, Word w)
{
    if (root == NULL)
    {
        NodePtr temp = new Node;
        temp -&gt; data = w;
        temp -&gt; left = NULL;
        temp -&gt; right = NULL;

        root = temp;
    }
    else if (compareWP (root -&gt; data, w) &gt; 0)
        insert (root -&gt; left, w);
    else
        insert (root -&gt; right, w);
}

bool BST::findNode (NodePtr root, Word w) const
{
    if (root == NULL)
        return false;
    else
    {
        int k = compareWP (root -&gt; data, w);

        if (k == 0)
            return true;
        else if (k &gt; 0)
            return findNode (root -&gt; left, w);
        else
            return findNode (root -&gt; right, w);
    }
}

void BST::inorderPrint (NodePtr) const
{

}
</code></pre>

<p>===Main.cpp===</p>

<pre><code class="language-cpp">#include "HashTable.h"

int main()
{
    int size;
    int num;
    char* filename = new char [20];
    fstream fin;

    cout &lt;&lt; "Enter the file name for analysis: ";
    cin &gt;&gt; filename;
    cout &lt;&lt; endl;

    fin.open(filename, ios::in);

    if(!fin)
    {
        cout &lt;&lt; "File unable to open!" &lt;&lt; endl;
        exit(1);
    }

    cout &lt;&lt; "Enter the size of hash table: ";
    cin &gt;&gt; size;

    HashTable table (size);

    cout &lt;&lt; "How many top popular words?: ";
    cin &gt;&gt; num;


    cout &lt;&lt; "Analysis of insertion" 
        &lt;&lt; endl &lt;&lt; endl;

    char* p = new char [20];

    while(fin &gt;&gt; p)
    {
        //p = strtok (NULL, " .,?:;");
        Word w(p);
        table.insertion (w);      
    }

    table.printTable ();

}
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/cpp/8">C++</category>
			<dc:creator>cresenia1988</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/cpp/threads/424177/urgent-help-needed-bst-output-the-popular-words</guid>
		</item>
				<item>
			<title>Populating a Java ArrayList with User Input</title>
			<link>http://www.daniweb.com/software-development/java/threads/424176/populating-a-java-arraylist-with-user-input</link>
			<pubDate>Sat, 26 May 2012 03:08:19 +0000</pubDate>
			<description>I'm working on what I thought was a straightforward program to accept user inputs and store them in an ArrayList. I created a separate class containing an object and a constructor (first name, last name, and an integer). In the main method, I prompt the user for input within a ...</description>
			<content:encoded><![CDATA[ <p>I'm working on what I thought was a straightforward program to accept user inputs and store them in an ArrayList.  I created a separate class containing an object and a constructor  (first name, last name, and an integer).</p>

<p>In the main method, I prompt the user for input within a while loop and add a new Document object to the ArrayList on each iteration.  When I print the array, the output isn't what I expected.  The string elements of the last Document object entered print in every instance of the array, while the integer element of the Document object updates correctly.  If anyone could point me in the right direction I would really appreciate the help!  I'm stumped!</p>

<p><strong>Main Method:</strong></p>

<pre><code class="language-java">mport java.util.Scanner;
import java.util.ArrayList;


public class ExceptionDriver
{
    public static void main (String[] args)
    {
        Scanner scan = new Scanner(System.in);
        ArrayList&lt;Document&gt; someStuff = new ArrayList&lt;Document&gt;();
        char quit = 'Y';
        String firstname, lastname;
        int code;

            while (quit == 'Y')
            {
                System.out.print("\n First Name: ");
                firstname = scan.next();

                System.out.print(" Last Name: ");
                lastname = scan.next();

                System.out.print(" Document Code: ");
                code = scan.nextInt();

                someStuff.add (new Document(lastname, firstname, code));

                System.out.print(" Enter Another Record? (Y/N)");
                String word = scan.next();
                word = word.toUpperCase();
                quit= word.charAt(0);
            }


            for(Document stuff : someStuff)
            System.out.println(stuff);
    }

}
</code></pre>

<p><strong>Constructor</strong></p>

<pre><code class="language-java">public class Document
{
    public static String firstname, lastname;
    private int code;

    public Document (String Last, String First, int docCode)
    {
        firstname = First;
        lastname = Last;
        code = docCode;
    }

    public String toString ()
    {
        return "\n\n Name: " + lastname + ", " + firstname + "\n Document Code: " + code + "\n";
    }

    public boolean equals (Object other)
    {
        return (lastname.equals(((Document)other).getLast())&amp;&amp;
        firstname.equals(((Document)other).getFirst()));
    }

    public int compareTo (Object other)
    {

        int result;

        String otherFirst = ((Document)other).getFirst();
        String otherLast = ((Document)other).getLast();

        if (lastname.equals(otherLast))
            result = firstname.compareTo(otherFirst);
        else
            result = lastname.compareTo(otherLast);

        return result;
    }


    public String getFirst ()
    {
        return firstname;
    }

    public String getLast ()
    {
        return lastname;
    }
}
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/java/9">Java</category>
			<dc:creator>JavaPadawan</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/java/threads/424176/populating-a-java-arraylist-with-user-input</guid>
		</item>
				<item>
			<title>Numeric 9 doesn&#039;t add up</title>
			<link>http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/424175/numeric-9-doesnt-add-up</link>
			<pubDate>Sat, 26 May 2012 01:32:38 +0000</pubDate>
			<description>i have this code where it computes for the time entered by the user. it doesn't have yet the limitations or the conditions regarding the time to be entered . it successfully computes for the time and the hour increases based on the minutes, but the problem is when you ...</description>
			<content:encoded><![CDATA[ <p>i have this code where it computes for the time entered by the user.<br />
it doesn't have yet the limitations or the conditions regarding the time to be entered .</p>

<p>it successfully computes for the time and the hour increases based on the minutes, but the problem is when you entered "9" for the hour it doesn't add to the total but the rest is fine.. anyone can help ?</p>

<p>so here it is:</p>

<pre><code class="language-js">&lt;html&gt;
&lt;FORM&gt;
&lt;table name="tblSamp" border="1"&gt;
&lt;tr&gt;&lt;th&gt;Time&lt;/th&gt;
&lt;td&gt;&lt;input type="text" name="alpha" value="" onchange="addColon(this.form.alpha, this.form.total);" maxlength="5"/&gt;&lt;/td&gt;
&lt;td&gt;&lt;input type="text" name="beta" value="" onchange="addColon(this.form.beta, this.form.total);" maxlength="5" /&gt;&lt;/td&gt;
&lt;td&gt;&lt;input type="text" name="gamma" value="" onchange="addColon(this.form.gamma, this.form.total);"  maxlength="5"/&gt;&lt;/td&gt;
&lt;td&gt;&lt;input type="text" name="total" value="" readonly="readonly" /&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;/table&gt;
&lt;input type="hidden" name="displaycount" size="20"&gt;
&lt;/FORM&gt;

&lt;SCRIPT TYPE="text/javascript"&gt;
        var hours = new Array(); 
        var mins = new Array();

    function addColon(what, outTo){

        var tHours = 0;
        var tMins = 0;
        var tTime = 0; 
        var adder = 0;
        var min = 0;
        var tempMins = 0;

    var string = what.value;
    var strlen = string.length;
    var i = string.indexOf(":"); 
    var tbl = document.getElementById("tblSamp");
    var cIndex = what.parentNode.cellIndex; 
    //alert("cell index=" + cIndex); 
    //alert("index of (:): " + i);
    //alert("string length " + strlen);
    if(string != "" &amp; !isNaN(string)){
        if(i &lt; 0){//if colon == 0
            if(strlen &lt; 3){//for input 12 = 12:00
                //alert("for input 12 = 12:00");
                hours[cIndex] = string;
                mins[cIndex] = '00';
                string = string + ':00';
                what.value = string;
            }
            else if(strlen &lt; 4){//for input 123 = 01:23
                //alert("for input 123 = 01:23");
                hours[cIndex] = '0' + string.charAt(0);
                mins[cIndex] = string.charAt(1) + string.charAt(2);
                string = hours[cIndex] + ':' + mins[cIndex];
                //alert(string);
                what.value = string;
            }
            else if(strlen &lt; 5){//for input 1234 = 12:34
                //alert("for input 1234 = 12:34");
                hours[cIndex] = string.charAt(0) + string.charAt(1);
                mins[cIndex] = string.charAt(2) + string.charAt(3);
                string = hours[cIndex] + ':' + mins[cIndex];
                //alert(string);
                what.value = string;
            }
            else if(strlen &gt; 4){//for input 12345 = Invalid Input
                alert("Invalid Input!");
                what.value = "";
            }
        }       
        else {
            alert("Invalid Input!");
            what.value = "";
        }
    }
    else if(string != ""){
        if(i &gt; 0 &amp;&amp; i &lt; 3){
            //alert("with :");
            if(strlen &lt; 5){//for input 1:23 = 01:23
                //alert("for input 1:23 = 01:23");
                hours[cIndex] = '0' + string.charAt(0);
                mins[cIndex] = string.charAt(2) + string.charAt(3);
                string = hours[cIndex] + ':' + mins[cIndex];
                //alert(string);
                what.value = string;
            } 
            else {
                //alert("correct input");
                hours[cIndex] = string.charAt(0) + string.charAt(1);
                mins[cIndex] = string.charAt(3) + string.charAt(4);
            }
        }
    }
    //end if
        var lastCol = 4;
        var table = document.getElementById('tblSamp');

            for(var i=1;i&lt;lastCol;i++){
                if(mins[i] != "" &amp;&amp; !isNaN(mins[i]) &amp;&amp; hours[i] != "" &amp;&amp; !isNaN(hours[i])){
                    tMins = eval(tMins) + parseInt(mins[i]);
                    //alert("total mins: "+tMins);
                    if(tMins &gt; 59){
                        tempMins = tMins;
                        min = tempMins % 60;
                        tMins = tMins - min;
                        adder = tMins/60;
                        tHours += adder;
                        tMins = min
                    }
                    tHours = eval(tHours) + parseInt(hours[i]);
                    //alert("total hours: "+tHours);
                }
            }
                tTime = tHours + ':' + tMins;
                //alert("TOTAL=" + tTime);
                outTo.value = tTime;
}
&lt;/SCRIPT&gt;

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

<p>just copy the whole thing and you can try it ...<br />
i really need help in this. i can't see where did that problem come from ..<br />
cheers,</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/web-development/javascript-dhtml-ajax/117">JavaScript / DHTML / AJAX</category>
			<dc:creator>azareth</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/424175/numeric-9-doesnt-add-up</guid>
		</item>
				<item>
			<title>Linked List Implementation of Queues</title>
			<link>http://www.daniweb.com/software-development/java/threads/424174/linked-list-implementation-of-queues</link>
			<pubDate>Sat, 26 May 2012 00:28:12 +0000</pubDate>
			<description>Can someone explain the code below? Is .next an operator in java that pushes the pointer to the next node in the linked list? Node E &lt; -- type node? public E dequeue ( ) throws EmptyQueueException { if (isEmpty ( )) { throw new EmptyQueueException (”Queue under flow”) ; ...</description>
			<content:encoded><![CDATA[ <p>Can someone explain the code below? Is .next an operator in java that pushes the pointer to the next node in the linked list?<br />
Node E &lt; -- type node?</p>

<pre><code class="language-java">public E dequeue ( ) throws EmptyQueueException {
 if (isEmpty ( )) {
 throw new EmptyQueueException (”Queue under flow”) ;
 else{
 if (end==front.next) // Special case , dequeue single element in queue
 end = front;
 E val = front.next.element;
 front.next = front.next.next; / / Bypass first node
 return(val);
 }
 }
</code></pre>

<p>`</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/java/9">Java</category>
			<dc:creator>warpstar</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/java/threads/424174/linked-list-implementation-of-queues</guid>
		</item>
				<item>
			<title>I am having trouble with file creation using code</title>
			<link>http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/424173/i-am-having-trouble-with-file-creation-using-code</link>
			<pubDate>Sat, 26 May 2012 00:01:28 +0000</pubDate>
			<description>Hello everyone, can some one help me with the code to create a folder by code in vb6,I am greatefull for Qvee72. The scenario I have is that I have an application that allows users to login but waht I need specific is to create users forlder during registration so ...</description>
			<content:encoded><![CDATA[ <p>Hello everyone, can some one help me with the code to create a folder by code in vb6,I am greatefull for Qvee72.<br />
The scenario I have is that I have an application that allows users to login but waht I need specific is to create users forlder during registration so when logged on can only access the pre created folder by his/her name,<br />
The MkDir code limits me with the location I need the folder to be created when I provide the path ie,C:\Documents and Settings\MyName\Desktop when I move to another location or machine an erro.<br />
Can I get another way please,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>Bile</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/424173/i-am-having-trouble-with-file-creation-using-code</guid>
		</item>
				<item>
			<title>ERROR time_t to unsighned int</title>
			<link>http://www.daniweb.com/software-development/cpp/threads/424172/error-time_t-to-unsighned-int</link>
			<pubDate>Fri, 25 May 2012 23:32:14 +0000</pubDate>
			<description> #include &lt;Stdafx.h&gt; #include &lt;iostream&gt; #include &lt;stdlib.h&gt; #include &lt;time.h&gt; #include &lt;math.h&gt; using namespace std; int rand_0toN1(int n); int hits[10]; int main() { int n; int i; int r; srand(time(NULL)); // set seed for random numbers cout&lt;&lt; &quot;Enter number of trials to run &quot;; cout&lt;&lt; &quot;and press ENTER: &quot;; cin&gt;&gt; n; // ...</description>
			<content:encoded><![CDATA[ <pre><code class="language-cpp">#include &lt;Stdafx.h&gt;
#include &lt;iostream&gt;
#include &lt;stdlib.h&gt;
#include &lt;time.h&gt;
#include &lt;math.h&gt;
using namespace std;

int rand_0toN1(int n);

int hits[10];

int main()
{
    int n;
    int i;
    int r;

    srand(time(NULL));          // set seed for random numbers

    cout&lt;&lt; "Enter number of trials to run ";
    cout&lt;&lt; "and press ENTER: ";
    cin&gt;&gt; n;

    // run n trials. for each trial, get a number from 0 to 9 and then
    // increment the corresponding element in the hits array

    for(i = 1; i &lt;= n; i++)
    {
        r = rand_0toN1(10);
        hits[r]++;
    }

    // print all the elements in the hits array, along with the ratio
    // of hits to the EXPECTED hits (n / 10)

    for(i = 0; i &lt; 10; i++)
    {
        cout&lt;&lt; i &lt;&lt; ": " &lt;&lt; hits[i] &lt;&lt; " Accuracy: ";
        cout&lt;&lt; static_cast&lt;double&gt;(hits[i]) / (n / 10)
            &lt;&lt; endl;
    }

    system("pause");
    return 0;
}

// random 0-to-N1 function
// generate a random integer from 0 to N - 1

int rand_0_toN1(int n)
{
    return rand() % n;
}
</code></pre>

<p>in the program above I'M getting an error on the srand(time(NULL)); line. Something about tiime_t and an unsigned int. I'M typing it in just like the book shows as far as I can tell. Thanks for any help here.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/cpp/8">C++</category>
			<dc:creator>Garrett85</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/cpp/threads/424172/error-time_t-to-unsighned-int</guid>
		</item>
			</channel>
</rss>
