<?xml version="1.0" encoding="utf-8"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>DaniWeb IT Discussion Community - 2,4,8,9,14,42,58,61,71,112,113,114,118,124,125,134</title>
		<link>http://www.daniweb.com/forums/</link>
		<description>Tech support, programming, web development, and internet marketing community. Forums to get free computer help and support.</description>
		<language>en-US</language>
		<lastBuildDate>Fri, 18 Dec 2009 08:10:24 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.daniweb.com/alphaimages/misc/rss.jpg</url>
			<title>DaniWeb IT Discussion Community - 2,4,8,9,14,42,58,61,71,112,113,114,118,124,125,134</title>
			<link>http://www.daniweb.com/forums/</link>
		</image>
		<item>
			<title>call the value from my source XML to the element in my result XML</title>
			<link>http://www.daniweb.com/forums/thread247354.html</link>
			<pubDate>Fri, 18 Dec 2009 07:38:12 GMT</pubDate>
			<description><![CDATA[I am trying to transform 1 XML document to another using XSLT. I want to call the value from my source XML to the element in my result XML as the value of an attribute. 
 
Source code- 
 
<?xml version="1.0" encoding="ISO-8859-1"?> 
<?xml-stylesheet type="text/xsl" href="test.xsl"?> 
<catalog>...]]></description>
			<content:encoded><![CDATA[<div>I am trying to transform 1 XML document to another using XSLT. I want to call the value from my source XML to the element in my result XML as the value of an attribute.<br />
<br />
Source code-<br />
<br />
&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt;<br />
&lt;?xml-stylesheet type=&quot;text/xsl&quot; href=&quot;test.xsl&quot;?&gt;<br />
&lt;catalog&gt;<br />
	&lt;cd&gt;<br />
		&lt;title&gt;Empire Burlesque&lt;/title&gt;<br />
		&lt;artist&gt;Bob Dylan&lt;/artist&gt;<br />
		&lt;country&gt;USA&lt;/country&gt;<br />
		&lt;company&gt;Columbia&lt;/company&gt;<br />
		&lt;price&gt;10.90&lt;/price&gt;<br />
		&lt;year&gt;1985&lt;/year&gt;<br />
	&lt;/cd&gt;<br />
	&lt;cd&gt;<br />
		&lt;title&gt;Hide your heart&lt;/title&gt;<br />
		&lt;artist&gt;Bonnie Tyler&lt;/artist&gt;<br />
		&lt;country&gt;UK&lt;/country&gt;<br />
		&lt;company&gt;CBS Records&lt;/company&gt;<br />
		&lt;price&gt;9.90&lt;/price&gt;<br />
		&lt;year&gt;1988&lt;/year&gt;<br />
	&lt;/cd&gt;<br />
&lt;/catalog&gt;<br />
<br />
Want output as-<br />
&lt;root&gt;<br />
	&lt;singer name=”Bob Dylan”&gt; <br />
                  &lt;!--this name is the value of &quot;artist&quot;--&gt;<br />
	      &lt;title&gt;Empire Burlesque&lt;/title&gt; <br />
	&lt;/singer&gt;<br />
	&lt;singer name=”Bonnie Tyler”/&gt; <br />
	      &lt;title&gt;Hide your heart&lt;/title&gt;<br />
	&lt;/singer&gt;<br />
&lt;/root&gt;<br />
<br />
I don’t even know whether it is possible or not using XSLT. Please advise.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum134.html">XML, XSLT and XPATH</category>
			<dc:creator>himit</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247354.html</guid>
		</item>
		<item>
			<title>Interrupts and Exceptions</title>
			<link>http://www.daniweb.com/forums/thread247349.html</link>
			<pubDate>Fri, 18 Dec 2009 07:05:49 GMT</pubDate>
			<description><![CDATA[Hi , these days I'm reading the brans kernel development  
tutorial. and doing it's particles. So last I find to had to read 
Intel 80386 programmers manual by intel.  
In section 2.6 Interrupts and Exceptions I asking a theoretical question 
here. 
They said Exceptions are synchronous and...]]></description>
			<content:encoded><![CDATA[<div>Hi , these days I'm reading the brans kernel development <br />
tutorial. and doing it's particles. So last I find to had to read<br />
Intel 80386 programmers manual by intel. <br />
In section 2.6 Interrupts and Exceptions I asking a theoretical question<br />
here.<br />
They said Exceptions are synchronous and Interrupts are asynchronous.<br />
<br />
what that means precisely ?<br />
<br />
Is that mean's that interrupt even can be happen middle of a instruction , but exceptions can't happen like that ? Please correct<br />
me if I'm wrong.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum125.html">Assembly</category>
			<dc:creator>NicAx64</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247349.html</guid>
		</item>
		<item>
			<title>Testing Equality on a BST</title>
			<link>http://www.daniweb.com/forums/thread247348.html</link>
			<pubDate>Fri, 18 Dec 2009 07:02:26 GMT</pubDate>
			<description><![CDATA[Hi, 
this is my first post on here so forgive me if my question or code is unclear. 
I'm coding a binary search tree and I'm stuck on the overloaded ==operator. 
 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a...]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
this is my first post on here so forgive me if my question or code is unclear.<br />
I'm coding a binary search tree and I'm stuck on the overloaded ==operator.<br />
<br />
 <pre style="margin:20px; line-height:13px">//BSTCLASS.CPP<br />
template &lt;class ItemType&gt;<br />
void BstClass&lt;ItemType&gt;::rFindNode(node&lt;ItemType&gt;* trav,ItemType&amp; item,node&lt;ItemType&gt;* rtTrav,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ItemType&amp; rtItem, bool&amp; equal)const<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; rFindNode(trav-&gt;left, trav-&gt;left-&gt;data, rtTrav-&gt;left, rtTrav-&gt;left-&gt;data, equal);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if(item.key == rtItem.key)//Get an error here&quot;.key has no&nbsp;  struct/union <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; equal = true;<br />
&nbsp; &nbsp; &nbsp; &nbsp; else <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; equal = false;<br />
&nbsp; &nbsp; &nbsp; &nbsp; rFindNode(trav-&gt;right, trav-&gt;right-&gt;data, rtTrav-&gt;right, rtTrav-&gt;right-&gt;data, equal);<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
<br />
template &lt;class ItemType&gt;<br />
bool BstClass&lt;ItemType&gt;::operator==(const BstClass&lt;ItemType&gt;&amp; rtOp)const<br />
{<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; bool equal;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; rFindNode(root, root-&gt;data,rtOp.root, rtOp.root-&gt;data, equal);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; return equal;<br />
<br />
}</pre><br />
<br />
I know the rFindNode function doesn't need all those parameters <br />
i was just trying different things to see if i could get it to work.<br />
<br />
my ItemType definition is in the client code per template standards<br />
<br />
 <pre style="margin:20px; line-height:13px">//TestClient.CPP<br />
#include &lt;iostream&gt;<br />
<br />
typedef int KeyType;<br />
<br />
struct ItemType<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; KeyType key;<br />
&nbsp; &nbsp; &nbsp; &nbsp; char data;<br />
};<br />
<br />
<br />
#include &quot;bstTreeClass.h&quot;<br />
<br />
using namespace std;<br />
<br />
void Display(ItemType&amp; j);<br />
<br />
<br />
void main() ......</pre><br />
<br />
My problem is that i'm getting an error  when trying to assess my .key fields, I'm unclear on how i can access them so i can test them for equality</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum8.html">C++</category>
			<dc:creator>evilsweeps</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247348.html</guid>
		</item>
		<item>
			<title>The mysterious !@#$%^ underscore</title>
			<link>http://www.daniweb.com/forums/thread247346.html</link>
			<pubDate>Fri, 18 Dec 2009 06:38:58 GMT</pubDate>
			<description>Gentlefolk,  
 
Totally new to the world of C C++, compilers and linkers. 
 
I am attempting to compile and build some demonstration application code which access BlueTooth devices. 
 
Have all the .C, .H files, also a .lib. 
 
Using the LCC c ide-compiler-linker, etc on Windows-32</description>
			<content:encoded><![CDATA[<div>Gentlefolk, <br />
<br />
Totally new to the world of C C++, compilers and linkers.<br />
<br />
I am attempting to compile and build some demonstration application code which access BlueTooth devices.<br />
<br />
Have all the .C, .H files, also a .lib.<br />
<br />
Using the LCC c ide-compiler-linker, etc on Windows-32<br />
<br />
Compile one module - no errors.<br />
Link the module and get a raft of undefined errors, an example:<br />
<br />
&quot;undefined reference to '_fred' &quot;<br />
<br />
'Fred' is defined in the .c file as  &quot;void Fred(void);&quot;.<br />
<br />
I have done some research and for historical reasons some C type compilers prepend underscores to &quot;external&quot; symbols. <br />
<br />
An inspection of the provided .lib file shows a number of &quot;_Fred&quot; symbols, unfortunately I do not have a definition of the .lib file structure to work out if things are OK. The .lib file is accessed during the link process. &quot;Fred&quot; and &quot;_Fred&quot; do not appear in a .map file.<br />
<br />
My problem is I cannot find out how to get the linker to resolve this undefined, or perhaps stop the compiler generating such a symbol.<br />
<br />
Any thoughts, ideas or directions appreciated.<br />
<br />
iru, Melbourne, Australia.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum118.html">C</category>
			<dc:creator>iru</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247346.html</guid>
		</item>
		<item>
			<title>ssh without password</title>
			<link>http://www.daniweb.com/forums/thread247344.html</link>
			<pubDate>Fri, 18 Dec 2009 06:25:57 GMT</pubDate>
			<description>Hi, 
 
The situation I am in is as follows: 
 
There are some computers in a network. They are sharing the same file server ie the same home directory. I am not sure how it works but logging from any machine using the same user name takes me to the same home directory. Now I am trying to ssh from...</description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
The situation I am in is as follows:<br />
<br />
There are some computers in a network. They are sharing the same file server ie the same home directory. I am not sure how it works but logging from any machine using the same user name takes me to the same home directory. Now I am trying to ssh from one machine to another because I want to run a client server application where clients and server are running on different computers. For this reason I wrote some script, to run the clients in different computers using command like this<br />
<br />
ssh machine1 ./client.o machine0<br />
ssh machine2 ./client.o machine0<br />
ssh machine3 ./client.o machine0<br />
<br />
But it asks password as a result of calling the ssh. I am not sure how to prevent machines from asking passwords. The problem is the ssh keys are stored in the same .ssh under the same home directory. Please suggest some way out of this trap.<br />
<br />
Thanks.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum113.html">Shell Scripting</category>
			<dc:creator>johndoe444</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247344.html</guid>
		</item>
		<item>
			<title>c simple problem</title>
			<link>http://www.daniweb.com/forums/thread247343.html</link>
			<pubDate>Fri, 18 Dec 2009 06:21:45 GMT</pubDate>
			<description>below two are same program except i interchange to accept input value  ....in the first program i accept first using scanf and the by getchar()...which didnt allow to accept character value . but in the second program i first accept getchar()value and then scanf(). so it works fine but i dont...</description>
			<content:encoded><![CDATA[<div>below two are same program except i interchange to accept input value  ....in the first program i accept first using scanf and the by getchar()...which didnt allow to accept character value . but in the second program i first accept getchar()value and then scanf(). so it works fine but i dont understand why frist value doesnt work. so please help me out<br />
<br />
#include&lt;stdio.h&gt;<br />
#include&lt;string.h&gt;<br />
<br />
int main()<br />
        {<br />
        char ch;<br />
        char name[20];<br />
        printf(&quot;enter your name\n&quot;);<br />
        scanf(&quot;%s&quot;,&amp;name);<br />
<br />
        printf(&quot;enter single value\n&quot;);<br />
        ch=getchar();<br />
<br />
}<br />
<br />
output<br />
enter your name<br />
lobsang<br />
enter single value       //not allowing to enter the value here<br />
lobsiphone:cprogram gyurmey$ <br />
<br />
........................................................................................................<br />
#include&lt;stdio.h&gt;<br />
#include&lt;string.h&gt;<br />
<br />
int main()<br />
        {<br />
        char ch;<br />
        char name[20];<br />
<br />
         //  printf(&quot;enter your name\n&quot;);<br />
        //  scanf(&quot;%s&quot;,&amp;name);<br />
<br />
        printf(&quot;enter single value\n&quot;);<br />
        ch=getchar();<br />
<br />
        printf(&quot;enter your name\n&quot;);<br />
        scanf(&quot;%s&quot;,&amp;name);<br />
<br />
}<br />
<br />
output<br />
<br />
enter single value<br />
a<br />
enter your name<br />
lobsang<br />
lobsiphone:cprogram gyurmey$</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum118.html">C</category>
			<dc:creator>cthoes</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247343.html</guid>
		</item>
		<item>
			<title>force a constuctor to be called</title>
			<link>http://www.daniweb.com/forums/thread247342.html</link>
			<pubDate>Fri, 18 Dec 2009 06:17:55 GMT</pubDate>
			<description><![CDATA[I know I'm supposed to use new and delete, but I really need to use realloc, and I'm curious to how it can be done. 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680"...]]></description>
			<content:encoded><![CDATA[<div>I know I'm supposed to use new and delete, but I really need to use realloc, and I'm curious to how it can be done.<br />
 <pre style="margin:20px; line-height:13px">myclass {<br />
...<br />
public:<br />
myclass()<br />
{<br />
cout &lt;&lt; &quot;Hi, I'm the constuctor&quot; &lt;&lt; endl;<br />
};<br />
<br />
int main()<br />
{<br />
myclass *m;<br />
m = (myclass*) malloc (sizeof(myclass));<br />
//m-&gt;myclass()&nbsp; ?!<br />
}</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum8.html">C++</category>
			<dc:creator>qwertymk</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247342.html</guid>
		</item>
		<item>
			<title>c simple problem</title>
			<link>http://www.daniweb.com/forums/thread247341.html</link>
			<pubDate>Fri, 18 Dec 2009 06:04:56 GMT</pubDate>
			<description>below two are same program except i interchange to accept input value  ....in the first program i accept first using scanf and the by getchar()...which didnt allow to accept character value . but in the second program i first accept getchar()value and then scanf(). so it works fine but i dont...</description>
			<content:encoded><![CDATA[<div>below two are same program except i interchange to accept input value  ....in the first program i accept first using scanf and the by getchar()...which didnt allow to accept character value . but in the second program i first accept getchar()value and then scanf(). so it works fine but i dont understand why frist value doesnt work. so please help me out<br />
<br />
#include&lt;stdio.h&gt;<br />
#include&lt;string.h&gt;<br />
<br />
int main()<br />
        {<br />
        char ch;<br />
        char name[20];<br />
        printf(&quot;enter your name\n&quot;);<br />
        scanf(&quot;%s&quot;,&amp;name);<br />
<br />
        printf(&quot;enter single value\n&quot;);<br />
        ch=getchar();<br />
<br />
}<br />
<br />
output<br />
enter your name<br />
lobsang<br />
enter single value       //not allowing to enter the value here<br />
lobsiphone:cprogram gyurmey$ <br />
<br />
........................................................................................................<br />
#include&lt;stdio.h&gt;<br />
#include&lt;string.h&gt;<br />
<br />
int main()<br />
        {<br />
        char ch;<br />
        char name[20];<br />
<br />
         //  printf(&quot;enter your name\n&quot;);<br />
        //  scanf(&quot;%s&quot;,&amp;name);<br />
<br />
        printf(&quot;enter single value\n&quot;);<br />
        ch=getchar();<br />
<br />
        printf(&quot;enter your name\n&quot;);<br />
        scanf(&quot;%s&quot;,&amp;name);<br />
<br />
}<br />
<br />
output<br />
<br />
enter single value<br />
a<br />
enter your name<br />
lobsang<br />
lobsiphone:cprogram gyurmey$</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum118.html">C</category>
			<dc:creator>cthoes</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247341.html</guid>
		</item>
		<item>
			<title>Center Text inside Static Control</title>
			<link>http://www.daniweb.com/forums/thread247340.html</link>
			<pubDate>Fri, 18 Dec 2009 06:01:21 GMT</pubDate>
			<description><![CDATA[Hello 
 
I have a static window control & I want to make the text inside that static window centre aligned. 
 
*Is is possible to do that with a static window?* 
 
Or should I use another function? 
 
static window: 
  <div class="codeblock"> <div class="spaced"> <div style="float:right;...]]></description>
			<content:encoded><![CDATA[<div>Hello<br />
<br />
I have a static window control &amp; I want to make the text inside that static window centre aligned.<br />
<br />
<span style="font-weight:bold">Is is possible to do that with a static window?</span><br />
<br />
Or should I use another function?<br />
<br />
static window:<br />
 <pre style="margin:20px; line-height:13px">stBox = CreateWindowEx(<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;Static&quot;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; s.c_str(),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WS_BORDER | WS_CHILD | WS_VISIBLE, // maybe I can put TF_RIGHTALIGN ??<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; x,y,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; w+totalW+5,h+10,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hwnd, NULL,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gInstance,NULL);</pre><br />
Another question, I have a dialog using OPENFILENAME that closes when I select a <span style="font-weight:bold">file</span>. Is there a way to make the dialog close when I select a <span style="font-weight:bold">folder</span> instead of a file?<br />
 <pre style="margin:20px; line-height:13px">void doFileOpen(HWND hwnd,UINT msg)<br />
{<br />
&nbsp; &nbsp; OPENFILENAME ofn;<br />
&nbsp; &nbsp; char szFileName[MAX_PATH] = &quot;&quot;;<br />
&nbsp; &nbsp; char folderPath[MAX_PATH] = &quot;&quot;;<br />
<br />
&nbsp; &nbsp; ZeroMemory(&amp;ofn, sizeof(ofn));<br />
<br />
&nbsp; &nbsp; ofn.lStructSize = sizeof(OPENFILENAME);<br />
&nbsp; &nbsp; ofn.hwndOwner = hwnd;<br />
&nbsp; &nbsp; ofn.lpstrFilter = &quot;Text Files (*.txt)\0*.txt\0All Files (*.*)\0*.*\0&quot;;<br />
&nbsp; &nbsp; ofn.lpstrFile = szFileName;<br />
&nbsp; &nbsp; ofn.nMaxFile = MAX_PATH;<br />
&nbsp; &nbsp; ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;<br />
&nbsp; &nbsp; ofn.lpstrDefExt = &quot;txt&quot;;<br />
<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; if(GetOpenFileName(&amp;ofn))<br />
&nbsp; &nbsp; {&nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; //CommDlg_OpenSave_GetFolderPath(hwnd,sizeof(folderPath),(WPARAM)folderPath);&nbsp; // This doesn't work<br />
&nbsp; &nbsp; &nbsp; &nbsp; SendMessage(hwnd,CDM_GETFOLDERPATH,sizeof(folderPath),(LPARAM)folderPath);<br />
&nbsp; &nbsp; &nbsp; &nbsp; SetDlgItemText(hwnd,msg,folderPath);<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; <br />
}</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum8.html">C++</category>
			<dc:creator>gretty</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247340.html</guid>
		</item>
		<item>
			<title>Help Coding Battleship</title>
			<link>http://www.daniweb.com/forums/thread247339.html</link>
			<pubDate>Fri, 18 Dec 2009 05:59:29 GMT</pubDate>
			<description><![CDATA[For my project I am coding battleship. I don't know how i should go about 
 
1. mapping the board spots (dictionaries?) 
2. randomizing ship placement 
 
any advice would be greatly appreciated 
 
PS. I am using pygame as well.]]></description>
			<content:encoded><![CDATA[<div>For my project I am coding battleship. I don't know how i should go about<br />
<br />
1. mapping the board spots (dictionaries?)<br />
2. randomizing ship placement<br />
<br />
any advice would be greatly appreciated<br />
<br />
PS. I am using pygame as well.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>thenewguy111</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247339.html</guid>
		</item>
		<item>
			<title>Get Cpu in pascal?</title>
			<link>http://www.daniweb.com/forums/thread247334.html</link>
			<pubDate>Fri, 18 Dec 2009 05:10:04 GMT</pubDate>
			<description>How do you find the CPU, of your computer, using dev-pascal ?</description>
			<content:encoded><![CDATA[<div>How do you find the CPU, of your computer, using dev-pascal ?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum124.html">Pascal and Delphi</category>
			<dc:creator>GoGames1315</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247334.html</guid>
		</item>
		<item>
			<title>While Loop Program</title>
			<link>http://www.daniweb.com/forums/thread247333.html</link>
			<pubDate>Fri, 18 Dec 2009 04:45:41 GMT</pubDate>
			<description><![CDATA[How can I write a definition for a function that is passed a list of numbers and returns the sum of the numbers in that list using a while loop? 
 
I'm trying this, but it's not working 
 
def sumList(): 
	num = [1,2,3] 
	sum = 0 
	while num != str: 
		for i in num: 
			sum += i]]></description>
			<content:encoded><![CDATA[<div>How can I write a definition for a function that is passed a list of numbers and returns the sum of the numbers in that list using a while loop?<br />
<br />
I'm trying this, but it's not working<br />
<br />
def sumList():<br />
	num = [1,2,3]<br />
	sum = 0<br />
	while num != str:<br />
		for i in num:<br />
			sum += i<br />
	print(sum)<br />
<br />
Is there a way to not even use for?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>JuvenileMango</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247333.html</guid>
		</item>
		<item>
			<title>C++ Function call help please</title>
			<link>http://www.daniweb.com/forums/thread247317.html</link>
			<pubDate>Fri, 18 Dec 2009 03:54:50 GMT</pubDate>
			<description><![CDATA[So I'm working on my final project, and I decided to create a BMI calculator. 
 
As part of the requirements, I need to call a function into play.  Below is what I have so far, but I am getting errors.  I don't expect the solution, but could someone assist me by pointing me in the right direction....]]></description>
			<content:encoded><![CDATA[<div>So I'm working on my final project, and I decided to create a BMI calculator.<br />
<br />
As part of the requirements, I need to call a function into play.  Below is what I have so far, but I am getting errors.  I don't expect the solution, but could someone assist me by pointing me in the right direction.<br />
<br />
The problem is that I am not calling the function into play correctly (for starters).  How do I do that?<br />
<br />
Thank you.<br />
Sara<br />
<br />
#include &lt;iostream&gt;<br />
<br />
using namespace std;<br />
<br />
int main()<br />
{<br />
int weight ; // weight in pounds<br />
int height ; // height in inches<br />
float BMI ; // Body Mass Index<br />
bool DoItAgain ;<br />
char Repeat ;<br />
<br />
cout &lt;&lt; &quot; &quot; &lt;&lt; endl ;<br />
cout &lt;&lt; &quot;Body Mass Index (BMI) Calculator&quot; &lt;&lt; endl ;<br />
cout &lt;&lt; &quot; &quot; &lt;&lt; endl ;<br />
cout &lt;&lt; &quot;Enter your weight in pounds. (please round to nearest whole number): &quot; &lt;&lt; endl ;<br />
<br />
cin &gt;&gt; weight ;<br />
<br />
cout &lt;&lt; &quot;Enter your height in inches. (please round to nearest whole number): &quot; &lt;&lt; endl ;<br />
<br />
cin &gt;&gt; height ;<br />
<br />
<span style="color:Red">cout &lt;&lt; &quot;Your BMI is&quot; BMI(weight, height) &lt;&lt; endl ;</span>	This is where my first problem is.<br />
if BMI &lt; 18.5<br />
cout &lt;&lt; &quot;You are underweight, and should considered gaining weight.&quot;<br />
&quot;Please contact your doctor to discuss your options&quot; &lt;&lt; endl ;<br />
<br />
if BMI &lt;= 24.9<br />
cout &lt;&lt; &quot;Congratulations, you are a healthy weight.&quot;<br />
&quot;You should continue to maintain this weight&quot; &lt;&lt; endl ;<br />
<br />
if BMI &lt;= 29.9<br />
cout &lt;&lt; &quot;You are over weight and should consider losing a little bit of weight.&quot; &lt;&lt; endl ;<br />
<br />
if BMI &lt;= 39.9<br />
cout &lt;&lt; &quot;You are obese and your weight could lead to serious health problems.&quot;<br />
&quot;Please contact your doctor to discuss diet and exercise.&quot; &lt;&lt; endl ;<br />
<br />
if BMI &gt;= 40.0<br />
cout &lt;&lt; &quot;You are severely obese and your weight may already be causing serious health complications.&quot;<br />
&quot;Please contact your doctor to dicuss significant weight-loss options.&quot; &lt;&lt; endl ;<br />
<br />
cout &lt;&lt; &quot;Would you like to enter a new height and weight? (Y or N): &quot; &lt;&lt; endl ;<br />
cin &gt;&gt; Repeat ;<br />
if Repeat = N<br />
	DoItAgain = false<br />
<br />
return 0 ;<br />
}<br />
<br />
int BMI(weight, height)<br />
{<br />
	int wgt_kg // weight in kilograms<br />
	int hgt_m // height in meters<br />
<br />
	wgt_kg = (weight * 0.454) // kilograms = pounds * 0.454<br />
	hgt_m = (height * 0.0254) // meters = inches * 0.0254)<br />
	BMI = (wgt_kg/(hgt_m^2)) // BMI = kilograms/(meters^2)<br />
<br />
	return 0 ;<br />
}</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum8.html">C++</category>
			<dc:creator>daeuse</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247317.html</guid>
		</item>
		<item>
			<title>how to do this in c?</title>
			<link>http://www.daniweb.com/forums/thread247316.html</link>
			<pubDate>Fri, 18 Dec 2009 03:46:18 GMT</pubDate>
			<description><![CDATA[Hi, 
 
In java, we can run a program remotely by doing something like this: 
 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code Tags"...]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
In java, we can run a program remotely by doing something like this:<br />
<br />
 <pre style="margin:20px; line-height:13px">Runtime.exec(&quot;ssh machinename programname&quot;)</pre><br />
I was wondering whether I can do the same in C using some standard library function call. Also is this possible to get a handle to the remote program's input/output to see its console output or provide input (as done in java)?<br />
<br />
Thanks.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum118.html">C</category>
			<dc:creator>johndoe444</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247316.html</guid>
		</item>
		<item>
			<title>help pls.</title>
			<link>http://www.daniweb.com/forums/thread247303.html</link>
			<pubDate>Fri, 18 Dec 2009 02:59:16 GMT</pubDate>
			<description>can you help me do a program using array in c++. 
1. accepts 10 input numbers and output its sum and average. 
2.accepts 10 input numbers and arrange it from highest to lowest. 
3. accepts 10 input numbers will output the highest number and lowest number. 
 
thank you.</description>
			<content:encoded><![CDATA[<div>can you help me do a program using array in c++.<br />
1. accepts 10 input numbers and output its sum and average.<br />
2.accepts 10 input numbers and arrange it from highest to lowest.<br />
3. accepts 10 input numbers will output the highest number and lowest number.<br />
<br />
thank you.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum8.html">C++</category>
			<dc:creator>etteragram</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247303.html</guid>
		</item>
		<item>
			<title>Trying to open a file for read from command line argument</title>
			<link>http://www.daniweb.com/forums/thread247301.html</link>
			<pubDate>Fri, 18 Dec 2009 02:53:32 GMT</pubDate>
			<description><![CDATA[In the following example I am trying to open a file that I have named in the command line for Read. Does anyone have any suggestions? 
========================================== 
 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a...]]></description>
			<content:encoded><![CDATA[<div>In the following example I am trying to open a file that I have named in the command line for Read. Does anyone have any suggestions?<br />
==========================================<br />
<br />
 <pre style="margin:20px; line-height:13px">#include &quot;stdafx.h&quot;<br />
#include &lt;fstream&gt;<br />
#include &lt;iostream&gt;<br />
<br />
using namespace System;<br />
using namespace System::IO;<br />
using namespace System::Text;<br />
using namespace std;<br />
<br />
#define RSIZE 1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Buffer size<br />
<br />
int main( int&nbsp; argc,&nbsp; &nbsp; &nbsp; // Number of strings in array argv<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; char *argv[],&nbsp;  // Array of command-line argument strings<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; char *envp[] )&nbsp; // Array of environment variable strings<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; int count;<br />
<br />
&nbsp; &nbsp; // Display each command-line argument.<br />
&nbsp; &nbsp; cout &lt;&lt; &quot;\nCommand-line arguments:\n&quot;;<br />
&nbsp; &nbsp; for( count = 0; count &lt; argc; count++ )<br />
&nbsp; &nbsp; &nbsp; &nbsp;  cout &lt;&lt; &quot;&nbsp; argv[&quot; &lt;&lt; count &lt;&lt; &quot;]&nbsp;  &quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;&lt; argv[count] &lt;&lt; &quot;\n&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp;String^ kpath =&nbsp; ToString(argv[1]);<br />
&nbsp;// &lt;&lt;&lt;&lt;&lt;&lt; error C3861 &quot;'ToString': idenifier not found&quot;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp;  <br />
&nbsp; FileStream^ kfs = File::OpenRead( kpath );<br />
&nbsp; long long kL = kfs-&gt;Length;<br />
<br />
&nbsp; array&lt;Byte&gt;^ib = gcnew array&lt;Byte&gt;(RSIZE); // array of 1 bytes&nbsp;  <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; try<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Console::Write(kL);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (int i; i &lt; kL; i++){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ifs-&gt;Read(kb, 0, RSIZE);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Console::Write(Convert::ToChar(kb[0]));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; finally<br />
&nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; if ( kfs )<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; delete (IDisposable^)kfs;<br />
&nbsp; &nbsp; &nbsp; }<br />
}<br />
// -eof-</pre>==========================================<br />
<br />
Thank You in advance for any help!</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum8.html">C++</category>
			<dc:creator>ThomsonGB</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247301.html</guid>
		</item>
		<item>
			<title>Removing strings in java</title>
			<link>http://www.daniweb.com/forums/thread247296.html</link>
			<pubDate>Fri, 18 Dec 2009 02:11:24 GMT</pubDate>
			<description>Here it is: 
the user enters string and then then they enter a word from the sentnce they just entered in. then the program is supposed  to take out the word they entered and then display the new sentence.. 
 
How to do this ???????? 
really need help PLEASE... :( 
 
this is what i have so far... 
...</description>
			<content:encoded><![CDATA[<div>Here it is:<br />
the user enters string and then then they enter a word from the sentnce they just entered in. then the program is supposed  to take out the word they entered and then display the new sentence..<br />
<br />
How to do this ????????<br />
really need help PLEASE... :(<br />
<br />
this is what i have so far...<br />
<br />
import java.util.Scanner;<br />
/**<br />
*<br />
*<br />
*<br />
*/<br />
public class RemoveString {<br />
	public static void main(String[] args) {<br />
		// TODO Auto-generated method stub<br />
		Scanner input=new Scanner(System.in);	<br />
		<br />
		String sent;<br />
		String string;<br />
		String part;<br />
		<br />
		System.out.println(&quot;Enter a sentence:&quot;);<br />
		sent=input.nextLine();<br />
		System.out.println(&quot;Enter a string:&quot;);<br />
		string=input.nextLine();<br />
			<br />
	}<br />
}</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>pandalov101</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247296.html</guid>
		</item>
		<item>
			<title>Assignment operator</title>
			<link>http://www.daniweb.com/forums/thread247295.html</link>
			<pubDate>Fri, 18 Dec 2009 02:09:05 GMT</pubDate>
			<description>class A: public B 
{ 
C* p1; 
C* p2; 
} 
 
What would be a correct assignment operator for class A? We have to ensure that we do not leave any object in an inconsistent state due to any exceptions or create any dangling references or memory leaks.</description>
			<content:encoded><![CDATA[<div> <pre style="margin:20px; line-height:13px">class A: public B<br />
{<br />
C* p1;<br />
C* p2;<br />
}</pre><br />
What would be a correct assignment operator for class A? We have to ensure that we do not leave any object in an inconsistent state due to any exceptions or create any dangling references or memory leaks.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum8.html">C++</category>
			<dc:creator>Agni</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247295.html</guid>
		</item>
		<item>
			<title>Prime numbers help</title>
			<link>http://www.daniweb.com/forums/thread247291.html</link>
			<pubDate>Fri, 18 Dec 2009 01:47:53 GMT</pubDate>
			<description><![CDATA[So I'm trying to make a program that generates twin prime numbers between 1 and 1000. I think I got it, but I can't stop the looping it goes on forever. Here's my code so far: 
#include <stdio.h> 
#include <stdlib.h> 
 
int main(int argc, char *argv[]) 
{ 
  int a, c;  
  a=3; 
  c=2; 
        for...]]></description>
			<content:encoded><![CDATA[<div>So I'm trying to make a program that generates twin prime numbers between 1 and 1000. I think I got it, but I can't stop the looping it goes on forever. Here's my code so far:<br />
#include &lt;stdio.h&gt;<br />
#include &lt;stdlib.h&gt;<br />
<br />
int main(int argc, char *argv[])<br />
{<br />
  int a, c; <br />
  a=3;<br />
  c=2;<br />
        for (c=2; c&lt;100; c++)<br />
        {<br />
            for (a=3; a != a%c; a++)<br />
            {<br />
                printf (&quot;%d&quot;, a);<br />
            }<br />
        }<br />
  } <br />
  system(&quot;PAUSE&quot;);	<br />
  return 0;<br />
}<br />
<br />
I'm a beginner in C so please help.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum118.html">C</category>
			<dc:creator>Hitman Mania</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247291.html</guid>
		</item>
		<item>
			<title>JAVA ATM Home problem</title>
			<link>http://www.daniweb.com/forums/thread247283.html</link>
			<pubDate>Fri, 18 Dec 2009 01:11:31 GMT</pubDate>
			<description><![CDATA[Hi out there. 
 
I have a project that I just cant seem to get to work.  I just don't get programming!  I have been working on this for three days, and all I am doing is going in circles.  I can't seem to get the array to initialize.  
 
The assignment: Use the Account classes created earlier to...]]></description>
			<content:encoded><![CDATA[<div>Hi out there.<br />
<br />
I have a project that I just cant seem to get to work.  I just don't get programming!  I have been working on this for three days, and all I am doing is going in circles.  I can't seem to get the array to initialize. <br />
<br />
The assignment: Use the Account classes created earlier to simulate an ATM machine.  Create ten account in an array with id 0,1,...9, and initial balance $100.00.  The system prompts the user to enter an id.  if the id is enter incorrectly, ask the user to enter a corect id.  Once an id is accepted, the main menus is displace.  You can enter choice 1 for viewing balance, 2 for withdraw money, 3 for deposit and 4 to exit. <br />
<br />
my code:<br />
import java.util.*;<br />
<br />
public class ATM {<br />
     public class Account {<br />
    private int id;<br />
    private double balance;<br />
    private double annualInterestRate;<br />
    private final Date dateCreated = new Date();<br />
<br />
    public Account() {<br />
    }<br />
<br />
    public Date getDateCreated() {<br />
        return dateCreated;<br />
    }<br />
<br />
    public void setId(int id) {<br />
        this.id = id;<br />
    }<br />
<br />
    public int getId() {<br />
        return id;<br />
    }<br />
<br />
    public void setBalance(double balance) {<br />
        this.balance = balance;<br />
    }<br />
<br />
    public double getBalance() {<br />
        return balance;<br />
    }<br />
<br />
    public void setAnnualInterestRate(double annualInterestRate) {<br />
        this.annualInterestRate = annualInterestRate;<br />
    }<br />
<br />
    public double getAnnualInterestRate() {<br />
        return annualInterestRate;<br />
    }<br />
<br />
    public void deposit(double amount) {<br />
        balance += amount;<br />
    }<br />
<br />
    public void withdraw(double amount) {<br />
        deposit(- amount);<br />
    }<br />
<br />
    public double getMonthlyInterestRate() {<br />
        return getAnnualInterestRate()/12;<br />
    }<br />
<br />
<br />
}<br />
<br />
    public static void main(String[] args)<br />
     {<br />
	<br />
	int currentAccountId;<br />
	int currentChoice;<br />
	double moneyVariable;<br />
	boolean customerLoopFlag;<br />
        boolean validcurrentAccountID;<br />
        boolean validcurrentChoice;<br />
<br />
        Scanner input = new Scanner(System.in);<br />
<br />
      //initialize the array of accounts<br />
        Account[] customerAccount = new Account[10];<br />
        for (int i = 0; i &lt; 10; i++)<br />
                {<br />
		customerAccount[i] = new Account();<br />
		customerAccount[i].setId(i);<br />
		customerAccount[i].setBalance((double)100);<br />
		}<br />
  //Get user data about account<br />
        do<br />
        {<br />
        System.out.println( &quot;Enter an account number between 0 and 9: &quot;);<br />
        currentAccountId = input.nextInt();<br />
        validcurrentAccountID = true;<br />
             if ( (currentAccountId &lt; 0)  || (currentAccountId &gt; 9))<br />
                 {<br />
                 validcurrentAccountID = false;<br />
                 System.out.println( &quot;Please enter a valid account number between 0 and 9: &quot;);<br />
                 }<br />
                    }while (!validcurrentAccountID);<br />
                          //print customer menu<br />
			System.out.println(&quot;&quot;);<br />
			System.out.println(&quot;Main menu:&quot;);<br />
			System.out.println(&quot;1: Check Balance&quot;);<br />
			System.out.println(&quot;2: Withdraw&quot;);<br />
			System.out.println(&quot;3: Deposit&quot;);<br />
			System.out.println(&quot;4: Exit&quot;);<br />
<br />
			System.out.print(&quot;Enter a choice: &quot;);<br />
                        currentChoice = input.nextInt();<br />
                        validcurrentChoice = true;<br />
                            if ( (currentChoice &lt; 0) || (currentChoice &gt;= 4));//check to make sure it is in the range<br />
                            {<br />
                               validcurrentChoice = false;<br />
                               System.out.println( &quot;Please enter a valid choice between 1 and 4: &quot;);<br />
                            }<br />
                                }while (!validcurrentChoice);<br />
<br />
                                switch (currentChoice)<br />
                                {<br />
                                case 1:<br />
                                    System.out.println(&quot;Current Balance is: &quot; + getID.getBalance());<br />
                                    break;<br />
                                case 2:<br />
                                    System.out.print(&quot;Enter ammount to withdraw: &quot;);<br />
                                    moneyVariable = input.nextDouble();<br />
                                    customerAccount[customerAccount].withdraw(moneyVariable);<br />
                                    break;<br />
                                case 3:<br />
                                    System.out.print(&quot;Enter ammount to deposit: &quot;);<br />
                                    moneyVariable = input.nextDouble();<br />
                                    customerAccount[customerAccount].deposit(moneyVariable);<br />
                                    break;<br />
                                case 4:<br />
                                    customerLoopFlag = false;<br />
                                    break;<br />
		<br />
			}<br />
<br />
    }</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>tabel69</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247283.html</guid>
		</item>
		<item>
			<title>Creating menu in Java</title>
			<link>http://www.daniweb.com/forums/thread247280.html</link>
			<pubDate>Fri, 18 Dec 2009 00:17:14 GMT</pubDate>
			<description>Hi everyone. 
So I get the code going now the question is: 
How to make a menu in Java code? 
For example: 
1.create table 
2.insert into table 
3.select fro table 
4.delete table... 
Which will you choose: ex.1 
and creates table</description>
			<content:encoded><![CDATA[<div>Hi everyone.<br />
So I get the code going now the question is:<br />
How to make a menu in Java code?<br />
For example:<br />
1.create table<br />
2.insert into table<br />
3.select fro table<br />
4.delete table...<br />
Which will you choose: ex.1<br />
and creates table<br />
I mean like switch case in C++<br />
 <pre style="margin:20px; line-height:13px">import java.sql.*;<br />
<br />
public class dbAccess<br />
{<br />
&nbsp; &nbsp; public static void main(String[] args)<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; try<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Class.forName(&quot;sun.jdbc.odbc.JdbcOdbcDriver&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String database = <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;jdbc:odbc:Driver:myDB&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Connection conn = DriverManager.getConnection(database, &quot;&quot;, &quot;&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Statement s = conn.createStatement();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // the 1st case: create a table<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String tableName = &quot;myTable&quot; + String.valueOf((int)(Math.random() * 1000.0));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String createTable = &quot;CREATE TABLE &quot; + tableName + <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot; (id Integer, name Text(32))&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; s.execute(createTable); <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // second case: enter value into table<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for(int i=0; i&lt;25; i++)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String addRow = &quot;INSERT INTO &quot; + tableName + &quot; VALUES ( &quot; + <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  String.valueOf((int) (Math.random() * 32767)) + &quot;, 'Text Value &quot; + <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  String.valueOf(Math.random()) + &quot;')&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; s.execute(addRow);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // this should be third case:Fetch table<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String selTable = &quot;SELECT * FROM &quot; + tableName;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; s.execute(selTable);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ResultSet rs = s.getResultSet();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while((rs!=null) &amp;&amp; (rs.next()))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(rs.getString(1) + &quot; : &quot; + rs.getString(2));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // this should be the 4: drop the table<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String dropTable = &quot;DROP TABLE &quot; + tableName;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; s.execute(dropTable);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // close and cleanup<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; s.close();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; conn.close();<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; catch(Exception ex)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ex.printStackTrace();<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; }<br />
}</pre>Help anyone???</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>didi00</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247280.html</guid>
		</item>
		<item>
			<title>warning BC42105:</title>
			<link>http://www.daniweb.com/forums/thread247279.html</link>
			<pubDate>Fri, 18 Dec 2009 00:08:04 GMT</pubDate>
			<description><![CDATA[Well basically I keep a null value returned code and I have the same issue in all 6 of my functions.   
 
Here is the error code - Warning BC42105: Function 'GetTimesheet' doesn't return a value on all code paths. A null reference exception could occur at run time when the result is used. 
 
[code]...]]></description>
			<content:encoded><![CDATA[<div>Well basically I keep a null value returned code and I have the same issue in all 6 of my functions.  <br />
<br />
Here is the error code - Warning BC42105: Function 'GetTimesheet' doesn't return a value on all code paths. A null reference exception could occur at run time when the result is used.<br />
<br />
[code]   &lt;System.ComponentModel.DataObjectMethodAttribute _<br />
        (System.ComponentModel.DataObjectMethodType.Select, True)&gt; _<br />
    Public Function GetTimesheet() As dsTimesheet.TimesheetDataTable<br />
        Try<br />
            Return Adapter.GetTimesheetData()<br />
        Catch e As Exception<br />
        End Try<br />
    End Function[icode]</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum58.html">VB.NET</category>
			<dc:creator>bumassjp</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247279.html</guid>
		</item>
		<item>
			<title>Starting CD Writing Wizard in Windows</title>
			<link>http://www.daniweb.com/forums/thread247278.html</link>
			<pubDate>Fri, 18 Dec 2009 00:00:52 GMT</pubDate>
			<description><![CDATA[I have written code to use the automatic CD-Burn routine inside WinXP and above. 
 
But I cannot start the CD Writing Wizard by python code. Has anybody any idea how to do it? 
This is my code so far: 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a...]]></description>
			<content:encoded><![CDATA[<div>I have written code to use the automatic CD-Burn routine inside WinXP and above.<br />
<br />
But I cannot start the CD Writing Wizard by python code. Has anybody any idea how to do it?<br />
This is my code so far:<br />
 <pre style="margin:20px; line-height:13px">#!/usr/bin/env python<br />
# -*- coding: utf-8 -*-<br />
<br />
import os, sys<br />
import win32com.client<br />
import win32file<br />
from ctypes import *<br />
from time import sleep<br />
from win32com.shell import shell, shellcon<br />
<br />
MAX_PATH = 260 <br />
HICON = c_int<br />
<br />
class SHFILEINFO(Structure): _fields_ = [(&quot;hIcon&quot;, HICON), (&quot;iIcon&quot;, c_int), (&quot;dwAttributes&quot;, c_uint), (&quot;szDisplayName&quot;, c_char * MAX_PATH), (&quot;szTypeName&quot;, c_char * 80)]<br />
<br />
SHGFI_ICON = 0x000000100 <br />
SHGFI_DISPLAYNAME = 0x000000200 <br />
SHGFI_TYPENAME = 0x000000400 <br />
SHGFI_ATTRIBUTES = 0x000000800 <br />
SHGFI_ICONLOCATION = 0x000001000 <br />
SHGFI_EXETYPE = 0x000002000 <br />
SHGFI_SYSICONINDEX = 0x000004000 <br />
SHGFI_LINKOVERLAY = 0x000008000 <br />
SHGFI_SELECTED = 0x000010000 <br />
SHGFI_ATTR_SPECIFIED = 0x000020000 <br />
SHGFI_LARGEICON = 0x000000000 <br />
SHGFI_SMALLICON = 0x000000001 <br />
SHGFI_OPENICON = 0x000000002 <br />
SHGFI_SHELLICONSIZE = 0x000000004 <br />
SHGFI_PIDL = 0x000000008 <br />
SHGFI_USEFILEATTRIBUTES = 0x000000010<br />
<br />
shfileinfo = SHFILEINFO()<br />
shflags = SHGFI_DISPLAYNAME | SHGFI_TYPENAME | SHGFI_ATTRIBUTES<br />
<br />
<br />
def find_drives():<br />
&nbsp; &nbsp; &nbsp; &nbsp; drivebits=win32file.GetLogicalDrives()<br />
&nbsp; &nbsp; &nbsp; &nbsp; # print drivebits<br />
&nbsp; &nbsp; &nbsp; &nbsp; not_removable_drives_no_cd = []<br />
&nbsp; &nbsp; &nbsp; &nbsp; removable_drives = []<br />
&nbsp; &nbsp; &nbsp; &nbsp; cd_rom = []<br />
&nbsp; &nbsp; &nbsp; &nbsp; cd_rom_type = []<br />
&nbsp; &nbsp; &nbsp; &nbsp; cd_writer = []<br />
&nbsp; &nbsp; &nbsp; &nbsp; cd_dvd = []<br />
&nbsp; &nbsp; &nbsp; &nbsp; for d in range(0,26):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mask=1 &lt;&lt; d<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if drivebits &amp; mask:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # here if the drive is at least there<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; drname='%c:\\' % chr(ord('A')+d)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # print drname, <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; t=win32file.GetDriveType(drname)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if t == win32file.DRIVE_REMOVABLE:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # print &quot;is removable&quot;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; removable_drives.append(drname.split(&quot;\\&quot;)[0])<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # print &quot;is not removable&quot;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if t == win32file.DRIVE_CDROM:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # print &quot;and is a CDROM drive&quot;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cd_rom.append(drname.split(&quot;\\&quot;)[0])<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; windll.shell32.SHGetFileInfo(drname, 0, byref(shfileinfo), sizeof(shfileinfo), shflags)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cd_rom_type.append(shfileinfo.szDisplayName)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if cd_rom_type[-1].find(&quot;RW&quot;)&gt;-1 or cd_rom_type[-1].find(&quot;RAM&quot;)&gt;-1 or cd_rom_type[-1].find(&quot;Writer&quot;)&gt;-1 or cd_rom_type[-1].find(&quot;WRITER&quot;)&gt;-1:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cd_writer.append(True)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cd_writer.append(False)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if cd_rom_type[-1].find(&quot;DVD&quot;)&gt;-1:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cd_dvd.append(&quot;DVD&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cd_dvd.append(&quot;CD&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # print &quot;and is not a CDROM drive&quot;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; not_removable_drives_no_cd.append(drname.split(&quot;\\&quot;)[0])<br />
&nbsp; &nbsp; &nbsp; &nbsp; return [not_removable_drives_no_cd,removable_drives,cd_rom,cd_rom_type,cd_writer,cd_dvd]<br />
<br />
drives = find_drives()<br />
<br />
print &quot;CD-ROM letters/labels:&quot;,drives[2]<br />
print &quot;CD-ROM-Type:&quot;,drives[3]<br />
print &quot;CD-Writer:&quot;,drives[4]<br />
print &quot;CD or DVD:&quot;,drives[5]<br />
<br />
cdburn_pidl = shell.SHGetFolderLocation (0, shellcon.CSIDL_CDBURN_AREA, 0, 0)<br />
CDBurnStageArea = shell.SHGetPathFromIDList (cdburn_pidl)<br />
# print &quot;1st way to get folder:&quot;,CDBurnStageArea<br />
<br />
# copy a file to CD Burn Stage Area<br />
win32file.CopyFile (sys.executable, os.path.join(CDBurnStageArea,os.path.basename(sys.executable)), 0)<br />
<br />
shell = win32com.client.Dispatch(&quot;WScript.Shell&quot;)<br />
# strBurnDirectory = shell.RegRead(&quot;HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\CD Burning&quot;)<br />
# print &quot;2nd way to get folder:&quot;,strBurnDirectory<br />
<br />
objShell = win32com.client.Dispatch(&quot;Shell.Application&quot;)<br />
<br />
drive = &quot;&quot;<br />
<br />
for d in range(len(drives[2])):<br />
&nbsp; &nbsp; if drives[4][d] == True:<br />
&nbsp; &nbsp; &nbsp; &nbsp; drive = drive + drives[2][d] + &quot;\\&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; break<br />
<br />
if drive == &quot;&quot;:<br />
&nbsp; &nbsp; raise IOError, &quot;No CD Writer found&quot;<br />
<br />
# show the CD writer drive and its contents supposed to be written<br />
shell.Run(&quot;explorer.exe &quot; + drive)<br />
sleep(2)<br />
windll.user32.MessageBoxA(None, &quot;Please click onto:\nWrite these files to CD.\nThe CD Writing Wizard will start immediately.&quot;, &quot;How to proceed&quot;, 0)<br />
<br />
# this unfortunately not working:<br />
&quot;&quot;&quot;<br />
shell.AppActivate (&quot;CD Writing Wizard&quot;)<br />
while not shell.AppActivate(&quot;CD Writing Wizard&quot;):<br />
&nbsp; &nbsp; print &quot;waiting&quot;<br />
&nbsp; &nbsp; sleep(1)<br />
&quot;&quot;&quot;</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>bunkus</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247278.html</guid>
		</item>
		<item>
			<title>MP3 Library Program help!</title>
			<link>http://www.daniweb.com/forums/thread247277.html</link>
			<pubDate>Thu, 17 Dec 2009 23:53:56 GMT</pubDate>
			<description>Hi. I have this assignment and have absolutely hit a wall here. I will give the assignment details, then say what the issue is: 
 
Consider a collection of songs in an MP3 library where each song is characterized by artistName, songTitle, album, playTime (in seconds), musicCategory, and...</description>
			<content:encoded><![CDATA[<div>Hi. I have this assignment and have absolutely hit a wall here. I will give the assignment details, then say what the issue is:<br />
<br />
Consider a collection of songs in an MP3 library where each song is characterized by artistName, songTitle, album, playTime (in seconds), musicCategory, and albumProducer – hence, you will need to use a struct data type. The musicCategory is represented by an enumeration type called SongCategory. The MP-3 library can hold a maximum of 200 songs at a time. The collection of songs is stored in a text file, which you will need to create with songs of your choice. You are free to select any format by which the songs are stored in the text file.<br />
<br />
Write a program that reads the songs data from the text file, and stores it in an array of the struct data type, each of which represents a song in the library<br />
- PrintAllRecords: Outputs to a text file all the contents of the MP3 library <br />
- AddRecord: Adds a new record at the end of the MP3 library.<br />
- DeleteRecord: Removes a specific record from the MP3 library, and then shifts the array accordingly.<br />
- UpdateRecord: For a given song record, it updates one or more fields. <br />
- SortRecords: Sorts all the records in the MP3 library according to the name of the song artist. <br />
<br />
<br />
Now, I cannot for the life of me get the enum to work. It doesn't display correctly, either showing a LARGE number, or repeating the wrong value for each category.<br />
Any help to ANY of the assignment is welcomed. Thanks ahead of time. :)<br />
<br />
Here's my code so far:  <pre style="margin:20px; line-height:13px">#include&lt;iostream&gt;<br />
#include&lt;iomanip&gt;<br />
#include&lt;string&gt;<br />
#include&lt;fstream&gt;<br />
<br />
using namespace std;<br />
<br />
/*enum songCategory {ROCK = 0, ALTERNATIVE = 1, CLASSICAL = 2, SOUNDTRACK= 3, CHILDREN=4, OTHER=5};*/<br />
struct MyLibrary<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; string albumName;<br />
&nbsp; &nbsp; &nbsp; &nbsp; string songName;<br />
&nbsp; &nbsp; &nbsp; &nbsp; string artistName;<br />
&nbsp; &nbsp; &nbsp; &nbsp; string playTime;<br />
&nbsp; &nbsp; &nbsp; &nbsp; string genre;<br />
&nbsp; &nbsp; &nbsp; &nbsp; string albumProducer;<br />
};<br />
<br />
void GetLibrary(ifstream&amp; inFile, MyLibrary Library[]);<br />
void PrintLibrary(ofstream&amp; outFile, MyLibrary Library[]);<br />
void PrintToScreen(MyLibrary Library[]);<br />
void AddRecord(ofstream&amp; outFile, MyLibrary Library[]);<br />
<br />
const int MAX_SIZE = 200;<br />
<br />
<br />
<br />
int main()<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; ifstream inFile;<br />
&nbsp; &nbsp; &nbsp; &nbsp; ofstream outFile;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; inFile.open(&quot;MySongLibrary.txt&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; outFile.open(&quot;OrganizedLibrary.txt&quot;);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; MyLibrary songInfo[MAX_SIZE];<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; GetLibrary(inFile, songInfo);<br />
&nbsp; &nbsp; &nbsp; &nbsp; PrintLibrary(outFile, songInfo);<br />
&nbsp; &nbsp; &nbsp; &nbsp; //PrintToScreen(songInfo);<br />
&nbsp; &nbsp; &nbsp; &nbsp; AddRecord(outFile, songInfo);<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; inFile.close(); <br />
&nbsp; &nbsp; &nbsp; &nbsp; outFile.close(); <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; return 0;<br />
<br />
<br />
}<br />
<br />
void GetLibrary(ifstream&amp; inFile, MyLibrary Library[])<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; for(int i = 0; i &lt; MAX_SIZE; i++)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; string category;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; getline(inFile, Library[i].albumName);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; getline(inFile, Library[i].songName);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; getline(inFile, Library[i].artistName);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; getline(inFile, Library[i].playTime);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; getline(inFile, Library[i].genre);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /*getline(inFile, category);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(category == &quot;ROCK&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Library[i].genre = ROCK;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if(category == &quot;ALTERNATIVE&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Library[i].genre = ALTERNATIVE;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if(category == &quot;CLASSICAL&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Library[i].genre = CLASSICAL;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if(category == &quot;SOUNDTRACK&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Library[i].genre = SOUNDTRACK;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if(category == &quot;CHILDREN&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Library[i].genre = CHILDREN;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if(category == &quot;OTHER&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Library[i].genre = OTHER;*/<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; getline(inFile, Library[i].albumProducer);<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
}<br />
<br />
<br />
void PrintLibrary(ofstream&amp; outFile, MyLibrary Library[])<br />
{&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; for(int i = 0; i &lt; MAX_SIZE; i++)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; outFile &lt;&lt; right &lt;&lt; setw(3) &lt;&lt; i + 1 &lt;&lt; &quot;) &quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; outFile &lt;&lt; Library[i].albumName &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; outFile &lt;&lt; &quot;&nbsp; &nbsp;  &quot; &lt;&lt; Library[i].songName &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; outFile &lt;&lt; &quot;&nbsp; &nbsp;  &quot; &lt;&lt; Library[i].artistName &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; outFile &lt;&lt; &quot;&nbsp; &nbsp;  &quot; &lt;&lt; Library[i].playTime &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; outFile &lt;&lt; &quot;&nbsp; &nbsp;  &quot; &lt;&lt; Library[i].genre &lt;&lt; endl;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; outFile &lt;&lt; &quot;&nbsp; &nbsp;  &quot; &lt;&lt; Library[i].albumProducer &lt;&lt; endl &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
}<br />
<br />
void PrintToScreen(MyLibrary Library[])<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; for(int i = 9; i &lt; MAX_SIZE; i++)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; right &lt;&lt; setw(3) &lt;&lt; i + 1 &lt;&lt; &quot;) &quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; Library[i].albumName &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;&nbsp; &nbsp;  &quot; &lt;&lt; Library[i].songName &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;&nbsp; &nbsp;  &quot; &lt;&lt; Library[i].artistName &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;&nbsp; &nbsp;  &quot; &lt;&lt; Library[i].playTime &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;&nbsp; &nbsp;  &quot; &lt;&lt; Library[i].genre &lt;&lt; endl;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;&nbsp; &nbsp;  &quot; &lt;&lt; Library[i].albumProducer &lt;&lt; endl &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
}<br />
<br />
void AddRecord(ofstream&amp; outFile, MyLibrary Library[])<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;Please enter the Album Name&quot; &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cin.getline(Library[i].albumName, albumName);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; outFile &lt;&lt; Library[i].albumName;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;Please enter the Song Name&quot; &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cin &gt;&gt; Library[i].songName;<br />
}</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum8.html">C++</category>
			<dc:creator>MrJNV</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247277.html</guid>
		</item>
		<item>
			<title>equations</title>
			<link>http://www.daniweb.com/forums/thread247275.html</link>
			<pubDate>Thu, 17 Dec 2009 22:48:18 GMT</pubDate>
			<description>I am needing to make a program add and multiple from two different entries and display the total on a different line.  I am needing the syntax on how to add and multiply.  A web reference page would be good as well.  All I have is two classes at this time, main and subclass.  As you can see from my...</description>
			<content:encoded><![CDATA[<div>I am needing to make a program add and multiple from two different entries and display the total on a different line.  I am needing the syntax on how to add and multiply.  A web reference page would be good as well.  All I have is two classes at this time, main and subclass.  As you can see from my question I am new. Your assistance is appreciated.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>BobBrown</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247275.html</guid>
		</item>
		<item>
			<title>Object instantiation as part of a parameter</title>
			<link>http://www.daniweb.com/forums/thread247273.html</link>
			<pubDate>Thu, 17 Dec 2009 22:27:54 GMT</pubDate>
			<description><![CDATA[I'm fairly inexperienced so please bear with me.  
 
I am using FlourineFX, my goal is to retrieve data from an amf server. 
 
I've got a windows form with a button.  The code for a button creates an instance of an object:   
 
  <div class="codeblock"> <div class="spaced"> <div style="float:right;...]]></description>
			<content:encoded><![CDATA[<div>I'm fairly inexperienced so please bear with me. <br />
<br />
I am using FlourineFX, my goal is to retrieve data from an amf server.<br />
<br />
I've got a windows form with a button.  The code for a button creates an instance of an object:  <br />
<br />
 <pre style="margin:20px; line-height:13px">private void btnGo_Click(object sender, EventArgs e)<br />
{<br />
ArrayList args = new ArrayList { val1, val2, val3, val4 };<br />
AmfConnect VidData = new AmfConnect(args);<br />
}<br />
<br />
<br />
//The AmfConnect class is as follows:<br />
public class AmfConnect<br />
{<br />
public&nbsp; AmfConnect(ArrayList&nbsp; args)<br />
{<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; ServerConnect(args);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
}<br />
private void ServerConnect(ArrayList&nbsp; args)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp;  //get args from string array<br />
&nbsp; &nbsp; &nbsp; &nbsp; string server = args[0].ToString();<br />
&nbsp; &nbsp; &nbsp; &nbsp; string command = args[1].ToString();<br />
&nbsp; &nbsp; &nbsp; &nbsp; string file = args[2].ToString();<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; // Create NetConnection client<br />
&nbsp; &nbsp; &nbsp; &nbsp; NetConnection connection;<br />
&nbsp; &nbsp; &nbsp; &nbsp; connection = new NetConnection();<br />
&nbsp; &nbsp; &nbsp; &nbsp; connection.ObjectEncoding = ObjectEncoding.AMF3;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; connection.Connect(server);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; connection.Call(command, <span style="color:Red">new AmfResult()</span>,new object[] { file, 103207, true, null, 1.859671316E9 });]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
}</pre><br />
My issue is with<span style="color:Red"> connection.Call.</span>  While stepping through the code, I realized that &quot;new AmfResult()&quot;, which is where the resultant is determined, was not being processed/instantiated until after VidData was instantiated and any other code in the _Click function has been processed, keeping me from getting the resultant I need.  I'm at a loss, any help would be appreciated.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum61.html">C#</category>
			<dc:creator>CBLACK10</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247273.html</guid>
		</item>
		<item>
			<title>Tic tac toe</title>
			<link>http://www.daniweb.com/forums/thread247272.html</link>
			<pubDate>Thu, 17 Dec 2009 22:00:11 GMT</pubDate>
			<description><![CDATA[I am working on the tic tac toe problem and i need help with the AI part i got it to work for 1v1 but it needs to be 1vAI 
 
I was thinking that easiest was to to program something like "when player clicks this squaure, AI will click anything"   
 
Should I create another temp button then everytime...]]></description>
			<content:encoded><![CDATA[<div>I am working on the tic tac toe problem and i need help with the AI part i got it to work for 1v1 but it needs to be 1vAI<br />
<br />
I was thinking that easiest was to to program something like &quot;when player clicks this squaure, AI will click anything&quot;  <br />
<br />
Should I create another temp button then everytime <br />
tempbutton is used make tempbutton2 also move? <br />
<br />
Belowe is the code for the clickhandler part<br />
<br />
Thanks <br />
<br />
 <pre style="margin:20px; line-height:13px">private void ClickHandler(object sender, System.EventArgs e)<br />
<br />
{<br />
<br />
Button tempButton = (Button)sender;<br />
<br />
if( this._isGameOver )<br />
<br />
{<br />
<br />
MessageBox.Show(&quot;please start new game!&quot;,&quot;Game End&quot;,MessageBoxButtons.OK);<br />
<br />
return; <br />
<br />
}<br />
<br />
if( tempButton.Text != &quot;&quot; ) <br />
<br />
{<br />
<br />
return;<br />
<br />
}<br />
<br />
if( _isX ) <br />
<br />
tempButton.Text = &quot;X&quot;;<br />
<br />
else<br />
<br />
tempButton.Text = &quot;O&quot;;<br />
<br />
_isX = !_isX; <br />
<br />
this._isGameOver = result.CheckWinner(_buttonArray );<br />
<br />
}<br />
<br />
}</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum61.html">C#</category>
			<dc:creator>zaxxon216</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247272.html</guid>
		</item>
		<item>
			<title>.net 2008, application updates.</title>
			<link>http://www.daniweb.com/forums/thread247271.html</link>
			<pubDate>Thu, 17 Dec 2009 21:54:32 GMT</pubDate>
			<description><![CDATA[In the project properties, under public, there is a button that says 'updates' and look as to let you specify a path to an update file where the current application can compare its version information with the file in the remote update location determining if it needs to be updated. 
 
i did...]]></description>
			<content:encoded><![CDATA[<div>In the project properties, under public, there is a button that says 'updates' and look as to let you specify a path to an update file where the current application can compare its version information with the file in the remote update location determining if it needs to be updated.<br />
<br />
i did something similiar to this in vb6 using an ftp server - which the .net version says that is capable of.<br />
<br />
not getting anywhere with it though. i get errors sating public.updateurt, the stirng must be a fully qualified url or unc path.<br />
<br />
i could program my own auto updating feature, however i would like to take advantage of the one already there.<br />
<br />
does anyone know where there are any tutorials on the application updates or similiar, i searched google but everyhing i found was self built.<br />
<br />
thanks</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum58.html">VB.NET</category>
			<dc:creator>jlego</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247271.html</guid>
		</item>
		<item>
			<title>Random runtime Crash</title>
			<link>http://www.daniweb.com/forums/thread247268.html</link>
			<pubDate>Thu, 17 Dec 2009 21:44:37 GMT</pubDate>
			<description><![CDATA[hello all 
im having as the title would suggest a runtime crash in my program cant quite figure out why hits some ware around enter tenant name. line 53 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a...]]></description>
			<content:encoded><![CDATA[<div>hello all<br />
im having as the title would suggest a runtime crash in my program cant quite figure out why hits some ware around enter tenant name. line 53<br />
 <pre style="margin:20px; line-height:13px">void ComplexInterface::editUnit(){<br />
&nbsp; &nbsp; &nbsp; &nbsp; bool test = false;<br />
&nbsp; &nbsp; &nbsp; &nbsp; do {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int unitToEdit;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;choose a Unit to edit &quot; &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (int i = 0; i &lt; numberOfUnits; ++i) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; i+1 &lt;&lt; &quot; &quot; &lt;&lt;complexList[i].getTenantName();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;enter &quot; &lt;&lt; numberOfUnits+1 &lt;&lt; &quot; to add a new unit&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;enter 0 to go back&quot; &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;Answer: &quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cin &gt;&gt; unitToEdit;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (unitToEdit == 0) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; test = true;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if (unitToEdit &gt; 0 &amp;&amp; unitToEdit &lt;= numberOfUnits) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; editUnit(unitToEdit);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if (unitToEdit == numberOfUnits+1) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int unitNumber, unitSiz, aptNumRepairs;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; double balDue;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; string tenantName;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;enter the unit Number: &quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cin &gt;&gt; unitNumber;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;enter the unit size: &quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cin &gt;&gt; unitSiz;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;enter the number of repairs: &quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cin &gt;&gt; aptNumRepairs;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int repairArray[aptNumRepairs];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (int i = 0; i &lt; aptNumRepairs; ++i) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int boolCheck;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; string repairName, repairInfo;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bool done;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;enter repair Name: &quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; getline(cin,repairName);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; getline(cin,repairName);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;enter repair Info: &quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; getline(cin,repairInfo);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;is the repair compleate 1:Yes 2:No&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cin &gt;&gt; boolCheck;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (boolCheck == 1) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; done = true;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if (boolCheck = false) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; done = false;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Repairs tempRepair(repairName,numberOfRepairs+1,repairInfo,done);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; repairsList.push_back(tempRepair);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; repairArray[i]=numberOfRepairs+1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; numberOfRepairs++;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;enter name of Tenant: &quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; getline(cin,tenantName);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int *repPtr = repairArray;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Tenants newTenant(unitNumber,balDue,unitSiz,aptNumRepairs,tenantName,repPtr);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; } while (!test);<br />
}</pre><br />
full project is in the zip and im using eclipse with g++<br />
thanks for any help.</div>  <br /> <div style="padding:5px">     <fieldset class="fieldset"> <legend>Attached Files</legend> <table cellpadding="0" cellspacing="5" border="0"> <tr> <td><img class="inlineimg" src="http://www.daniweb.com/forums/images/attach/zip.gif" alt="File Type: zip" width="16" height="16" border="0" style="vertical-align:baseline" /></td> <td><a href="http://www.daniweb.com/forums/attachment.php?attachmentid=12984&amp;d=1261086265">Final Project.zip</a> (394.7 KB)</td> </tr> </table> </fieldset>  </div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum8.html">C++</category>
			<dc:creator>theABCasian</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247268.html</guid>
		</item>
		<item>
			<title>Nested Loops</title>
			<link>http://www.daniweb.com/forums/thread247267.html</link>
			<pubDate>Thu, 17 Dec 2009 21:39:40 GMT</pubDate>
			<description><![CDATA[The first part inside the "If" statement works perfectly. The only part I am having trouble with is the "else" statement. I was trying to get it to generate an "x" amount of passwords and get those passwords to be at a length defined by the user. The problem is that it will only spew out one...]]></description>
			<content:encoded><![CDATA[<div>The first part inside the &quot;If&quot; statement works perfectly. The only part I am having trouble with is the &quot;else&quot; statement. I was trying to get it to generate an &quot;x&quot; amount of passwords and get those passwords to be at a length defined by the user. The problem is that it will only spew out one password. The rest have the &quot;Password(x): &quot; but nothing beside it. I have been through the code I don't know how many times. Would someone be able to help me? I'd greatly appreciate it. Thank you<br />
<br />
 <pre style="margin:20px; line-height:13px">#include &lt;iostream&gt;<br />
#include &lt;ctime&gt;<br />
<br />
using namespace std;<br />
<br />
int main () {<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; int amount, length;<br />
&nbsp; &nbsp; cout &lt;&lt; &quot;Password Generator v1&quot; &lt;&lt; endl;<br />
&nbsp; &nbsp; cout &lt;&lt; &quot;How many passwords would you like to generate?&quot; &lt;&lt; endl;<br />
&nbsp; &nbsp; cin &gt;&gt; amount;<br />
&nbsp; &nbsp; cout &lt;&lt; &quot;How long would you like the passwords to be?&quot; &lt;&lt; endl;<br />
&nbsp; &nbsp; cin &gt;&gt; length;<br />
&nbsp; &nbsp; cout &lt;&lt; endl;<br />
&nbsp; &nbsp; cout &lt;&lt; endl;<br />
&nbsp; &nbsp; srand( time(NULL) );<br />
&nbsp; &nbsp; if (amount == 1) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;Your generated password is: &quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while (length &gt; 0) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; (rand() % 9) + 1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; length--;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
}<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; else {<br />
&nbsp; &nbsp; &nbsp; &nbsp;  cout &lt;&lt; &quot;**Passwords List**&quot; &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp;  cout &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp;  for (int r = 0; r &lt;= amount; r++) {<br />
&nbsp; &nbsp; &nbsp; &nbsp;  cout &lt;&lt; &quot;Generated password(&quot; &lt;&lt; r &lt;&lt; &quot;): &quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp;  //Creates password length<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  while (length &gt; 0) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; (rand() % 9) + 1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; length--;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  // Adds spacing after each password<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  cout &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  cout &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp;  cout &lt;&lt; endl;<br />
&nbsp;  system(&quot;pause&quot;);<br />
&nbsp;  return 0;<br />
}</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum8.html">C++</category>
			<dc:creator>tinkeydo</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247267.html</guid>
		</item>
		<item>
			<title>how to show certain files according to extention ?????</title>
			<link>http://www.daniweb.com/forums/thread247261.html</link>
			<pubDate>Thu, 17 Dec 2009 21:21:07 GMT</pubDate>
			<description><![CDATA[Hi guys,  
 
How to show certain files according the selected extension in openFileDialog() object??? 
 
Thanks 
 
[EL-Prince]]]></description>
			<content:encoded><![CDATA[<div>Hi guys, <br />
<br />
How to show certain files according the selected extension in openFileDialog() object???<br />
<br />
Thanks<br />
<br />
[EL-Prince]</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum61.html">C#</category>
			<dc:creator>MxDev</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247261.html</guid>
		</item>
		<item>
			<title>two-pass simulation</title>
			<link>http://www.daniweb.com/forums/thread247259.html</link>
			<pubDate>Thu, 17 Dec 2009 21:12:20 GMT</pubDate>
			<description><![CDATA[This is starting to drive me nuts. I'm writing a program that simulates a two-pass algorithm which translates assembly language code in C++. I started with the first pass which reads the labels and address for each line. My whole program is in a mess and need a lot of help. Its supposed to read in...]]></description>
			<content:encoded><![CDATA[<div>This is starting to drive me nuts. I'm writing a program that simulates a two-pass algorithm which translates assembly language code in C++. I started with the first pass which reads the labels and address for each line. My whole program is in a mess and need a lot of help. Its supposed to read in a block of assembly code and output a symbol table in this form:<br />
<br />
Address-------	Machine code -------       Operands-------           Instructions<br />
000500      -------      33FC  ---------------------                   4F-------		            MOVE           #79, $002000<br />
<br />
The code to translate from is:<br />
<br />
<br />
	---------	ORG           $500<br />
	---------	MOVE        #79, $00002000<br />
                  ---------      TRAP          #1                                 ;READLN (Y),  INPUT INTO DO<br />
LOOP1          --  MOVE       DO, $00020004            ;STORE DO IN LOCATION Y<br />
                       --------- MOVE        $00002000, DO            ;FETCH VARIABLE I FOR THE AD<br />
                        ---------ADD           $00002004, DO             ;ADD Y+1<br />
                        ---------MOVE        DO, $00002002             ; STORE THE SUM IN X<br />
LOOP2        --   ADDI          #18, $00002002             ;ADD 18 TO X<br />
                        ---------TRAP          #2                                  ; PRINT X<br />
                  -----------      TRAP          #0                                  ; STOP<br />
                -----------        END <br />
<br />
Here is where I am so far. I can't find any tutorials online for the SMC 68000 so if you know of any or can help me out in any way I would REALLY appreciate it. <br />
<br />
 <pre style="margin:20px; line-height:13px">#include &lt;iostream&gt;<br />
#include &lt;fstream&gt;<br />
#include &lt;string&gt;<br />
#include &lt;cmath&gt;<br />
#include &lt;vector&gt;<br />
<br />
using namespace std;<br />
<br />
struct symbol<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; string label;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Holds Label Name<br />
&nbsp; &nbsp; &nbsp; &nbsp; int address;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Holds Label Address<br />
&nbsp; &nbsp; &nbsp; &nbsp; int machineCode;<br />
&nbsp; &nbsp; &nbsp; &nbsp; int operand;<br />
&nbsp; &nbsp; &nbsp; &nbsp; string instructions;<br />
};<br />
<br />
void Parse(vector&lt;symbol&gt; &amp;table);<br />
void secondPass(vector&lt;symbol&gt; &amp;table);<br />
void findMachineCode(vector&lt;symbol&gt; &amp;table, string line);<br />
bool check(string word);<br />
int find(string word, vector &lt;symbol&gt; table);<br />
<br />
void main()<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; vector&lt;symbol&gt; table;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Symbol Table<br />
&nbsp; &nbsp; &nbsp; &nbsp; Parse(table);&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Parse Document and Set Symbol Table<br />
&nbsp; &nbsp; &nbsp; &nbsp; secondPass(table);<br />
}<br />
<br />
// First Pass of Document *** Set Symbol Table<br />
void Parse(vector&lt;symbol&gt; &amp;table)<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; ifstream inFile;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Input File<br />
&nbsp; &nbsp; &nbsp; &nbsp; string line;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Command Line<br />
&nbsp; &nbsp; &nbsp; &nbsp; int count = 0;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Instruction Number<br />
&nbsp; &nbsp; &nbsp; &nbsp; inFile.open(&quot;inData&quot;);&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Open File<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; inFile &gt;&gt; line;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; while (!inFile.eof())&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Until No More Commands Available<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // If Not Known, Instruction is a Label<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!check(line))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; table.resize(table.size() + 1);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; table[table.size() - 1].label = line;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; table[table.size() - 1].address = count;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; count++;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Increase Location<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //inFile &gt;&gt; &quot;\n&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; inFile &gt;&gt; line;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Get Next Line<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; inFile.close();&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Close File<br />
}<br />
<br />
void secondPass(vector&lt;symbol&gt; &amp;table)<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; string line;<br />
&nbsp; &nbsp; &nbsp; &nbsp; ifstream inFile;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; inFile.open(&quot;inData&quot;);&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Open File<br />
&nbsp; &nbsp; &nbsp; &nbsp; getline(inFile, line);<br />
&nbsp; &nbsp; &nbsp; &nbsp; findMachineCode(table, line);<br />
}<br />
<br />
void findMachineCode(vector&lt;symbol&gt; &amp;table, string line)<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
}<br />
<br />
// Check to See if Command is Known *** If Not, Command is a Label<br />
bool check(string word)<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (word == &quot;MOVE&quot; || word == &quot;TRAP&quot; || word == &quot;ADD&quot; || word == &quot;ADDI&quot; || word == &quot;ORG&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return true;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // If Know Command Then Return 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; else<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return false;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Else Command is a Label<br />
}<br />
<br />
<br />
<br />
// Search Symbol Table For Label Addresses<br />
int find(string word, vector &lt;symbol&gt; table)<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; int lcv = 0;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Start At Begining<br />
&nbsp; &nbsp; &nbsp; &nbsp; while (lcv &lt; table.size())&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Search For Label<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (word == table[lcv].label)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return table[lcv].address;&nbsp; &nbsp; &nbsp; &nbsp; // Return Label Address<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lcv++;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; //&nbsp; &nbsp; &nbsp; &nbsp; Debug<br />
&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;Address of Label &quot; &lt;&lt; word &lt;&lt; &quot; Not Found&quot; &lt;&lt;endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; return -127;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Return False Address If Label Not Found<br />
}</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum8.html">C++</category>
			<dc:creator>simonsayz27</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247259.html</guid>
		</item>
		<item>
			<title>Sales problem c++</title>
			<link>http://www.daniweb.com/forums/thread247258.html</link>
			<pubDate>Thu, 17 Dec 2009 21:06:47 GMT</pubDate>
			<description>Hi together i need your help... again for my lab work. 
The question is the following: 
 
Use a single-subscripted array to solve the following problem. A company pays its 
salespeople on a commission basis. The salespeople receive £200 per week plus 9 percent of 
their gross sales for that week....</description>
			<content:encoded><![CDATA[<div>Hi together i need your help... again for my lab work.<br />
The question is the following:<br />
<br />
Use a single-subscripted array to solve the following problem. A company pays its<br />
salespeople on a commission basis. The salespeople receive £200 per week plus 9 percent of<br />
their gross sales for that week. For example, a salesperson who grosses £5000 in sales in a week receives £200 plus 9 percent of £5000, or a total of £650. <br />
Write a program (using an<br />
array of counters) that determines how many of the salespeople earned salaries in each of the<br />
following ranges (assume that each salesperson’s salary is truncated to an integer amount):<br />
a) £200–£299<br />
b) £300–£399<br />
c) £400–£499<br />
d) £500–£599<br />
e) £600–£699<br />
f) £700–£799<br />
g) £800–£899<br />
h) £900–£999<br />
i) £1000 and over<br />
<br />
Sample Screen Output<br />
Enter employee gross sales (-1 to end): 10000<br />
Employee Commission is £1100.00<br />
Enter employee gross sales (-1 to end): 4235<br />
Employee Commission is £581.15<br />
Enter employee gross sales (-1 to end): 600<br />
Employee Commission is £254.00<br />
Enter employee gross sales (-1 to end): 12500<br />
Employee Commission is £1325.00<br />
Enter employee gross sales (-1 to end): -1<br />
Employees in the range:<br />
£200-£299 : 1<br />
£300-£399 : 0<br />
£400-£499 : 0<br />
£500-£599 : 1<br />
£600-£699 : 0<br />
£700-£799 : 0<br />
£800-£899 : 0<br />
£900-£999 : 0<br />
Over £1000: 2<br />
<br />
what i have got so far:<br />
<br />
 <pre style="margin:20px; line-height:13px">#include &lt;iostream&gt;<br />
#include &lt;iomanip&gt; // use to be able to set precision<br />
<br />
using std::cin;<br />
using std::cout;<br />
using std::endl;<br />
using std::setprecision;<br />
<br />
int main ()<br />
<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; double comission;<br />
&nbsp; &nbsp; &nbsp; &nbsp; double salary;<br />
&nbsp; &nbsp; &nbsp; &nbsp; int grosssales;<br />
&nbsp; &nbsp; &nbsp; &nbsp; int salespeople; // want to make the program independent on number of sales people<br />
&nbsp; &nbsp; &nbsp; &nbsp; int count1 = 0; // individual counter for each salary range<br />
&nbsp; &nbsp; &nbsp; &nbsp; int count2 = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; int count3 = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; int count4 = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; int count5 = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; int count6 = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; int count7 = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; int count8 = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; int count9 = 0;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;This program determines the number of salespeople earning salaries in various different ranges.&quot; &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;The salespeople receive &quot; &lt;&lt; char ( 156 ) &lt;&lt; &quot;200 plus 9 percent of their gross sales that week.&quot; &lt;&lt; endl;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;Please enter the number of sales people.&quot; &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; cin &gt;&gt; salespeople; // enter the number of sales people to know how often to repeat the loop<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;Please enter the salespersons gross sales in GBP ( &quot; &lt;&lt; char ( 156 ) &lt;&lt; &quot; )&quot; &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; cin &gt;&gt; grosssales; // type in the number of goss sales per salesperson to have basis for calculation for comission<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; comission = 0.09 * grosssales; // define comission<br />
&nbsp; &nbsp; &nbsp; &nbsp; salary = comission + 200;<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if ( comission &lt;= 299 )<br />
&nbsp; &nbsp; &nbsp; &nbsp; ++count1;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if ( 300 &lt;= comission &lt;= 399 )<br />
&nbsp; &nbsp; &nbsp; &nbsp; ++count2;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if ( 400 &lt;= comission &lt;= 499 )<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ++count3;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if ( 500 &lt;= comission &lt;= 599 )<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ++count4;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if ( 600 &lt;= comission &lt;= 699 )<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ++count5;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if ( 700 &lt;= comission &lt;= 799 )<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ++count6;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if ( 800 &lt;= comission &lt;= 899 )<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ++count7;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if ( 900 &lt;= comission &lt;= 999 )<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ++count8;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if ( 1000 &lt;= comission )<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ++count9;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;Employee's comission is &quot; &lt;&lt; char ( 156 ) &lt;&lt; setprecision (2) &lt;&lt; comission &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;Employee's salary is &quot; &lt;&lt; char ( 156 ) &lt;&lt; setprecision (2) &lt;&lt; salary &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; return 0;<br />
}// end program</pre><br />
any hints please<br />
<br />
thank you</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum8.html">C++</category>
			<dc:creator>kellnerq</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247258.html</guid>
		</item>
		<item>
			<title>NullPointerException</title>
			<link>http://www.daniweb.com/forums/thread247256.html</link>
			<pubDate>Thu, 17 Dec 2009 20:56:08 GMT</pubDate>
			<description><![CDATA[Hi, I'm getting this NullPointerException in one of my classes (state). This design is done by a state machine design pattern. From debugging it I can see that insertMoney under coffeemachine>State>insertMoney is null but I can't figure out why it's null. 
 
The line with the error is almost on the...]]></description>
			<content:encoded><![CDATA[<div>Hi, I'm getting this NullPointerException in one of my classes (state). This design is done by a state machine design pattern. From debugging it I can see that insertMoney under coffeemachine&gt;State&gt;insertMoney is null but I can't figure out why it's null.<br />
<br />
The line with the error is almost on the bottom and marked with ERROR.<br />
Error message:<br />
 <pre style="margin:20px; line-height:13px">Exception in thread &quot;Thread-3&quot; java.lang.NullPointerException<br />
&nbsp; &nbsp; &nbsp; &nbsp; at hotdrinksmachine.MessageDelay.run(InsertMoney.java:102)<br />
&nbsp; &nbsp; &nbsp; &nbsp; at java.lang.Thread.run(Thread.java:619)</pre><br />
This is my first semester in Java so please help!  :) <br />
<br />
I attached my project from NetBeans and also just the .java files.<br />
<br />
 <pre style="margin:20px; line-height:13px">package hotdrinksmachine;<br />
<br />
import java.util.logging.Level;<br />
import java.util.logging.Logger;<br />
<br />
<br />
/**<br />
&nbsp;* Handles the payment for the selected drink<br />
&nbsp;* @author Tómas<br />
&nbsp;*/<br />
public class InsertMoney extends State {<br />
&nbsp; &nbsp; private InsertMoney insertMoney;<br />
<br />
&nbsp; &nbsp; /**<br />
&nbsp; &nbsp;  * Empty constructor that initializes the superclass variables <br />
&nbsp; &nbsp;  */<br />
&nbsp; &nbsp; public InsertMoney() {<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; /**<br />
&nbsp; &nbsp;  * Constructor to initializes the State variables<br />
&nbsp; &nbsp;  * @param state previous state<br />
&nbsp; &nbsp;  */<br />
&nbsp; &nbsp; public InsertMoney(State state) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; super(state.getDrinkPrice(), state.getTotalInsertedMoney(), state.getSelection());<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; public void makeSelection(String selection, CoffeeMachine coffeemachine) {<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; public void setPrice(int drinkPrice, CoffeeMachine coffeemachine) {<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; /**<br />
&nbsp; &nbsp;  * Decides if the inserted money is too low, too much or sufficient to<br />
&nbsp; &nbsp;  * change state<br />
&nbsp; &nbsp;  * @param money keeps track of total amount of money put in the<br />
&nbsp; &nbsp;  * CoffeeMachine<br />
&nbsp; &nbsp;  * @param coffeemachine reference to CoffeeMachine.java<br />
&nbsp; &nbsp;  */<br />
&nbsp; &nbsp; @Override<br />
&nbsp; &nbsp; public void insertMoney(int money, CoffeeMachine coffeemachine) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; int totalMoneyInserted = money + super.getTotalInsertedMoney();<br />
&nbsp; &nbsp; &nbsp; &nbsp; super.setTotalInsertedMoney(totalMoneyInserted);<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (super.getDrinkPrice() &gt; totalMoneyInserted) { // Less than total<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; coffeemachine.displayNotEnoughMoney(super.getDrinkPrice() - totalMoneyInserted);<br />
&nbsp; &nbsp; &nbsp; &nbsp; } else if (super.getDrinkPrice() &lt; totalMoneyInserted) { // Greater than total<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; coffeemachine.displayReturnMoney(totalMoneyInserted - super.getDrinkPrice());<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MessageDelay messageDelay = new MessageDelay(coffeemachine, insertMoney);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Thread delay = new Thread(messageDelay);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; delay.start();<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //super.setTotalInsertedMoney(super.getDrinkPrice()); // Set totalInsertedMoney to total price of drink<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //coffeemachine.setState(new BrewDrink(this));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //coffeemachine.getState().brewDrink(coffeemachine);<br />
&nbsp; &nbsp; &nbsp; &nbsp; } else { // Equals total drink price<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; coffeemachine.setState(new BrewDrink(this));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; coffeemachine.getState().brewDrink(coffeemachine);<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; @Override<br />
&nbsp; &nbsp; public void brewDrink(CoffeeMachine coffeemachine) {<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; @Override<br />
&nbsp; &nbsp; public boolean equals(Object obj) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; return super.equals(obj);<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; @Override<br />
&nbsp; &nbsp; public int hashCode() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; return super.hashCode();<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; @Override<br />
&nbsp; &nbsp; public void setDrinkReady(boolean drinkReady, CoffeeMachine coffeemachine) {<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; @Override<br />
&nbsp; &nbsp; public void drinkRemoved(boolean drinkReady, CoffeeMachine coffeemachine) {<br />
&nbsp; &nbsp; }<br />
}<br />
class MessageDelay implements Runnable {<br />
<br />
&nbsp; &nbsp; private CoffeeMachine coffeemachine;<br />
&nbsp; &nbsp; private InsertMoney insertMoney;<br />
&nbsp; &nbsp; private State state;<br />
<br />
&nbsp; &nbsp; public MessageDelay() {<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; public MessageDelay(CoffeeMachine coffeemachine, InsertMoney insertMoney) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; this.coffeemachine = coffeemachine;<br />
&nbsp; &nbsp; &nbsp; &nbsp; this.insertMoney = insertMoney;<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; public void run() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; try {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //coffeemachine.displayReturnMoney(10);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Thread.sleep(1000);<br />
ERROR--&gt;state.setTotalInsertedMoney(state.getDrinkPrice()); // Set totalInsertedMoney to total price of drink<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; coffeemachine.setState(new BrewDrink(insertMoney));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; coffeemachine.getState().brewDrink(coffeemachine);<br />
&nbsp; &nbsp; &nbsp; &nbsp; } catch (InterruptedException ex) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; }<br />
}</pre></div>  <br /> <div style="padding:5px">     <fieldset class="fieldset"> <legend>Attached Files</legend> <table cellpadding="0" cellspacing="5" border="0"> <tr> <td><img class="inlineimg" src="http://www.daniweb.com/forums/images/attach/zip.gif" alt="File Type: zip" width="16" height="16" border="0" style="vertical-align:baseline" /></td> <td><a href="http://www.daniweb.com/forums/attachment.php?attachmentid=12981&amp;d=1261083324">SourceCode.zip</a> (8.4 KB)</td> </tr><tr> <td><img class="inlineimg" src="http://www.daniweb.com/forums/images/attach/zip.gif" alt="File Type: zip" width="16" height="16" border="0" style="vertical-align:baseline" /></td> <td><a href="http://www.daniweb.com/forums/attachment.php?attachmentid=12982&amp;d=1261083337">NetBeansProject.zip</a> (74.1 KB)</td> </tr> </table> </fieldset>  </div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>benregn</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247256.html</guid>
		</item>
		<item>
			<title>Overloading function with pointers or array</title>
			<link>http://www.daniweb.com/forums/thread247255.html</link>
			<pubDate>Thu, 17 Dec 2009 20:54:24 GMT</pubDate>
			<description><![CDATA[Hello everybody, I want to overload a function based on an array dimension or pointers. 
Ex: 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with...]]></description>
			<content:encoded><![CDATA[<div>Hello everybody, I want to overload a function based on an array dimension or pointers.<br />
Ex:<br />
 <pre style="margin:20px; line-height:13px">int calc(int a[]);<br />
int calc(int a[][]);</pre>or<br />
 <pre style="margin:20px; line-height:13px">int calc(int *a);<br />
int calc(int **a);</pre>*a should be &amp;a but i dont know how to face a reference of a reference so i wrote * for better understading...</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum118.html">C</category>
			<dc:creator>ax8l</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247255.html</guid>
		</item>
		<item>
			<title>VB.net 2008 and XML problems</title>
			<link>http://www.daniweb.com/forums/thread247254.html</link>
			<pubDate>Thu, 17 Dec 2009 20:40:17 GMT</pubDate>
			<description><![CDATA[Hi all, 
 
I hope someone can help me with this because it's driving me insane. 
 
I've spent almost two solid days trying to figure this out without much success. 
 
What I need to do is load in an XML file (which I have working fine) but then I need to cycle through each element and extract each...]]></description>
			<content:encoded><![CDATA[<div>Hi all,<br />
<br />
I hope someone can help me with this because it's driving me insane.<br />
<br />
I've spent almost two solid days trying to figure this out without much success.<br />
<br />
What I need to do is load in an XML file (which I have working fine) but then I need to cycle through each element and extract each of the childnode values into it's own textbox so the user can then edit the values and save the edited XML file.<br />
<br />
The XML file looks like this (it has been edited down a little)<br />
<br />
 <pre style="margin:20px; line-height:13px">&lt;?xml version=&quot;1.0&quot; standalone=&quot;yes&quot;?&gt;<br />
&lt;window&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;id&gt;35&lt;/id&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;defaultcontrol&gt;6&lt;/defaultcontrol&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;allowoverlay&gt;yes&lt;/allowoverlay&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;disabletopbar&gt;no&lt;/disabletopbar&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;rememberLastFocusedControl&gt;yes&lt;/rememberLastFocusedControl&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;controls&gt;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;control&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;description&gt;BG&lt;/description&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;type&gt;image&lt;/type&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;id&gt;1&lt;/id&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;texture&gt;Background.png&lt;/texture&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;width&gt;720&lt;/width&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;height&gt;576&lt;/height&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/control&gt;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;control&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;description&gt;Big text&lt;/description&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;type&gt;label&lt;/type&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;id&gt;200&lt;/id&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;posX&gt;355&lt;/posX&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;posY&gt;200&lt;/posY&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;label&gt;#highlightedbutton&lt;/label&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;align&gt;center&lt;/align&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;font&gt;dingbats&lt;/font&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;textcolor&gt;40ffffff&lt;/textcolor&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;animation&gt;WindowOpen&lt;/animation&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;animation&gt;WindowClose&lt;/animation&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/control&gt;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;import&gt;common.videowindow.small.xml&lt;/import&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/controls&gt;<br />
&lt;/window&gt;</pre><br />
Each of the 'control' elements can potentially have a different number of childnodes. which is my first problem.<br />
<br />
Also, there can be varying numbers of 'control' elements<br />
<br />
I sort of have an idea in my head of how to achieve what I want, but don't have the first clue on how to do it.<br />
<br />
Bascially what I want to do is determine the number of 'control' elements (which I have done) and then create a new 'tab' for each one.<br />
<br />
Within each individual tab I want to create a text box and a label for each 'control' childnode title (label) and value (textbox), the user will be able to then edit these values and then click a button to save the XML file.<br />
<br />
Here's where I am with the vb.<br />
At the moment, it loads the XML and determines how many 'control' elements there are.<br />
<br />
 <pre style="margin:20px; line-height:13px">Public Class Form1<br />
<br />
&nbsp; &nbsp; Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; Me.cmbFolders.DataSource = (From folder In New IO.DirectoryInfo(&quot;C:\ProgramData\Team MediaPortal\MediaPortal\skin\&quot;).GetDirectories Select (folder.Name)).ToArray<br />
<br />
&nbsp; &nbsp; End Sub<br />
<br />
&nbsp; &nbsp; Private Sub cmbFolders_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbFolders.SelectedIndexChanged<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; Dim str_SkinName As String<br />
&nbsp; &nbsp; &nbsp; &nbsp; Dim str_SourceFolder As String<br />
&nbsp; &nbsp; &nbsp; &nbsp; Dim str_CurrentSkin As String<br />
&nbsp; &nbsp; &nbsp; &nbsp; Dim str_FileName As String<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; Dim intControlCounter As Integer<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; Dim xmlDoc As New XmlDocument<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; Dim teststring As String<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; teststring = &quot;&quot;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; str_FileName = &quot;BasicHome.xml&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; str_SourceFolder = &quot;C:\ProgramData\Team MediaPortal\MediaPortal\skin\&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; str_SkinName = cmbFolders.SelectedValue<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; str_CurrentSkin = str_SourceFolder &amp; str_SkinName &amp; &quot;\&quot; &amp; str_FileName<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; txtFilePath.Text = str_CurrentSkin<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; xmlDoc.Load(str_CurrentSkin)<br />
&nbsp; &nbsp; &nbsp; &nbsp; intControlCounter = xmlDoc.SelectNodes(&quot;window/controls/control&quot;).Count<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; txtControlNo.Text = intControlCounter<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 'MsgBox(xmlDoc.OuterXml)<br />
<br />
&nbsp; &nbsp; End Sub<br />
<br />
End Class</pre><br />
Thanks for reading through, please don't hesitate to ask if something is unclear.<br />
<br />
Thanks<br />
TheMightySpud</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum58.html">VB.NET</category>
			<dc:creator>TheMightySpud</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247254.html</guid>
		</item>
		<item>
			<title>Stopping a shape after 5 seconds of moving</title>
			<link>http://www.daniweb.com/forums/thread247253.html</link>
			<pubDate>Thu, 17 Dec 2009 20:35:24 GMT</pubDate>
			<description><![CDATA[How can I stop  shape after 5 seconds of moving? 
 
I know how to move it and how to stop it but don't know how to make it stop IN 5 SECONDS. 
This is the rest of the code that I have done but the 5 seconds part is still left. BTW, I tried to use loop but it didn't work out.  
Thanks everyone in...]]></description>
			<content:encoded><![CDATA[<div>How can I stop  shape after 5 seconds of moving?<br />
<br />
I know how to move it and how to stop it but don't know how to make it stop IN 5 SECONDS.<br />
This is the rest of the code that I have done but the 5 seconds part is still left. BTW, I tried to use loop but it didn't work out. <br />
Thanks everyone in advance. :)<br />
<br />
Private Sub Command1_Click()<br />
  Timer1.Enabled = True<br />
End Sub<br />
<br />
Private Sub Form_Load()<br />
  Command1.Caption = &quot;Move&quot;<br />
End Sub<br />
<br />
Private Sub Timer1_Timer()<br />
  Shape1.Left = Shape1.Left + 50<br />
End Sub</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum4.html">Visual Basic 4 / 5 / 6</category>
			<dc:creator>Lida_pink</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247253.html</guid>
		</item>
		<item>
			<title>WINAPI question : Running an exe</title>
			<link>http://www.daniweb.com/forums/thread247252.html</link>
			<pubDate>Thu, 17 Dec 2009 20:33:39 GMT</pubDate>
			<description><![CDATA[Ok so heres what I am trying to do to help you understand my question. I am making my WINAPI load hidden so it's not in the taskbar and is only running as a process using ShowWindow(hwnd, SW_HIDE) on case WM_CREATE: 
 
Now what I am trying to do is make my api run a file on my c:\ . 
For example I...]]></description>
			<content:encoded><![CDATA[<div>Ok so heres what I am trying to do to help you understand my question. I am making my WINAPI load hidden so it's not in the taskbar and is only running as a process using ShowWindow(hwnd, SW_HIDE) on case WM_CREATE:<br />
<br />
Now what I am trying to do is make my api run a file on my c:\ .<br />
For example I got a program that I use that is a mouse macro recorder. It records mouse clicks and movements etc.. and it saves the recorded file as  c:\ace.scp  .   So if I clicked on c:\ace.scp the recording runs the recorded clicks and so forth, and if I run  c:\ace.scp through command line console it runs etc..  but what I am trying to do is make my api run it.  So in my api as with my console experience what I did was placed  system(&quot;c:\ace.scp&quot;);  right under my WM_CREATE  case, and it runs the ace.scp, but it keeps a console window open. I dont want the console window open at all. Is there a way to run the ace.scp, or any executable without using system(&quot;DPATH&quot;); ??? Like an windows API version that doesnt execute the program through an obvious console?<br />
<br />
I'm really hoping to get a simple function that can do this and not a huge block of code, but either way whatever works.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum8.html">C++</category>
			<dc:creator>CodyOebel</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247252.html</guid>
		</item>
		<item>
			<title>report</title>
			<link>http://www.daniweb.com/forums/thread247251.html</link>
			<pubDate>Thu, 17 Dec 2009 20:29:15 GMT</pubDate>
			<description>how can I print a report of the page if it has a many text boxes that I want to print it in one decoment</description>
			<content:encoded><![CDATA[<div>how can I print a report of the page if it has a many text boxes that I want to print it in one decoment</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum61.html">C#</category>
			<dc:creator>Egypt Pharaoh</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247251.html</guid>
		</item>
		<item>
			<title>Help - Bug: A script to compile two types of data files into two temporary files</title>
			<link>http://www.daniweb.com/forums/thread247250.html</link>
			<pubDate>Thu, 17 Dec 2009 20:26:03 GMT</pubDate>
			<description><![CDATA[Dear other forum members, 
 
I'm writing a script for my homework, but I'm scratching all over my head and still can't figure out what I did wrong.  I appreciate if anyone of you can point out my errors. I thank you in advance. 
 
  <div class="codeblock"> <div class="spaced"> <div...]]></description>
			<content:encoded><![CDATA[<div>Dear other forum members,<br />
<br />
I'm writing a script for my homework, but I'm scratching all over my head and still can't figure out what I did wrong.  I appreciate if anyone of you can point out my errors. I thank you in advance.<br />
<br />
 <pre style="margin:20px; line-height:13px">-bash-3.2$ cat payinfo<br />
#!/bin/bash<br />
#<br />
#This shell script compiles two types of data files into two temporary files:<br />
#$depts and $payroll<br />
#It matches the employee IDs from the two files<br />
#and extracts the regular/overtime worked hours and pay rates<br />
#to calculate each employees' total wages earned<br />
#from January to June 2004<br />
#It generates an error message and excludes an employee from the calculation<br />
#if the ID does not exist in both files<br />
#It calculates the total number of employee paid and the total regular/overtime<br />
#paid out amount in the end<br />
#<br />
#usage: payinfo -d directory_with_data_files<br />
#<br />
if [ $# -ne 2 ]; then<br />
echo &quot;payinfo:ERROR: at least teo arguments required&quot;<br />
echo &quot;usage: payinfo -d directory_with_data_files&quot;<br />
exit 1<br />
fi<br />
<br />
if [ ! -d &quot;$2&quot; -o ! -r &quot;$2&quot; -o ! -x &quot;$2&quot; ]; then<br />
echo &quot;payinfo:ERROR: '$2' is not a directory or does not have appropriate permissions (rx)&quot;<br />
echo &quot;usage: payinfo -d directory_with_data_files&quot;<br />
exit 1<br />
fi<br />
<br />
dir=&quot;$2&quot;<br />
cat &quot;$dir&quot;/0[1-6][0-3][0-9]04 &gt; $payroll<br />
<br />
cat &quot;$dir&quot;/[DE][0-9][0-9] &gt; $depts<br />
cat &quot;$dir&quot;/[DE][0-9][0-9][0-9] &gt;&gt; $depts<br />
<br />
empid=$(cat $payroll | sort -nu | cut -d# -f1)<br />
totalhrpay=0; totalotpay=0<br />
for emp in $empid; do<br />
line1=$(grep &quot;^.*:.*:$emp:&quot; $depts)<br />
line2=$(grep &quot;^$emp#&quot; $payroll)<br />
name=$(echo $line1 | cut -d: -f1)<br />
if echo &quot;$line1&quot; | cut -d: -f3 &gt;/dev/null; then<br />
payrate=$(echo $line1 | cut -d: -f4)<br />
overtime=$(echo $line1 | cut -d: -f5)<br />
hours=$(echo $line2 | cut -d\# -f2)<br />
totalhr=0<br />
for hour in $hours; do<br />
((totalhr = totalhr + hour))<br />
done<br />
othours=$(echo $line2 | cut -d\# -f3)<br />
totalot=0<br />
for othour in $othours; do<br />
((totalot = totalot + othour))<br />
done<br />
hourpay=$(echo &quot;scale=2; $totalhr*$payrate&quot; | bc)<br />
otpay=$(echo &quot;scale=2; $totalot*$overtime&quot; | bc)<br />
emppay=$(echo &quot;scale=2; $hourpay+$otpay&quot; | bc)<br />
echo &quot;Employee #$emp ($name) earned $&quot;$emppay&quot; during the period&quot;<br />
((count=count+1))<br />
((totalhrpay = totalhrpay + hourpay))<br />
<br />
# totalhrpay=$(echo &quot;scale=2; $totalhrpay+$hourpay&quot; | bc)<br />
# totalotpay=$(echo &quot;scale=2; $totalotpay+$otpay&quot; | bc)<br />
else<br />
echo &quot;payinfo:ERROR: Employee $emp is not listed in the Department files&quot; &gt;&amp;2<br />
fi<br />
done<br />
<br />
echo &quot;************ TOTALS ***************&quot;<br />
echo &quot;Employees paid: $count&quot;<br />
echo &quot;Regular pay: $totalhrpay&quot;<br />
echo &quot;Overtime pay: $totalotpay&quot;</pre><br />
******** Data File *************<br />
-bash-3.2$ payinfo -d /pub/cs/gboyd/cs160b/asmt04/payroll<br />
Employee #53 (Stevens,Daran) earned $621.00 during the period<br />
Employee #91 (Wilson,Fred P) earned $1032.00 during the period<br />
Employee #181 (Bennett,Fina) earned $1958.40 during the period<br />
Employee #200 (Doenitz,Erick) earned $45.80 during the period<br />
Employee #333 (Haskett,Phil) earned $370.50 during the period<br />
Employee #342 (Zulo,Giorgio) earned $228.00 during the period<br />
Employee #435 () earned $syntax error on line 1, during the period<br />
Employee #584 (Pinkerton,Tom) earned $172.00 during the period<br />
Employee #732 (Roberts,Julie) earned $478.00 during the period<br />
Employee #773 (Doe,Annie) earned $272.30 during the period<br />
Employee #784 (Peabody,Connie) earned $970.00 during the period<br />
Employee #833 (Markowitz,Rob) earned $823.50 during the period<br />
Employee #834 (Juliano,Clio) earned $480.00 during the period<br />
Employee #982 (Banshee,Suzy) earned $538.00 during the period<br />
Employee #1012 (Fostner,Alice) earned $178.00 during the period<br />
Employee #1333 (Jones,Grace) earned $900.40 during the period<br />
Employee #1784 (Adams,Gomez) earned $264.00 during the period<br />
Employee #1818 (Cow,Holy) earned $220.00 during the period<br />
Employee #2000 (Sanders,Colonel) earned $672.00 during the period<br />
Employee #2834 (Anzhenila,Fred) earned $525.00 during the period<br />
Employee #3421 (Johnson,JH) earned $319.20 during the period<br />
Employee #3877 (Penske,Jim) earned $28.00 during the period<br />
Employee #5584 (Hoosis,Jacob) earned $506.00 during the period<br />
Employee #6435 (Gonzales,Carlos) earned $594.00 during the period<br />
Employee #7322 (Charles,Master) earned $640.00 during the period<br />
Employee #7731 (Andrews,Jamal) earned $400.00 during the period<br />
Employee #8333 (Doe,John) earned $740.00 during the period<br />
Employee #98221 (Helricht,Abel) earned $145.00 during the period<br />
************ TOTALS ***************<br />
<br />
************ Output **************<br />
Employees paid: 28<br />
Regular pay: syntax error on line 1,<br />
Overtime pay: syntax error on line 1,<br />
-bash-3.2$</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum113.html">Shell Scripting</category>
			<dc:creator>ilove2smoke</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247250.html</guid>
		</item>
		<item>
			<title>Need help with pygame to exe</title>
			<link>http://www.daniweb.com/forums/thread247249.html</link>
			<pubDate>Thu, 17 Dec 2009 20:26:00 GMT</pubDate>
			<description><![CDATA[So i made a small game using pygame, and I want to be able to give it out to some friends who don't have python, so I want to make it into an EXE. i've been trying for several hours using several different methods, but nothings seems to be working. I would REALLY appreciate any help. 
 
So after...]]></description>
			<content:encoded><![CDATA[<div>So i made a small game using pygame, and I want to be able to give it out to some friends who don't have python, so I want to make it into an EXE. i've been trying for several hours using several different methods, but nothings seems to be working. I would REALLY appreciate any help.<br />
<br />
So after all this time I think py2exe appears to be the best tool to use. I have it installed, I just can't get it to work correctly on my game. After looking for many different setup.py file thingys, this is the one i've been using most recently:<br />
<br />
 <pre style="margin:20px; line-height:13px">try:<br />
&nbsp; &nbsp; from distutils.core import setup<br />
&nbsp; &nbsp; import py2exe, pygame<br />
&nbsp; &nbsp; from modulefinder import Module<br />
&nbsp; &nbsp; import glob, fnmatch<br />
&nbsp; &nbsp; import sys, os, shutil<br />
except ImportError, message:<br />
&nbsp; &nbsp; raise SystemExit,&nbsp; &quot;Unable to load module. %s&quot; % message<br />
&nbsp;<br />
class pygame2exe(py2exe.build_exe.py2exe): #This hack make sure that pygame default font is copied: no need to modify code for specifying default font<br />
&nbsp; &nbsp; def copy_extensions(self, extensions):<br />
&nbsp; &nbsp; &nbsp; &nbsp; #Get pygame default font<br />
&nbsp; &nbsp; &nbsp; &nbsp; pygamedir = os.path.split(pygame.base.__file__)[0]<br />
&nbsp; &nbsp; &nbsp; &nbsp; pygame_default_font = os.path.join(pygamedir, pygame.font.get_default_font())<br />
&nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; #Add font to list of extension to be copied<br />
&nbsp; &nbsp; &nbsp; &nbsp; extensions.append(Module(&quot;pygame.font&quot;, pygame_default_font))<br />
&nbsp; &nbsp; &nbsp; &nbsp; py2exe.build_exe.py2exe.copy_extensions(self, extensions)<br />
&nbsp;<br />
class BuildExe:<br />
&nbsp; &nbsp; def __init__(self):<br />
&nbsp; &nbsp; &nbsp; &nbsp; #Name of starting .py<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.script = &quot;game.py&quot;<br />
&nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; #Name of program<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.project_name = &quot;MyApps&quot;<br />
&nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; #Project url<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.project_url = &quot;about<b></b>:none&quot;<br />
&nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; #Version of program<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.project_version = &quot;0.0&quot;<br />
&nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; #License of the program<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.license = &quot;MyApps License&quot;<br />
&nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; #Auhor of program<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.author_name = &quot;Me&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.author_email = &quot;example@example.com&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.copyright = &quot;Copyright (c) 2009 Me.&quot;<br />
&nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; #Description<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.project_description = &quot;MyApps Description&quot;<br />
&nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; #Icon file (None will use pygame default icon)<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.icon_file = None<br />
&nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; #Extra files/dirs copied to game<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.extra_datas = ['background.mid','background.png','bonus.png','cowbell.wav','highscore.txt']<br />
&nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; #Extra/excludes python modules<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.extra_modules = []<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.exclude_modules = []<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; #DLL Excludes<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.exclude_dll = ['']<br />
&nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; #Zip file name (None will bundle files in exe instead of zip file)<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.zipfile_name = None<br />
&nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; #Dist directory<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.dist_dir ='dist'<br />
&nbsp;<br />
&nbsp; &nbsp; ## Code from DistUtils tutorial at http://wiki.python.org/moin/Distutils/Tutorial<br />
&nbsp; &nbsp; ## Originally borrowed from wxPython's setup and config files<br />
&nbsp; &nbsp; def opj(self, *args):<br />
&nbsp; &nbsp; &nbsp; &nbsp; path = os.path.join(*args)<br />
&nbsp; &nbsp; &nbsp; &nbsp; return os.path.normpath(path)<br />
&nbsp;<br />
&nbsp; &nbsp; def find_data_files(self, srcdir, *wildcards, **kw):<br />
&nbsp; &nbsp; &nbsp; &nbsp; # get a list of all files under the srcdir matching wildcards,<br />
&nbsp; &nbsp; &nbsp; &nbsp; # returned in a format to be used for install_data<br />
&nbsp; &nbsp; &nbsp; &nbsp; def walk_helper(arg, dirname, files):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if '.svn' in dirname:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; names = []<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lst, wildcards = arg<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for wc in wildcards:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wc_name = self.opj(dirname, wc)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for f in files:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; filename = self.opj(dirname, f)<br />
&nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if fnmatch.fnmatch(filename, wc_name) and not os.path.isdir(filename):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; names.append(filename)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if names:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lst.append( (dirname, names ) )<br />
&nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; file_list = []<br />
&nbsp; &nbsp; &nbsp; &nbsp; recursive = kw.get('recursive', True)<br />
&nbsp; &nbsp; &nbsp; &nbsp; if recursive:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; os.path.walk(srcdir, walk_helper, (file_list, wildcards))<br />
&nbsp; &nbsp; &nbsp; &nbsp; else:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; walk_helper((file_list, wildcards),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; srcdir,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [os.path.basename(f) for f in glob.glob(self.opj(srcdir, '*'))])<br />
&nbsp; &nbsp; &nbsp; &nbsp; return file_list<br />
&nbsp;<br />
&nbsp; &nbsp; def run(self):<br />
&nbsp; &nbsp; &nbsp; &nbsp; if os.path.isdir(self.dist_dir): #Erase previous destination dir<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; shutil.rmtree(self.dist_dir)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; #Use the default pygame icon, if none given<br />
&nbsp; &nbsp; &nbsp; &nbsp; if self.icon_file == None:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; path = os.path.split(pygame.__file__)[0]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.icon_file = os.path.join(path, 'pygame.ico')<br />
&nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; #List all data files to add<br />
&nbsp; &nbsp; &nbsp; &nbsp; extra_datas = []<br />
&nbsp; &nbsp; &nbsp; &nbsp; for data in self.extra_datas:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if os.path.isdir(data):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; extra_datas.extend(self.find_data_files(data, '*'))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; extra_datas.append(('.', [data]))<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; setup(<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cmdclass = {'py2exe': pygame2exe},<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; version = self.project_version,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; description = self.project_description,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; name = self.project_name,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; url = self.project_url,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; author = self.author_name,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; author_email = self.author_email,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; license = self.license,<br />
&nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # targets to build<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; windows = [{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'script': self.script,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'icon_resources': [(0, self.icon_file)],<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'copyright': self.copyright<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }],<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; options = {'py2exe': {'optimize': 2, 'bundle_files': 1, 'compressed': True, \<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'excludes': self.exclude_modules, 'packages': self.extra_modules, \<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'dll_excludes': self.exclude_dll} },<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; zipfile = self.zipfile_name,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; data_files = extra_datas,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dist_dir = self.dist_dir<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; if os.path.isdir('build'): #Clean up build dir<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; shutil.rmtree('build')<br />
&nbsp;<br />
if __name__ == '__main__':<br />
&nbsp; &nbsp; &nbsp; &nbsp; if len(sys.argv):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sys.argv.append('py2exe')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BuildExe().run()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; raw_input(&quot;Press any key to continue&quot;) #Pause to let user see that things ends</pre><br />
When I try this however, I get the error:<br />
NotImplementedError: font module not available<br />
(ImportError: MemoryLoadLibrary failed loading pygame\font.pyd)<br />
<br />
In my actual code, I'm loading font using:<br />
font = pygame.font.SysFont(&quot;freesansbold&quot;, 48)<br />
<br />
as I heard this is the better way to do it.<br />
<br />
I've tried many different setup.py files, but each gives me a different error, whether it be missing DLL's, or font, or something else. If I could get any help with this, i would appreciate it.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>sinisterduke</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247249.html</guid>
		</item>
		<item>
			<title>Checking the MySQL Database</title>
			<link>http://www.daniweb.com/forums/thread247248.html</link>
			<pubDate>Thu, 17 Dec 2009 20:24:17 GMT</pubDate>
			<description>Hello all, 
 
Not sure if this is the proper forum for this but first: 
 
I am using Visual Studio 2008 and MySQL Server Version 5.1.42 and Client Version 5.1.11 programming language C# 
 
issue: 
save button from windows form for record editing using databindings and textboxes... 
 
is there a way...</description>
			<content:encoded><![CDATA[<div>Hello all,<br />
<br />
Not sure if this is the proper forum for this but first:<br />
<br />
I am using Visual Studio 2008 and MySQL Server Version 5.1.42 and Client Version 5.1.11 programming language C#<br />
<br />
issue:<br />
save button from windows form for record editing using databindings and textboxes...<br />
<br />
is there a way to check if the value in the textboxes match the field in the database so it does not overwrite the field if it has not been changed.<br />
<br />
I had thought about creating a stored procedure that throws the fields into strings which then could be checked if each equals corresponding textbox.text...<br />
if so do nothing otherwise update that field...<br />
<br />
I see alot of redundant coding to accomplish this this way... was wondering if someone had an idea that would require less coding within my program... <br />
<br />
for example:<br />
 <pre style="margin:20px; line-height:13px">private void btnSavDealer_Click(object sender, EventArgs e)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //Are you sure box<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DialogResult dlgResult = MessageBox.Show(&quot;Are you sure you wish to save changes to this Dealer?&quot;, &quot;Continue?&quot;, MessageBoxButtons.YesNo, MessageBoxIcon.Question);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (dlgResult == DialogResult.No)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // No, Do nothing and set focus back to dealer name<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; txtDealName.Focus();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; txtDealName.SelectAll();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if (dlgResult == DialogResult.Yes)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //Create Database connection<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MySqlConnection conn = new MySqlConnection(&quot;server=localhost;user id=root;Password=******;persist security info=True;database=central1;&quot;);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //get Dealer Name from Database<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; conn.Open();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MySqlCommand myCommand = new MySqlCommand(spname, conn);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myCommand.CommandType = CommandType.StoredProcedure;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myCommand.Parameters.AddWithValue(&quot;@dealerID&quot;, lblDealNum2.Text);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myCommand.Parameters[&quot;@dealerID&quot;].Direction = ParameterDirection.Input;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myCommand.Parameters.Add(new MySqlParameter(&quot;@dealername&quot;, MySqlDbType.VarChar));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myCommand.Parameters[&quot;@dealername&quot;].Direction = ParameterDirection.Output;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myCommand.ExecuteNonQuery();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dn = (string)myCommand.Parameters[&quot;@dealername&quot;].Value;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; conn.Close();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; catch (MySqlException MyException)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MessageBox.Show(&quot;Stored procedure error: MySQL code: &quot; + MyException.Number<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; + &quot;&nbsp; &quot; + MyException.Message);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; conn.Close();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // MessageBox.Show(dn); //Test to make sure retrieving correct name<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //Dealer Name<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (txtDealName.Text == &quot;&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MessageBox.Show(&quot;You must enter a name for this Dealer.&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; txtDealName.Focus();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; txtDealName.SelectAll();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if (txtDealName.Text == dn)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //Do nothing<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //MessageBox.Show(txtDealName.Text); //More testing<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; string query = &quot;UPDATE dealer SET DealName = '&quot; + txtDealName.Text + &quot;' WHERE DealNum = '&quot; + lblDealNum2.Text + &quot;'&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand(query);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; conn.Open();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cmd.Connection = conn;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cmd.ExecuteNonQuery();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; conn.Close();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; catch (MySqlException)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.Diagnostics.Debugger.Break();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; this.Close();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; }</pre>This one works but uses a single query stored procedure that returns only dealer name... <br />
I am trying for an easier way as I have 10 to 15 fields to check</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum61.html">C#</category>
			<dc:creator>Dmennite</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247248.html</guid>
		</item>
		<item>
			<title>parameters + panel1_paint</title>
			<link>http://www.daniweb.com/forums/thread247244.html</link>
			<pubDate>Thu, 17 Dec 2009 20:00:57 GMT</pubDate>
			<description><![CDATA[Hi,  
 
I have code: 
 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code Tags" target="_blank">Help with Code Tags</a> </div> <div>(<a...]]></description>
			<content:encoded><![CDATA[<div>Hi, <br />
<br />
I have code:<br />
<br />
 <pre style="margin:20px; line-height:13px">public func(z)<br />
{<br />
&nbsp; &nbsp; int a = z;<br />
&nbsp; &nbsp; pnlGraphics.Paint += new PaintEventHandler(panel1_Paint);<br />
}<br />
<br />
private void panel1_Paint(object sender, PaintEventArgs e)<br />
{<br />
<br />
}</pre><br />
how can I send val a to panel1_Paint?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum61.html">C#</category>
			<dc:creator>nertos</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247244.html</guid>
		</item>
		<item>
			<title>Class to Compute Average</title>
			<link>http://www.daniweb.com/forums/thread247240.html</link>
			<pubDate>Thu, 17 Dec 2009 19:50:40 GMT</pubDate>
			<description><![CDATA[Hi All,  
 
Thank you for reading this and helping me! I am finishing off my program with a method that can compute Average Scores from a list of data. It's giving me an error that says "invalid use of member (did you forget the â&â ?)". Below is the code that I'm working on, the 
error is the line...]]></description>
			<content:encoded><![CDATA[<div>Hi All, <br />
<br />
Thank you for reading this and helping me! I am finishing off my program with a method that can compute Average Scores from a list of data. It's giving me an error that says &quot;invalid use of member (did you forget the â&amp;â ?)&quot;. Below is the code that I'm working on, the<br />
error is the line with the Sum =. Please Help me figure out a way to sum up all the scores successfully!<br />
<br />
 <pre style="margin:20px; line-height:13px">int Team::AverageHome()<br />
{<br />
int Average = 0;<br />
int Sum = 0;<br />
int Number = 0;<br />
int i;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; for( i = 0; i &lt; NumGames; i++)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Sum = Sum + Games[i].GetHomeScore;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; Average = Sum / i;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; return Average;<br />
}</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum8.html">C++</category>
			<dc:creator>lkegley</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247240.html</guid>
		</item>
		<item>
			<title>Need Help With Templates and Vectors</title>
			<link>http://www.daniweb.com/forums/thread247239.html</link>
			<pubDate>Thu, 17 Dec 2009 19:44:33 GMT</pubDate>
			<description><![CDATA[Hi, I'm trying to write a console program that will sort and find the median of numbers that are given in a text file. The text file can have ints or doubles.  
 
The problem I'm having is outputting the median and the insertionSort functions. I think that they are failing because I did something...]]></description>
			<content:encoded><![CDATA[<div>Hi, I'm trying to write a console program that will sort and find the median of numbers that are given in a text file. The text file can have ints or doubles. <br />
<br />
The problem I'm having is outputting the median and the insertionSort functions. I think that they are failing because I did something wrong with either the vector or templates or both as it is my first time writing code using both of those. <br />
<br />
Any insight is greatly appreciated.<br />
 <pre style="margin:20px; line-height:13px">#include &lt;iostream&gt;<br />
#include &lt;vector&gt;<br />
#include &lt;fstream&gt;<br />
using namespace std;<br />
<br />
template &lt;typename T&gt;<br />
void median(const vector&lt;T&gt; &amp; values) ;<br />
<br />
template &lt;typename T&gt;<br />
void insertionSort(ifstream&amp; in_file, vector&lt;T&gt;&amp; a_values);<br />
<br />
template &lt;typename T&gt;<br />
void fill_vector(ifstream&amp; in_file, vector&lt;T&gt; &amp; values) <br />
{<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; T a_value;<br />
&nbsp; &nbsp; &nbsp; &nbsp; while (!in_file.eof()) <br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; in_file &gt;&gt; a_value;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; values.push_back(a_value);<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
}<br />
int main() <br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; vector&lt;double&gt; values;<br />
&nbsp; &nbsp; &nbsp; &nbsp; char filename[16];<br />
&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;Enter a file name: &quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; cin &gt;&gt; filename;<br />
&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; endl;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; ifstream fin(filename);<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (!fin) <br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cerr &lt;&lt; &quot;Could not open the file&quot; &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return 1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; fill_vector(fin,values);<br />
&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;Values entered: &quot;;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; vector&lt;double&gt;::iterator p;<br />
&nbsp; &nbsp; &nbsp; &nbsp; for (p = values.begin(); p != values.end(); p++) <br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; *p &lt;&lt; &quot;,&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; endl;<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;Sorted values are: &quot; &lt;&lt; insertionSort &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;Median = &quot; &lt;&lt; median &lt;&lt; endl;<br />
<br />
} //end main<br />
<br />
<br />
<br />
<br />
template &lt;typename T&gt;<br />
void insertionSort(vector&lt;T&gt;&amp; values)<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; int i, j, n = values.size(); //i is the pseudo-Code Index and j is the scanIndex<br />
&nbsp; &nbsp; &nbsp; &nbsp; T temp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; // Select List[Index] as element to be inserted into sorted sublist.<br />
&nbsp; &nbsp; &nbsp; &nbsp; // place v[i] into the sublistv[0] ... v[i-1], 1 &lt;= i &lt; n,<br />
&nbsp; &nbsp; &nbsp; &nbsp; // so it is in the correct position<br />
&nbsp; &nbsp; &nbsp; &nbsp; for (i = 1; i &lt; n; i++)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // index j scans down list from v[i] looking for correct position to locate temp assigns it to v[j]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; j = i;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; temp= values[ i];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // find where to insert in the sorted sublistand shift elements to right while scanning<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //from right-to-left<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while ( j &gt; 0 &amp;&amp; target &lt; values[ j-1 ])<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // shift elements up list to make room for insertion<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; values[ j ] = values[ j-1];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; j--;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // the location is found; insert temp<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; values[j] = temp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
}<br />
template &lt;typename T&gt;<br />
void median(const vector&lt;T&gt; &amp; values)<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; double product = 0;<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if( values.size % 2 )<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; product = values[values.size() / 2]<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; else<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; product = ( values[values.size() / 2- 1] + [values.size / 2] ) / 2;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; product &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; return 0;<br />
}</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum8.html">C++</category>
			<dc:creator>prokek</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247239.html</guid>
		</item>
		<item>
			<title>How do i put a function inside another function?</title>
			<link>http://www.daniweb.com/forums/thread247238.html</link>
			<pubDate>Thu, 17 Dec 2009 19:37:42 GMT</pubDate>
			<description>How do i put a function inside another function? Im getting confused with the function definition. Plz help??</description>
			<content:encoded><![CDATA[<div>How do i put a function inside another function? Im getting confused with the function definition. Plz help??</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum8.html">C++</category>
			<dc:creator>darkunknown</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247238.html</guid>
		</item>
		<item>
			<title>get  rid of outlook 07 warning when access 07 sends email</title>
			<link>http://www.daniweb.com/forums/thread247237.html</link>
			<pubDate>Thu, 17 Dec 2009 19:34:13 GMT</pubDate>
			<description><![CDATA[on a form in access, I open up a rst and want to send a report to all in a database table list. 
 
It all works and opens outlook and will send it but, it shows the security thing>>> 
 
after I click "allow", it goes ahead and puts the 1st email in "outbox". 
 
then, access moves on the the 2nd...]]></description>
			<content:encoded><![CDATA[<div>on a form in access, I open up a rst and want to send a report to all in a database table list.<br />
<br />
It all works and opens outlook and will send it but, it shows the security thing&gt;&gt;&gt;<br />
<br />
after I click &quot;allow&quot;, it goes ahead and puts the 1st email in &quot;outbox&quot;.<br />
<br />
then, access moves on the the 2nd report and then , it shows the security thing&gt;&gt;&gt;<br />
<br />
after I click &quot;allow&quot;, it goes ahead and puts the 2nd email in &quot;outbox&quot;.<br />
<br />
then, access moves on the the 3rd report and then <br />
<br />
etc.. I really don't want the user to have to wait and click this 37 times to complete the task..<br />
<br />
I have looked at security on the internet for outlook 2007 but, I can't find anything I can use that works.<br />
<br />
I don't want to purchase anything like …..  <br />
<br />
Advanced Security for Outlook says it will work.. but, I can't get it to do anything..<br />
<br />
what can I do.<br />
<br />
is there any code I can run in outlook or access 2007 that will let it step thru and send 37 emails to the individuals ??</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum4.html">Visual Basic 4 / 5 / 6</category>
			<dc:creator>joe archer sr</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247237.html</guid>
		</item>
		<item>
			<title>KochCurve Coding! *NEED HELP!*</title>
			<link>http://www.daniweb.com/forums/thread247232.html</link>
			<pubDate>Thu, 17 Dec 2009 19:05:40 GMT</pubDate>
			<description>ok so here are the instructions for this project: 
 
 
Write a KochCurve program that uses DrawingTool and provides a drawKochCurve method for drawing Koch curves. Each drawKochCurve method can take the number of levels and an initial size as its parameters. Sample usage of the method to draw a 6...</description>
			<content:encoded><![CDATA[<div>ok so here are the instructions for this project:<br />
<br />
<br />
Write a KochCurve program that uses DrawingTool and provides a drawKochCurve method for drawing Koch curves. Each drawKochCurve method can take the number of levels and an initial size as its parameters. Sample usage of the method to draw a 6 level Koch curve of length 300 would be:<br />
<br />
KochCurve curve = new KochCurve();<br />
curve.drawKochCurve(6, 300);<br />
<br />
The procedure for creating a Koch curve is usually recursive. At each level, we observe that a Koch curve is made up of four smaller Koch curves. This process can be described in the following pseudocode: <br />
if level &lt; 1 then<br />
  Move forward length pixels<br />
else<br />
  Draw a k-1 level Koch curve with segments 1/3 the current length<br />
  Turn left 60 degrees<br />
  Draw a k-1 level Koch curve with segments 1/3 the current length<br />
  Turn right 120 degrees<br />
  Draw a k-1 level Koch curve with segments 1/3 the current length<br />
  Turn left 60 degrees<br />
  Draw a k-1 level Koch curve with segments 1/3 the current length</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>gods_angel</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247232.html</guid>
		</item>
		<item>
			<title>format mask at run time</title>
			<link>http://www.daniweb.com/forums/thread247231.html</link>
			<pubDate>Thu, 17 Dec 2009 18:59:11 GMT</pubDate>
			<description><![CDATA[Hi friends 
I want to force datagridview's columns to use "NO" format mask at run time.for achieving this,I used this code.There is no error but it doesn't work.(This code is for column[1]) 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a...]]></description>
			<content:encoded><![CDATA[<div>Hi friends<br />
I want to force datagridview's columns to use &quot;NO&quot; format mask at run time.for achieving this,I used this code.There is no error but it doesn't work.(This code is for column[1])<br />
 <pre style="margin:20px; line-height:13px">private void dataGridView1_CellValidating<br />
(object sender,DataGridViewCellValidatingEventArgs e)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dataGridView1.Columns[1].DefaultCellStyle.Format = &quot;NO&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }</pre>what should I do?<br />
thx for your attention.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum61.html">C#</category>
			<dc:creator>Dajer</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247231.html</guid>
		</item>
		<item>
			<title>Multicolumns Combobox</title>
			<link>http://www.daniweb.com/forums/thread247229.html</link>
			<pubDate>Thu, 17 Dec 2009 18:36:55 GMT</pubDate>
			<description><![CDATA[str = "select sno,name,city from employees" 
        dt = GetTable(str) 
 
Public Function GetTable(ByVal mstr As String) 
        cmd = New SqlClient.SqlCommand(mstr, con) 
        da = New SqlClient.SqlDataAdapter(cmd) 
        dt = New DataTable 
        da.Fill(dt) 
        Return (dt) 
    End...]]></description>
			<content:encoded><![CDATA[<div>str = &quot;select sno,name,city from employees&quot;<br />
        dt = GetTable(str)<br />
<br />
Public Function GetTable(ByVal mstr As String)<br />
        cmd = New SqlClient.SqlCommand(mstr, con)<br />
        da = New SqlClient.SqlDataAdapter(cmd)<br />
        dt = New DataTable<br />
        da.Fill(dt)<br />
        Return (dt)<br />
    End Function<br />
<br />
<br />
How to display three columns sno,name and city in combobox<br />
<br />
Please help</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum58.html">VB.NET</category>
			<dc:creator>tqmd1</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247229.html</guid>
		</item>
		<item>
			<title>Discriminating between Windows versions programatically</title>
			<link>http://www.daniweb.com/forums/thread247228.html</link>
			<pubDate>Thu, 17 Dec 2009 18:33:47 GMT</pubDate>
			<description><![CDATA[I've pretty much got it down how to determine operating system version, service pack level, 95/NT based, etc. for Windows XP and earlier versions by using GetVersionEx(...) and that's pretty handy for getting system information that software users probably don't know and don't know how to figure...]]></description>
			<content:encoded><![CDATA[<div>I've pretty much got it down how to determine operating system version, service pack level, 95/NT based, etc. for Windows XP and earlier versions by using GetVersionEx(...) and that's pretty handy for getting system information that software users probably don't know and don't know how to figure out (sadly).<br />
<br />
A new wrench in the works is driver signing enforcement on 64 bit versions of windows (e.g. Windows Vista Home Premium 64-bit), which requires drivers to be digitally signed (read:  30 pieces of silver to MS and their cronies) which, by the way, Kaspersky and other AV folks say doesn't do squat for preventing malicious code from executing.  <br />
<br />
Driver signature enforcement may be disabled by the user at boot time using the F8 key and selecting the appropriate option, but that is inconvenient and impractical for the user.  There is also a work around which can be used after the fact for this particular driver (which involves installing the signed drivers and the unsigned drivers, which are the same drivers only modified to include my PID and VID).<br />
<br />
In any case, it would be easiest if we were able to determine the version of the operating system and resolve it down to the OS major and minor version, service pack, on which OS it is based as well as 32- vs 64-bit.  <span style="font-weight:bold">Which leads to my <span style="text-decoration:underline">question</span>:</span>  <span style="font-style:italic">How do I do that?</span><br />
<br />
I think I'll need to use the <a rel="nofollow" class="t" href="http://msdn.microsoft.com/en-us/library/ms724358(VS.85).aspx" target="_blank">GetProductInfo(...)</a> function (?) but I'm not sure if that will do the trick or not and, further, I'm not sure how to use it and can't find any really good examples.  Does anyone know if this will work and, if so, can you explain/show me how to do it?  Is there another, easier, way to determine this information programatically?  I'm using VC++ 6.0.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum8.html">C++</category>
			<dc:creator>donaldw</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247228.html</guid>
		</item>
		<item>
			<title>quick question</title>
			<link>http://www.daniweb.com/forums/thread247225.html</link>
			<pubDate>Thu, 17 Dec 2009 18:27:24 GMT</pubDate>
			<description><![CDATA[What is a seed in c++? 
 
"Call a function to populate the array to perform the following: 
Ask the user for a seed"]]></description>
			<content:encoded><![CDATA[<div>What is a seed in c++?<br />
<br />
&quot;Call a function to populate the array to perform the following:<br />
Ask the user for a <span style="font-style:italic">seed</span>&quot;</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum8.html">C++</category>
			<dc:creator>dani2010</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247225.html</guid>
		</item>
		<item>
			<title>Opening Files Question</title>
			<link>http://www.daniweb.com/forums/thread247222.html</link>
			<pubDate>Thu, 17 Dec 2009 18:10:40 GMT</pubDate>
			<description><![CDATA[What is the difference between 
 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code Tags" target="_blank">Help with Code Tags</a> </div>...]]></description>
			<content:encoded><![CDATA[<div>What is the difference between<br />
<br />
 <pre style="margin:20px; line-height:13px">file = open(&quot;name.txt&quot;)</pre>and<br />
 <pre style="margin:20px; line-height:13px">file = open(&quot;name.txt&quot;, 'r')</pre>?<br />
<br />
I can still use the methods: read(n), readline(n), and readlines(n) without adding the &quot;r&quot; in the open method.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>JuvenileMango</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247222.html</guid>
		</item>
		<item>
			<title>login password window</title>
			<link>http://www.daniweb.com/forums/thread247220.html</link>
			<pubDate>Thu, 17 Dec 2009 18:01:46 GMT</pubDate>
			<description>Hi 
please help me 
How can create login password window for delphi application? 
                                                                                  
                                                                               Thanks</description>
			<content:encoded><![CDATA[<div>Hi<br />
please help me<br />
How can create login password window for delphi application?<br />
                                                                                 <br />
                                                                               Thanks</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum124.html">Pascal and Delphi</category>
			<dc:creator>ITwoman</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247220.html</guid>
		</item>
		<item>
			<title>Java travel with plane project.</title>
			<link>http://www.daniweb.com/forums/thread247219.html</link>
			<pubDate>Thu, 17 Dec 2009 17:50:12 GMT</pubDate>
			<description><![CDATA[Im doing a plane seat assignment. Were i use a File for: 
 
varible name = Keyboard.readVaribale(); 
 
and some part are in swedish but you smart guys might solv it e/w or otherwise i've to rewrite it :p. 
 
e/w the prolem is that i got the program working but i have to add a "search" metod in a...]]></description>
			<content:encoded><![CDATA[<div>Im doing a plane seat assignment. Were i use a File for:<br />
<br />
varible name = Keyboard.readVaribale();<br />
<br />
and some part are in swedish but you smart guys might solv it e/w or otherwise i've to rewrite it :p.<br />
<br />
e/w the prolem is that i got the program working but i have to add a &quot;search&quot; metod in a targeted plane, example:<br />
<br />
What flight?<br />
rom<br />
<br />
name?<br />
Sven<br />
<br />
in &quot;plats&quot; 1 = Sven erik<br />
in &quot;plats&quot; 56 = bjorn Svensson<br />
<br />
how should i do?<br />
<br />
here is the code:<br />
public class Inlupp_SpBr{<br />
public static void main(String[] args){<br />
<br />
		int val, val_resemal, val_plats, plats;<br />
	//	String Rom, Stockholm, Oslo, Madrid, Paris;<br />
			String namn = Keyboard.readString();<br />
			String[] Rom = new String[120];<br />
			String[] Stockholm = new String[120];<br />
			String[] Oslo = new String[120];<br />
			String[] Madrid = new String[120];<br />
			String[] Paris = new String[120];<br />
<br />
				boolean ledig = false;<br />
<br />
					char svar = 'j';<br />
					while(svar=='j' || svar=='J'){<br />
<br />
		meny();<br />
			val = Keyboard.readInt();<br />
				switch(val){<br />
<br />
	       				case 1:<br />
<br />
	       					System.out.println(&quot;1.Rom&quot;);<br />
							System.out.println(&quot;2.Stockholm&quot;);<br />
							System.out.println(&quot;3.Oslo&quot;);<br />
							System.out.println(&quot;4.Madrid&quot;);<br />
							System.out.println(&quot;5.Paris&quot;);<br />
<br />
	      					val_resemal = Keyboard.readInt();<br />
<br />
	       							while(ledig==false){<br />
<br />
	       								if (val_resemal==1){<br />
<br />
	       									System.out.println(&quot;Ange passagerarens namn&quot;);<br />
<br />
	       									namn = Keyboard.readString();<br />
<br />
       										System.out.println(&quot;Ange plats&quot;);<br />
<br />
	       									plats = Keyboard.readInt();<br />
<br />
	       									ledig = nyBokning(Rom,plats,namn);<br />
<br />
	       									Rom[plats-1]=namn;<br />
	       											}<br />
	       								else if (val_resemal==2){<br />
<br />
											System.out.println(&quot;Ange passagerarens namn&quot;);<br />
<br />
											namn = Keyboard.readString();<br />
<br />
											System.out.println(&quot;Ange plats&quot;);<br />
<br />
											plats = Keyboard.readInt();<br />
<br />
											ledig = nyBokning(Stockholm,plats,namn);<br />
<br />
											Stockholm[plats-1]=namn;<br />
										}<br />
<br />
										else if (val_resemal==3){<br />
<br />
											System.out.println(&quot;Ange passagerarens namn&quot;);<br />
<br />
											namn = Keyboard.readString();<br />
<br />
											System.out.println(&quot;Ange plats&quot;);<br />
<br />
											plats = Keyboard.readInt();<br />
<br />
											ledig = nyBokning(Oslo,plats,namn);<br />
<br />
											Oslo[plats-1]=namn;<br />
										}<br />
<br />
										else if (val_resemal==4){<br />
<br />
											System.out.println(&quot;Ange passagerarens namn&quot;);<br />
<br />
											namn = Keyboard.readString();<br />
<br />
											System.out.println(&quot;Ange plats&quot;);<br />
<br />
											plats = Keyboard.readInt();<br />
<br />
											ledig = nyBokning(Madrid,plats,namn);<br />
<br />
											Madrid[plats-1]=namn;<br />
										}<br />
<br />
										else{<br />
											System.out.println(&quot;Ange passagerarens namn&quot;);<br />
<br />
											namn = Keyboard.readString();<br />
<br />
											System.out.println(&quot;Ange plats&quot;);<br />
<br />
											plats = Keyboard.readInt();<br />
<br />
											ledig = nyBokning(Paris,plats,namn);<br />
<br />
											Paris[plats-1]=namn;<br />
										}<br />
						//	}//avslutar if<br />
<br />
<br />
						}//avslutar while ledig==false<br />
<br />
								ledig=false;<br />
								break;//slutet på case 1<br />
<br />
					case 2:<br />
<br />
							System.out.println(&quot;1.Rom&quot;);<br />
							System.out.println(&quot;2.Stockholm&quot;);<br />
							System.out.println(&quot;3.Oslo&quot;);<br />
							System.out.println(&quot;4.Madrid&quot;);<br />
							System.out.println(&quot;5.Paris&quot;);<br />
<br />
	      					val_resemal = Keyboard.readInt();<br />
<br />
						System.out.println(&quot;Ange plats&quot;);<br />
<br />
						plats=Keyboard.readInt();<br />
<br />
						//	Visaplats(destination, plats);<br />
<br />
								if(plats==1)<br />
									VisaPlats(Rom,plats);<br />
								else if (plats==2)<br />
									VisaPlats(Stockholm,plats);<br />
								else if(plats==3)<br />
									VisaPlats(Oslo,plats);<br />
								else if(plats==4)<br />
									VisaPlats(Madrid,plats);<br />
								else<br />
									VisaPlats(Paris,plats);<br />
						break; //avsluta case 2<br />
<br />
<br />
<br />
<br />
					case 3:<br />
						System.out.println(&quot;destination&quot;);<br />
						System.out.println(&quot;1.Rom&quot;);<br />
						System.out.println(&quot;2.Stockholm&quot;);<br />
						System.out.println(&quot;3.Oslo&quot;);<br />
						System.out.println(&quot;4.Madrid&quot;);<br />
						System.out.println(&quot;5.Paris&quot;);<br />
<br />
						val_resemal = Keyboard.readInt();<br />
<br />
						if(val_resemal == 1)<br />
							visaAlla(Rom);<br />
						else if(val_resemal == 2)<br />
							visaAlla(Stockholm);<br />
						else if(val_resemal == 3)<br />
							visaAlla(Oslo);<br />
						else if(val_resemal == 4)<br />
							visaAlla(Madrid);<br />
						else<br />
							visaAlla(Paris);<br />
<br />
					break; //avslutar case 3<br />
<br />
					case 4:<br />
					System.exit(0);<br />
					break;<br />
<br />
					default:<br />
						System.out.println(&quot;Error!!!&quot;);<br />
					break;<br />
<br />
}//avslutar switch<br />
<br />
<br />
<br />
                  System.out.println(&quot;Continue? J/N or j/n&quot;);<br />
                  svar=Keyboard.readChar();<br />
<br />
}//avslutar while svar==j eller......<br />
<br />
}//avslutar huvudprogrammet<br />
<br />
<br />
static void meny()<br />
{<br />
<br />
System.out.println(&quot;Choose from the menu&quot;);<br />
System.out.println(&quot;1.Book a flight seat&quot;);<br />
System.out.println(&quot;2.show a booked flight seat&quot;);<br />
System.out.println(&quot;3.Show ALL booked flight seats&quot;);<br />
System.out.println(&quot;4.Quit&quot;);<br />
}<br />
<br />
<br />
 static boolean nyBokning(String[] lista, int plats, String namn)<br />
{<br />
	if(lista[plats-1]==null)<br />
	return true;<br />
	else<br />
	return false;<br />
<br />
}<br />
<br />
<br />
//Här kommer definitionen av metoden VisaPlats<br />
public static void VisaPlats(String[] lista, int plats){<br />
<br />
if(lista[plats-1]!=null)<br />
<br />
System.out.println(&quot;Plats:&quot;+plats+&quot;namn :&quot;+lista[plats-1]);<br />
<br />
else<br />
	System.out.println(&quot;Ej bokad&quot;);<br />
<br />
}<br />
<br />
//Här kommer metoden visaAlla<br />
 static void visaAlla(String lista[]){<br />
<br />
for (int i=0; i&lt;120; i++)<br />
<br />
System.out.println(&quot;Namn: &quot;+lista[i]+&quot;   &quot;+&quot;Plats: &quot;+(i+1));<br />
}<br />
}//avslutar klassen</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>Spnecer</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247219.html</guid>
		</item>
		<item>
			<title>Text files and Array</title>
			<link>http://www.daniweb.com/forums/thread247214.html</link>
			<pubDate>Thu, 17 Dec 2009 17:29:25 GMT</pubDate>
			<description><![CDATA[Hello.. This is my first time posting here, and I'm hoping I can find some help 
 
I have missed about a week and some of my programming class, and I am very behind. I haven't been able to figure these out on my own. 
 
I need to write a practice program that prompts the user to enter an Element...]]></description>
			<content:encoded><![CDATA[<div>Hello.. This is my first time posting here, and I'm hoping I can find some help<br />
<br />
I have missed about a week and some of my programming class, and I am very behind. I haven't been able to figure these out on my own.<br />
<br />
I need to write a practice program that prompts the user to enter an Element Name, the Symbol and the Atomic Mass, in a procedure. It also needs to offer the list sorted by Element Name, and Atomic Mass.<br />
<br />
Basically, I need to create/ overwrite a file, a readln to enter the Element Name/Atomic Mass/Symbol, and have the option to display by Element Name, and by Atomic Mass.<br />
<br />
I know that I need to use a basic array, and I know how to create a text file and overwrite it, but after my absence, this is overwhelming.<br />
<br />
Thank you in advanced</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum124.html">Pascal and Delphi</category>
			<dc:creator>su-moose</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247214.html</guid>
		</item>
		<item>
			<title>Custom Installation Questions</title>
			<link>http://www.daniweb.com/forums/thread247209.html</link>
			<pubDate>Thu, 17 Dec 2009 17:04:03 GMT</pubDate>
			<description><![CDATA[Hi, I'm completely new to Java, and I'm already lost with the installation. :p 
 
I'm on the custom install page and I see 
 
Source Code: Source code for classes that comprise the public API of Java. 
Public JRE: The standalone JRE. Any application can use this JRE. It registers Java Plug-in and...]]></description>
			<content:encoded><![CDATA[<div>Hi, I'm completely new to Java, and I'm already lost with the installation. :p<br />
<br />
I'm on the custom install page and I see<br />
<br />
Source Code: Source code for classes that comprise the public API of Java.<br />
Public JRE: The standalone JRE. Any application can use this JRE. It registers Java Plug-in and Java Web Start with the browsers and system.<br />
<br />
There is also Demo and Samples, and Development Tools, which don't have an option for not installing.<br />
<br />
I don't know if I should install those two features.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>JuvenileMango</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247209.html</guid>
		</item>
		<item>
			<title>Reading CSV into Dataset (BES Log files)</title>
			<link>http://www.daniweb.com/forums/thread247208.html</link>
			<pubDate>Thu, 17 Dec 2009 17:01:23 GMT</pubDate>
			<description>It gives an incorrect row count and the column count only shows 1. 
 
So when I try to handle the true number of columns in the CSV file it reports an OutOfIndexRange error. 
 
Any and all help would be greatly appreciated. 
 
Example Data: 
 
 
---Quote---</description>
			<content:encoded><![CDATA[<div>It gives an incorrect row count and the column count only shows 1.<br />
<br />
So when I try to handle the true number of columns in the CSV file it reports an OutOfIndexRange error.<br />
<br />
Any and all help would be greatly appreciated.<br />
<br />
Example Data:<br />
<br />
<div style="margin:20px; margin-top:5px; "> <div class="smallfont" style="margin-bottom:2px">Quote:</div> <table cellpadding="5" cellspacing="0" border="0" width="100%"> <tr> <td class="alt2"> <hr />  &quot;Name.ID&quot;,&quot;Type of Call&quot;,&quot;Name&quot;,&quot;Phone Number&quot;,&quot;Start Date&quot;,&quot;Server Log Date&quot;,&quot;Elapsed Time&quot;,&quot;Memo&quot;,&quot;Command&quot;,&quot;UID&quot;<br />
&quot;Name Removed&quot;,&quot;Outgoing&quot;,&quot;&quot;,&quot;5555555555&quot;,&quot;2009/04/20 20:00:25&quot;,&quot;2009/05/14 09:29:10&quot;,&quot;00:00:43&quot;,&quot;&quot;,&quot;Update&quot;,&quot;5555555555&quot;<br />
<br />
&quot;Name Removed&quot;,&quot;Incoming - Missed Call, Unopened&quot;,&quot;Name Removed&quot;,&quot;5555555555&quot;,&quot;2009/05/11 20:32:41&quot;,&quot;2009/05/14 09:29:10&quot;,&quot;00:00:00&quot;,&quot;&quot;,&quot;Update&quot;,&quot;5555555555&quot;<br />
<br />
&quot;Name Removed&quot;,&quot;Incoming - Missed Call, Unopened&quot;,&quot;&quot;,&quot;5555555555&quot;,&quot;2009/04/20 19:59:20&quot;,&quot;2009/05/14 09:29:10&quot;,&quot;00:00:00&quot;,&quot;&quot;,&quot;Update&quot;,&quot;5555555555&quot;<br />
<br />
&quot;Name Removed&quot;,&quot;Incoming - Completed&quot;,&quot;&quot;,&quot;5555555555&quot;,&quot;2009/04/20 19:58:41&quot;,&quot;2009/05/14 09:29:10&quot;,&quot;00:00:05&quot;,&quot;&quot;,&quot;Update&quot;,&quot;5555555555&quot;<br />
<br />
&quot;Name Removed&quot;,&quot;Incoming - Completed&quot;,&quot;Name Removed&quot;,&quot;5555555555&quot;,&quot;2009/04/20 17:13:41&quot;,&quot;2009/05/14 09:29:10&quot;,&quot;00:00:15&quot;,&quot;&quot;,&quot;Update&quot;,&quot;5555555555&quot;<br />
<br />
&quot;Name Removed&quot;,&quot;Incoming - Completed&quot;,&quot;&quot;,&quot;5555555555&quot;,&quot;2009/04/20 16:26:26&quot;,&quot;2009/05/14 09:29:10&quot;,&quot;00:00:26&quot;,&quot;&quot;,&quot;Update&quot;,&quot;5555555555&quot;<br />  <hr /> </td> </tr> </table> </div> <pre style="margin:20px; line-height:13px"><br />
Imports System.Data.SqlClient<br />
Imports System.Data.OleDb<br />
Imports System.IO<br />
Imports System.Threading<br />
<br />
Module Module1<br />
<br />
&nbsp; &nbsp; Dim LogDirectory As String = &quot;C:\BES Log Importer\Logs&quot;<br />
&nbsp; &nbsp; Dim IODirectory As DirectoryInfo = New DirectoryInfo(LogDirectory)<br />
<br />
&nbsp; &nbsp; Sub Main()<br />
&nbsp; &nbsp; &nbsp; &nbsp; For Each IOFile As FileInfo In IODirectory.GetFiles(&quot;*.csv&quot;, SearchOption.AllDirectories)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Console.WriteLine(&quot;Current File: &quot; &amp; IOFile.Name)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AddToDatabase(IOFile.Name, IOFile.DirectoryName)<br />
&nbsp; &nbsp; &nbsp; &nbsp; Next<br />
&nbsp; &nbsp; &nbsp; &nbsp; Console.Read()<br />
&nbsp; &nbsp; &nbsp; &nbsp; Process.GetCurrentProcess.Kill()<br />
&nbsp; &nbsp; End Sub<br />
<br />
&nbsp; &nbsp; Sub AddToDatabase(ByVal mFile As String, ByVal mFolder As String)<br />
&nbsp; &nbsp; &nbsp; &nbsp; Dim ConnectionString, CommandText As String<br />
&nbsp; &nbsp; &nbsp; &nbsp; Dim conn As OleDb.OleDbConnection<br />
&nbsp; &nbsp; &nbsp; &nbsp; Dim Command As OleDbCommand<br />
&nbsp; &nbsp; &nbsp; &nbsp; Dim Count As Integer<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; ConnectionString = &quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&quot; &amp; mFolder &amp; &quot;;Extended Properties='text;HDR=Yes;FMT=Delimited';&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; CommandText = &quot;select * from &quot; &amp; mFile<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; conn = New System.Data.OleDb.OleDbConnection(ConnectionString)<br />
&nbsp; &nbsp; &nbsp; &nbsp; Command = New System.Data.OleDb.OleDbCommand(CommandText, conn)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; conn.Open()<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; Dim da As OleDbDataAdapter = New OleDbDataAdapter(CommandText, conn)<br />
&nbsp; &nbsp; &nbsp; &nbsp; Dim ds As DataSet = New DataSet<br />
&nbsp; &nbsp; &nbsp; &nbsp; da.Fill(ds, mFile)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; Console.WriteLine(mFile &amp; &quot; Row Count: &quot; &amp; ds.Tables(0).Rows.Count)<br />
&nbsp; &nbsp; &nbsp; &nbsp; Console.WriteLine(mFile &amp; &quot; Column Count: &quot; &amp; ds.Tables(0).Columns.Count)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; Dim SqlConn As SqlConnection = New SqlConnection(&quot;Data Source=XXX-XXX\ULOG;Initial Catalog=BESLogs;User Id=sa;Password=XXXXXXXX;&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; Dim SqlComm As SqlCommand = New SqlCommand(&quot;Select * from nothing&quot;, SqlConn)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; For Count = 0 To ds.Tables(0).Rows.Count - 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If Count &lt; 0 Then Exit For<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If Not (SqlComm Is Nothing) Then SqlComm.Parameters.Clear()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If mFile.StartsWith(&quot;S&quot;) Then<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Console.WriteLine(ds.Tables(0).Rows(Count).Item(0) &amp; &quot;,&quot; &amp; ds.Tables(0).Rows(Count).Item(1) &amp; &quot;,&quot; &amp; ds.Tables(0).Rows(Count).Item(2) &amp; &quot;,&quot; &amp; ds.Tables(0).Rows(Count).Item(3) &amp; &quot;,&quot; &amp; ds.Tables(0).Rows(Count).Item(4) &amp; &quot;,&quot; &amp; ds.Tables(0).Rows(Count).Item(5) &amp; &quot;,&quot; &amp; ds.Tables(0).Rows(Count).Item(6) &amp; &quot;,&quot; &amp; ds.Tables(0).Rows(Count).Item(7) &amp; &quot;,&quot; &amp; ds.Tables(0).Rows(Count).Item(8) &amp; &quot;,&quot; &amp; ds.Tables(0).Rows(Count).Item(9) &amp; &quot;,&quot; &amp; ds.Tables(0).Rows(Count).Item(10) &amp; &quot;,&quot; &amp; ds.Tables(0).Rows(Count).Item(11))<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm = New SqlCommand(&quot;INSERT INTO [BESLogs].[dbo].[SMSLog]([NameID], [EmailAddress], [TypeofMessage], [To], [From], [CallbackPhoneNumber], [Body], [SendReceivedDate], [ServerLogDate], [OverallMessageStatus], [Command], [UID]) VALUES(@SqlParam0,@SqlParam1,@SqlParam2,@SqlParam3,@SqlParam4,@SqlParam5,@SqlParam6,@SqlParam7,@SqlParam8,@SqlParam9,@SqlParam10,@SqlParam11)&quot;, SqlConn)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim SqlParam0 As SqlParameter = New SqlParameter(&quot;SqlParam0&quot;, SqlDbType.VarChar, 100)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim SqlParam1 As SqlParameter = New SqlParameter(&quot;SqlParam1&quot;, SqlDbType.VarChar, 100)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim SqlParam2 As SqlParameter = New SqlParameter(&quot;SqlParam2&quot;, SqlDbType.VarChar, 100)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim SqlParam3 As SqlParameter = New SqlParameter(&quot;SqlParam3&quot;, SqlDbType.VarChar, 100)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim SqlParam4 As SqlParameter = New SqlParameter(&quot;SqlParam4&quot;, SqlDbType.VarChar, 100)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim SqlParam5 As SqlParameter = New SqlParameter(&quot;SqlParam5&quot;, SqlDbType.VarChar, 100)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim SqlParam6 As SqlParameter = New SqlParameter(&quot;SqlParam6&quot;, SqlDbType.VarChar, 8000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim SqlParam7 As SqlParameter = New SqlParameter(&quot;SqlParam7&quot;, SqlDbType.DateTime)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim SqlParam8 As SqlParameter = New SqlParameter(&quot;SqlParam8&quot;, SqlDbType.DateTime)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim SqlParam9 As SqlParameter = New SqlParameter(&quot;SqlParam9&quot;, SqlDbType.VarChar, 100)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim SqlParam10 As SqlParameter = New SqlParameter(&quot;SqlParam10&quot;, SqlDbType.VarChar, 100)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim SqlParam11 As SqlParameter = New SqlParameter(&quot;SqlParam11&quot;, SqlDbType.VarChar, 100)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlParam0.Value = ds.Tables(0).Rows(Count).Item(0)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlParam1.Value = ds.Tables(0).Rows(Count).Item(1)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlParam2.Value = ds.Tables(0).Rows(Count).Item(2)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlParam3.Value = ds.Tables(0).Rows(Count).Item(3)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlParam4.Value = ds.Tables(0).Rows(Count).Item(4)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlParam5.Value = ds.Tables(0).Rows(Count).Item(5)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlParam6.Value = ds.Tables(0).Rows(Count).Item(6)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlParam7.Value = ds.Tables(0).Rows(Count).Item(7)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlParam8.Value = ds.Tables(0).Rows(Count).Item(8)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlParam9.Value = ds.Tables(0).Rows(Count).Item(9)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlParam10.Value = ds.Tables(0).Rows(Count).Item(10)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlParam11.Value = ds.Tables(0).Rows(Count).Item(11)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm.Parameters.Add(SqlParam0)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm.Parameters.Add(SqlParam1)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm.Parameters.Add(SqlParam2)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm.Parameters.Add(SqlParam3)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm.Parameters.Add(SqlParam4)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm.Parameters.Add(SqlParam5)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm.Parameters.Add(SqlParam6)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm.Parameters.Add(SqlParam7)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm.Parameters.Add(SqlParam8)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm.Parameters.Add(SqlParam9)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm.Parameters.Add(SqlParam10)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm.Parameters.Add(SqlParam11)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm.Connection.Open()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Console.WriteLine(SqlComm.CommandText)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm.ExecuteNonQuery()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm.Connection.Close()<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.Threading.Thread.Sleep(50)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Else<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Console.WriteLine(ds.Tables(0).Rows(Count).Item(0) &amp; &quot;,&quot; &amp; ds.Tables(0).Rows(Count).Item(1) &amp; &quot;,&quot; &amp; ds.Tables(0).Rows(Count).Item(2) &amp; &quot;,&quot; &amp; ds.Tables(0).Rows(Count).Item(3) &amp; &quot;,&quot; &amp; ds.Tables(0).Rows(Count).Item(4) &amp; &quot;,&quot; &amp; ds.Tables(0).Rows(Count).Item(5) &amp; &quot;,&quot; &amp; ds.Tables(0).Rows(Count).Item(6) &amp; &quot;,&quot; &amp; ds.Tables(0).Rows(Count).Item(7) &amp; &quot;,&quot; &amp; ds.Tables(0).Rows(Count).Item(8) &amp; &quot;,&quot; &amp; ds.Tables(0).Rows(Count).Item(9) &amp; &quot;,&quot; &amp; ds.Tables(0).Rows(Count).Item(10))<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm = New SqlCommand(&quot;INSERT INTO [BESLogs].[dbo].[PhoneCallLog]([NameID], [TypeofCall], [Name], [PhoneNumber], [StartDate], [ServerLogDate], [ElapsedTime], [Memo], [Command], [UID], [PhoneLine]) VALUES(@SqlParam0,@SqlParam1,@SqlParam2,@SqlParam3,@SqlParam4,@SqlParam5,@SqlParam6,@SqlParam7,@SqlParam8,@SqlParam9,@SqlParam10)&quot;, SqlConn)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim SqlParam0 As SqlParameter = New SqlParameter(&quot;SqlParam0&quot;, SqlDbType.VarChar, 100)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim SqlParam1 As SqlParameter = New SqlParameter(&quot;SqlParam1&quot;, SqlDbType.VarChar, 100)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim SqlParam2 As SqlParameter = New SqlParameter(&quot;SqlParam2&quot;, SqlDbType.VarChar, 100)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim SqlParam3 As SqlParameter = New SqlParameter(&quot;SqlParam3&quot;, SqlDbType.VarChar, 100)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim SqlParam4 As SqlParameter = New SqlParameter(&quot;SqlParam4&quot;, SqlDbType.DateTime)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim SqlParam5 As SqlParameter = New SqlParameter(&quot;SqlParam5&quot;, SqlDbType.DateTime)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim SqlParam6 As SqlParameter = New SqlParameter(&quot;SqlParam6&quot;, SqlDbType.VarChar, 100)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim SqlParam7 As SqlParameter = New SqlParameter(&quot;SqlParam7&quot;, SqlDbType.VarChar, 100)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim SqlParam8 As SqlParameter = New SqlParameter(&quot;SqlParam8&quot;, SqlDbType.VarChar, 100)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim SqlParam9 As SqlParameter = New SqlParameter(&quot;SqlParam9&quot;, SqlDbType.VarChar, 100)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim SqlParam10 As SqlParameter = New SqlParameter(&quot;SqlParam10&quot;, SqlDbType.VarChar, 100)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlParam0.Value = ds.Tables(0).Rows(Count).Item(0)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlParam1.Value = ds.Tables(0).Rows(Count).Item(1)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlParam2.Value = ds.Tables(0).Rows(Count).Item(2)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlParam3.Value = ds.Tables(0).Rows(Count).Item(3)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlParam4.Value = ds.Tables(0).Rows(Count).Item(4)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlParam5.Value = ds.Tables(0).Rows(Count).Item(5)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlParam6.Value = ds.Tables(0).Rows(Count).Item(6)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlParam7.Value = ds.Tables(0).Rows(Count).Item(7)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlParam8.Value = ds.Tables(0).Rows(Count).Item(8)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlParam9.Value = ds.Tables(0).Rows(Count).Item(9)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlParam10.Value = ds.Tables(0).Rows(Count).Item(10)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm.Parameters.Add(SqlParam0)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm.Parameters.Add(SqlParam1)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm.Parameters.Add(SqlParam2)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm.Parameters.Add(SqlParam3)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm.Parameters.Add(SqlParam4)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm.Parameters.Add(SqlParam5)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm.Parameters.Add(SqlParam6)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm.Parameters.Add(SqlParam7)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm.Parameters.Add(SqlParam8)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm.Parameters.Add(SqlParam9)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm.Parameters.Add(SqlParam10)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm.Connection.Open()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Console.WriteLine(SqlComm.CommandText)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm.ExecuteNonQuery()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlComm.Connection.Close()<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.Threading.Thread.Sleep(50)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End If<br />
&nbsp; &nbsp; &nbsp; &nbsp; Next<br />
<br />
&nbsp; &nbsp; End Sub<br />
<br />
End Module</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum58.html">VB.NET</category>
			<dc:creator>jonturlington</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247208.html</guid>
		</item>
		<item>
			<title>py2exe and tkSnack</title>
			<link>http://www.daniweb.com/forums/thread247207.html</link>
			<pubDate>Thu, 17 Dec 2009 16:51:58 GMT</pubDate>
			<description><![CDATA[Hello everybody, 
 
I made a wonderfull software, using Windows / python26 / tkinter / tkSnack. 
As long as I'm on my computer, it works fine. 
I try to distribute it, using py2exe. And I've not found the way to include tkSnack in the distribution. 
I tried also with pyInstaller, with the same...]]></description>
			<content:encoded><![CDATA[<div>Hello everybody,<br />
<br />
I made a wonderfull software, using Windows / python26 / tkinter / tkSnack.<br />
As long as I'm on my computer, it works fine.<br />
I try to distribute it, using py2exe. And I've not found the way to include tkSnack in the distribution.<br />
I tried also with pyInstaller, with the same result.<br />
<br />
I guess there is something to write in the setup file, like packages=&quot;tkSnack&quot;.<br />
<br />
Does someone have an idea ?<br />
<br />
<span style="font-style:italic">nb : sorry for my poor english</span></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>yvos91</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247207.html</guid>
		</item>
		<item>
			<title>2d linked lists(??)</title>
			<link>http://www.daniweb.com/forums/thread247206.html</link>
			<pubDate>Thu, 17 Dec 2009 16:45:28 GMT</pubDate>
			<description>Hello, 
 
I am trying to create a collection that will store boolean relationships between a list of numbers. Normally I would create a 2d array but these numbers will always be dynamically changing. Sometimes there will be more numbers and sometimes less. What collection type can I use to store an...</description>
			<content:encoded><![CDATA[<div>Hello,<br />
<br />
I am trying to create a collection that will store boolean relationships between a list of numbers. Normally I would create a 2d array but these numbers will always be dynamically changing. Sometimes there will be more numbers and sometimes less. What collection type can I use to store an unspecified amount of data that behaves like a 2d array??</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>RichardCrickets</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247206.html</guid>
		</item>
		<item>
			<title>String Program Problem!</title>
			<link>http://www.daniweb.com/forums/thread247205.html</link>
			<pubDate>Thu, 17 Dec 2009 16:43:11 GMT</pubDate>
			<description>hi, 
the following program has got to take a user inputted string and allows the user to see the postion of each character in the array i.e. 
T H I S     I  S    A  T  E   S   T 
0 1 2 3 4 5 6 7 8  9 10 11 12  
 
then it ask the user to search for any of the characters and it gives them their first...</description>
			<content:encoded><![CDATA[<div>hi,<br />
the following program has got to take a user inputted string and allows the user to see the postion of each character in the array i.e.<br />
T H I S     I  S    A  T  E   S   T<br />
0 1 2 3 4 5 6 7 8  9 10 11 12 <br />
<br />
then it ask the user to search for any of the characters and it gives them their first and last position i.e for T 1st =0 last = 12<br />
<br />
then it has to reverse the string. At first I had this working in one class, but I now need to split it into seperate cpp and header files. <br />
<br />
but now i'm getting errors that i'm have problems fixing, probably something simiple that i just can't see.<br />
<br />
Here are the 3 seperate files:<br />
<br />
MyString.cpp<br />
 <pre style="margin:20px; line-height:13px">#include &quot;MyString.h&quot;<br />
<br />
#include &lt;string&gt; <br />
#include &lt;iostream&gt;<br />
#include &lt;cstring&gt;<br />
#include &lt;iomanip&gt;<br />
#include &lt;string&gt;<br />
<br />
using std::cout; <br />
using std::cin; <br />
using std::endl; <br />
using std::setw;<br />
/**<br />
&nbsp; &nbsp; &nbsp; &nbsp; MyString constructor, we set the str pointer to NULL to make sure it is initialised<br />
&nbsp; &nbsp; &nbsp; &nbsp; properly, then call the set() method to avoid code duplication.<br />
&nbsp;*/<br />
MyString::MyString(const char* inputString /* = NULL */) : str(NULL)<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; set(inputString);<br />
}<br />
<br />
/** <br />
&nbsp; &nbsp; &nbsp; &nbsp; Destructor, needs to deallocate all memory allocated to the object, in this case<br />
&nbsp; &nbsp; &nbsp; &nbsp; this means any memory that's allocated to store the string<br />
*/<br />
MyString::~MyString()<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; // if the str pointer is not NULL, we need to deallocate the memory for the string<br />
&nbsp; &nbsp; &nbsp; &nbsp; // stored<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (str != NULL)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; delete[] str;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
}<br />
<br />
<br />
<br />
void MyString::set(const char* inputString)<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp;  // Get amount mem that needs allocating from length of input string<br />
&nbsp; &nbsp; &nbsp; &nbsp; int inputLength = strlen(inputString);<br />
&nbsp; &nbsp; &nbsp; &nbsp; // Allocate memory for holding string, with 1 extra for null terminator<br />
&nbsp; &nbsp; &nbsp; &nbsp; str = new char[inputLength + 1];<br />
&nbsp; &nbsp; &nbsp; &nbsp; // Copy contents from input string to memory allocated<br />
&nbsp; &nbsp; &nbsp; &nbsp; strcpy (str , inputString);<br />
}<br />
<br />
void MyString::getLength(char Array[])<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int i = 0; // declaring new int 'i' with a value of 0<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; do // do this<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; i++; // increment 'i'<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while (Array[i] != '\0');<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return i;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
void MyString::printFormatted(char Formatted[])<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (int format = 0; format &lt; getLength(Formatted); ++format)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; setw(4) &lt;&lt; Formatted[format];&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; endl;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (int formatP = 0; formatP &lt; getLength(Formatted); ++formatP)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; setw(4) &lt;&lt; formatP;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; } <br />
<br />
void MyString::findFirst(char First[], char c)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (int findF = 0; findF &lt; getLength(First); --findF)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (First[findF] == c)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return findF;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return -1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
void MyString::findLast(char Last[], char c)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (int findL = getLength(Last); findL &gt; 0; --findL)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (Last[findL] == c)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return findL;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return -1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
<br />
void MyString::reverse()<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; for (int i = str1.length()-1; i&gt;=0; i--)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt;str1 [i];<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
}<br />
<br />
<br />
ostream&amp; operator&lt;&lt;(ostream&amp; output, const MyString&amp; mstr)<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; // can access the private member string because the function is a <br />
&nbsp; &nbsp; &nbsp; &nbsp; // friend of MyString.<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (mstr.str != NULL)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; output &lt;&lt; mstr.str;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; return output;<br />
}<br />
<br />
/** <br />
&nbsp; &nbsp; &nbsp; &nbsp; Overloaded input stream operator<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; A non-constant reference is used as the MyString object is being<br />
&nbsp; &nbsp; &nbsp; &nbsp; modified.<br />
*/<br />
istream&amp; operator&gt;&gt;(istream&amp; input, MyString&amp; mstr)<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; char strBuffer[MY_STRING_BUFFER_SIZE];<br />
&nbsp; &nbsp; &nbsp; &nbsp; input &gt;&gt; strBuffer;<br />
&nbsp; &nbsp; &nbsp; &nbsp; mstr.set(strBuffer);<br />
&nbsp; &nbsp; &nbsp; &nbsp; return input;<br />
}</pre><br />
<br />
MyString.h<br />
 <pre style="margin:20px; line-height:13px">#ifndef MYSTRING_H<br />
#define MYSTRING_H<br />
<br />
#include &lt;iostream&gt;<br />
<br />
<br />
// Allow MyString to use input/output streams by name<br />
using std::ostream;<br />
using std::istream;<br />
using std::cout;<br />
using std::endl;<br />
// Used for character array buffers for reading<br />
const int MY_STRING_BUFFER_SIZE = 256;<br />
<br />
class MyString<br />
{<br />
private:<br />
&nbsp; &nbsp; &nbsp; &nbsp; char* str;<br />
<br />
public:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MyString(const char* inputString = NULL);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; /** <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; This is the destructor, and deallocates any memory that<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; has been explicitly allocated to this class.<br />
&nbsp; &nbsp; &nbsp; &nbsp; */<br />
&nbsp; &nbsp; &nbsp; &nbsp; ~MyString();<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; void set(const char* inputString);<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; int getLength(/*char Array[]*/);<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; void printFormatted(/*char Formatted[]*/);<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; int findFirst(char c);<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; int findLast(char c);<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; void reverse();<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; friend ostream&amp; operator&lt;&lt;(ostream&amp; output, const MyString&amp; str);<br />
&nbsp; &nbsp; &nbsp; &nbsp; friend istream&amp; operator&gt;&gt;(istream&amp; input, MyString&amp; str);<br />
};<br />
<br />
<br />
#endif&nbsp; &nbsp; &nbsp; &nbsp; // MYSTRING_H</pre><br />
Main.cpp<br />
 <pre style="margin:20px; line-height:13px">#include &lt;iostream&gt;<br />
#include &quot;MyString.h&quot;<br />
<br />
using std::cin;<br />
using std::cout;<br />
using std::endl;<br />
<br />
int main()<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; // Create an empty MyString object<br />
&nbsp; &nbsp; &nbsp; &nbsp; MyString mstr;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; // Create a buffer so we can read input<br />
&nbsp; &nbsp; &nbsp; &nbsp; char strBuffer[MY_STRING_BUFFER_SIZE];<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; // Read a line...<br />
&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;Please input a string: &quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; cin.getline(strBuffer, MY_STRING_BUFFER_SIZE);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; // And put it into the MyString object<br />
&nbsp; &nbsp; &nbsp; &nbsp; mstr.set(strBuffer);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; // Print formatted...<br />
&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;You input:&quot; &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; mstr.printFormatted();<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; // Length<br />
&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;Length of string: &quot; &lt;&lt; mstr.getLength() &lt;&lt; endl;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; // Read character, and search<br />
&nbsp; &nbsp; &nbsp; &nbsp; char c;<br />
&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;Please enter a character to search for: &quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; cin &gt;&gt; c;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;First occurrence of '&quot; &lt;&lt; c &lt;&lt; &quot;' at: &quot; &lt;&lt; mstr.findFirst(c) &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;Last occurrence of '&quot; &lt;&lt; c &lt;&lt; &quot;' at: &quot; &lt;&lt; mstr.findLast(c) &lt;&lt; endl;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; // Reverse<br />
&nbsp; &nbsp; &nbsp; &nbsp; mstr.reverse();<br />
&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;Reverse string: &quot; &lt;&lt; mstr &lt;&lt; endl;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; return 0;<br />
}</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum8.html">C++</category>
			<dc:creator>nedsnurb</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247205.html</guid>
		</item>
		<item>
			<title>how to add user input to system command</title>
			<link>http://www.daniweb.com/forums/thread247204.html</link>
			<pubDate>Thu, 17 Dec 2009 16:35:59 GMT</pubDate>
			<description><![CDATA[Can anyone tell what is wrong in the below program.I want to ping an ip address which is entered by the user. 
 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox"...]]></description>
			<content:encoded><![CDATA[<div>Can anyone tell what is wrong in the below program.I want to ping an ip address which is entered by the user.<br />
<br />
 <pre style="margin:20px; line-height:13px">#include &lt;iostream&gt;<br />
using namespace std;<br />
<br />
int main()<br />
{<br />
char ip1[30];<br />
cout&lt;&lt;&quot;Enter the Ip Address&quot;;<br />
cin&gt;&gt;ip1;<br />
system(&quot;ping ip1&quot;);<br />
return 0;<br />
}</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum8.html">C++</category>
			<dc:creator>bijayswain</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247204.html</guid>
		</item>
		<item>
			<title>Linux shell tool to list function tree in an executable.</title>
			<link>http://www.daniweb.com/forums/thread247202.html</link>
			<pubDate>Thu, 17 Dec 2009 16:33:51 GMT</pubDate>
			<description><![CDATA[The following is output from an unknown command off an old school DEC Ultrix machine.  Does Linux have a similar command/tool?  Thanks, Kent 
 
1       pend_nonpayment: int(), <pend_nonpayment.c 79> 
2               usr_pwd: <> 
3               display_error: <> 
4               clears: <> 
5      ...]]></description>
			<content:encoded><![CDATA[<div>The following is output from an unknown command off an old school DEC Ultrix machine.  Does Linux have a similar command/tool?  Thanks, Kent<br />
<br />
1       pend_nonpayment: int(), &lt;pend_nonpayment.c 79&gt;<br />
2               usr_pwd: &lt;&gt;<br />
3               display_error: &lt;&gt;<br />
4               clears: &lt;&gt;<br />
5               paint: &lt;&gt;<br />
6               current_date: &lt;&gt;<br />
7               get_process_date: &lt;&gt;<br />
8               strcpy: &lt;&gt;<br />
9               get_yes_no: &lt;&gt;<br />
10              process_nonpayments: int(), &lt;pend_nonpayment.c 191&gt;<br />
11                      clear_bottom_screen: &lt;&gt;<br />
12                      read_carriers: &lt;&gt;<br />
13                      traverse_carriers: &lt;&gt;<br />
14      PNP_Carrier_Compare: int(), &lt;pend_nonpayment.c 213&gt;<br />
15              fnd_flg: &lt;&gt;<br />
16      PNP_Carrier_Visit: int(), &lt;pend_nonpayment.c 231&gt;<br />
17              sprintf: &lt;&gt;<br />
18              isopen: &lt;&gt;<br />
19              memset: &lt;&gt;<br />
20              open_policy_files: &lt;&gt;<br />
21              traverse_pol_pend_file: &lt;&gt;<br />
22              close_policy_files: &lt;&gt;<br />
23              isclose: &lt;&gt;<br />
24      PNP_Pol_Pend_Compare: int(), &lt;pend_nonpayment.c 267&gt;<br />
25              lmess: &lt;&gt;<br />
26              day_ad1: &lt;&gt;<br />
27              read_policy_data_files: &lt;&gt;<br />
28              inst_bill_from_poltrans: &lt;&gt;<br />
29              set_pol_pend_ActivityFlag: &lt;&gt;<br />
30              update_active_pol_pend: &lt;&gt;</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum118.html">C</category>
			<dc:creator>kemiko</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247202.html</guid>
		</item>
		<item>
			<title>Help needed with search box (kind of)</title>
			<link>http://www.daniweb.com/forums/thread247198.html</link>
			<pubDate>Thu, 17 Dec 2009 16:19:40 GMT</pubDate>
			<description>Hi Guys, 
 
Im trying to build an order form application that pulls information from a msaccess file. 
 
The form has 3 Textboxes labeled 1,2,3 etc 
 
 
The first one is a product code, the second a description. i would like to be able to type a product code into box1 and on pressing return it...</description>
			<content:encoded><![CDATA[<div>Hi Guys,<br />
<br />
Im trying to build an order form application that pulls information from a msaccess file.<br />
<br />
The form has 3 Textboxes labeled 1,2,3 etc<br />
<br />
<br />
The first one is a product code, the second a description. i would like to be able to type a product code into box1 and on pressing return it populates box2 (the description).<br />
<br />
If anyone could point me in the right direction id greatly appreciate it.<br />
<br />
Im using VB2010 Express.<br />
<br />
Thanks in advance</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum58.html">VB.NET</category>
			<dc:creator>compusol</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247198.html</guid>
		</item>
		<item>
			<title>Help with my code</title>
			<link>http://www.daniweb.com/forums/thread247196.html</link>
			<pubDate>Thu, 17 Dec 2009 16:08:18 GMT</pubDate>
			<description>Hello good day guys. I just want to ask for help in my java python. I am just new in this language. 
MY first java language is java. However, for me to make it easier to code in python,  i need to code it in java first and then convert after. But i am confused working with arrays in python, help me...</description>
			<content:encoded><![CDATA[<div>Hello good day guys. I just want to ask for help in my java python. I am just new in this language.<br />
MY first java language is java. However, for me to make it easier to code in python,  i need to code it in java first and then convert after. But i am confused working with arrays in python, help me guys. Thank you.<br />
<br />
 <pre style="margin:20px; line-height:13px">import java.util.*;<br />
<br />
public class sample {<br />
&nbsp; &nbsp; &nbsp; &nbsp; static Scanner scan = new Scanner(System.in);<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; public static void main (String args&#91;&#93;){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sample();<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; public static void sample(){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;Enter numbers : &quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String input&#91;&#93; = new String&#91;5&#93;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for ( int i = 0 ; i &lt; input.length; i++){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; input&#91;i&#93; = scan.nextLine();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for ( int i = 0 ; i &lt; input.length; i++){&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(input&#91;i&#93;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
}</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>letlet_pogs</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247196.html</guid>
		</item>
		<item>
			<title>Random in Class</title>
			<link>http://www.daniweb.com/forums/thread247195.html</link>
			<pubDate>Thu, 17 Dec 2009 16:03:07 GMT</pubDate>
			<description><![CDATA[Okay, I'm making a game, and I need to use random inside a class, however I can't figure out how to seed the randomness into the class, so atm I'm getting the same random each time. I've tried stuff like srand(time) in main, however, that doesn't apply to the class, so how am I going to seed it in...]]></description>
			<content:encoded><![CDATA[<div>Okay, I'm making a game, and I need to use random inside a class, however I can't figure out how to seed the randomness into the class, so atm I'm getting the same random each time. I've tried stuff like srand(time) in main, however, that doesn't apply to the class, so how am I going to seed it in the class, call srand inside the constructor?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum8.html">C++</category>
			<dc:creator>Skeen</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247195.html</guid>
		</item>
		<item>
			<title><![CDATA[Inventory System with database "f.stream"]]></title>
			<link>http://www.daniweb.com/forums/thread247192.html</link>
			<pubDate>Thu, 17 Dec 2009 15:50:56 GMT</pubDate>
			<description><![CDATA[is there anyone who is kind enough to share a program code "Inventory System with database "f.stream"".. just a simple program! with add, delete and search!]]></description>
			<content:encoded><![CDATA[<div>is there anyone who is kind enough to share a program code &quot;Inventory System with database &quot;f.stream&quot;&quot;.. just a simple program! with add, delete and search!</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum8.html">C++</category>
			<dc:creator>frankenclyde</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247192.html</guid>
		</item>
		<item>
			<title>lenb vb6 vs .net</title>
			<link>http://www.daniweb.com/forums/thread247191.html</link>
			<pubDate>Thu, 17 Dec 2009 15:49:55 GMT</pubDate>
			<description><![CDATA[in vb6 the most efficient/fast way to test if a variable/object was empty was to use  
 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code...]]></description>
			<content:encoded><![CDATA[<div>in vb6 the most efficient/fast way to test if a variable/object was empty was to use <br />
<br />
 <pre style="margin:20px; line-height:13px">if lenb(x) = 0 then</pre>instead of using if x = &quot;&quot;<br />
<br />
in .net len(x) works, but is there a more efficient way?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum58.html">VB.NET</category>
			<dc:creator>jlego</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247191.html</guid>
		</item>
		<item>
			<title>Pseudocode project - Need Help Today!</title>
			<link>http://www.daniweb.com/forums/thread247189.html</link>
			<pubDate>Thu, 17 Dec 2009 15:34:07 GMT</pubDate>
			<description><![CDATA[Hello everyone, I need a little help understanding what to do for a final project. I'm writing a program that will make an array for 10 songs, sort them by title, genre, and artist name, and make a hierarchy chart showing the branch of modules. 
 
I understand this for the most part, but I'm having...]]></description>
			<content:encoded><![CDATA[<div>Hello everyone, I need a little help understanding what to do for a final project. I'm writing a program that will make an array for 10 songs, sort them by title, genre, and artist name, and make a hierarchy chart showing the branch of modules.<br />
<br />
I understand this for the most part, but I'm having a little trouble writing the string values, and how to pass it through the sorting array with the numberOfEls value to make it more adjustable. Any help would be greatly appreciated, thanks alot.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum14.html">Computer Science</category>
			<dc:creator>Arikado.Kanchi</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247189.html</guid>
		</item>
		<item>
			<title>Compile Deplhi over the network</title>
			<link>http://www.daniweb.com/forums/thread247188.html</link>
			<pubDate>Thu, 17 Dec 2009 15:29:35 GMT</pubDate>
			<description>We have number of projects in Delphi 5 that depends one on another and are built in right order. 
When we compile them on local drive - everything does fine, all projects are compiled successfully. 
When i put source on mapped network drive - one of the projects failed with error: Fatal error:...</description>
			<content:encoded><![CDATA[<div>We have number of projects in Delphi 5 that depends one on another and are built in right order.<br />
When we compile them on local drive - everything does fine, all projects are compiled successfully.<br />
When i put source on mapped network drive - one of the projects failed with error: Fatal error: SomeFile.dcu not fount.<br />
It should be something concern network or security, but there is no idea.<br />
Please help</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum124.html">Pascal and Delphi</category>
			<dc:creator>ritar72</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247188.html</guid>
		</item>
		<item>
			<title>breaking up xml string to post in listview in vb.net?</title>
			<link>http://www.daniweb.com/forums/thread247187.html</link>
			<pubDate>Thu, 17 Dec 2009 15:19:38 GMT</pubDate>
			<description><![CDATA[Ok, sorry to be so needy this week!  Here is the situation.  
 
I have discovered how to do a linq query to get my data from my xml but when I return it as a string to a list box it is coming in as one large line.  No breaks.  
 
Here is the xml: 
  <div class="codeblock"> <div class="spaced"> <div...]]></description>
			<content:encoded><![CDATA[<div>Ok, sorry to be so needy this week!  Here is the situation. <br />
<br />
I have discovered how to do a linq query to get my data from my xml but when I return it as a string to a list box it is coming in as one large line.  No breaks. <br />
<br />
Here is the xml:<br />
 <pre style="margin:20px; line-height:13px">- &lt;record&gt;<br />
&nbsp; &lt;jurisdiction&gt;VA Circuit&lt;/jurisdiction&gt; <br />
- &lt;offender&gt;<br />
&nbsp; &lt;fullname&gt;VARDOS,BENSON&lt;/fullname&gt; <br />
&nbsp; &lt;dob&gt;01/01/1901&lt;/dob&gt; <br />
&nbsp; &lt;ssn&gt;123-45-1234&lt;/ssn&gt; <br />
&nbsp; &lt;sex&gt;MALE&lt;/sex&gt; <br />
&nbsp; &lt;race&gt;WHITE&lt;/race&gt; <br />
&nbsp; &lt;haircolor /&gt; <br />
&nbsp; &lt;eyecolor&gt;UNKNOWN&lt;/eyecolor&gt; <br />
&nbsp; &lt;weight&gt;000&lt;/weight&gt; <br />
&nbsp; &lt;height&gt;000&lt;/height&gt; <br />
&nbsp; &lt;status /&gt; <br />
&nbsp; &lt;address&gt;123 APPLE ST ,RICHMOND VA 23232&lt;/address&gt; <br />
&nbsp; &lt;casenumber&gt;112233&lt;/casenumber&gt; <br />
&nbsp; &lt;comments&gt;Offender#: 001 CASE#:112233&lt;/comments&gt; <br />
&nbsp; &lt;statelinks /&gt; <br />
&nbsp; &lt;imagelinks /&gt; <br />
&nbsp; &lt;aliases count=&quot;0&quot; /&gt; <br />
&nbsp; &lt;/offender&gt;</pre><br />
Here is the linq query:<br />
<br />
 <pre style="margin:20px; line-height:13px"> ListBox1.Items.Clear()<br />
&nbsp; &nbsp; &nbsp; &nbsp; Dim feedXML As XDocument = XDocument.Load(&quot;c:\mydata.xml&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; Dim sb = New StringBuilder()<br />
&nbsp; &nbsp; &nbsp; &nbsp; For Each s In (From nbdresponse In feedXML.Descendants(&quot;record&quot;) _<br />
&nbsp; &nbsp; &nbsp; &nbsp; Where (nbdresponse.Element(&quot;jurisdiction&quot;).Value() = Me.DataGridView3.CurrentCell.Value) _<br />
&nbsp; &nbsp; &nbsp; &nbsp; Select nbdresponse.Elements(&quot;offender&quot;).Value())<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sb.Append(s)<br />
&nbsp; &nbsp; &nbsp; &nbsp; Next<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; Dim foo = sb.ToString<br />
&nbsp; &nbsp; &nbsp; &nbsp; ListBox1.Items.Add(foo)</pre><br />
and it is returning:<br />
<br />
VARDOS,BENSON01/01/1901123-45-1234MALEWHITEUNKNOWN ..... ETC.<br />
<br />
where as I need it to be<br />
VARDOS, BENSON<br />
01/01/1901<br />
123-45-1234<br />
MAIL<br />
WHITE<br />
UNKOWN<br />
ETC.<br />
<br />
i am also not apposed to putting this into a gridview as multi rows.  But I am lost.  Any advice?  Any research directions i can take?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum58.html">VB.NET</category>
			<dc:creator>bluem1</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247187.html</guid>
		</item>
		<item>
			<title>hi all</title>
			<link>http://www.daniweb.com/forums/thread247186.html</link>
			<pubDate>Thu, 17 Dec 2009 15:18:28 GMT</pubDate>
			<description>struct date{ int y; 
                    int m; 
                    int d; 
 long int calculate_date(/*struct variable */) 
     { 
      //.... 
     } 
}; 
void main () 
{/*here how to call function and define struct var*/</description>
			<content:encoded><![CDATA[<div>struct date{ int y;<br />
                    int m;<br />
                    int d;<br />
 long int calculate_date(/*struct variable */)<br />
     {<br />
      //....<br />
     }<br />
};<br />
void main ()<br />
{/*here how to call function and define struct var*/<br />
<br />
}</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum8.html">C++</category>
			<dc:creator>Happy Family</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247186.html</guid>
		</item>
		<item>
			<title>Java Applet Animated Gifs</title>
			<link>http://www.daniweb.com/forums/thread247185.html</link>
			<pubDate>Thu, 17 Dec 2009 15:13:46 GMT</pubDate>
			<description><![CDATA[Is it possible to remove the animated gif from view once it had played once, i am using  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code...]]></description>
			<content:encoded><![CDATA[<div>Is it possible to remove the animated gif from view once it had played once, i am using <pre style="margin:20px; line-height:13px">&nbsp; &nbsp; &nbsp; &nbsp; tr = new MediaTracker(this);<br />
&nbsp; &nbsp; img = getImage(getCodeBase(),&quot;test.gif&quot;);<br />
&nbsp; &nbsp; tr.addImage(img,0);<br />
&nbsp; &nbsp; g.drawImage(img, 0, 0, this);</pre>to display it but it just keeps playing over and over again. Is there a way to remove it after it is played once?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>JasonDoyle</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247185.html</guid>
		</item>
		<item>
			<title>panel</title>
			<link>http://www.daniweb.com/forums/thread247182.html</link>
			<pubDate>Thu, 17 Dec 2009 15:00:18 GMT</pubDate>
			<description>how can I get a picture of the panel that in my application and save it</description>
			<content:encoded><![CDATA[<div>how can I get a picture of the panel that in my application and save it</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum61.html">C#</category>
			<dc:creator>Egypt Pharaoh</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247182.html</guid>
		</item>
		<item>
			<title>jComponents jumping around on the Gui</title>
			<link>http://www.daniweb.com/forums/thread247180.html</link>
			<pubDate>Thu, 17 Dec 2009 14:57:12 GMT</pubDate>
			<description><![CDATA[I've made a gui that has a couple of panes on a frame. 
 
Initially only one frame is visible, but as you fill in options and press buttons, the others become visible.  
 
The problem I have is that the first pane should be in the top left corner when the app starts up. It's not doing that though,...]]></description>
			<content:encoded><![CDATA[<div>I've made a gui that has a couple of panes on a frame.<br />
<br />
Initially only one frame is visible, but as you fill in options and press buttons, the others become visible. <br />
<br />
The problem I have is that the first pane should be in the top left corner when the app starts up. It's not doing that though, when it starts up it's at the top right, and only shifts to the top left when the other pane become visible. Is there any way for me to fix this?<br />
<br />
Thanks in advance!</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>P00dle</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247180.html</guid>
		</item>
		<item>
			<title>using Dolinay library</title>
			<link>http://www.daniweb.com/forums/thread247177.html</link>
			<pubDate>Thu, 17 Dec 2009 14:45:59 GMT</pubDate>
			<description><![CDATA[Hi, 
 
"DriveDetector();" work with "using Dolinay;", but "Dolinay" is only in Framework 2.0 
 
Now i work with Framework 3.5. 
 
How i can run "DriveDetector();" in FW 3.5?]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
&quot;DriveDetector();&quot; work with &quot;using Dolinay;&quot;, but &quot;Dolinay&quot; is only in Framework 2.0<br />
<br />
Now i work with Framework 3.5.<br />
<br />
How i can run &quot;DriveDetector();&quot; in FW 3.5?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum61.html">C#</category>
			<dc:creator>Lolalola</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247177.html</guid>
		</item>
		<item>
			<title>I need your view on this project</title>
			<link>http://www.daniweb.com/forums/thread247174.html</link>
			<pubDate>Thu, 17 Dec 2009 14:41:28 GMT</pubDate>
			<description><![CDATA[Hi guys, 
I have always wanted to write MP3 encoder in Python. I heard of Py-lame but I have never had hands on it and it is, to me a myth.  
 
Ok after trying thinking in ctypes, I thought the best way would be using lame.exe and subprocess. But as I'm thinking of it, I hate black screen. I want...]]></description>
			<content:encoded><![CDATA[<div>Hi guys,<br />
I have always wanted to write MP3 encoder in Python. I heard of Py-lame but I have never had hands on it and it is, to me a myth. <br />
<br />
Ok after trying thinking in ctypes, I thought the best way would be using lame.exe and subprocess. But as I'm thinking of it, I hate black screen. I want to use my own GUI using wxPython. So, is it possible to use subprocess without having black screen? Also getting encoding progress and nicely display it on progress bar?<br />
<br />
What do  you suggest buddies? Thanks alot ;)</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>evstevemd</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247174.html</guid>
		</item>
		<item>
			<title>Help me learn VB 5</title>
			<link>http://www.daniweb.com/forums/thread247170.html</link>
			<pubDate>Thu, 17 Dec 2009 14:32:53 GMT</pubDate>
			<description>Hi guys please help me learn VB 5. Am very new in this . If anyone can forward me some starter tutorials i would be very grateful</description>
			<content:encoded><![CDATA[<div>Hi guys please help me learn VB 5. Am very new in this . If anyone can forward me some starter tutorials i would be very grateful</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum4.html">Visual Basic 4 / 5 / 6</category>
			<dc:creator>johnGIS</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247170.html</guid>
		</item>
		<item>
			<title>Read the selected text and dispaly in textbox</title>
			<link>http://www.daniweb.com/forums/thread247166.html</link>
			<pubDate>Thu, 17 Dec 2009 14:17:19 GMT</pubDate>
			<description>hi evreydby 
 
 
Read the selected text from webbrowser control  and display in the texbox(only text not document text) in winforms using c#.net. y i need this means im doing spell check in winforms.</description>
			<content:encoded><![CDATA[<div>hi evreydby<br />
<br />
<br />
Read the selected text from webbrowser control  and display in the texbox(only text not document text) in winforms using c#.net. y i need this means im doing spell check in winforms.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum61.html">C#</category>
			<dc:creator>naren7</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247166.html</guid>
		</item>
		<item>
			<title>Help with Python</title>
			<link>http://www.daniweb.com/forums/thread247162.html</link>
			<pubDate>Thu, 17 Dec 2009 14:07:24 GMT</pubDate>
			<description><![CDATA[Hello, I need help with editing this program: 
 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code Tags" target="_blank">Help with Code...]]></description>
			<content:encoded><![CDATA[<div>Hello, I need help with editing this program:<br />
<br />
 <pre style="margin:20px; line-height:13px">#!/usr/bin/env python<br />
&quot;&quot;&quot;<br />
Monte Carlo simulation for the Monty Hall Problem:<br />
http://en.wikipedia.org/wiki/Monty_Hall_problem.<br />
&quot;&quot;&quot;<br />
import sys<br />
from random import randrange, shuffle, choice<br />
<br />
DOORS = ['car', 'goat', 'goat']<br />
<br />
def pick_door():<br />
&nbsp; &nbsp; &quot;&quot;&quot;Return a number representing the player's first choice.&quot;&quot;&quot;<br />
&nbsp; &nbsp; return randrange(3)<br />
<br />
def reveal_door(pick):<br />
&nbsp; &nbsp; &quot;&quot;&quot;Return the index of the door opened by the host.<br />
&nbsp; &nbsp; This cannot be a door hiding a car or the player's chosen door.<br />
&nbsp; &nbsp; &quot;&quot;&quot;<br />
&nbsp; &nbsp; all_doors = set([0, 1, 2])<br />
&nbsp; &nbsp; unavailable_doors = set([DOORS.index('car'), pick])<br />
&nbsp; &nbsp; available_doors = list(all_doors - unavailable_doors)<br />
&nbsp; &nbsp; return choice(available_doors)<br />
<br />
def staying_wins(pick):<br />
&nbsp; &nbsp; &quot;&quot;&quot;Return True if the player won by staying<br />
&nbsp; &nbsp; with their first choice, False otherwise.<br />
&nbsp; &nbsp; &quot;&quot;&quot;<br />
&nbsp; &nbsp; return won(pick)<br />
<br />
def switching_wins(pick, open_door):<br />
&nbsp; &nbsp; &quot;&quot;&quot;Return True if the player won by switching,<br />
&nbsp; &nbsp; False otherwise.<br />
&nbsp; &nbsp; &quot;&quot;&quot;<br />
&nbsp; &nbsp; other_doors = set([pick, open_door])<br />
&nbsp; &nbsp; switched_pick = (set([0, 1, 2]) - other_doors).pop()<br />
&nbsp; &nbsp; return won(switched_pick)<br />
<br />
def won(pick):<br />
&nbsp; &nbsp; &quot;&quot;&quot;Return True if the player's final pick hides a car,<br />
&nbsp; &nbsp; False otherwise.<br />
&nbsp; &nbsp; &quot;&quot;&quot;<br />
&nbsp; &nbsp; return (DOORS[pick] == 'car')<br />
<br />
def main(iterations=1000000):<br />
&nbsp; &nbsp; &quot;&quot;&quot;Run the main simulation as many<br />
&nbsp; &nbsp; times as specified by the function argument.<br />
&nbsp; &nbsp; &quot;&quot;&quot;<br />
&nbsp; &nbsp; shuffle(DOORS)<br />
<br />
&nbsp; &nbsp; switching = 0<br />
&nbsp; &nbsp; staying = 0<br />
<br />
&nbsp; &nbsp; for dummy in xrange(iterations):<br />
&nbsp; &nbsp; &nbsp; &nbsp; picked = pick_door()<br />
&nbsp; &nbsp; &nbsp; &nbsp; revealed = reveal_door(picked)<br />
&nbsp; &nbsp; &nbsp; &nbsp; if staying_wins(picked):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; staying += 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; if switching_wins(picked, revealed):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; switching += 1<br />
<br />
&nbsp; &nbsp; staying_rate = (float(staying) / iterations) * 100<br />
&nbsp; &nbsp; switching_rate = (float(switching) / iterations) * 100<br />
<br />
&nbsp; &nbsp; print &quot;Staying: %f%%&quot; % staying_rate<br />
&nbsp; &nbsp; print &quot;Switching: %f%%&quot; % switching_rate<br />
<br />
if __name__ == &quot;__main__&quot;:<br />
&nbsp; &nbsp; if len(sys.argv) == 2:<br />
&nbsp; &nbsp; &nbsp; &nbsp; main(int(sys.argv[1]))<br />
&nbsp; &nbsp; else:<br />
&nbsp; &nbsp; &nbsp; &nbsp; main()</pre>You can probably tell what this program does so I shall not elaborate. However, how can I edit the program so that it works for (for example) 4 goats and 1 car? Of course  <pre style="margin:20px; line-height:13px">DOORS = ['car', 'goat', 'goat']</pre> needs to be changed but I'm not sure what else. Also, what does  <pre style="margin:20px; line-height:13px">return randrange(3)</pre> do?<br />
<br />
Thanks  :)</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>pith</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247162.html</guid>
		</item>
		<item>
			<title>Image Problem with Tkinter</title>
			<link>http://www.daniweb.com/forums/thread247161.html</link>
			<pubDate>Thu, 17 Dec 2009 14:04:46 GMT</pubDate>
			<description><![CDATA[Hello pals. 
 
We're having a project to make a Backup and Restore program in Python. As we think that making a GUI is of course very important, we started using Tkinter after initially trying wxPython which was kind of difficult given the time we had. 
 
Either way, we made a Class where the main...]]></description>
			<content:encoded><![CDATA[<div>Hello pals.<br />
<br />
We're having a project to make a Backup and Restore program in Python. As we think that making a GUI is of course very important, we started using Tkinter after initially trying wxPython which was kind of difficult given the time we had.<br />
<br />
Either way, we made a Class where the main window is. Inside this Class, there is another Class defined, which contains the code of the another Window, where one can chose the options of the backup proccess. So, here's the thing. While we have made two text entries and two buttons, when trying to load an image, or any label for all it matters, it just won't appear, and we get the following error in Python Shell.<br />
<br />
 <pre style="margin:20px; line-height:13px">Exception in Tkinter callback<br />
Traceback (most recent call last):<br />
&nbsp; File &quot;C:\Python25\lib\lib-tk\Tkinter.py&quot;, line 1414, in __call__<br />
&nbsp; &nbsp; return self.func(*args)<br />
&nbsp; File &quot;C:\Users\Ash_Pokemaster\Desktop\project_e31\kuygku.py&quot;, line 110, in backup_window<br />
&nbsp; &nbsp; back = Backup(buwind)<br />
&nbsp; File &quot;C:\Users\Ash_Pokemaster\Desktop\project_e31\kuygku.py&quot;, line 94, in __init__<br />
&nbsp; &nbsp; self.labelcho = Button(framebu, image= photocho)<br />
&nbsp; File &quot;C:\Python25\lib\lib-tk\Tkinter.py&quot;, line 2012, in __init__<br />
&nbsp; &nbsp; Widget.__init__(self, master, 'button', cnf, kw)<br />
&nbsp; File &quot;C:\Python25\lib\lib-tk\Tkinter.py&quot;, line 1942, in __init__<br />
&nbsp; &nbsp; (widgetName, self._w) + extra + self._options(cnf))<br />
TclError: image &quot;pyimage8&quot; doesn't exist</pre><br />
Here is the code along with the images.<br />
<a rel="nofollow" class="t" href="http://rapidshare.com/files/321658197/project_e31.zip.html" target="_blank">http://rapidshare.com/files/32165819...t_e31.zip.html</a><br />
<br />
We would appeciate it if you could try create an image inside the Backup Class, and figure out what the problem is.<br />
<br />
So far, this is what we type between the two text entry eidgets, and of course doesn't work:<br />
<br />
 <pre style="margin:20px; line-height:13px">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; photocho = PhotoImage(file=choose.gif&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.labelcho = Button(framebu, image= photocho)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.labelcho.image = photocho<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.labelcho.pack()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.labelcho.grid(row=2, column=0)</pre><br />
Image &quot;choose.gif&quot; is not inside the zip, but I guess any image would work...<br />
<br />
Thanks for your time.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Ash_Pokemaster</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247161.html</guid>
		</item>
		<item>
			<title>squared numbers</title>
			<link>http://www.daniweb.com/forums/thread247175.html</link>
			<pubDate>Thu, 17 Dec 2009 13:49:53 GMT</pubDate>
			<description>how do i wite a progaram in visual basic 6 that contains a  general sub procedure thats finds a numbers squared number and it aslo contains a general sub procedure thats shows the squared numbers(positive/negative) on the screen</description>
			<content:encoded><![CDATA[<div>how do i wite a progaram in visual basic 6 that contains a  general sub procedure thats finds a numbers squared number and it aslo contains a general sub procedure thats shows the squared numbers(positive/negative) on the screen</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum4.html">Visual Basic 4 / 5 / 6</category>
			<dc:creator>peac</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247175.html</guid>
		</item>
		<item>
			<title>warning: taking address of temporary</title>
			<link>http://www.daniweb.com/forums/thread247157.html</link>
			<pubDate>Thu, 17 Dec 2009 13:33:47 GMT</pubDate>
			<description><![CDATA[Hello 
 
I'm trying to copy a variable from a vector into an array (with a few steps in between) 
As you can see from the code, I take a random piece of equipment from the vector of equipments and insert it into the inventory (which is an array). 
The line marked with the <---- gives a warning in...]]></description>
			<content:encoded><![CDATA[<div>Hello<br />
<br />
I'm trying to copy a variable from a vector into an array (with a few steps in between)<br />
As you can see from the code, I take a random piece of equipment from the vector of equipments and insert it into the inventory (which is an array).<br />
The line marked with the &lt;---- gives a warning in the compiler.<br />
<span style="font-style:italic">warning: taking address of temporary<br />
</span><br />
<br />
 <pre style="margin:20px; line-height:13px">// Static list of monsters &amp; equipment<br />
vector&lt;CMonster&gt; monsters;<br />
vector&lt;CEquipment&gt; equipments;<br />
vector&lt;CPotion&gt; potions;<br />
vector&lt;CBag&gt; bags;<br />
<br />
template &lt;typename T&gt;<br />
void load_from_file(vector&lt;T&gt; &amp; v, const char * filename) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; ifstream in(filename);<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (!in.is_open())<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; throw runtime_error(string(&quot;File does not exist: &quot;) + filename);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; string line;<br />
&nbsp; &nbsp; &nbsp; &nbsp; while (getline(in, line)){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (line[0] == 'P'){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; potions.push_back(CPotion(line));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if (line[0] == 'Z'){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bags.push_back(CBag(line));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v.push_back(T(line));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
}<br />
<br />
template &lt;typename T&gt;<br />
T random_from(const vector&lt;T&gt; &amp; v) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; return v[d(1, v.size()) - 1];<br />
}<br />
<br />
void Battle(CPlayer player, int count){<br />
<br />
// code omitted<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (count &gt; 1 and player.Alive()){<br />
&nbsp; &nbsp; &nbsp; &nbsp; // generate an amount of gold<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int amt = rand()%100;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; player.Receive(amt);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;You get &quot; &lt;&lt; amt &lt;&lt; &quot; gold from the &quot; &lt;&lt; monster.GetName() &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; // less money is compensated with a weapon<br />
&nbsp; &nbsp; &nbsp; &nbsp; //if (amt &lt; 20){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CEquipment* equipment = &amp;(random_from&lt;CEquipment&gt;(equipments)); //&lt;-----<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;You search the room and find: &quot; &lt;&lt; *equipment &lt;&lt; &quot;.&quot;&lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;What do you do? (e)quip, (c)ontinue, add to (i)nventory &quot; &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cin &gt;&gt; move;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; switch (move){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case 'e': <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; player.WieldItem(*equipment);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case 'i':<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; player.AddToInventory(equipment);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; player.DispInv();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; default:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //}<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; else {cout &lt;&lt; &quot;You survived the dungeon!&quot; &lt;&lt; endl &lt;&lt; &quot;Your final stats: &quot; &lt;&lt; player &lt;&lt; endl;}<br />
<br />
// code omitted<br />
<br />
}</pre><br />
When I print out the inventory after one addition, its correct but after the second addition it says that both elements are the same and equal to the last added item.<br />
<br />
How can I resolve this issue? I know the inventory works as it should, the display function is also correct.<br />
I thinks its something with the fact that the equipment from the vector is given through a few functions. But I don't see the solution.<br />
<br />
Thanks,<br />
<br />
Jasper</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum8.html">C++</category>
			<dc:creator>Japus</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247157.html</guid>
		</item>
		<item>
			<title>sem project</title>
			<link>http://www.daniweb.com/forums/thread247152.html</link>
			<pubDate>Thu, 17 Dec 2009 13:18:40 GMT</pubDate>
			<description>I want to develop an HTML editor in vb.net for my B.C.A final project.Whether its worthy in this era and wil companies prefer these projects?</description>
			<content:encoded><![CDATA[<div>I want to develop an HTML editor in vb.net for my B.C.A final project.Whether its worthy in this era and wil companies prefer these projects?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum58.html">VB.NET</category>
			<dc:creator>mashooka</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247152.html</guid>
		</item>
		<item>
			<title>Java Applet and AVI</title>
			<link>http://www.daniweb.com/forums/thread247151.html</link>
			<pubDate>Thu, 17 Dec 2009 13:18:31 GMT</pubDate>
			<description><![CDATA[Is it possible to have AVI's play in Java Applets at specific times, eg: when a button is pushed?]]></description>
			<content:encoded><![CDATA[<div>Is it possible to have AVI's play in Java Applets at specific times, eg: when a button is pushed?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>JasonDoyle</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247151.html</guid>
		</item>
		<item>
			<title>Controls position when is shown in mdiParent Form . How to Resolve this Issue?</title>
			<link>http://www.daniweb.com/forums/thread247147.html</link>
			<pubDate>Thu, 17 Dec 2009 12:55:57 GMT</pubDate>
			<description>I have Windows Form which is implemented as per singleton pattern and having TableLayoutPanel as container on it for other controls to be placed on it and it is generating an anonymous problem regarding  controls movement in which they changes their position when set as mdiChildForm of a mdiParent...</description>
			<content:encoded><![CDATA[<div>I have Windows Form which is implemented as per singleton pattern and having TableLayoutPanel as container on it for other controls to be placed on it and it is generating an anonymous problem regarding  controls movement in which they changes their position when set as mdiChildForm of a mdiParent Form.  In this scenario if a windows Form is not being implemented by singleton pattern then it is working fine and if not then the Controls like lable and others are changing their location when the form appear on screen inside mdiparent second time by the user. The further detail regarding this problem is described below.<br />
<br />
There are two Forms named as UI-1 and UI-2 and one Is the MDIParent Form named as MainForm. <br />
<br />
Form UI-1 has the singleton pattern implementation and can only be initialized by GetInstance() method as you can see from code given below. <br />
 <br />
      <br />
The code In the UI-1 Form:<br />
 <pre style="margin:20px; line-height:13px">&nbsp; &nbsp;  public partial class UI1 : Form<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; private static UI1 frm;<br />
&nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; public static UI1 GetInstance()<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (frm == null)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; frm = new UI1();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return frm;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; private UI1()<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; InitializeComponent();<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; public void ShowLabelCoordinates()<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MessageBox.Show(&quot;Location: &quot; + this.label1.Location.ToString() + &quot; Position: &quot;+ <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; this.label1.PointToScreen(this.label1.Location).ToString());<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; }<br />
<br />
<br />
Form UI-2 is with its usual constructor and can be initialized directly from it as you can see from code given below.<br />
<br />
public partial class UI2 : Form<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; public UI2()<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; InitializeComponent();<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; }<br />
<br />
The code in the main Form which is actually a mdi Parent Form.<br />
<br />
UI1 frm = UI1.GetInstance();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; frm.MdiParent = this;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; frm.Show();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; frm.Focus();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; frm.ShowLabelCoordinates();<br />
<br />
UI2 frm = new UI2();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; frm.MdiParent = this;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; frm.Show();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; frm.Focus();</pre> Any immediate assistance will be highly appreciated. <br />
<span style="font-style:italic">&lt;&lt;snip&gt;&gt;</span></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum61.html">C#</category>
			<dc:creator>nauman_gcu</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247147.html</guid>
		</item>
		<item>
			<title>VB2008 x Crystal</title>
			<link>http://www.daniweb.com/forums/thread247146.html</link>
			<pubDate>Thu, 17 Dec 2009 12:51:11 GMT</pubDate>
			<description>Hi all! 
Is that possible to use Crystal Reports 8 with VB2008 Express? 
Thanks in advance!</description>
			<content:encoded><![CDATA[<div>Hi all!<br />
Is that possible to use Crystal Reports 8 with VB2008 Express?<br />
Thanks in advance!</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum58.html">VB.NET</category>
			<dc:creator>groff</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247146.html</guid>
		</item>
		<item>
			<title>append one file to another</title>
			<link>http://www.daniweb.com/forums/thread247137.html</link>
			<pubDate>Thu, 17 Dec 2009 12:15:19 GMT</pubDate>
			<description>Hi all, 
 
How to write one file to the end of other file using python.</description>
			<content:encoded><![CDATA[<div>Hi all,<br />
<br />
How to write one file to the end of other file using python.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>rajeshwari_ib</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247137.html</guid>
		</item>
		<item>
			<title>Codes Modification</title>
			<link>http://www.daniweb.com/forums/thread247136.html</link>
			<pubDate>Thu, 17 Dec 2009 12:07:41 GMT</pubDate>
			<description>These codes work fine to display data from listview to textbox. 
 
TextBox1.Text = ListView1.Items.Item(ListView1.FocusedItem.Index).SubItems(0).Text 
 
Is there any alternative codes for this purpose?</description>
			<content:encoded><![CDATA[<div>These codes work fine to display data from listview to textbox.<br />
<br />
TextBox1.Text = ListView1.Items.Item(ListView1.FocusedItem.Index).SubItems(0).Text<br />
<br />
Is there any alternative codes for this purpose?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum58.html">VB.NET</category>
			<dc:creator>tqmd1</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247136.html</guid>
		</item>
		<item>
			<title>To retrieve data based on field value selected from a combo box and search key</title>
			<link>http://www.daniweb.com/forums/thread247135.html</link>
			<pubDate>Thu, 17 Dec 2009 11:56:46 GMT</pubDate>
			<description><![CDATA[I'm a beginner in .net programming environment.I am using c#. 
 
 
i have a text box(txtSearchKey) for user to enter the text key. 
i have a combo box(cmbSearchBy) to specify in which field of employee table ,search key should be  used to retrieve data. 
 
when i use the above code i get with all...]]></description>
			<content:encoded><![CDATA[<div>I'm a beginner in .net programming environment.I am using c#.<br />
<br />
<br />
i have a text box(txtSearchKey) for user to enter the text key.<br />
i have a combo box(cmbSearchBy) to specify in which field of employee table ,search key should be  used to retrieve data.<br />
<br />
when i use the above code i get with all fields and a blank record,even when i tried with all fields.<br />
<br />
Should i use cmd.ExecuteReader();,If so how?.<br />
<br />
Plase help me out. <br />
<br />
<br />
<br />
<br />
 <pre style="margin:20px; line-height:13px"><br />
SqlCommand cmd = new SqlCommand(&quot;Select *&nbsp; from employees where '&quot;+cmbSearchBy.SelectedItem+&quot;' = '&quot;+txtSearchKey.Text+&quot;' &quot;, newcon);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int result=Convert.ToInt32(cmd.ExecuteNonQuery());<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SqlDataAdapter da=new SqlDataAdapter(cmd);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DataSet ds =new DataSet();<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; da.Fill(ds);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dgv1.DataSource=ds.Tables[0].DefaultView;</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum61.html">C#</category>
			<dc:creator>shanboy</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247135.html</guid>
		</item>
		<item>
			<title>Sharepoint Session Variables</title>
			<link>http://www.daniweb.com/forums/thread247134.html</link>
			<pubDate>Thu, 17 Dec 2009 11:55:37 GMT</pubDate>
			<description>Hi all, 
 
I am currently developing a webpart that works as a submit for many web parts at once. 
 
When the Submit button is pressed, it sets a session variable and then when the page is realoded, each form on the screen responds to this and calls their own Submit functions. 
 
For somereason...</description>
			<content:encoded><![CDATA[<div>Hi all,<br />
<br />
I am currently developing a webpart that works as a submit for many web parts at once.<br />
<br />
When the Submit button is pressed, it sets a session variable and then when the page is realoded, each form on the screen responds to this and calls their own Submit functions.<br />
<br />
For somereason when trying to turn these variables off again (in RenderWebPart) I get a SP error that says that there is a problem with the webpart (No other information given).<br />
<br />
The reason that the variable is turned off in RenderWebPart is so that all webparts can call their submit function in OnPreRender and then the variable is turned off when I know all have completed their submits.<br />
<br />
Here is the code for the RenderWebPart function, I was wondering if anyone could help point me in the right direction for solving this issue.<br />
<br />
<br />
 <pre style="margin:20px; line-height:13px">Protected Overrides Sub RenderWebPart(ByVal output As HtmlTextWriter)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; EnsureChildControls()<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; Me.Page.Session.Item(&quot;GlobalClear&quot;) = &quot;Off&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; Me.Page.Session.Item(&quot;GlobalClose&quot;) = &quot;Off&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; Me.Page.Session.Item(&quot;GlobalVerify&quot;) = &quot;Off&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; Me.Page.Session.Item(&quot;GlobalSubmit&quot;) = &quot;Off&quot;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; MyBase.RenderWebPart(output)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; If mstrNextPage &lt;&gt; &quot;&quot; Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Me.Page.Response.Redirect(mstrNextPage)<br />
&nbsp; &nbsp; &nbsp; &nbsp; End If<br />
<br />
&nbsp; &nbsp; End Sub</pre>Thanks</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum58.html">VB.NET</category>
			<dc:creator>brimble2010</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247134.html</guid>
		</item>
		<item>
			<title>leap year</title>
			<link>http://www.daniweb.com/forums/thread247133.html</link>
			<pubDate>Thu, 17 Dec 2009 11:48:49 GMT</pubDate>
			<description>Project 1 
Leap year calculation (Leap year is a year that has 366 days, a year that has 365 
days is not a leap year) 
Write a program that will accept a positive integer ( the year to be tested) from a user. If 
the user inputs a 0 or negative number, the program quits without doing anything....</description>
			<content:encoded><![CDATA[<div>Project 1<br />
Leap year calculation (Leap year is a year that has 366 days, a year that has 365<br />
days is not a leap year)<br />
Write a program that will accept a positive integer ( the year to be tested) from a user. If<br />
the user inputs a 0 or negative number, the program quits without doing anything.<br />
Otherwise, it will print a message saying whether or not the year is a leap year based on<br />
the following rules.<br />
The rules to calculate if it is a leap year are:<br />
(a) A year divisible by 4 is a leap year (2004, 2008...), unless<br />
(b) it is also divisible by 100 (2100, 2200...) in which case it is not a leap year.<br />
(c) There is an exception. A year divisible by 400 is a leap year (2000, 2400...).<br />
Here are examples of how the program works.<br />
Input a number for the year (&gt;= 1): -1<br />
Sorry, your year must be greater than 1.<br />
Input a number for the year (&gt;= 1): 2001<br />
The year 2001 is (a leap year) or ( not a leap year)<br />
Input a number for the year (&gt;= 1): 2004<br />
The year 2004 is (leap year) or ( not a leap year)<br />
Input a number for the year (&gt;= 1): 2100<br />
The year 2100 is not a leap year</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum8.html">C++</category>
			<dc:creator>seam</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247133.html</guid>
		</item>
		<item>
			<title>How Do I make graphs in VB??</title>
			<link>http://www.daniweb.com/forums/thread247132.html</link>
			<pubDate>Thu, 17 Dec 2009 11:45:26 GMT</pubDate>
			<description>i have made a program which stores a number of record files and need to alanyse financial records of a company and display certain information in graph format so can anyone help me with the basics of graphs which a can manipulate please.</description>
			<content:encoded><![CDATA[<div>i have made a program which stores a number of record files and need to alanyse financial records of a company and display certain information in graph format so can anyone help me with the basics of graphs which a can manipulate please.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum4.html">Visual Basic 4 / 5 / 6</category>
			<dc:creator>Matt3144</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247132.html</guid>
		</item>
		<item>
			<title>Count letter rate</title>
			<link>http://www.daniweb.com/forums/thread247128.html</link>
			<pubDate>Thu, 17 Dec 2009 11:37:12 GMT</pubDate>
			<description>hi, i have a task i dont understand, im working with C++ Borland 6. 
my task is to create array ,which will read text from .txt file (any text,with any number of words). What is important i need to count those letters by rating them, and then range (counted letters) in declining lines by rate. 
...</description>
			<content:encoded><![CDATA[<div>hi, i have a task i dont understand, im working with C++ Borland 6.<br />
my task is to create array ,which will read text from .txt file (any text,with any number of words). What is important i need to count those letters by rating them, and then range (counted letters) in declining lines by rate.<br />
<br />
Example: we have text <br />
aaaa, bbbbbbbb, cccccccccccccc, dddddddddddddddddd...<br />
<br />
my task is to rate them from higher to lower (sry if my english bad)<br />
<br />
......<br />
dddddddddddddddddd<br />
cccccccccccccc<br />
bbbbbbbb<br />
aaaa<br />
<br />
<br />
I dont know how formula looks so i beg ,to create me one, but create with C++ Borland 6, dont use black screen please. If its possible to compile and extract that program and upload here ^^ thank u.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum8.html">C++</category>
			<dc:creator>grafas7</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247128.html</guid>
		</item>
		<item>
			<title><![CDATA[[pyqt]QTabbar beginner question..help plz..]]></title>
			<link>http://www.daniweb.com/forums/thread247127.html</link>
			<pubDate>Thu, 17 Dec 2009 11:29:16 GMT</pubDate>
			<description><![CDATA[Hello all, 
    One simple question.. We can set Tab bar for the tab widget in pyqt...  
I want to place a push button on tab1.. In what way i can do that??? Should i have to add this in the first tab in tab bar or in the tab widget directly..  If i'm not clear, in QTabWidget we will add the...]]></description>
			<content:encoded><![CDATA[<div>Hello all,<br />
    One simple question.. We can set Tab bar for the tab widget in pyqt... <br />
I want to place a push button on tab1.. In what way i can do that??? Should i have to add this in the first tab in tab bar or in the tab widget directly..  If i'm not clear, in QTabWidget we will add the components in this sequence <br />
CreateWidget--&gt;Add it to the tab(addTab)---&gt;Add it to the QTabWidget.. <br />
<br />
          In the same manner how should i use QTabbar..<br />
CreateWidget---&gt;Add to TabBar---&gt;Add it to the Tab(in Tab Widget)<br />
                                           or<br />
CreateTabBar----&gt;SetTabBar and CreateWidget----&gt;Add to the TabWidget ...<br />
Explain me in detail...</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>python.noob</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247127.html</guid>
		</item>
		<item>
			<title>write a number puzzle</title>
			<link>http://www.daniweb.com/forums/thread247126.html</link>
			<pubDate>Thu, 17 Dec 2009 10:59:42 GMT</pubDate>
			<description>Hi every body 
i need a code of program that makes a number puzzle. 
the puzzle has 16 pieces,that move with arrow keys. 
this is my project! 
plzzzzzzzzzzz help me!:sad:</description>
			<content:encoded><![CDATA[<div>Hi every body<br />
i need a code of program that makes a number puzzle.<br />
the puzzle has 16 pieces,that move with arrow keys.<br />
this is my project!<br />
plzzzzzzzzzzz help me!:sad:</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum118.html">C</category>
			<dc:creator>nikoo718</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247126.html</guid>
		</item>
		<item>
			<title>Display square of stars</title>
			<link>http://www.daniweb.com/forums/thread247130.html</link>
			<pubDate>Thu, 17 Dec 2009 10:48:31 GMT</pubDate>
			<description>Question- 
Write a function that displays at the left margin of the screen a solid square of asterisks whose 
side is specified in integer parameter side. For example, if side is 4, the function displays: 
Sample Screen Display 
**** 
**** 
**** 
**** 
 
i have come this far but i get the output</description>
			<content:encoded><![CDATA[<div>Question-<br />
Write a function that displays at the left margin of the screen a solid square of asterisks whose<br />
side is specified in integer parameter side. For example, if side is 4, the function displays:<br />
Sample Screen Display<br />
****<br />
****<br />
****<br />
****<br />
<br />
i have come this far but i get the output<br />
<br />
*<br />
*<br />
*<br />
*<br />
*<br />
*<br />
<br />
if i put in side as 2<br />
<br />
here is my code<br />
<br />
 <pre style="margin:20px; line-height:13px">#include &lt;iostream&gt;<br />
<br />
using std::cin;<br />
using std::cout;<br />
using std::endl;<br />
<br />
int main ()<br />
<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; int side;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;This program will display a solid square of asterisks whose side is specified by the user.&quot; &lt;&lt; endl;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;Please enter an integer specifying the length of the side.&quot; &lt;&lt; endl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; cin &gt;&gt; side;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; for ( int i = 0 ; i &lt; side ; i++)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot; * &quot; &lt;&lt; endl;<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for ( int j = 0 ; j &lt; side ; j++)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot; * &quot; &lt;&lt; endl;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; return 0;<br />
<br />
}</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum8.html">C++</category>
			<dc:creator>kellnerq</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247130.html</guid>
		</item>
		<item>
			<title>I need help with java sockets!!!!</title>
			<link>http://www.daniweb.com/forums/thread247123.html</link>
			<pubDate>Thu, 17 Dec 2009 10:43:56 GMT</pubDate>
			<description>Hi there 
 
I need help!!!! 
 
How do you read and write from an .ini file by using java sockets????</description>
			<content:encoded><![CDATA[<div>Hi there<br />
<br />
I need help!!!!<br />
<br />
How do you read and write from an .ini file by using java sockets????</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>Camzie</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247123.html</guid>
		</item>
		<item>
			<title>SqlException</title>
			<link>http://www.daniweb.com/forums/thread247118.html</link>
			<pubDate>Thu, 17 Dec 2009 10:36:04 GMT</pubDate>
			<description><![CDATA[Someone please help! 
I'm writing a program that enable a user to search for a patient Info when patient number is given.  
here is the search code snippet 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a...]]></description>
			<content:encoded><![CDATA[<div>Someone please help!<br />
I'm writing a program that enable a user to search for a patient Info when patient number is given. <br />
here is the search code snippet<br />
 <pre style="margin:20px; line-height:13px"><br />
&nbsp; &nbsp; &nbsp; &nbsp; public ArrayList searchPatient(String patientNum)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try&nbsp; &nbsp; &nbsp; &nbsp; {<br />
String sql = &quot;SELECT fname, sname, location, dob, dor, race, gender, status, initials, idnum FROM PatientTable WHERE patientNo = &quot; + patientNum;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Create a prepared statement<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  Statement s = con.createStatement();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String pno = &quot;&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String firstname=&quot;&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String lastname=&quot;&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String locate = &quot;&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String dOB=&quot;&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String dOR=&quot;&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String Race=&quot;&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String Gen=&quot;&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String Stat=&quot;&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String Initial=&quot;&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; double id;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ResultSet rs = s.executeQuery(sql);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while(rs.next())<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pno = rs.getString(1);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; firstname = rs.getString(2);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lastname = rs.getString(3);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; locate=rs.getString(4);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dOB = rs.getString(5);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dOR = rs.getString(6);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Race=rs.getString(7);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Gen=rs.getString(8);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Stat=rs.getString(9);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Initial=rs.getString(10);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; id = rs.getDouble(11);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //Create a PatientInfo object<br />
PatientInfo patient = new PatientInfo(id, pno, firstname, lastname, locate,dOB, dOR, Race, Gen, Stat, Initial);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //Add the patient object to array list<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; patientList.add(patient);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</pre><br />
don't get it the Sql statement looks fine but when I run it gives me this exception:<br />
 <pre style="margin:20px; line-height:13px">java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.</pre><br />
Thamks for your support!</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>JBeginer7891</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247118.html</guid>
		</item>
		<item>
			<title>moving buttons</title>
			<link>http://www.daniweb.com/forums/thread247107.html</link>
			<pubDate>Thu, 17 Dec 2009 09:17:16 GMT</pubDate>
			<description>i need help on how to  move button over a panel from the form in which the button is created dynamically at run-time ?</description>
			<content:encoded><![CDATA[<div>i need help on how to  move button over a panel from the form in which the button is created dynamically at run-time ?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum58.html">VB.NET</category>
			<dc:creator>chirup</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread247107.html</guid>
		</item>
	</channel>
</rss>
