<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.0.4" -->
<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/"
	>

<channel>
	<title>Arkadiusz 'ARJ' Jasak</title>
	<link>http://arj.ovh.org</link>
	<description>devblog</description>
	<pubDate>Sun, 24 Dec 2006 11:44:24 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.4</generator>
	<language>en</language>
			<item>
		<title>Witam</title>
		<link>http://arj.ovh.org/?p=3</link>
		<comments>http://arj.ovh.org/?p=3#comments</comments>
		<pubDate>Sat, 16 Sep 2006 18:52:02 +0000</pubDate>
		<dc:creator>ARJ</dc:creator>
		
	<category>Inne</category>
		<guid isPermaLink="false">http://arj.ovh.org/?p=3</guid>
		<description><![CDATA[Witam wszystkich na moim devBlogu.
Będę tutaj pisał o (X)HTML, PHP, MySQL, ajax i innych zagadnieniach związanych z pisaniem stron www i przyległościami. Tutaj będziecie mogli również dowiedzieć się o prowadzonych przeze mnie projektach, moich skryptach oraz klasach. Nie zapominam o życiu prywatnym - będą także pojawiać się informacje o mnie i moim życiu, ale nie [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal">Witam wszystkich na moim devBlogu.<br />
Będę tutaj pisał o (X)HTML, PHP, MySQL, ajax i innych zagadnieniach związanych z pisaniem stron www i przyległościami. Tutaj będziecie mogli również dowiedzieć się o prowadzonych przeze mnie projektach, moich skryptach oraz klasach. Nie zapominam o życiu prywatnym - będą także pojawiać się informacje o mnie i moim życiu, ale nie jest to temat tego bloga więc nie liczcie na dużą ilość notek z tym związanych.</p>
<p class="MsoNormal">Póki co wszystko postawione jest na darmowym serwerze ovh, później się pomyśli nad czymś lepszym, niezależnym. W najbliższym czasie zajmę się wyglądem i funkcjonalnością systemu WordPress na którym postawiony jest blog. Pojawią się także pierwsze notki.</p>
<p class="MsoNormal">Zachęcam wszystkich do czytania i komentowania.</p>
]]></content:encoded>
			<wfw:commentRSS>http://arj.ovh.org/?feed=rss2&amp;p=3</wfw:commentRSS>
		</item>
		<item>
		<title>Klasa DB Manager</title>
		<link>http://arj.ovh.org/?p=5</link>
		<comments>http://arj.ovh.org/?p=5#comments</comments>
		<pubDate>Mon, 18 Sep 2006 19:23:59 +0000</pubDate>
		<dc:creator>ARJ</dc:creator>
		
	<category>PHP</category>
	<category>Klasy</category>
		<guid isPermaLink="false">http://arj.ovh.org/?p=5</guid>
		<description><![CDATA[Witam.
Mam zaszczyt zaprezentować klasę własnej produkcji. Jest to klasa do komunikacji z bazą danych oparta na PDO. Klasa jest już w wersji 0.2 gdyż na forum.php.pl poddano mi kilka pomysłów, jak i wytknięto kilka wad.
W porównaniu do wersji 0.1 wprowadziłem następujące zmiany:
- przerobiona metoda queryandfetch (można wybrać co ma zostać zwrócone)
- nowa metoda numRows
- nowa [...]]]></description>
			<content:encoded><![CDATA[<p>Witam.<br />
Mam zaszczyt zaprezentować klasę własnej produkcji. Jest to klasa do komunikacji z bazą danych oparta na PDO. Klasa jest już w wersji 0.2 gdyż na <a title="forum.php.pl" href="http://forum.php.pl/klasa-DB-manager-t53882.html">forum.php.pl</a> poddano mi kilka pomysłów, jak i wytknięto kilka wad.</p>
<p>W porównaniu do wersji 0.1 wprowadziłem następujące zmiany:<br />
- przerobiona metoda queryandfetch (można wybrać co ma zostać zwrócone)<br />
- nowa metoda numRows<br />
- nowa zmienna i metoda numExecutes zwracająca ilość zapytań wysłanych do bazy</p>
<p>ToDo:<br />
- napisać obsługę Exceptions<br />
- cache zapytań</p>
<p>Zapraszam do przeczytania dalszej części.</p>
<p><a id="more-5"></a>Do użycia skryptu potrzebny jest plik configuracyjny. Oto jego budowa:</p>
<div class="igBar"><span id="lphp-3"><a href="#" onclick="javascript:showPlainTxt('php-3'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span><br />
<div id="php-3">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'DB_HOST'</span>,<span style="color:#FF0000;">'localhost'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'DB_USER'</span>,<span style="color:#FF0000;">'arj'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'DB_PASS'</span>,<span style="color:#FF0000;">''</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'DB_NAME'</span>,<span style="color:#FF0000;">'test'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'DB_KIND'</span>,<span style="color:#FF0000;">'mysql'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'DB_CHARSET'</span>,<span style="color:#FF0000;">'utf8'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'DB_COLCON'</span>,<span style="color:#FF0000;">'utf8_general_ci'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Oto sama klasa dbmanager.class.php</p>
<div class="igBar"><span id="lphp-4"><a href="#" onclick="javascript:showPlainTxt('php-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span><br />
<div id="php-4">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">/**</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*&nbsp; Database Manager</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*&nbsp; @package Darion</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*&nbsp; @author Arkadiusz 'ARJ' Jasak</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*&nbsp; @copyright Copyright (c) 2006 Arkadiusz 'ARJ' Jasak (ajasak[at]gmail.com)</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*&nbsp; @version 0.2</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*/</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">class</span> DBmanager<span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">/**</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* Object instance</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* @var object</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* @access private</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*/</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/static"><span style="color:#000066;">static</span></a> private <span style="color:#0000FF;">$thisInstance</span> = <span style="color:#000000; font-weight:bold;">null</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">/**</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* Query results</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* @var array</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* @access private</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*/</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">private <span style="color:#0000FF;">$result</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">/**</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* PDO instance</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* @var object</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* @access private</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*/</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">private <span style="color:#0000FF;">$dbh</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">/**</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* Number of executes</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* @access private</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* @var int</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*/</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">private <span style="color:#0000FF;">$numExecutes</span> = <span style="color:#CC66CC;color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">/**</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* Constructor</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* Connect to database and set character encoding</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* @access public</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*/</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">public <span style="color:#000000; font-weight:bold;">function</span> __construct<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">try<span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">dbh</span> = <span style="color:#000000; font-weight:bold;">new</span> PDO<span style="color:#006600; font-weight:bold;">&#40;</span>DB_KIND.<span style="color:#FF0000;">':host='</span>.DB_HOST.<span style="color:#FF0000;">';dbname='</span>.DB_NAME, DB_USER, DB_PASS<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">dbh</span>-&gt;<span style="color:#006600;">exec</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'SET CHARACTER SET '</span>.DB_CHARSET<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">dbh</span>-&gt;<span style="color:#006600;">exec</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'SET collation_connection = '</span>.DB_COLCON.<span style="color:#FF0000;">';'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span>catch <span style="color:#006600; font-weight:bold;">&#40;</span>PDOException <span style="color:#0000FF;">$e</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'Error!: '</span> . <span style="color:#0000FF;">$e</span>-&gt;<span style="color:#006600;">getMessage</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> . <span style="color:#FF0000;">'</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">/**</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* Query and fetch</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* @param string $_query</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* @param string $_mode</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* @param int $_param</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* @access public</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* @return array</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*/</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">public <span style="color:#000000; font-weight:bold;">function</span> queryandfetch<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$_query</span>, <span style="color:#0000FF;">$_mode</span>, <span style="color:#0000FF;">$_param</span> = <span style="color:#000000; font-weight:bold;">NULL</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">numExecutes</span>++;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">result</span> = <span style="color:#000000; font-weight:bold;">null</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">result</span> = <span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">dbh</span>-&gt;<span style="color:#006600;">query</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$_query</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">switch</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$_mode</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">case</span> <span style="color:#FF0000;">'assoc'</span>:</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">return</span> <span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">result</span>-&gt;<span style="color:#006600;">fetchAll</span><span style="color:#006600; font-weight:bold;">&#40;</span>PDO::<span style="color:#006600;">FETCH_ASSOC</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">break</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">case</span> <span style="color:#FF0000;">'both'</span>:</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">return</span> <span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">result</span>-&gt;<span style="color:#006600;">fetchAll</span><span style="color:#006600; font-weight:bold;">&#40;</span>PDO::<span style="color:#006600;">FETCH_BOTH</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">break</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">case</span> <span style="color:#FF0000;">'column'</span>:</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">return</span> <span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">result</span>-&gt;<span style="color:#006600;">fetchAll</span><span style="color:#006600; font-weight:bold;">&#40;</span>PDO::<span style="color:#006600;">FETCH_COLUMN</span>, <span style="color:#0000FF;">$_param</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">break</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">default</span>:</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">return</span> <span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">result</span>-&gt;<span style="color:#006600;">fetchAll</span><span style="color:#006600; font-weight:bold;">&#40;</span>PDO::<span style="color:#006600;">FETCH_ASSOC</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">/**</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* Exec: insert, update, delete</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* @param string $_exec</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* @access public</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* @return int or false</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*/</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">public <span style="color:#000000; font-weight:bold;">function</span> <a href="http://www.php.net/exec"><span style="color:#000066;">exec</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$_exec</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">numExecutes</span>++;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">result</span> = <span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">dbh</span>-&gt;<span style="color:#006600;">exec</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$_exec</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">result</span> == <span style="color:#000000; font-weight:bold;">false</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">return</span> <span style="color:#000000; font-weight:bold;">false</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#616100;">else</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">return</span> <span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">result</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">/**</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* Count rows number</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* @param string $_table</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* @param string $_where</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* @return int</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*/</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">public <span style="color:#000000; font-weight:bold;">function</span> numRows<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$_table</span>, <span style="color:#0000FF;">$_where</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">numExecutes</span>++;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">result</span> = <span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">dbh</span>-&gt;<span style="color:#006600;">query</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"SELECT COUNT(*) FROM "</span>.<span style="color:#0000FF;">$_table</span>.<span style="color:#FF0000;">" WHERE "</span>.<span style="color:#0000FF;">$_where</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">return</span> <span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">result</span>-&gt;<span style="color:#006600;">fetchColumn</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">/**</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* Return number of executes</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* @access public</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* @return int</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*/</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">public <span style="color:#000000; font-weight:bold;">function</span> numExecutes<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">return</span> <span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">numExecutes</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">/**</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* Singleton</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* @access public</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* @return object</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*/</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/static"><span style="color:#000066;">static</span></a> public <span style="color:#000000; font-weight:bold;">function</span> getInstance<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span>self::<span style="color:#0000FF;">$thisInstance</span> == <span style="color:#000000; font-weight:bold;">null</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">self::<span style="color:#0000FF;">$thisInstance</span> = <span style="color:#000000; font-weight:bold;">new</span> DBmanager<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">return</span> self::<span style="color:#0000FF;">$thisInstance</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">/**</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* Destructor</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* Close connection with database</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* @access public</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*/</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">public <span style="color:#000000; font-weight:bold;">function</span> __destruct<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">dbh</span> = <span style="color:#000000; font-weight:bold;">null</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Jeżeli będzie trzeba, zaprezentuję przykłady użycia.<br />
Klasę można ściągnąć <a href="http://arj.ovh.org/repo/dbmanager.class.phps">tutaj</a>.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://arj.ovh.org/?feed=rss2&amp;p=5</wfw:commentRSS>
		</item>
		<item>
		<title>Edytory PHP</title>
		<link>http://arj.ovh.org/?p=6</link>
		<comments>http://arj.ovh.org/?p=6#comments</comments>
		<pubDate>Wed, 20 Sep 2006 20:49:20 +0000</pubDate>
		<dc:creator>ARJ</dc:creator>
		
	<category>Software</category>
		<guid isPermaLink="false">http://arj.ovh.org/?p=6</guid>
		<description><![CDATA[Korzystają z edytorów php natknąłem się na kilka problemów. Postaram się wam przybliżyć klika z nich. Każdy, kto zaczyna programować - nie ważne czy to HTML, PHP czy inny język - po pewnym czasie przesiada się z podstawowego edytora ( najczęściej notatnik ) to czegoś bardziej zaawansowanego. Do programu, który przyspieszy pracę poprzez: kolorowanie składni [...]]]></description>
			<content:encoded><![CDATA[<p>Korzystają z edytorów php natknąłem się na kilka problemów. Postaram się wam przybliżyć klika z nich. Każdy, kto zaczyna programować - nie ważne czy to HTML, PHP czy inny język - po pewnym czasie przesiada się z podstawowego edytora ( najczęściej notatnik ) to czegoś bardziej zaawansowanego. Do programu, który przyspieszy pracę poprzez: kolorowanie składni i podpowiadanie składni, debugowanie, integracja z ftp, cvs, svn, phpDoc. Wszytko jest pięknie aż do rozpoczęcia pracy na owym edytorze. Nagle okazuje się, że niektóre rzeczy nie działają lub działają nie właściwie.</p>
<p><a id="more-6"></a></p>
<p><strong>1</strong>. Wszyscy, którzy pracują, bądź pracowali na Zend Studio wiedzą jak ten edytor zapycha komputer. Posiadam P4 2,4Ghz z 512Mb ramu i czasem straszni się on tnie. Jednak znalazłem pewne rozwiązanie, które może nie zupełnie i nie na wszystkich komputerach pomoże. Otwieramy folder z Zend Studio/Bin, tam edytujemy plik ZDE.lax. W połowie pliku odnajdujemy 2 linijki:</p>
<div class="igBar"><span id="lcode-9"><a href="#" onclick="javascript:showPlainTxt('code-9'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span><br />
<div id="code-9">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">lax.<span style="">nl</span>.<span style="">java</span>.<span style="">option</span>.<span style="">java</span>.<span style="">heap</span>.<span style="">size</span>.<span style="">initial</span>=<span style="color:#800000;color:#800000;">268435456</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">lax.<span style="">nl</span>.<span style="">java</span>.<span style="">option</span>.<span style="">java</span>.<span style="">heap</span>.<span style="">size</span>.<span style="">max</span>=<span style="color:#800000;color:#800000;">536870912</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Standardowe wartości powinny być dużo niższe. Obie wartości wyznaczają ilość pamięci RAM dostępnej dla programu, pierwsza wartość przy starcie, a druga maksymalna dostępna podczas jego używania. Należy obie wartości zwiększyć, nawet ustalić obie takie same, aby Zend Studio od razu dysponowało odpowiednią wielkością. Ja przydzieliłem programowi różne wartości gdyż po ich zwiększeniu uporczywe przycinanie się ustało.</p>
<p><strong>2</strong>. Wiele osób używa wzorca projektowego Singleton. Jednak w edytorach pojawia się pewien problem z nim związany. Przeanalizujmy następujący kod:</p>
<div class="igBar"><span id="lphp-10"><a href="#" onclick="javascript:showPlainTxt('php-10'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span><br />
<div id="php-10">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">class</span> Foo<span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/static"><span style="color:#000066;">static</span></a> private <span style="color:#0000FF;">$thisInstance</span> = <span style="color:#000000; font-weight:bold;">null</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">private <span style="color:#0000FF;">$variable</span> = <span style="color:#FF0000;">"Test"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">public <span style="color:#000000; font-weight:bold;">function</span> getVariable<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">return</span> <span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">variable</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/static"><span style="color:#000066;">static</span></a> public <span style="color:#000000; font-weight:bold;">function</span> getInstance<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span>self::<span style="color:#0000FF;">$thisInstance</span> == <span style="color:#000000; font-weight:bold;">null</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">self::<span style="color:#0000FF;">$thisInstance</span> = <span style="color:#000000; font-weight:bold;">new</span> Foo<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">return</span> self::<span style="color:#0000FF;">$thisInstance</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Wszytko pięknie ale gdy chcemy się odwołać do obiektu:</p>
<div class="igBar"><span id="lphp-11"><a href="#" onclick="javascript:showPlainTxt('php-11'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span><br />
<div id="php-11">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$objFoo</span> = Foo::<span style="color:#006600;">getInstance</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// tutaj podpowiadanie kodu nie zadziała</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#0000FF;">$objFoo</span>-&gt;<span style="color:#006600;">getVariable</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Jednak jest na to rozwiązanie. Jest to nic innego jak dokumentacja kodu zgodna z phpDoc. Wystarczy dobrze udokumentować kod i będzie on nie tylko czytelny dla nas i innych, ale także edytor będzie lepiej podpowiadał składnię. W powyższym kodzie wystarczy tylko udokumentować metodę getInstance w następujący sposób:</p>
<div class="igBar"><span id="lphp-12"><a href="#" onclick="javascript:showPlainTxt('php-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span><br />
<div id="php-12">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//kod klasy</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">/**</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* Singleton</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* @return Foo</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*/</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/static"><span style="color:#000066;">static</span></a> public <span style="color:#000000; font-weight:bold;">function</span> getInstance<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span>self::<span style="color:#0000FF;">$thisInstance</span> == <span style="color:#000000; font-weight:bold;">null</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">self::<span style="color:#0000FF;">$thisInstance</span> = <span style="color:#000000; font-weight:bold;">new</span> Foo<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">return</span> self::<span style="color:#0000FF;">$thisInstance</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$objFoo</span> = Foo::<span style="color:#006600;">getInstance</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// teraz w tym miejscu zostanie podpowiedziana metoda getVariable</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#0000FF;">$objFoo</span>-&gt;<span style="color:#006600;">getVariable</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Trick polega na tym, aby w dokumentacji metody @return podana była nazwa obiektu, który ma zostać zwrócony.</p>
<p><strong>3</strong>. Większość edytorów porozumiewa się z użytkownikiem w języku angielskim. Gdy chcemy użyć znaków diakrytycznych pojawia się problem, ponieważ zamiast nich pojawiają się jakieś okienka, uruchamiają się jakieś funkcję programu. Rada jest prosta: należy w opcjach programu zmienić mapę klawiszy. Gdy już wyłączymy dane skróty klawiaturowe takie jak alt + s możemy się cieszyć polskimi znakami w programie.</p>
<p>Mam nadzieję, że przydadzą się wam porady zamieszczone w tej notce. Jeżeli macie jakieś uwagi lub propozycję to piszcie. Zagadnienia 2 i 3 były sprawdzane w edytorach: Zend Studio i Eclipse.</p>
<blockquote />
]]></content:encoded>
			<wfw:commentRSS>http://arj.ovh.org/?feed=rss2&amp;p=6</wfw:commentRSS>
		</item>
		<item>
		<title>Internet 2</title>
		<link>http://arj.ovh.org/?p=7</link>
		<comments>http://arj.ovh.org/?p=7#comments</comments>
		<pubDate>Wed, 27 Sep 2006 16:48:37 +0000</pubDate>
		<dc:creator>ARJ</dc:creator>
		
	<category>Inne</category>
		<guid isPermaLink="false">http://arj.ovh.org/?p=7</guid>
		<description><![CDATA[Witam.
Dzisiaj postaram się wam przedstawić przyszłość internetu. Od pewnego czasu zaczyna zmieniać się pogląd na sieć i komputery. Czy doprowadzi to do powstania internetu 2 generacji, czy tylko do modernizacji obecnej wersji?
Zapraszam do dalszego czytania artykułu, w którym przedstawię nowe technologie wchodzące do użytku, przyszłość internetu, a także jego użytkowników.

Na wstępie chciałbym przybliżyć, czym jest [...]]]></description>
			<content:encoded><![CDATA[<p>Witam.<br />
Dzisiaj postaram się wam przedstawić przyszłość internetu. Od pewnego czasu zaczyna zmieniać się pogląd na sieć i komputery. Czy doprowadzi to do powstania internetu 2 generacji, czy tylko do modernizacji obecnej wersji?<br />
Zapraszam do dalszego czytania artykułu, w którym przedstawię nowe technologie wchodzące do użytku, przyszłość internetu, a także jego użytkowników.</p>
<p><a id="more-7"></a></p>
<p>Na wstępie chciałbym przybliżyć, czym jest Internet2. Jest to niedochodowe konsorcjum prowadzące badania nad nowymi technologiami sieciowymi. Zrzesza 207 uniwersytetów, agencji rządowych oraz firmy przemysłu komputerowego takie jak: Sun Microsystems, Cisco Systems. Do celów badań zbudowana specjalną sieć "Abilene", w której transfer sięga 10Gb/s. Testowane są tam rozwiązania takie jak protokół IPv6 czy QoS.</p>
<p>Pierwsza informacja, jaką czytałem o tej sieci mówiła, że jest to nowa generacja internetu, która zastąpi aktualną. Jednak bardziej prawdopodobne jest to, iż nie nastąpi to tak nagle. Abilene będzie tylko placem badawczym, będzie tylko dostarczać nowych technologii, ale nigdy nie stanie się częścią globalnego internetu. Sieć będzie się cały czas zmieniać, będzie się powoli modernizować.<br />
Obecny internet zaczyna się zmieniać dzięki nowym technologią, takim jak AJAX, Flex czy Comet. Dzięki takim nowinkom powstają aplikacje webowe, które są przyszłością internetu. Google wypuścił na rynek kilka takich aplikacji opartych na AJAXie - <a href="http://gmail.com">Gmail</a>, <a href="http://www.google.com/gn">Notatnik</a>, <a href="http://www.google.com/calendar">Kalendarz</a>, <a href="http://spreadsheets.google.com">Spreadsheet</a>. W oparciu o tą technologię powstał system operacyjny <a href="http://www.youos.com">YouOS</a>. Adobe stworzył konkurencję dla AJAXa, jest to Flex oparty na Flashu. Jego zaletą jest lepszy wygląd. Także w nim powstał system operacyjny <a href="http://www.goowy.com">Goowy</a>.</p>
<p>Czym jest, więc internet 2 generacji? Jest to internet taki, jaki znamy, może trochę szybszy. Zmianie podlegnie budowa stron, będą one bardziej multimedialne. Nie będzie trzeba już kupować oprogramowania takiego jak Word czy Excel, wystarczy wejść na stronę i zapłacić tylko za użytkowanie programu. Plusem takiego rozwiązania jest to, że w każdym miejscu na świecie mamy dostęp do naszych dokumentów, w prosty sposób można się nimi wymieniać, a także zapisać na dysku komputera. Języki takie jak HTML, java script zaczną zanikać. PHP, ASP będą musiały się zmieć, przestawić do obsługi multimedialnych aplikacji webowych.</p>
<p>Mam nadzieję, że rzuciłem troszkę światła na przyszłość internetu.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://arj.ovh.org/?feed=rss2&amp;p=7</wfw:commentRSS>
		</item>
		<item>
		<title>Web Developer w FireFox 2</title>
		<link>http://arj.ovh.org/?p=8</link>
		<comments>http://arj.ovh.org/?p=8#comments</comments>
		<pubDate>Thu, 28 Sep 2006 18:31:58 +0000</pubDate>
		<dc:creator>ARJ</dc:creator>
		
	<category>Software</category>
		<guid isPermaLink="false">http://arj.ovh.org/?p=8</guid>
		<description><![CDATA[Wiele osób zajmujących się tworzeniem stron www używa dodatku do przegladarki FireFox - Web developer. Problem w tym, że owy dodatek nie działa w najnowszej wersji przeglądarki oznaczonej numerkiem 2.0 RC1. Można to jednak zmienić.
Ściągamy ten plik, wyciągamy z archiwum plik install.rdf. Odnajdujemy tam linijki:
&#60;Description>
&#60;em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}&#60;/em:id>
&#60;em:maxVersion>2.0&#60;/em:maxVersion>
&#60;em:minVersion>1.0&#60;/em:minVersion>
&#60;/Description>
&#60;/em:targetApplication>
&#60;em:targetApplication>
&#60;Description>
&#60;em:id>{a463f10c-3994-11da-9945-000d60ca027b}&#60;/em:id>
&#60;em:maxVersion>2.0+&#60;/em:maxVersion>           [...]]]></description>
			<content:encoded><![CDATA[<p>Wiele osób zajmujących się tworzeniem stron www używa dodatku do przegladarki FireFox - <a href="https://addons.mozilla.org/firefox/60/">Web developer</a>. Problem w tym, że owy dodatek nie działa w najnowszej wersji przeglądarki oznaczonej numerkiem 2.0 RC1. Można to jednak zmienić.</p>
<p><a id="more-8"></a>Ściągamy <a href="http://releases.mozilla.org/pub/mozilla.org/extensions/web_developer/web_developer-1.0.2-fx+fl.xpi">ten plik</a>, wyciągamy z archiwum plik <em>install.rdf</em>. Odnajdujemy tam linijki:<br />
&lt;Description><br />
&lt;em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}&lt;/em:id><br />
&lt;em:maxVersion><strong>2.0</strong>&lt;/em:maxVersion><br />
&lt;em:minVersion>1.0&lt;/em:minVersion><br />
&lt;/Description><br />
&lt;/em:targetApplication><br />
&lt;em:targetApplication><br />
&lt;Description><br />
&lt;em:id>{a463f10c-3994-11da-9945-000d60ca027b}&lt;/em:id><br />
&lt;em:maxVersion><strong>2.0+</strong>&lt;/em:maxVersion>                 &lt;em:minVersion>1.0+&lt;/em:minVersion><br />
&lt;/Description></p>
<p>Należy zmienić wartości na te które zostały pogrubione. Plik zapisujemy i z powrotem wrzucamy do archiwum z którego został wyciągnięty. Odpalamy FireFox 2, dajemy otwórz plik (ctrl+O) i wybieramy przed chwilą zmodywikowane archiwum. Potwierdzamy chęć instalacji i gotowe. Po ponownym uruchomieniu przeglądarki możemy cieszyć się bardzo pomocnym dodatkiem.</p>
<p>Dla wszystkich którym nie chce się ręcznie tego modyfikować załączam plik przygotowany przeze mnie: <a href="http://arj.ovh.org/repo/web_developer-1.0.2-fx+fl.xpi">Web Developer 1.0.2 FF2 </a></p>
<p>życzę miłego użytkowania <img src='http://arj.ovh.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
</p>
]]></content:encoded>
			<wfw:commentRSS>http://arj.ovh.org/?feed=rss2&amp;p=8</wfw:commentRSS>
		</item>
		<item>
		<title>Studia</title>
		<link>http://arj.ovh.org/?p=9</link>
		<comments>http://arj.ovh.org/?p=9#comments</comments>
		<pubDate>Mon, 23 Oct 2006 21:16:01 +0000</pubDate>
		<dc:creator>ARJ</dc:creator>
		
	<category>Życie</category>
		<guid isPermaLink="false">http://arj.ovh.org/?p=9</guid>
		<description><![CDATA[Od 6 października studiuję Informatykę na Politechnice Krakowskiej. Po 5 miesiącach wolnego muszę jakoś sobie zorganizować czas. Przez to, że miałem dużo zajęć było tu ostatnio trochę cicho, jednak już zabieram się do roboty i nauki. Mogę zapowiedzieć, że już nie długo pojawi się notka na temat technologii Adobe Flex 2 i jej użycia. Później [...]]]></description>
			<content:encoded><![CDATA[<p>Od 6 października studiuję Informatykę na Politechnice Krakowskiej. Po 5 miesiącach wolnego muszę jakoś sobie zorganizować czas. Przez to, że miałem dużo zajęć było tu ostatnio trochę cicho, jednak już zabieram się do roboty i nauki. Mogę zapowiedzieć, że już nie długo pojawi się notka na temat technologii Adobe Flex 2 i jej użycia. Później mam nadzieję, że uda mi się dokończyć klasę <a href="http://arj.ovh.org/?p=5">DB Manager</a>.<br />
Zapraszam w najbliższym czasie.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://arj.ovh.org/?feed=rss2&amp;p=9</wfw:commentRSS>
		</item>
		<item>
		<title>Święta</title>
		<link>http://arj.ovh.org/?p=12</link>
		<comments>http://arj.ovh.org/?p=12#comments</comments>
		<pubDate>Sun, 24 Dec 2006 11:44:24 +0000</pubDate>
		<dc:creator>ARJ</dc:creator>
		
	<category>Życie</category>
		<guid isPermaLink="false">http://arj.ovh.org/?p=12</guid>
		<description><![CDATA[Nadeszły Święta Bożego Narodzenia chciałbym wszystkim odwiedzającym życzyć wszystkiego najlepszego, dużo zdrowia, szczęścia, pomyślności.
Programistom życzę nie zapomnianych klamerek i średników, studentom i uczniom dobrych ocen, pracującym wytrwałości, grafikom pomysłów, bezrobotnym pracy, a wszystkim bez wyjątku życzę
Wesołych Świąt i szczęśliwego Nowego Roku

]]></description>
			<content:encoded><![CDATA[<p><img align="left" src="http://arj.ovh.org/repo/choinka.jpg" />Nadeszły Święta Bożego Narodzenia chciałbym wszystkim odwiedzającym życzyć wszystkiego najlepszego, dużo zdrowia, szczęścia, pomyślności.<br />
Programistom życzę nie zapomnianych klamerek i średników, studentom i uczniom dobrych ocen, pracującym wytrwałości, grafikom pomysłów, bezrobotnym pracy, a wszystkim bez wyjątku życzę<br />
<strong>Wesołych Świąt i szczęśliwego Nowego Roku</strong>
</p>
]]></content:encoded>
			<wfw:commentRSS>http://arj.ovh.org/?feed=rss2&amp;p=12</wfw:commentRSS>
		</item>
	</channel>
</rss>
