<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Yet another Python blog</title>
	<atom:link href="https://www.tarral.net/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>https://www.tarral.net</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Sat, 02 Jul 2016 18:58:58 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.39</generator>
	<item>
		<title>Android – Final project COMP 3617 &#8211; Struggles</title>
		<link>https://www.tarral.net/?p=128</link>
		<comments>https://www.tarral.net/?p=128#comments</comments>
		<pubDate>Sat, 02 Jul 2016 18:58:58 +0000</pubDate>
		<dc:creator><![CDATA[nick]]></dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.tarral.net/?p=128</guid>
		<description><![CDATA[Yesterday and the day before i worked on my app, to display in the listView the following items: title, event date and the picture of the event. the things that i dislike is that the download the picture if each event , took place in the EventListAdapter, and reload everything when i switch tab from [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Yesterday and the day before i worked on my app, to display in the listView the following items:</p>
<p>title, event date and the picture of the event.</p>
<p>the things that i dislike is that the download the picture if each event , took place in the EventListAdapter, and reload everything when i switch tab from music to event, even the pictures.</p>
<p>so the mainactivity of the App where looking in the main url : http://www.straight.com/listings/events</p>
<p><a href="http://www.tarral.net/wp-content/uploads/2016/07/Capture.png"><img class="alignnone size-medium wp-image-129" src="http://www.tarral.net/wp-content/uploads/2016/07/Capture-300x176.png" alt="Capture" width="300" height="176" /></a></p>
<p>and would use the html tag element to grab the title. dates and the picture&#8217;s url, as well as the url for each events represented like this : /listings/events/723706</p>
<p>then store everything in a Event object.</p>
<p>then the EventListAdadpter will get the Event object and use titl and date but also download image of the event.</p>
<p>clicking on that link will bring up details of the event with description of the event :</p>
<p><a href="http://www.tarral.net/wp-content/uploads/2016/07/Capture_event.png"><img class="alignnone size-medium wp-image-130" src="http://www.tarral.net/wp-content/uploads/2016/07/Capture_event-300x178.png" alt="Capture_event" width="300" height="178" /></a></p>
<p>this page contains further informations , like the event description, <span style="line-height: 1.5;">the location, that i will need to display (with the date, title, picture  as well)by tapping on one of the event in the listView.</span></p>
<p>The listAdapter was very slow and struggling to display the picture fast enough, even if those pictures where pretty slow.</p>
<p>So i took an another approch, that will be to load all the Events details in one shot.</p>
<p>Here is the step i did followed :</p>
<p>Step 1 &#8211; Download the http://www.straight.com/listings/events index.html (using a Thread) and it will return a String with all the HTML data.</p>
<p>Step 2 &#8211; Parse this String object to find the link of each Music and art event (eg : /listings/events/723706) and store them in 2 String array one for music and one for arts.</p>
<p>Step 3 &#8211; go on each String array and download the HTML data of each events and store the data in String array for Musics and arts, so now i have every Event complete informations.</p>
<p>Ste 4 &#8211; for each String Array Event html data i will invoke a Method to parse and get me the following : title, date, location, full description, imglink and create an array of event object for music and one for art.</p>
<p>step 5 &#8211; in that step i am going to download each image of the event, store and name them (title event) in the device memory, the save method is going to return me the full path name that i will store in each object event.</p>
<p>step 6 &#8211; i am going to add those Event object in my SQlite database.</p>
<p>The project has been tested on a simple Mainactivity application, that display the images in the main Layout, i am going to post it on bitbucket :</p>
<p><a href="https://bitbucket.org/ntarral/websitegetimages">https://bitbucket.org/ntarral/websitegetimages</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.tarral.net/?feed=rss2&#038;p=128</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android &#8211; Final project COMP 3617 &#8211; PART 2</title>
		<link>https://www.tarral.net/?p=122</link>
		<comments>https://www.tarral.net/?p=122#comments</comments>
		<pubDate>Tue, 28 Jun 2016 04:07:24 +0000</pubDate>
		<dc:creator><![CDATA[nick]]></dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.tarral.net/?p=122</guid>
		<description><![CDATA[I have a fews things that needs to be put in place :L First  : the UI that will be  2 tabs that will display the Arts and Musics event list: a little picture the title and the date. i will use for that 2 fragments and inside each fragment i am using a ListView. [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I have a fews things that needs to be put in place :L</p>
<p>First  : the UI that will be  2 tabs that will display the Arts and Musics event list:</p>
<p>a little picture the title and the date.</p>
<p>i will use for that 2 fragments and inside each fragment i am using a ListView.</p>
<p>if we click on one of the item in the list it will display a new activity with further details.</p>
<p>second :</p>
<p>i will have to implement the core function of the app, that will consist of a web parser that will use the event url.</p>
<p>I started with the UI :</p>
<p><a href="http://www.tarral.net/wp-content/uploads/2016/06/Screenshot_20160627-204009.png"><img class="alignnone  wp-image-123" src="http://www.tarral.net/wp-content/uploads/2016/06/Screenshot_20160627-204009-169x300.png" alt="Screenshot_20160627-204009" width="281" height="499" /></a></p>
<p>&nbsp;</p>
<p>So far this is a first quick presentation and there is 2 tabs each tabs have a fragment , in that fragment currently selectioned, we have a LisView with 4 view, i am actually using a list View adapter to build the listView and each view is customized.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.tarral.net/?feed=rss2&#038;p=122</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android &#8211; Final project COMP 3617</title>
		<link>https://www.tarral.net/?p=119</link>
		<comments>https://www.tarral.net/?p=119#comments</comments>
		<pubDate>Tue, 28 Jun 2016 03:33:21 +0000</pubDate>
		<dc:creator><![CDATA[nick]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.tarral.net/?p=119</guid>
		<description><![CDATA[COMP 3617 needs to be validated by a  final project, that need to be presented to the class, for the last session. Here is the pitch : Motivation : I like to visit the Georgia straight new paper on my smartphone to check for the latest events and have time to see them. I find [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>COMP 3617 needs to be validated by a  final project, that need to be presented to the class, for the last session.</p>
<p>Here is the pitch :</p>
<p>Motivation :</p>
<p>I like to visit the Georgia straight new paper on my smartphone to check for the latest events and have time to see them.</p>
<p>I find out the website to be a little heavy in order to access the information I just need.</p>
<p>The purpose of this application will be to display the<strong> just</strong> <strong>announced </strong>events which are under the URL :</p>
<p>http:// <a href="http://www.straight.com/listings/events" target="_blank" rel="noreferrer">http://www.straight.com/listings/events</a></p>
<p><a href="http://www.tarral.net/wp-content/uploads/2016/06/georgia.png"><img class="alignnone size-medium wp-image-120" src="http://www.tarral.net/wp-content/uploads/2016/06/georgia-300x259.png" alt="georgia" width="300" height="259" /></a></p>
<p>I can choose to display the Music events  or arts event from the Georgia straight Journal.</p>
<p>Clicking on one of the event shows the details of the show with the Image, the location the date, the price and the full description.</p>
<p>Implementations :</p>
<p>The main activity will display a list View with 2 tab , one tab will display the music events and the other to display the arts events.</p>
<p>It will display those events with the title, the image, and the date.</p>
<p>Clicking on one of the item in the listView , will display a second Activity called EventActivity</p>
<p>EventActivity :</p>
<p>Displaying further details of the event.</p>
<p>Display the picture, the date of the show, the event’s location, the price and also a short description.</p>
<p>There will be options to set up the event on the calendar or to share it by email.</p>
<p>In order to get the information’s from the website I could choose to use the news feeds or to try to GET the webpage and parse the HTML, I find out than the news feeds might not have the <strong>just announced</strong> events.</p>
<p>I will also implement a preference menu to choose to display the images or not in the Main Activity, and also an another CheckBoxPreference to choose to display only the week end events.</p>
<p>Every time the application opens, the Main activity will load the events from the website, which depends on the users Preferences, there will be a refresh button to refresh those events.</p>
<p>Further implementation :</p>
<p>If I have the time I can choose to show the event’s address on a map with a button in the EventActivity.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.tarral.net/?feed=rss2&#038;p=119</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>servlet doGet /doPost</title>
		<link>https://www.tarral.net/?p=77</link>
		<comments>https://www.tarral.net/?p=77#comments</comments>
		<pubDate>Wed, 17 Feb 2016 07:03:30 +0000</pubDate>
		<dc:creator><![CDATA[nick]]></dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.tarral.net/?p=77</guid>
		<description><![CDATA[there is a method to get the launch the doGet method servlet when we start the server on eclipse or when we access the server. there is a JSP page which is in charge to display all the details given by a database. we must load the database before launching the JSP and displaying the [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>there is a method to get the launch the doGet method servlet when we start the server on eclipse or when we access the server.<br />
there is a JSP page which is in charge to display all the details given by a database.<br />
we must load the database before launching the JSP and displaying the date.</p>
<p>all the magic happen in the web.xml configuration file :</p>
<p>================================================================================================================================================================</p>
<p>&nbsp;</p>
<p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&gt;<br />
&lt;web-app xmlns:xsi=&#8221;http://www.w3.org/2001/XMLSchema-instance&#8221; xmlns=&#8221;http://java.sun.com/xml/ns/javaee&#8221; xsi:schemaLocation=&#8221;http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd&#8221; version=&#8221;3.0&#8243;&gt;<br />
&lt;display-name&gt;Lab03_Project&lt;/display-name&gt;</p>
<p>&lt;context-param&gt;<br />
&lt;param-name&gt;instruction&lt;/param-name&gt;<br />
&lt;param-value&gt;<br />
Please enter a temperature to convert.<br />
&lt;/param-value&gt;<br />
&lt;/context-param&gt;</p>
<p>&lt;servlet&gt;<br />
&lt;servlet-name&gt;Driver&lt;/servlet-name&gt;<br />
&lt;servlet-class&gt;a00805231.assignment1.Driver&lt;/servlet-class&gt;<br />
&lt;/servlet&gt;</p>
<p>&lt;servlet-mapping&gt;<br />
&lt;servlet-name&gt;Driver&lt;/servlet-name&gt;<br />
&lt;url-pattern&gt;/assignment1&lt;/url-pattern&gt;<br />
&lt;/servlet-mapping&gt;</p>
<p>&lt;welcome-file-list&gt;<br />
&lt;welcome-file&gt;assignment1&lt;/welcome-file&gt;<br />
&lt;/welcome-file-list&gt;<br />
&lt;/web-app&gt;</p>
<p>we have to get the serlvet name Driver and the access to the Main class called Driver as well.<br />
there is a server mapping which is going to map the url assignment1 to the servlet name.</p>
<p>then there is the welcome file before it was my main JSP page called index.jsp so the server were launching this page by default then skipping the doGet method which load the DB(this need to be fixed later to implement this inside the init method of the servlet.<br />
here we choose to provide the url-pattern called assignment1 which is going to launch the servelet main class and the doGet by default.</p>
<p>This is a remionder for me in case i need this later.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.tarral.net/?feed=rss2&#038;p=77</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>COMP-2613 RaodMap</title>
		<link>https://www.tarral.net/?p=62</link>
		<comments>https://www.tarral.net/?p=62#comments</comments>
		<pubDate>Sun, 11 Oct 2015 04:46:54 +0000</pubDate>
		<dc:creator><![CDATA[nick]]></dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.tarral.net/?p=62</guid>
		<description><![CDATA[COMP-2613 Week Outcome/Material Covered Assignment Note! The topics below have links to the Java Tutorial. You are expected to read the material each week. 0 The following is covered in the prerequisites and you are expected t know this material: About the Java Technology Object-Oriented Programming Concepts Language Basics Classes, Objects, &#38; More on Classes [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><code>COMP-2613</code></p>
<table>
<thead>
<tr>
<td>
<div>Week</div>
</td>
<td>
<div>Outcome/Material Covered</div>
</td>
<td>
<div>Assignment</div>
</td>
</tr>
<tr>
<td colspan="3">
<div><i>Note! The topics below have links to the Java Tutorial. You are expected to read the material each week</i>.</div>
</td>
</tr>
</thead>
<tbody>
<tr>
<td valign="top">
<div>0</div>
</td>
<td valign="top">
<div>The following is covered in the prerequisites and you are expected t know this material:</div>
<div><a href="http://docs.oracle.com/javase/tutorial/getStarted/intro/definition.html">About the Java Technology</a><br />
<a href="http://docs.oracle.com/javase/tutorial/java/concepts/index.html">Object-Oriented Programming Concepts</a></div>
<div><a href="http://docs.oracle.com/javase/tutorial/java/nutsandbolts/index.html">Language Basics</a></div>
<div><a href="http://docs.oracle.com/javase/tutorial/java/javaOO/classes.html">Classes</a>, <a href="http://docs.oracle.com/javase/tutorial/java/javaOO/objects.html">Objects</a>, &amp; <a href="http://docs.oracle.com/javase/tutorial/java/javaOO/more.html">More on Classes</a></div>
<div><a href="http://docs.oracle.com/javase/tutorial/java/IandI/index.html">Interfaces and Inheritance</a></div>
</td>
</tr>
<tr>
<td valign="top">
<div>1</div>
</td>
<td valign="top">
<div>The eclipse Integrated Development Environment</div>
<div><a href="http://docs.oracle.com/javase/tutorial/essential/environment/cmdLineArgs.html">main args &amp; CommandLine</a></div>
<div><a href="http://docs.oracle.com/javase/tutorial/java/package/index.html">Packages</a></div>
</td>
<td valign="top">
<div>Lab 1</div>
</td>
</tr>
<tr>
<td valign="top">
<div>2</div>
</td>
<td valign="top">
<div>Core Classes – <a href="http://docs.oracle.com/javase/tutorial/java/data/index.html">Numbers &amp; Strings</a></div>
<div><a href="http://docs.oracle.com/javase/tutorial/deployment/jar/basicsindex.html">Jar file basics</a></div>
<div>Debugging</div>
</td>
<td valign="top">
<div>Lab 2</div>
</td>
</tr>
<tr>
<td valign="top">
<div>3</div>
</td>
<td valign="top">
<div><a href="http://docs.oracle.com/javase/tutorial/java/annotations/">Annotations</a><br />
<a href="http://docs.oracle.com/javase/tutorial/java/javaOO/enum.html">Enums</a><br />
<a href="http://docs.oracle.com/javase/tutorial/essential/exceptions/">Exceptions</a></div>
</td>
<td valign="top">
<div>Quiz 1<br />
Lab 3</div>
</td>
</tr>
<tr>
<td valign="top">
<div>4</div>
</td>
<td valign="top">
<div><a href="http://docs.oracle.com/javase/tutorial/java/generics/index.html">Generics</a> [up to <a href="http://docs.oracle.com/javase/tutorial/java/generics/index.html">Generic Methods</a>]<br />
Collections &#8211; <a href="http://docs.oracle.com/javase/tutorial/collections/intro/index.html">Introduction</a>, <a href="http://docs.oracle.com/javase/tutorial/collections/interfaces/index.html">Interfaces</a> &amp; <a href="http://docs.oracle.com/javase/tutorial/collections/implementations/index.html">Implementations</a><br />
<a href="http://docs.oracle.com/javase/tutorial/collections/algorithms/index.html#sorting">Sorting</a></div>
</td>
<td valign="top">
<div>Lab 4</div>
</td>
</tr>
<tr>
<td valign="top">
<div>5</div>
</td>
<td valign="top">
<div><a href="http://docs.oracle.com/javase/tutorial/essential/io/index.html">File IO</a><br />
<a href="http://docs.oracle.com/javase/tutorial/essential/environment/properties.html">Properties</a><br />
<a href="http://www.dzone.com/tutorials/java/log4j/log4j-tutorial/log4j-tutorial.html">Logging using Log4j</a></div>
</td>
<td valign="top">
<div>Quiz 2<br />
Lab 5</div>
</td>
</tr>
<tr>
<td valign="top">
<div>6</div>
</td>
<td valign="top">
<div>Midterm Exam (1 hour)</div>
<div>Assignment Q &amp; A</div>
</td>
<td>
<div>Assignment 1 due before session 7</div>
</td>
</tr>
<tr>
<td valign="top">
<div>7</div>
</td>
<td valign="top">
<div><a href="http://docs.oracle.com/javase/tutorial/jdbc/index.html">Java Database Programming</a></div>
</td>
<td valign="top">
<div>Lab 7</div>
</td>
</tr>
<tr>
<td colspan="3" valign="top">
<div><b>NOTE:</b> Course Withdrawal Deadline</div>
<div><i>Please inform your instructor that you are dropping this course. </i>You must also fill out and submit the<b> &#8216;REQUEST TO WITHDRAW FROM A PART-TIME STUDIES COURSE&#8217;</b> before week 8 or else you will receive a failing grade on your academic record.</div>
<div></div>
<div></div>
</td>
</tr>
<tr>
<td valign="top">
<div>8</div>
</td>
<td valign="top">
<div><a href="https://docs.oracle.com/javase/tutorial/essential/concurrency/index.html">Concurrency</a></div>
<div>(read up to <a href="https://docs.oracle.com/javase/tutorial/essential/concurrency/guardmeth.html">Guarded Blocks</a>)</div>
</td>
<td valign="top">
<div>Lab 8</div>
</td>
</tr>
<tr>
<td valign="top">
<div>9</div>
</td>
<td valign="top">
<div>User Interfaces with Swing</div>
<div><a href="http://docs.oracle.com/javase/tutorial/uiswing/start/compile.html">Compiling and Running Swing Programs</a></div>
<div><a href="http://docs.oracle.com/javase/tutorial/java/javaOO/nested.html">Nested classes</a></div>
<div><a href="http://docs.oracle.com/javase/tutorial/uiswing/events/index.html">Events</a></div>
</td>
<td valign="top">
<div>Lab 9</div>
<div>Quiz 3</div>
</td>
</tr>
<tr>
<td valign="top">
<div>10</div>
</td>
<td valign="top">
<div>Design patterns featuring <a href="http://www.oracle.com/technetwork/articles/javase/index-142890.html">Model-view-Controller</a></div>
</td>
<td valign="top">
<div>Lab 10</div>
<div>Assignment 2 due before session 11</div>
</td>
</tr>
<tr>
<td valign="top">
<div>11</div>
</td>
<td valign="top">
<div><a href="http://docs.oracle.com/javase/tutorial/networking/index.html">Network Programming</a></div>
</td>
<td valign="top">
<div>Quiz 4</div>
</td>
</tr>
<tr>
<td valign="top">
<div>12</div>
</td>
<td valign="top">
<div>Final Exam</div>
</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>https://www.tarral.net/?feed=rss2&#038;p=62</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>deferencer pointeur en C</title>
		<link>https://www.tarral.net/?p=36</link>
		<comments>https://www.tarral.net/?p=36#comments</comments>
		<pubDate>Sun, 28 Sep 2014 18:42:53 +0000</pubDate>
		<dc:creator><![CDATA[nick]]></dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.tarral.net/?p=36</guid>
		<description><![CDATA[Ici, je vais expliquer le notion de deferencement de pointeurs en C. Un pointeur contient une addresse qui identifie l&#8217;addresse d&#8217;une variable. &#160; lorsque l&#8217;on veut acceder a une valeur, une donnee localise a une addresse memoire qui est pointe par un pointeur, on apeller cela deferencer un pointeur. en C ceci est un pointeur [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Ici, je vais expliquer le notion de deferencement de pointeurs en C.</p>
<p>Un pointeur contient une addresse qui identifie l&#8217;addresse d&#8217;une variable.</p>
<p>&nbsp;</p>
<p>lorsque l&#8217;on veut acceder a une valeur, une donnee localise a une addresse memoire qui est pointe par un pointeur, on apeller cela deferencer un pointeur.</p>
<p>en C ceci est un pointeur de char :</p>
<p>const char*  p = &#8220;abc&#8221;;</p>
<p>on utilise 4 octets (bytes), 4 car on mets en memoire 4 caractere a, b, c et 0 pour indiquer au C ou ce termine la chaine de caractere.</p>
<p>tous ceci est stocke dans un addresse memoire quelconque et sont addresse est stocke dans la variable <strong>p</strong></p>
<p>&nbsp;</p>
<p>addresse memoire                                     variable                               contenue<br />
1000                                                                                                                      &#8216;a&#8217;<br />
1001                                                                                                                      &#8216;b&#8217;<br />
1002                                                                                                                      &#8216;c&#8217;<br />
1003                                                                                                                        0<br />
&#8230;.<br />
2000-2003                                                                <strong>p                                         1000</strong></p>
<p>pour deferencer p on utilise une de ces code :</p>
<pre class="lang-c prettyprint prettyprinted"><code><span class="pln">assert</span><span class="pun">(*</span><span class="pln">p </span><span class="pun">==</span> <span class="str">'a'</span><span class="pun">);le premier caractere a  l'addresse p sera 'a'
</span></code></pre>
<pre class="lang-c prettyprint prettyprinted"><code><span class="pln">assert</span><span class="pun">(</span><span class="pln">p</span><span class="pun">[</span><span class="lit">1</span><span class="pun">]</span> <span class="pun">==</span> <span class="str">'b'</span><span class="pun">);</span> p[1] deference le pointeur cree en ajoutant p et une  fois la taille de la chose que p pointe dans ce cas ce un char de taille 1 octet </code></pre>
<pre class="lang-c prettyprint prettyprinted"><code><span class="pln">assert</span><span class="pun">(*(</span><span class="pln">p </span><span class="pun">+</span> <span class="lit">1</span><span class="pun">)</span> <span class="pun">==</span> <span class="str">'b'</span><span class="pun">);on ajoute 1 au pointeur soit addresse 1001
</span></code></pre>
<p>p++; va faire pointer sur addresse 1001 et</p>
<pre class="lang-c prettyprint prettyprinted"><code><span class="pln">assert</span><span class="pun">(*</span><span class="pln">p </span><span class="pun">==</span> <span class="str">'b'</span><span class="pun">); et p pointera vers 'b'</span></code></pre>
<p>Dans le cas ou on utilise l&#8217;allocation de memoire dynamique avec un malloc</p>
<pre class="lang-c prettyprint prettyprinted"><code><span class="typ">int</span><span class="pun">*</span><span class="pln"> p </span><span class="pun">=</span><span class="pln"> malloc</span><span class="pun">(</span><span class="kwd">sizeof</span><span class="pun">(</span><span class="typ">int</span><span class="pun">));</span> </code>reserve de la memoire a un endroit  quelconque

</pre>
<pre class="lang-c prettyprint prettyprinted"><code><span class="pun">*</span><span class="pln">p </span><span class="pun">=</span> <span class="lit">10</span><span class="pun">;</span></code> on deference le pointeur de la memoire et on ecrit une valeur</pre>
<pre class="lang-c prettyprint prettyprinted"><code><span class="pln">fn</span><span class="pun">(*</span><span class="pln">p</span><span class="pun">);</span>  </code>appelle fonction fn et passe la valeur a l'addresse de p.</pre>
<pre class="lang-c prettyprint prettyprinted"><code><span class="pun">(*</span><span class="pln">p</span><span class="pun">)</span> <span class="pun">+=</span> <span class="lit">3</span><span class="pun">;</span> </code>change la valeur de p et ajoute 3.</pre>
<pre class="lang-c prettyprint prettyprinted"><code><span class="pln">free</span><span class="pun">(</span><span class="pln">p</span><span class="pun">);</span> </code>libere la memoire alloue dynamiquement.


</pre>
<p><strong>un cas pour les void  *</strong> :</p>
<p>le compilateur nous transmettra un message d&#8217;erreur si on essaie de deferencer un void * car il ne sait pas la taille de la variable qu&#8217;il  pointe.</p>
<p>si  par exemple la variable pointe est un char qui est un octet le compilateur accedera ce seul octet. si il sagit d&#8217;un double il y aura plus de memoire alloue mais aussi son architecture sera differente. avant de deferencer ce pointeur generique void * nous devrons le caster vers le type de valeur desire.</p>
<p>quelques exemples pour le deferencement :</p>
<p><strong>int nb = 6;</strong><br />
<strong>void *ptr;</strong><br />
<strong>ptr = &amp;nb;</strong> /* ici dans la case memoire de ptr on range l&#8217;addresse de nb. */<br />
<strong>printf(&#8220;\nLa valeur de nb est : %d&#8221;,*((int*)ptr));</strong> /* on caste le ptr en pointeur de int, puis on accede a sont contenant grace a l&#8217;etoile exterieure (*&#8230;..). */</p>
<p>ou alors :</p>
<p>int nbptr<br />
void* ptr = NULL;<br />
ptr = &nb;<br />
nbptr = *((int*)ptr); /* meme explication que au dessus, le pointeru</p>
<p>Le pointeur void* ne pointe vers rien de particulier, si l&#8217;on veut le deferencer, il faut d&#8217;abors changer de type de pointeur, dans ce cas ci il faut passer par un pointeur de int.<br />
soit l&#8217;ecriture (int*) qui caste le pointeur void* appeler ptr en pointeur de int, mais ce n&#8217;est pas fini.<br />
notre pointeur ressemble a int* ptr, pour acceder a la case memoire par ce pointeur il faut donc regarder ou il pointe ou le deferencer avec *((int*) ptr) qui va donc extirper la valeur int de la case memoire.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.tarral.net/?feed=rss2&#038;p=36</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My new application in C</title>
		<link>https://www.tarral.net/?p=32</link>
		<comments>https://www.tarral.net/?p=32#comments</comments>
		<pubDate>Sat, 13 Sep 2014 17:50:07 +0000</pubDate>
		<dc:creator><![CDATA[nick]]></dc:creator>
				<category><![CDATA[sdl]]></category>

		<guid isPermaLink="false">http://www.tarral.net/?p=32</guid>
		<description><![CDATA[Here is a new application i made in C with the SDL 1.2. this is just the front screen for the interface of my internal software at work. the front screen is just a few button to select option and a char field to enter the customer phone number, and of course a submit button. [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Here is a new application i made in C with the SDL 1.2.</p>
<p>this is just the front screen for the interface of my internal software at work.</p>
<p>the front screen is just a few button to select option and a char field to enter the customer phone number, and of course a submit button.</p>
<p>&nbsp;</p>
<p>here is a print screen, the source code will be available soon on my Git hub.</p>
<p>i had the idea to create a GUI in DOS-like gui, it might be not that nice but that could be a good template to improve it.</p>
<div id="attachment_33" style="width: 310px" class="wp-caption alignnone"><a href="http://www.tarral.net/wp-content/uploads/2014/09/ecran.png"><img class="size-medium wp-image-33" src="http://www.tarral.net/wp-content/uploads/2014/09/ecran-300x213.png" alt="front screen Dos-like" width="300" height="213" /></a><p class="wp-caption-text">front screen Dos-like</p></div>
]]></content:encoded>
			<wfw:commentRss>https://www.tarral.net/?feed=rss2&#038;p=32</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First Game in C</title>
		<link>https://www.tarral.net/?p=29</link>
		<comments>https://www.tarral.net/?p=29#comments</comments>
		<pubDate>Tue, 19 Aug 2014 00:27:03 +0000</pubDate>
		<dc:creator><![CDATA[nick]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.tarral.net/?p=29</guid>
		<description><![CDATA[Hello, i was busy learning about C and making some progress as i did manage to get a Game fully working in C with the SDL library. This is a very short video  of my game working, i did manage to get it working on my linux box with the GCC 4.7.2 and SDL version [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Hello,</p>
<p>i was busy learning about C and making some progress as i did manage to get a Game fully working in C with the SDL library.</p>
<p>This is a very short video  of my game working, i did manage to get it working on my linux box with the GCC 4.7.2 and SDL version 1.2.</p>
<p>but i do not have an exe file for windows for now.</p>
<p><a href="https://www.youtube.com/watch?v=lVhs96_6kdI">Borpion</a></p>
]]></content:encoded>
			<wfw:commentRss>https://www.tarral.net/?feed=rss2&#038;p=29</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dessiner en C Part2</title>
		<link>https://www.tarral.net/?p=24</link>
		<comments>https://www.tarral.net/?p=24#comments</comments>
		<pubDate>Fri, 18 Jul 2014 05:36:31 +0000</pubDate>
		<dc:creator><![CDATA[nick]]></dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.tarral.net/?p=24</guid>
		<description><![CDATA[Voici une droite realisee avec la bibliotheque SDL du language C pour creer des interface graphique. Cette image a ete cree a partir de l&#8217;alghorithme de Bresenham. dont voici la fiche Wikipedia : http://fr.wikipedia.org/wiki/Algorithme_de_trac%C3%A9_de_segment_de_Bresenham Cette image etait originellemtn on .tga, convertie en png.]]></description>
				<content:encoded><![CDATA[<p>Voici une droite realisee avec la bibliotheque SDL du language C pour creer des interface graphique.<br />
Cette image a ete cree a partir de l&#8217;alghorithme de Bresenham.</p>
<p>dont voici la fiche Wikipedia :<br />
<a title="Bresenham" href="http://fr.wikipedia.org/wiki/Algorithme_de_trac%C3%A9_de_segment_de_Bresenham">http://fr.wikipedia.org/wiki/Algorithme_de_trac%C3%A9_de_segment_de_Bresenham</a></p>
<p><a href="http://www.tarral.net/wp-content/uploads/2014/07/firstpic.png"><img class="alignnone size-medium wp-image-25" alt="firstpic" src="http://www.tarral.net/wp-content/uploads/2014/07/firstpic-300x225.png" width="300" height="225" /></a></p>
<p>Cette image etait originellemtn on .tga, convertie en png.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.tarral.net/?feed=rss2&#038;p=24</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dessiner en C</title>
		<link>https://www.tarral.net/?p=17</link>
		<comments>https://www.tarral.net/?p=17#comments</comments>
		<pubDate>Sat, 22 Mar 2014 21:23:11 +0000</pubDate>
		<dc:creator><![CDATA[nick]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.tarral.net/?p=17</guid>
		<description><![CDATA[Voice un petit dessin realiser uniquement avec du code en C Pour informations, il s&#8217;agit de cercle avec differents degrade de gris.]]></description>
				<content:encoded><![CDATA[<p>Voice un petit dessin realiser uniquement avec du code en C</p>
<p><a href="http://www.tarral.net/wp-content/uploads/2014/03/essai.png"><img src="http://www.tarral.net/wp-content/uploads/2014/03/essai-300x225.png" alt="essai" width="300" height="225" class="alignnone size-medium wp-image-18" /></a></p>
<p>Pour informations, il s&#8217;agit de cercle avec differents degrade de gris.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.tarral.net/?feed=rss2&#038;p=17</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
