<?xml version="1.0" encoding="ISO-8859-1"?>

<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>CodeGuru Forums</title>
		<link>http://forums.codeguru.com/</link>
		<description>Hard hitting articles, dicussions, resources, and more all focusing for real developers in the real world.</description>
		<language>en</language>
		<lastBuildDate>Mon, 20 May 2013 06:36:45 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://forums.codeguru.com/images/misc/rss.png</url>
			<title>CodeGuru Forums</title>
			<link>http://forums.codeguru.com/</link>
		</image>
		<item>
			<title>Saving Exif Data on Newly save Image</title>
			<link>http://forums.codeguru.com/showthread.php?537135-Saving-Exif-Data-on-Newly-save-Image&amp;goto=newpost</link>
			<pubDate>Mon, 20 May 2013 05:50:33 GMT</pubDate>
			<description><![CDATA[Hi there Everyone!,

I am trying a program that edit the existing exif image to to a newly one, but it seem that  I don't have luck. 

I extracted exif data in an image, this is the code:

Dim objExif As New ExifReader
Text2.Text = CommonDialog1.FileName
    Dim txtExifInfo As String
    If Text2.Text = "" Then
    MsgBox ("please insert an image")
    Else
    objExif.Load (Text2.Text)
    txtExifInfo = objExif.Tag(DateTimeOriginal)
    Text1.Text = objExif.Tag(GpsLatitude)
    Text3.Text = objExif.Tag(GpsLongitude)
    Text4.Text = objExif.Tag(GPSInfo)
    Text5.Text = objExif.Tag(DateTimeDigitized)
    Text6.Text = objExif.Tag(Artist)

the textboxes are fill with this data, when I run the system was good, this is my problem, when I save the file, the exif data was  lost (GPS Latitude and Longitude are lost the save image. another thing is the file size of the image gets bigger (from 28 Kb to 43 kb). 

And One thing more, if the image doesn't have a gps lat and long, how can I edit the data and then save it to the property detail of the image. 

any idea or code that might help to solve my problem will be gradually appreciated.. 

more thanks and   more power to everyone!

btw my name is john from phils.]]></description>
			<content:encoded><![CDATA[<div>Hi there Everyone!,<br />
<br />
I am trying a program that edit the existing exif image to to a newly one, but it seem that  I don't have luck. <br />
<br />
I extracted exif data in an image, this is the code:<br />
<br />
Dim objExif As New ExifReader<br />
Text2.Text = CommonDialog1.FileName<br />
    Dim txtExifInfo As String<br />
    If Text2.Text = &quot;&quot; Then<br />
    MsgBox (&quot;please insert an image&quot;)<br />
    Else<br />
    objExif.Load (Text2.Text)<br />
    txtExifInfo = objExif.Tag(DateTimeOriginal)<br />
    Text1.Text = objExif.Tag(GpsLatitude)<br />
    Text3.Text = objExif.Tag(GpsLongitude)<br />
    Text4.Text = objExif.Tag(GPSInfo)<br />
    Text5.Text = objExif.Tag(DateTimeDigitized)<br />
    Text6.Text = objExif.Tag(Artist)<br />
<br />
the textboxes are fill with this data, when I run the system was good, this is my problem, when I save the file, the exif data was  lost (GPS Latitude and Longitude are lost the save image. another thing is the file size of the image gets bigger (from 28 Kb to 43 kb). <br />
<br />
And One thing more, if the image doesn't have a gps lat and long, how can I edit the data and then save it to the property detail of the image. <br />
<br />
any idea or code that might help to solve my problem will be gradually appreciated.. <br />
<br />
more thanks and   more power to everyone!<br />
<br />
btw my name is john from phils.</div>

 ]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?4-Visual-Basic-6.0-Programming">Visual Basic 6.0 Programming</category>
			<dc:creator>WWindow</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?537135-Saving-Exif-Data-on-Newly-save-Image</guid>
		</item>
		<item>
			<title>Problem in Algorithm Recursive?</title>
			<link>http://forums.codeguru.com/showthread.php?537133-Problem-in-Algorithm-Recursive&amp;goto=newpost</link>
			<pubDate>Sun, 19 May 2013 23:36:22 GMT</pubDate>
			<description><![CDATA[Hello friends, I have a problem to implement a recursive version of an algorithm that I made, I get different values, I hope you can help me, here are the code so Iterative (OK) and Recursive code form that is not OK.

The data sets do not give equal:

The algorithm is given two source and target positions on a board, find the number of paths between them...

Input Example: 5
2 3
4 4
Output Example:

5



I hope its not help that I'm wrong!!!

Iterative Algorithm ( OK ) 

Code:
---------
#include <iostream>
#include <stdio.h>
#include <cmath>
#include <algorithm>
#include <string.h>
#include <vector>
#include <queue>

using namespace std;
int n , dp [1000][1000], x, y, xx, yy;
bool mark [1000][1000];

struct Punto
{
    int x;
    int y;
};

Punto inicio, fin , aux;
queue < Punto > lista;
int direcciones[3][2] = { {0,1}, {1,0}, {1,1} }; 

void BFS()
{
    lista.push(inicio);
    dp[ inicio.x ][ inicio.y ] = 1;
    while( !lista.empty() )
    {
        aux = lista.front();
        lista.pop();
        x = aux.x;
        y = aux.y;
        for(int i=0 ; i<3 ; i++) 
        {
            xx = direcciones[i][0]+x;
            yy = direcciones[i][1]+y;
            if( xx>0 && xx <= n && yy > 0 && yy <= n ) 
            {
                dp[xx][yy] += dp[x][y]; 
                if(!mark[xx][yy])
                {
                    mark[xx][yy] = true;
                    aux.x = xx;
                    aux.y = yy;
                    lista.push( aux );
                }
            }
        }
    }
}

int main()
{    
    cin>>n;
    cin>>x>>y;
    inicio.x = x;
    inicio.y = y;
    cin>>x>>y;
    fin.x = x;
    fin.y = y;
    BFS(); 
    cout<< dp[fin.x][fin.y] <<endl;
    system("pause");
    return 0;
}
---------
Recursive Algorithm ( not OK )

Code:
---------
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <vector>
#include <cmath>
#include <queue>
#include <map>
#include <iostream>
#include <string>
#include <stack>
using namespace std;
int n , dp [1000][1000], x, y, xx, yy;
bool mark [1000][1000];

struct Punto
{
    int x;
    int y;
};

Punto inicio, fin , aux;
queue < Punto > lista;
int direcciones[3][2] = { {0,1}, {1,0}, {1,1} }; 

void BFS(Punto aux){
	x=aux.x;
	y=aux.y;
	for(int i=0;i<3;i++){
		xx=direcciones[i][0]+x;
		yy=direcciones[i][1]+y;
		if( xx>0 && xx <= n && yy > 0 && yy <= n )
		{
			dp[xx][yy] += dp[x][y]; 
			if(!mark[xx][yy])
			{
				mark[xx][yy] = true; 
				aux.x = xx;
				aux.y = yy;
				BFS( aux );
			}
		}
	}
}

int main()
{
    cin>>n;
    cin>>x>>y;
    inicio.x = x;
    inicio.y = y;
    cin>>x>>y;
    fin.x = x;
    fin.y = y;
   
    dp[ inicio.x ][ inicio.y ] = 1;
    BFS(inicio);
  
    cout<< dp[fin.x][fin.y] <<endl; 
    system("pause");
    return 0;
}
---------
I hope its not help that I'm wrong!!!
cronos]]></description>
			<content:encoded><![CDATA[<div>Hello friends, I have a problem to implement a recursive version of an algorithm that I made, I get different values, I hope you can help me, here are the code so Iterative (OK) and Recursive code form that is not OK.<br />
<br />
The data sets do not give equal:<br />
<br />
The algorithm is given two source and target positions on a board, find the number of paths between them...<br />
<br />
Input Example: 5<br />
2 3<br />
4 4<br />
Output Example:<br />
<br />
5<br />
<br />
<br />
<br />
I hope its not help that I'm wrong!!!<br />
<br />
Iterative Algorithm ( OK ) <br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">#include &lt;iostream&gt;<br />
#include &lt;stdio.h&gt;<br />
#include &lt;cmath&gt;<br />
#include &lt;algorithm&gt;<br />
#include &lt;string.h&gt;<br />
#include &lt;vector&gt;<br />
#include &lt;queue&gt;<br />
<br />
using namespace std;<br />
int n , dp [1000][1000], x, y, xx, yy;<br />
bool mark [1000][1000];<br />
<br />
struct Punto<br />
{<br />
&nbsp; &nbsp; int x;<br />
&nbsp; &nbsp; int y;<br />
};<br />
<br />
Punto inicio, fin , aux;<br />
queue &lt; Punto &gt; lista;<br />
int direcciones[3][2] = { {0,1}, {1,0}, {1,1} }; <br />
<br />
void BFS()<br />
{<br />
&nbsp; &nbsp; lista.push(inicio);<br />
&nbsp; &nbsp; dp[ inicio.x ][ inicio.y ] = 1;<br />
&nbsp; &nbsp; while( !lista.empty() )<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; aux = lista.front();<br />
&nbsp; &nbsp; &nbsp; &nbsp; lista.pop();<br />
&nbsp; &nbsp; &nbsp; &nbsp; x = aux.x;<br />
&nbsp; &nbsp; &nbsp; &nbsp; y = aux.y;<br />
&nbsp; &nbsp; &nbsp; &nbsp; for(int i=0 ; i&lt;3 ; i++) <br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xx = direcciones[i][0]+x;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; yy = direcciones[i][1]+y;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if( xx&gt;0 &amp;&amp; xx &lt;= n &amp;&amp; yy &gt; 0 &amp;&amp; yy &lt;= n ) <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dp[xx][yy] += dp[x][y]; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(!mark[xx][yy])<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mark[xx][yy] = true;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aux.x = xx;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aux.y = yy;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lista.push( aux );<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; }<br />
}<br />
<br />
int main()<br />
{&nbsp; &nbsp; <br />
&nbsp; &nbsp; cin&gt;&gt;n;<br />
&nbsp; &nbsp; cin&gt;&gt;x&gt;&gt;y;<br />
&nbsp; &nbsp; inicio.x = x;<br />
&nbsp; &nbsp; inicio.y = y;<br />
&nbsp; &nbsp; cin&gt;&gt;x&gt;&gt;y;<br />
&nbsp; &nbsp; fin.x = x;<br />
&nbsp; &nbsp; fin.y = y;<br />
&nbsp; &nbsp; BFS(); <br />
&nbsp; &nbsp; cout&lt;&lt; dp[fin.x][fin.y] &lt;&lt;endl;<br />
&nbsp; &nbsp; system(&quot;pause&quot;);<br />
&nbsp; &nbsp; return 0;<br />
}</code><hr />
</div> Recursive Algorithm ( not OK )<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">#include &lt;iostream&gt;<br />
#include &lt;stdio.h&gt;<br />
#include &lt;string.h&gt;<br />
#include &lt;algorithm&gt;<br />
#include &lt;vector&gt;<br />
#include &lt;cmath&gt;<br />
#include &lt;queue&gt;<br />
#include &lt;map&gt;<br />
#include &lt;iostream&gt;<br />
#include &lt;string&gt;<br />
#include &lt;stack&gt;<br />
using namespace std;<br />
int n , dp [1000][1000], x, y, xx, yy;<br />
bool mark [1000][1000];<br />
<br />
struct Punto<br />
{<br />
&nbsp; &nbsp; int x;<br />
&nbsp; &nbsp; int y;<br />
};<br />
<br />
Punto inicio, fin , aux;<br />
queue &lt; Punto &gt; lista;<br />
int direcciones[3][2] = { {0,1}, {1,0}, {1,1} }; <br />
<br />
void BFS(Punto aux){<br />
&nbsp; &nbsp; &nbsp; &nbsp; x=aux.x;<br />
&nbsp; &nbsp; &nbsp; &nbsp; y=aux.y;<br />
&nbsp; &nbsp; &nbsp; &nbsp; for(int i=0;i&lt;3;i++){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xx=direcciones[i][0]+x;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; yy=direcciones[i][1]+y;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if( xx&gt;0 &amp;&amp; xx &lt;= n &amp;&amp; yy &gt; 0 &amp;&amp; yy &lt;= n )<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dp[xx][yy] += dp[x][y]; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(!mark[xx][yy])<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; mark[xx][yy] = true; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aux.x = xx;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aux.y = yy;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BFS( aux );<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
}<br />
<br />
int main()<br />
{<br />
&nbsp; &nbsp; cin&gt;&gt;n;<br />
&nbsp; &nbsp; cin&gt;&gt;x&gt;&gt;y;<br />
&nbsp; &nbsp; inicio.x = x;<br />
&nbsp; &nbsp; inicio.y = y;<br />
&nbsp; &nbsp; cin&gt;&gt;x&gt;&gt;y;<br />
&nbsp; &nbsp; fin.x = x;<br />
&nbsp; &nbsp; fin.y = y;<br />
&nbsp;  <br />
&nbsp; &nbsp; dp[ inicio.x ][ inicio.y ] = 1;<br />
&nbsp; &nbsp; BFS(inicio);<br />
&nbsp; <br />
&nbsp; &nbsp; cout&lt;&lt; dp[fin.x][fin.y] &lt;&lt;endl; <br />
&nbsp; &nbsp; system(&quot;pause&quot;);<br />
&nbsp; &nbsp; return 0;<br />
}</code><hr />
</div> I hope its not help that I'm wrong!!!<br />
cronos</div>

 ]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?7-Visual-C-Programming">Visual C++ Programming</category>
			<dc:creator>carburo</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?537133-Problem-in-Algorithm-Recursive</guid>
		</item>
		<item>
			<title>Problem in Algorithm Recursive?</title>
			<link>http://forums.codeguru.com/showthread.php?537131-Problem-in-Algorithm-Recursive&amp;goto=newpost</link>
			<pubDate>Sun, 19 May 2013 23:35:44 GMT</pubDate>
			<description><![CDATA[Hello friends, I have a problem to implement a recursive version of an algorithm that I made, I get different values, I hope you can help me, here are the code so Iterative (OK) and Recursive code form that is not OK.

The data sets do not give equal:

The algorithm is given two source and target positions on a board, find the number of paths between them...

Input Example: 5
2 3
4 4
Output Example:

5



I hope its not help that I'm wrong!!!

Iterative Algorithm ( OK ) 

Code:
---------
#include <iostream>
#include <stdio.h>
#include <cmath>
#include <algorithm>
#include <string.h>
#include <vector>
#include <queue>

using namespace std;
int n , dp [1000][1000], x, y, xx, yy;
bool mark [1000][1000];

struct Punto
{
    int x;
    int y;
};

Punto inicio, fin , aux;
queue < Punto > lista;
int direcciones[3][2] = { {0,1}, {1,0}, {1,1} }; 

void BFS()
{
    lista.push(inicio);
    dp[ inicio.x ][ inicio.y ] = 1;
    while( !lista.empty() )
    {
        aux = lista.front();
        lista.pop();
        x = aux.x;
        y = aux.y;
        for(int i=0 ; i<3 ; i++) 
        {
            xx = direcciones[i][0]+x;
            yy = direcciones[i][1]+y;
            if( xx>0 && xx <= n && yy > 0 && yy <= n ) 
            {
                dp[xx][yy] += dp[x][y]; 
                if(!mark[xx][yy])
                {
                    mark[xx][yy] = true;
                    aux.x = xx;
                    aux.y = yy;
                    lista.push( aux );
                }
            }
        }
    }
}

int main()
{    
    cin>>n;
    cin>>x>>y;
    inicio.x = x;
    inicio.y = y;
    cin>>x>>y;
    fin.x = x;
    fin.y = y;
    BFS(); 
    cout<< dp[fin.x][fin.y] <<endl;
    system("pause");
    return 0;
}
---------
Recursive Algorithm ( not OK )

Code:
---------
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <vector>
#include <cmath>
#include <queue>
#include <map>
#include <iostream>
#include <string>
#include <stack>
using namespace std;
int n , dp [1000][1000], x, y, xx, yy;
bool mark [1000][1000];

struct Punto
{
    int x;
    int y;
};

Punto inicio, fin , aux;
queue < Punto > lista;
int direcciones[3][2] = { {0,1}, {1,0}, {1,1} }; 

void BFS(Punto aux){
	x=aux.x;
	y=aux.y;
	for(int i=0;i<3;i++){
		xx=direcciones[i][0]+x;
		yy=direcciones[i][1]+y;
		if( xx>0 && xx <= n && yy > 0 && yy <= n )
		{
			dp[xx][yy] += dp[x][y]; 
			if(!mark[xx][yy])
			{
				mark[xx][yy] = true; 
				aux.x = xx;
				aux.y = yy;
				BFS( aux );
			}
		}
	}
}

int main()
{
    cin>>n;
    cin>>x>>y;
    inicio.x = x;
    inicio.y = y;
    cin>>x>>y;
    fin.x = x;
    fin.y = y;
   
    dp[ inicio.x ][ inicio.y ] = 1;
    BFS(inicio);
  
    cout<< dp[fin.x][fin.y] <<endl; 
    system("pause");
    return 0;
}
---------
I hope its not help that I'm wrong!!!
cronos]]></description>
			<content:encoded><![CDATA[<div>Hello friends, I have a problem to implement a recursive version of an algorithm that I made, I get different values, I hope you can help me, here are the code so Iterative (OK) and Recursive code form that is not OK.<br />
<br />
The data sets do not give equal:<br />
<br />
The algorithm is given two source and target positions on a board, find the number of paths between them...<br />
<br />
Input Example: 5<br />
2 3<br />
4 4<br />
Output Example:<br />
<br />
5<br />
<br />
<br />
<br />
I hope its not help that I'm wrong!!!<br />
<br />
Iterative Algorithm ( OK ) <br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">#include &lt;iostream&gt;<br />
#include &lt;stdio.h&gt;<br />
#include &lt;cmath&gt;<br />
#include &lt;algorithm&gt;<br />
#include &lt;string.h&gt;<br />
#include &lt;vector&gt;<br />
#include &lt;queue&gt;<br />
<br />
using namespace std;<br />
int n , dp [1000][1000], x, y, xx, yy;<br />
bool mark [1000][1000];<br />
<br />
struct Punto<br />
{<br />
&nbsp; &nbsp; int x;<br />
&nbsp; &nbsp; int y;<br />
};<br />
<br />
Punto inicio, fin , aux;<br />
queue &lt; Punto &gt; lista;<br />
int direcciones[3][2] = { {0,1}, {1,0}, {1,1} }; <br />
<br />
void BFS()<br />
{<br />
&nbsp; &nbsp; lista.push(inicio);<br />
&nbsp; &nbsp; dp[ inicio.x ][ inicio.y ] = 1;<br />
&nbsp; &nbsp; while( !lista.empty() )<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; aux = lista.front();<br />
&nbsp; &nbsp; &nbsp; &nbsp; lista.pop();<br />
&nbsp; &nbsp; &nbsp; &nbsp; x = aux.x;<br />
&nbsp; &nbsp; &nbsp; &nbsp; y = aux.y;<br />
&nbsp; &nbsp; &nbsp; &nbsp; for(int i=0 ; i&lt;3 ; i++) <br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xx = direcciones[i][0]+x;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; yy = direcciones[i][1]+y;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if( xx&gt;0 &amp;&amp; xx &lt;= n &amp;&amp; yy &gt; 0 &amp;&amp; yy &lt;= n ) <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dp[xx][yy] += dp[x][y]; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(!mark[xx][yy])<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mark[xx][yy] = true;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aux.x = xx;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aux.y = yy;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lista.push( aux );<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; }<br />
}<br />
<br />
int main()<br />
{&nbsp; &nbsp; <br />
&nbsp; &nbsp; cin&gt;&gt;n;<br />
&nbsp; &nbsp; cin&gt;&gt;x&gt;&gt;y;<br />
&nbsp; &nbsp; inicio.x = x;<br />
&nbsp; &nbsp; inicio.y = y;<br />
&nbsp; &nbsp; cin&gt;&gt;x&gt;&gt;y;<br />
&nbsp; &nbsp; fin.x = x;<br />
&nbsp; &nbsp; fin.y = y;<br />
&nbsp; &nbsp; BFS(); <br />
&nbsp; &nbsp; cout&lt;&lt; dp[fin.x][fin.y] &lt;&lt;endl;<br />
&nbsp; &nbsp; system(&quot;pause&quot;);<br />
&nbsp; &nbsp; return 0;<br />
}</code><hr />
</div> Recursive Algorithm ( not OK )<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">#include &lt;iostream&gt;<br />
#include &lt;stdio.h&gt;<br />
#include &lt;string.h&gt;<br />
#include &lt;algorithm&gt;<br />
#include &lt;vector&gt;<br />
#include &lt;cmath&gt;<br />
#include &lt;queue&gt;<br />
#include &lt;map&gt;<br />
#include &lt;iostream&gt;<br />
#include &lt;string&gt;<br />
#include &lt;stack&gt;<br />
using namespace std;<br />
int n , dp [1000][1000], x, y, xx, yy;<br />
bool mark [1000][1000];<br />
<br />
struct Punto<br />
{<br />
&nbsp; &nbsp; int x;<br />
&nbsp; &nbsp; int y;<br />
};<br />
<br />
Punto inicio, fin , aux;<br />
queue &lt; Punto &gt; lista;<br />
int direcciones[3][2] = { {0,1}, {1,0}, {1,1} }; <br />
<br />
void BFS(Punto aux){<br />
&nbsp; &nbsp; &nbsp; &nbsp; x=aux.x;<br />
&nbsp; &nbsp; &nbsp; &nbsp; y=aux.y;<br />
&nbsp; &nbsp; &nbsp; &nbsp; for(int i=0;i&lt;3;i++){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xx=direcciones[i][0]+x;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; yy=direcciones[i][1]+y;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if( xx&gt;0 &amp;&amp; xx &lt;= n &amp;&amp; yy &gt; 0 &amp;&amp; yy &lt;= n )<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dp[xx][yy] += dp[x][y]; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(!mark[xx][yy])<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; mark[xx][yy] = true; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aux.x = xx;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aux.y = yy;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BFS( aux );<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
}<br />
<br />
int main()<br />
{<br />
&nbsp; &nbsp; cin&gt;&gt;n;<br />
&nbsp; &nbsp; cin&gt;&gt;x&gt;&gt;y;<br />
&nbsp; &nbsp; inicio.x = x;<br />
&nbsp; &nbsp; inicio.y = y;<br />
&nbsp; &nbsp; cin&gt;&gt;x&gt;&gt;y;<br />
&nbsp; &nbsp; fin.x = x;<br />
&nbsp; &nbsp; fin.y = y;<br />
&nbsp;  <br />
&nbsp; &nbsp; dp[ inicio.x ][ inicio.y ] = 1;<br />
&nbsp; &nbsp; BFS(inicio);<br />
&nbsp; <br />
&nbsp; &nbsp; cout&lt;&lt; dp[fin.x][fin.y] &lt;&lt;endl; <br />
&nbsp; &nbsp; system(&quot;pause&quot;);<br />
&nbsp; &nbsp; return 0;<br />
}</code><hr />
</div> I hope its not help that I'm wrong!!!<br />
cronos</div>

 ]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?9-C-(Non-Visual-C-Issues)">C++  (Non Visual C++ Issues)</category>
			<dc:creator>carburo</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?537131-Problem-in-Algorithm-Recursive</guid>
		</item>
		<item>
			<title>xHTML Need Help on Loading Data in HTML Choose Your Own Adventure Game</title>
			<link>http://forums.codeguru.com/showthread.php?537129-Need-Help-on-Loading-Data-in-HTML-Choose-Your-Own-Adventure-Game&amp;goto=newpost</link>
			<pubDate>Sun, 19 May 2013 21:59:38 GMT</pubDate>
			<description><![CDATA[Well I am trying to make a Choose Your Own Adventure Game in HTML(with JS) and I currently have a save function which works pretty well, you make a character (race, name, and gender), it saves a text file with the race, name and gender written inside the .txt file named "Character_<name>.txt", what I want to do is save the file, then when you hit load it opens a File Input and you search for the file and open it up. <-- That's where I am at.

But I do not know what to do after that... I would like it to read the file and extract the data. Maybe it would be better if it was XML not a text file. But I do not know how to save those files.

So if anyone can help me, you will get a spot in the game's credits when it is done.

P.S. It is going to be a downloaded game, not a Server hosted game, so all the stuff is client side, not server side.]]></description>
			<content:encoded><![CDATA[<div>Well I am trying to make a Choose Your Own Adventure Game in HTML(with JS) and I currently have a save function which works pretty well, you make a character (race, name, and gender), it saves a text file with the race, name and gender written inside the .txt file named &quot;Character_&lt;name&gt;.txt&quot;, what I want to do is save the file, then when you hit load it opens a File Input and you search for the file and open it up. &lt;-- That's where I am at.<br />
<br />
But I do not know what to do after that... I would like it to read the file and extract the data. Maybe it would be better if it was XML not a text file. But I do not know how to save those files.<br />
<br />
So if anyone can help me, you will get a spot in the game's credits when it is done.<br />
<br />
P.S. It is going to be a downloaded game, not a Server hosted game, so all the stuff is client side, not server side.</div>

 ]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?8-Scripting-Client-Side">Scripting - Client Side</category>
			<dc:creator>RickChavez</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?537129-Need-Help-on-Loading-Data-in-HTML-Choose-Your-Own-Adventure-Game</guid>
		</item>
		<item>
			<title>handle list of data an fast search</title>
			<link>http://forums.codeguru.com/showthread.php?537127-handle-list-of-data-an-fast-search&amp;goto=newpost</link>
			<pubDate>Sun, 19 May 2013 20:01:13 GMT</pubDate>
			<description><![CDATA[i want to create some data structure that will amount of 20K xml.
xml structure will be of type :
<XML><GUID>fcf2664e-d641-48a7-a1aa-2e8fef5145e6</GUID><DATA>.....</DATA><XML>
<XML><GUID>62040b2d-52a4-4ce0-814f-ff5530dde6fc</GUID><DATA>.....</DATA><XML>
and so on...
i want to achive 2 things:
1) i want to remove xml after XX minutes (xx will be general number for all the XML)
2) i want to search  over the structure and find the xml by its GUID.

whats the best way to implement this?]]></description>
			<content:encoded><![CDATA[<div>i want to create some data structure that will amount of 20K xml.<br />
xml structure will be of type :<br />
&lt;XML&gt;&lt;GUID&gt;fcf2664e-d641-48a7-a1aa-2e8fef5145e6&lt;/GUID&gt;&lt;DATA&gt;.....&lt;/DATA&gt;&lt;XML&gt;<br />
&lt;XML&gt;&lt;GUID&gt;62040b2d-52a4-4ce0-814f-ff5530dde6fc&lt;/GUID&gt;&lt;DATA&gt;.....&lt;/DATA&gt;&lt;XML&gt;<br />
and so on...<br />
i want to achive 2 things:<br />
1) i want to remove xml after XX minutes (xx will be general number for all the XML)<br />
2) i want to search  over the structure and find the xml by its GUID.<br />
<br />
whats the best way to implement this?</div>

 ]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?11-C-Sharp-Programming">C-Sharp Programming</category>
			<dc:creator>wanttolearn1</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?537127-handle-list-of-data-an-fast-search</guid>
		</item>
		<item>
			<title>I need Help with my hangman game</title>
			<link>http://forums.codeguru.com/showthread.php?537123-I-need-Help-with-my-hangman-game&amp;goto=newpost</link>
			<pubDate>Sun, 19 May 2013 18:48:50 GMT</pubDate>
			<description><![CDATA[Hello! I'm trying to do a hangman game, 
I loaded words from a file (using std::ifstream) onto a std::vector<std::string>, and use a prng rand() to choose a random string.

What I'm planning to do next is to construct a std::vector<std::pair<char, bool>> from the string, intepreting the boolean as whether the character was correctly guessed. print it out as a series of X if the char is not guessed.
But i'm not sure how to do it..

Code:
---------
#include <iostream>
#include <fstream>
#include <string>
#include <cstdlib>
#include <vector>
#include <ctime>
using namespace std;

class hello
{
public:
hello();

void output();

private:
double list[23];
int size;

string guesses;
string letters;
string wordletters;
};
void hello::output()	
{	
cout<<"Hello"<<endl;	
} 

hello::hello():size(0)
{
}

int main()
{

ifstream qFile("Words.txt");
string qWord;
std::srand(std::time(0));

std::vector<string> words;
while(qFile >> qWord) {
words.push_back(qWord);
}
unsigned index = std::rand() % words.size();
std::cout << words[index];

system("pause");
}
---------
]]></description>
			<content:encoded><![CDATA[<div>Hello! I'm trying to do a hangman game, <br />
I loaded words from a file (using std::ifstream) onto a std::vector&lt;std::string&gt;, and use a prng rand() to choose a random string.<br />
<br />
What I'm planning to do next is to construct a std::vector&lt;std::pair&lt;char, bool&gt;&gt; from the string, intepreting the boolean as whether the character was correctly guessed. print it out as a series of X if the char is not guessed.<br />
But i'm not sure how to do it..<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">#include &lt;iostream&gt;<br />
#include &lt;fstream&gt;<br />
#include &lt;string&gt;<br />
#include &lt;cstdlib&gt;<br />
#include &lt;vector&gt;<br />
#include &lt;ctime&gt;<br />
using namespace std;<br />
<br />
class hello<br />
{<br />
public:<br />
hello();<br />
<br />
void output();<br />
<br />
private:<br />
double list[23];<br />
int size;<br />
<br />
string guesses;<br />
string letters;<br />
string wordletters;<br />
};<br />
void hello::output()&nbsp; &nbsp; &nbsp; &nbsp; <br />
{&nbsp; &nbsp; &nbsp; &nbsp; <br />
cout&lt;&lt;&quot;Hello&quot;&lt;&lt;endl;&nbsp; &nbsp; &nbsp; &nbsp; <br />
} <br />
<br />
hello::hello():size(0)<br />
{<br />
}<br />
<br />
int main()<br />
{<br />
<br />
ifstream qFile(&quot;Words.txt&quot;);<br />
string qWord;<br />
std::srand(std::time(0));<br />
<br />
std::vector&lt;string&gt; words;<br />
while(qFile &gt;&gt; qWord) {<br />
words.push_back(qWord);<br />
}<br />
unsigned index = std::rand() % words.size();<br />
std::cout &lt;&lt; words[index];<br />
<br />
system(&quot;pause&quot;);<br />
}</code><hr />
</div> </div>

 ]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?7-Visual-C-Programming">Visual C++ Programming</category>
			<dc:creator>frozen1337</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?537123-I-need-Help-with-my-hangman-game</guid>
		</item>
		<item>
			<title>Failed to execute box appears in SDK</title>
			<link>http://forums.codeguru.com/showthread.php?537121-Failed-to-execute-box-appears-in-SDK&amp;goto=newpost</link>
			<pubDate>Sun, 19 May 2013 18:22:17 GMT</pubDate>
			<description>when i click the sdk manager a box appears that says Failed to execute.bat: error 2 the system cannot find the file specified.What can i do to fix this error. Thank You</description>
			<content:encoded><![CDATA[<div>when i click the sdk manager a box appears that says Failed to execute.bat: error 2 the system cannot find the file specified.What can i do to fix this error. Thank You</div>

 ]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?19-General-Developer-Topics">General Developer Topics</category>
			<dc:creator>j_smith882</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?537121-Failed-to-execute-box-appears-in-SDK</guid>
		</item>
		<item>
			<title>Having issues with SDK setup</title>
			<link>http://forums.codeguru.com/showthread.php?537117-Having-issues-with-SDK-setup&amp;goto=newpost</link>
			<pubDate>Sun, 19 May 2013 16:56:47 GMT</pubDate>
			<description><![CDATA[Im in eclipse and im trying to open a new Android Project, but i don't see the expand Android name. I downloaded the sdk as  third party but i don't think that has anything todo with the android sdk. Can someone tell me what im doing wrong. Thank You]]></description>
			<content:encoded><![CDATA[<div>Im in eclipse and im trying to open a new Android Project, but i don't see the expand Android name. I downloaded the sdk as  third party but i don't think that has anything todo with the android sdk. Can someone tell me what im doing wrong. Thank You</div>

 ]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?19-General-Developer-Topics">General Developer Topics</category>
			<dc:creator>j_smith882</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?537117-Having-issues-with-SDK-setup</guid>
		</item>
		<item>
			<title>Help connecting java GUI to dabase</title>
			<link>http://forums.codeguru.com/showthread.php?537115-Help-connecting-java-GUI-to-dabase&amp;goto=newpost</link>
			<pubDate>Sun, 19 May 2013 16:36:57 GMT</pubDate>
			<description><![CDATA[hello everyone,
I have a school project and I have no ideea where to start. I am a begginer and I need help understanding some things. The reason I am asking is because I can`t seem to find a straight answer to my problem no matter where I search for. Maybe I am asking the wrong question so I will try to describe my problem.

What I need to do is, to connect a java program to a database ( mysql ), and via GUI to display some records from a table. 

Now, the table I am trying to display will be called "Flights", and has the next rows: "FlightiD","departure","destination","departureTime","arrivalTime","status", 

The ideea is. that I need 2 GUI`s "Arrivals" and "Departures" that both take data from the table, and another one that allows me to modify the data into the table. Where do I find such a tutorial to help me do this? Is it possible for someone to show me pieces of code that will help me do this? How do I connect my java program to the database?

Of course the "Flights" table has data from other tables (company, Airport ).

I know it`s much to ask, but I need to start from somewhere and all the java tutorials I read and leaned, didn`t show me much about how I can do this. 
Thank you for your help!]]></description>
			<content:encoded><![CDATA[<div>hello everyone,<br />
I have a school project and I have no ideea where to start. I am a begginer and I need help understanding some things. The reason I am asking is because I can`t seem to find a straight answer to my problem no matter where I search for. Maybe I am asking the wrong question so I will try to describe my problem.<br />
<br />
What I need to do is, to connect a java program to a database ( mysql ), and via GUI to display some records from a table. <br />
<br />
Now, the table I am trying to display will be called &quot;Flights&quot;, and has the next rows: &quot;FlightiD&quot;,&quot;departure&quot;,&quot;destination&quot;,&quot;departureTime&quot;,&quot;arrivalTime&quot;,&quot;status&quot;, <br />
<br />
The ideea is. that I need 2 GUI`s &quot;Arrivals&quot; and &quot;Departures&quot; that both take data from the table, and another one that allows me to modify the data into the table. Where do I find such a tutorial to help me do this? Is it possible for someone to show me pieces of code that will help me do this? How do I connect my java program to the database?<br />
<br />
Of course the &quot;Flights&quot; table has data from other tables (company, Airport ).<br />
<br />
I know it`s much to ask, but I need to start from somewhere and all the java tutorials I read and leaned, didn`t show me much about how I can do this. <br />
Thank you for your help!</div>

 ]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?5-Java-Programming">Java Programming</category>
			<dc:creator>Smashw</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?537115-Help-connecting-java-GUI-to-dabase</guid>
		</item>
		<item>
			<title>Would like to know what location do people normally use for deploying .XML files</title>
			<link>http://forums.codeguru.com/showthread.php?537113-Would-like-to-know-what-location-do-people-normally-use-for-deploying-.XML-files&amp;goto=newpost</link>
			<pubDate>Sun, 19 May 2013 16:32:29 GMT</pubDate>
			<description><![CDATA[Currently I have used as part of my solution an XML file which I have created on my local machine using a location path which I hard coded in my program based on (i.e. I am copying as a hardcoded string) the location that Visual Studio automatically gave it (I added the XML file by right clicking the project name from VS and then selected add new item XML and VS automatically gave it a location)... 

This location path works nicely when reading the .XML file from my local machine where VS automatically chose the folder path from. The problem that I can see potentially would show itself once I deploy the app is that the deploy environment most probably wont have the same location path as my computer. I can imagine a good location for it but would really like to hear from people who actually have experience deploying XML files. 

I do not want to create the XML on the fly owing to certain complexities in the file. So where should I put it so that I am guaranteed to find it on deploy .. I am sure people with more experience know exactly where it should go .. thanks in advance for all the help it's much appreciated]]></description>
			<content:encoded><![CDATA[<div>Currently I have used as part of my solution an XML file which I have created on my local machine using a location path which I hard coded in my program based on (i.e. I am copying as a hardcoded string) the location that Visual Studio automatically gave it (I added the XML file by right clicking the project name from VS and then selected add new item XML and VS automatically gave it a location)... <br />
<br />
This location path works nicely when reading the .XML file from my local machine where VS automatically chose the folder path from. The problem that I can see potentially would show itself once I deploy the app is that the deploy environment most probably wont have the same location path as my computer. I can imagine a good location for it but would really like to hear from people who actually have experience deploying XML files. <br />
<br />
I do not want to create the XML on the fly owing to certain complexities in the file. So where should I put it so that I am guaranteed to find it on deploy .. I am sure people with more experience know exactly where it should go .. thanks in advance for all the help it's much appreciated</div>

 ]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?11-C-Sharp-Programming">C-Sharp Programming</category>
			<dc:creator>matt_1ca</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?537113-Would-like-to-know-what-location-do-people-normally-use-for-deploying-.XML-files</guid>
		</item>
		<item>
			<title>Bresenham algorithm</title>
			<link>http://forums.codeguru.com/showthread.php?537111-Bresenham-algorithm&amp;goto=newpost</link>
			<pubDate>Sun, 19 May 2013 14:11:55 GMT</pubDate>
			<description><![CDATA[I use bresenhams line algorithm to draw a line.Sometimes when the slope is close to 0.5 the line isn't drawing correctly.Some parts of the line are thicker than other or the line that is drawn looks like a triangle.The following code is for the first and fourth octant.
Why this is happening?

Code:
---------

public void	draw_line(Graphics g,int x1,int y1,int xn,int yn)
	{
		int error,dx,dy,y,x;
		
	

		dx=xn-x1;
		dy=yn-y1;
		
		y=y1;
		x=x1;
		//the octant of the line
		if(slope==1||slope==4)
		{
			error=-dx/2;
		for( x=x1;x<=xn;x++)
		{  
			PutPixel(g,x,y);
			error=error+dy;
		if(error>=0)
		{y++;
		error=error-dx;}}}
---------
]]></description>
			<content:encoded><![CDATA[<div>I use bresenhams line algorithm to draw a line.Sometimes when the slope is close to 0.5 the line isn't drawing correctly.Some parts of the line are thicker than other or the line that is drawn looks like a triangle.The following code is for the first and fourth octant.<br />
Why this is happening?<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code"><br />
public void&nbsp; &nbsp; &nbsp; &nbsp; draw_line(Graphics g,int x1,int y1,int xn,int yn)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int error,dx,dy,y,x;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dx=xn-x1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dy=yn-y1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; y=y1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; x=x1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //the octant of the line<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(slope==1||slope==4)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; error=-dx/2;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for( x=x1;x&lt;=xn;x++)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {&nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PutPixel(g,x,y);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; error=error+dy;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(error&gt;=0)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {y++;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; error=error-dx;}}}</code><hr />
</div> </div>

 ]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?5-Java-Programming">Java Programming</category>
			<dc:creator>killbill689</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?537111-Bresenham-algorithm</guid>
		</item>
		<item>
			<title>Search C++ programmer.</title>
			<link>http://forums.codeguru.com/showthread.php?537107-Search-C-programmer.&amp;goto=newpost</link>
			<pubDate>Sun, 19 May 2013 13:01:17 GMT</pubDate>
			<description><![CDATA[Hi, I create Dragon Ball OTS Game Project and I search a programmer to my project. I create my project with my brother and we are looking for programmer C++ that would be rewrite interface in my game client. We use an alternative tibia client. I'm not creating this game to earn money.]]></description>
			<content:encoded><![CDATA[<div>Hi, I create Dragon Ball OTS Game Project and I search a programmer to my project. I create my project with my brother and we are looking for programmer C++ that would be rewrite interface in my game client. We use an alternative tibia client. I'm not creating this game to earn money.</div>

 ]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?33-Open-Positions-(Jobs)">Open Positions (Jobs)</category>
			<dc:creator>Zaaku</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?537107-Search-C-programmer.</guid>
		</item>
		<item>
			<title>JSON undefined in my webbrowser container</title>
			<link>http://forums.codeguru.com/showthread.php?537105-JSON-undefined-in-my-webbrowser-container&amp;goto=newpost</link>
			<pubDate>Sun, 19 May 2013 10:56:27 GMT</pubDate>
			<description>Hi all,
I create an IWebBrowser2* object and attached it to new window.
I create also a simple html page containing JScript alert(JSON) command.
when i load the page from IE the page works fine.
but when i load the page from my object i get JSON undefined.
do i nead to set my object with some setting?</description>
			<content:encoded><![CDATA[<div>Hi all,<br />
I create an IWebBrowser2* object and attached it to new window.<br />
I create also a simple html page containing JScript alert(JSON) command.<br />
when i load the page from IE the page works fine.<br />
but when i load the page from my object i get JSON undefined.<br />
do i nead to set my object with some setting?</div>

 ]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?7-Visual-C-Programming">Visual C++ Programming</category>
			<dc:creator>evilGil</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?537105-JSON-undefined-in-my-webbrowser-container</guid>
		</item>
		<item>
			<title>Quick Find window size</title>
			<link>http://forums.codeguru.com/showthread.php?537103-Quick-Find-window-size&amp;goto=newpost</link>
			<pubDate>Sun, 19 May 2013 04:19:58 GMT</pubDate>
			<description><![CDATA[Visual C++ forum,

 Somehow I have expanded the "quick find" window in visual c++ 2010 and
 can't figure out how to restore it to the original size.

 Any suggestions?

Jerryd]]></description>
			<content:encoded><![CDATA[<div>Visual C++ forum,<br />
<br />
 Somehow I have expanded the &quot;quick find&quot; window in visual c++ 2010 and<br />
 can't figure out how to restore it to the original size.<br />
<br />
 Any suggestions?<br />
<br />
Jerryd</div>

 ]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?7-Visual-C-Programming">Visual C++ Programming</category>
			<dc:creator>jerry_d</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?537103-Quick-Find-window-size</guid>
		</item>
		<item>
			<title>Midi driver?</title>
			<link>http://forums.codeguru.com/showthread.php?537101-Midi-driver&amp;goto=newpost</link>
			<pubDate>Sun, 19 May 2013 01:32:29 GMT</pubDate>
			<description><![CDATA[I recently purchased a laptop with WINDOWS 8.
I have a program that gets .MID or .MIDI file volume.
midiOutGetVolume(0,&midvolme);
But I get MMSYSERROR_NODRIVER.
I run a program called driverdetective.
But I still can not get any MIDI drivers.

How do I get midi drivers on my 64 bit laptop with WINDOWS 8?]]></description>
			<content:encoded><![CDATA[<div>I recently purchased a laptop with WINDOWS 8.<br />
I have a program that gets .MID or .MIDI file volume.<br />
midiOutGetVolume(0,&amp;midvolme);<br />
But I get MMSYSERROR_NODRIVER.<br />
I run a program called driverdetective.<br />
But I still can not get any MIDI drivers.<br />
<br />
How do I get midi drivers on my 64 bit laptop with WINDOWS 8?</div>

 ]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?68-Driver-Development">Driver Development</category>
			<dc:creator>ROCKYCAT</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?537101-Midi-driver</guid>
		</item>
	</channel>
</rss>
