<?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>Andrei DANEASA &#187; download</title>
	<atom:link href="http://www.webxpert.ro/andrei/tag/download/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webxpert.ro/andrei</link>
	<description>Programming, database, security, Oracle, .NET, C#, PHP, Travel</description>
	<lastBuildDate>Tue, 18 Oct 2011 15:42:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Upgrade Oracle APEX 3.2.1 to 4.0.1 on Oracle Database 10g Express Edition (XE)</title>
		<link>http://www.webxpert.ro/andrei/2010/09/09/upgrade-oracle-apex-3-2-1-to-4-0-1-on-oracle-database-10g-express-edition-xe/</link>
		<comments>http://www.webxpert.ro/andrei/2010/09/09/upgrade-oracle-apex-3-2-1-to-4-0-1-on-oracle-database-10g-express-edition-xe/#comments</comments>
		<pubDate>Thu, 09 Sep 2010 14:29:03 +0000</pubDate>
		<dc:creator>andreiash</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[10g]]></category>
		<category><![CDATA[apex]]></category>
		<category><![CDATA[application express]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[express edition]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[XE]]></category>

		<guid isPermaLink="false">http://www.webxpert.ro/andrei/?p=753</guid>
		<description><![CDATA[Apex is a great tool for rapid web applications based on Oracle Database. It&#8217;s free, and if you&#8217;re happy with Oracle XE&#8217;s limitations, then it&#8217;s perfect, you have the database free as well. I&#8217;ve been following APEX for long time ago, since it was called HTML DB, and wrote 2+ years ago a guide how [...]]]></description>
			<content:encoded><![CDATA[<p>Apex is a great tool for rapid web applications based on Oracle Database. It&#8217;s free, and if you&#8217;re happy with Oracle XE&#8217;s limitations, then it&#8217;s perfect, you have the database free as well. I&#8217;ve been following APEX for long time ago, since it was called HTML DB, and wrote 2+ years ago <a href="http://www.webxpert.ro/andrei/2008/06/16/oracle-apex-31-installation-on-oracle-database-10g-xe/">a guide how to install APEX on XE</a>.</p>
<p>Now APEX 4.0.1 is GA and most of the people would like to upgrade. It&#8217;s very simple.</p>
<p><a href="http://www.webxpert.ro/andrei/wp-content/uploads/2010/09/apex1.png"><img src="http://www.webxpert.ro/andrei/wp-content/uploads/2010/09/apex1.png" alt="" title="apex1" width="600" height="225" class="aligncenter size-full wp-image-754" /></a></p>
<p><strong>1. Download APEX from <a href="http://download.oracle.com/otn/java/appexpress/apex_4.0.1.zip">OTN</a></strong><br /><span id="more-753"></span><br />
<strong></p>
<p>2. Unzip it making sure you don&#8217;t change the name of the apex folder inside the zip.</strong></p>
<div class="dean_ch" style="white-space: wrap;">unzip apex_4.0.1.zip /tmp/<br />
cd /tmp/apex</div>
<p><strong>3. Connect to your XE installation</strong></p>
<div class="dean_ch" style="white-space: wrap;">sqlplus / as sysdba</div>
<p><strong>4. Run the installation script</strong></p>
<div class="dean_ch" style="white-space: wrap;">SQL&gt; @apexins SYSAUX SYSAUX TEMP /i/</div>
<p><strong>5. Wait 10-15 minutes then connect again as sysdba and import images</strong></p>
<div class="dean_ch" style="white-space: wrap;">SQL&gt;@apxldimg.sql /tmp</div>
<p><em>!do not put the &#8220;apex&#8221; folder in the path there</em></p>
<p>That&#8217;s it, no more unlock account, set password, set port, you already did this on the previous installation.</p>
<p>Enjoy!</p>
<p><em><strong>Related posts:</strong></em></p>
<li><a href="http://www.webxpert.ro/andrei/2008/06/16/oracle-apex-31-installation-on-oracle-database-10g-xe/">Oracle APEX 3.1 installation on Oracle Database 10g XE</a></li>
<li><a href="http://www.webxpert.ro/andrei/2009/05/31/instal-oracle-10g-xe-on-ubuntu-server-904-jaunty-jackalope/">Install Oracle 10g XE on Ubuntu Server 9.04 Jaunty Jackalope</a></li>
<li><a href="http://www.webxpert.ro/andrei/2009/03/17/disadvantages-of-using-oracle-database-10g-xe-express-edition/">Disadvantages of using Oracle Database 10g XE (Express Edition)</a></li>
<li><a href="http://www.webxpert.ro/andrei/2010/04/03/oracle-database-11g-release-2-available-on-windows-finally/">Oracle Database 11g Release 2 available on Windows&#8230; finally</a></li>
<li><a href="http://www.webxpert.ro/andrei/2009/10/01/sql-developer-2-1-ea1-available/">SQL Developer 2.1 EA1 available</a></li>
]]></content:encoded>
			<wfw:commentRss>http://www.webxpert.ro/andrei/2010/09/09/upgrade-oracle-apex-3-2-1-to-4-0-1-on-oracle-database-10g-express-edition-xe/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Oracle Database 11g Release 2 available on Windows&#8230; finally</title>
		<link>http://www.webxpert.ro/andrei/2010/04/03/oracle-database-11g-release-2-available-on-windows-finally/</link>
		<comments>http://www.webxpert.ro/andrei/2010/04/03/oracle-database-11g-release-2-available-on-windows-finally/#comments</comments>
		<pubDate>Sat, 03 Apr 2010 17:49:08 +0000</pubDate>
		<dc:creator>andreiash</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[11g]]></category>
		<category><![CDATA[11gR2]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.webxpert.ro/andrei/?p=703</guid>
		<description><![CDATA[Approx. 4 months after the Linux release, the Windows version of 11gR2 arrived on OTN silently. Just 64bit version for the moment, but I&#8217;m sure the 32bit version will follow soon. Considering the fact there is nothing on corporate blogs or on eDelivery, I&#8217;m sure they will make it public after both version will be [...]]]></description>
			<content:encoded><![CDATA[<p>Approx. 4 months after the Linux release, the Windows version of 11gR2 arrived on <a href="http://www.oracle.com/technology/software/products/database/oracle11g/112010_win64soft.html">OTN</a> silently. </p>
<p><img src="http://www.webxpert.ro/andrei/wp-content/uploads/2009/03/oracle_11g_database.jpg" alt="" title="oracle_11g_database" width="290" height="88" class="aligncenter size-full wp-image-383" /><br />
Just 64bit version for the moment, but I&#8217;m sure the 32bit version will follow soon. Considering the fact there is nothing on corporate blogs or on <a href="http://edelivery.oracle.com">eDelivery</a>, I&#8217;m sure they will make it public after both version will be available, most probably after Easter.</p>
<p>Regarding the version itself, I used the beta versions and will definitely recommend it. </p>
<p><em><strong>LATER UPDATE (6th of April)</strong></em>: 32bit version has just arrived on OTN <a href="http://www.oracle.com/technology/software/products/database/oracle11g/112010_win32soft.html">here</a>.</p>
<p>Enjoy!</p>
<li><a href="http://www.webxpert.ro/andrei/2009/09/01/11gr2-is-now-ga/">Oracle Database 11gR2 is now GA</a></li>
<li><a href="http://www.webxpert.ro/andrei/2010/09/09/upgrade-oracle-apex-3-2-1-to-4-0-1-on-oracle-database-10g-express-edition-xe/">Upgrade Oracle APEX 3.2.1 to 4.0.1 on Oracle Database 10g Express Edition (XE)</a></li>
<li><a href="http://www.webxpert.ro/andrei/2009/03/30/install-oracle-database-vault-on-patched-11g-database-11107-on-windows/">Install Oracle Database Vault on patched 11g database (11.1.0.7) on Windows</a></li>
<li><a href="http://www.webxpert.ro/andrei/2008/06/16/oracle-apex-31-installation-on-oracle-database-10g-xe/">Oracle APEX 3.1 installation on Oracle Database 10g XE</a></li>
<li><a href="http://www.webxpert.ro/andrei/2010/01/22/book-review-sql-developer-2-1-by-sue-harper-packt-publishing/">Book review: SQL Developer 2.1 by Sue Harper (Packt Publishing)</a></li>
]]></content:encoded>
			<wfw:commentRss>http://www.webxpert.ro/andrei/2010/04/03/oracle-database-11g-release-2-available-on-windows-finally/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install subversion for VPS (cPanel) under CentOS</title>
		<link>http://www.webxpert.ro/andrei/2010/03/12/install-subversion-for-vps-cpanel-under-centos/</link>
		<comments>http://www.webxpert.ro/andrei/2010/03/12/install-subversion-for-vps-cpanel-under-centos/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 11:26:33 +0000</pubDate>
		<dc:creator>andreiash</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://www.webxpert.ro/andrei/?p=662</guid>
		<description><![CDATA[I’ve been tasked to add some features (subversion is one of them) under a Virtual Private Server (cPanel WHM) on a Hosting site. First I downloaded and unarchived subversion: mkdir -p /usr/local/src/subverison cd /usr/local/src/subversion wget http://subversion.tigris.org/downloads/subversion-1.6.9.tar.bz2 tar xfj subversion-1.6.6.tar.bz2 &#160; Since the last versions are requiring SQLite, I had to download and copy one file [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been tasked to add some features (subversion is one of them) under a Virtual Private Server (cPanel WHM) on a Hosting site.</p>
<p><a href="http://www.webxpert.ro/andrei/wp-content/uploads/2010/03/image.axd.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image.axd" border="0" alt="image.axd" src="http://www.webxpert.ro/andrei/wp-content/uploads/2010/03/image.axd_thumb.png" width="150" height="130" /></a></p>
<p>First I downloaded and unarchived subversion:</p>
<div class="dean_ch" style="white-space: wrap;">
<span class="kw2">mkdir</span> -p /usr/<span class="kw3">local</span>/src/subverison<br />
<span class="kw3">cd</span> /usr/<span class="kw3">local</span>/src/subversion<br />
<span class="kw2">wget</span> http://subversion.tigris.org/downloads/subversion<span class="nu0">-1.6</span><span class="nu0">.9</span>.<span class="kw2">tar</span>.bz2<br />
<span class="kw2">tar</span> xfj subversion<span class="nu0">-1.6</span><span class="nu0">.6</span>.<span class="kw2">tar</span>.bz2 <br />
&nbsp;</div>
<p>Since the last versions are requiring SQLite, I had to download and copy one file from sqlite folder to subversion folder:<span id="more-662"></span></p>
<div class="dean_ch" style="white-space: wrap;">
<span class="kw3">cd</span> .. &nbsp; <br />
<span class="kw2">wget</span> http://www.sqlite.org/sqlite-amalgamation<span class="nu0">-3.6</span><span class="nu0">.13</span>.<span class="kw2">tar</span>.gz<br />
<span class="kw2">tar</span> -xvf sqlite-amalgamation<span class="nu0">-3.6</span><span class="nu0">.13</span>.<span class="kw2">tar</span>.gz<br />
<span class="kw2">mkdir</span> subversion<span class="nu0">-1.6</span><span class="nu0">.9</span>/sqlite-amalgamation<br />
<span class="kw2">cp</span> sqlite<span class="nu0">-3.6</span><span class="nu0">.13</span>/sqlite3.c subversion<span class="nu0">-1.6</span><span class="nu0">.9</span>/sqlite-amalgamation/sqlite3.c<br />
<span class="kw3">cd</span> subversion<span class="nu0">-1.6</span><span class="nu0">.9</span><br />
&nbsp;</div>
<p>Configure, make and install:</p>
<div class="dean_ch" style="white-space: wrap;">
./configure &#8211;with-<span class="re2">apxs=</span>/usr/<span class="kw3">local</span>/apache/bin/apxs &#8211;with-<span class="re2">apr=</span>/usr/<span class="kw3">local</span>/apache/bin/apr-config &#8211;with-apr-<span class="re2">util=</span>/home/cpeasyapache/src/httpd<span class="nu0">-2.2</span><span class="nu0">.9</span>/srclib/apr-util &nbsp; \<br />
<span class="kw2">make</span> &nbsp; &nbsp;<br />
<span class="kw2">make</span> <span class="kw2">install</span><br />
&nbsp;</div>
<p>Then creating a repository:</p>
<div class="dean_ch" style="white-space: wrap;">
<span class="kw3">cd</span> /<br />
<span class="kw2">mkdir</span> svn &amp;amp;&amp;amp; <span class="kw3">cd</span> svn<br />
svnadmin create &#8211;fs-<span class="kw3">type</span> fsfs &lt;repo_name&gt;<br />
&nbsp;</div>
<p>Create a template for my projects and initialize repository:</p>
<div class="dean_ch" style="white-space: wrap;">
<span class="kw2">mkdir</span> /svntemp<br />
<span class="kw3">cd</span> /svntemp</p>
<p><span class="kw2">mkdir</span> website1<br />
<span class="kw2">mkdir</span> website1/trunk<br />
<span class="kw2">mkdir</span> website1/branches<br />
<span class="kw2">mkdir</span> website1/tags</p>
<p>svn import /svntemp <span class="kw2">file</span>:///svn/&lt;repo-name&gt; &#8211;message <span class="st0">&quot;Creating initial repo.&quot;</span></p>
<p>svn list &#8211;verbose <span class="kw2">file</span>:///svn/&lt;repo-name&gt;<br />
&nbsp;</div>
<p>Create users inside authz file and add them to svnserve.conf. You might want to set anonymous permissions to none.</p>
<p>Access your svn via internet with:</p>
<div class="dean_ch" style="white-space: wrap;">svn://&lt;IP_ADDRESS/HOSTNAME&gt;/svn/&lt;repo_name&gt;/website1/trunk</div>
<p>Voila!</p>
<p><em><strong>Related posts:</strong></em></p>
<li><a href="http://www.webxpert.ro/andrei/2009/10/29/ubuntu-9-10-karmic-koala-released/">Ubuntu 9.10 Karmic Koala released</a></li>
<li><a href="http://www.webxpert.ro/andrei/2009/05/31/instal-oracle-10g-xe-on-ubuntu-server-904-jaunty-jackalope/">Install Oracle 10g XE on Ubuntu Server 9.04 Jaunty Jackalope</a></li>
<li><a href="http://www.webxpert.ro/andrei/2010/09/09/upgrade-oracle-apex-3-2-1-to-4-0-1-on-oracle-database-10g-express-edition-xe/">Upgrade Oracle APEX 3.2.1 to 4.0.1 on Oracle Database 10g Express Edition (XE)</a></li>
<li><a href="http://www.webxpert.ro/andrei/2010/09/07/install-webmin-on-ubuntu-server-or-desktop-10-10-maverick-meerka/">Install Webmin on Ubuntu Server or Desktop 10.10 Maverick Meerkat</a></li>
<li><a href="http://www.webxpert.ro/andrei/2010/09/07/install-webmin-on-ubuntu-server-or-desktop-10-04-lucid-lynx/">Install Webmin on Ubuntu Server or Desktop 10.04 Lucid Lynx</a></li>
]]></content:encoded>
			<wfw:commentRss>http://www.webxpert.ro/andrei/2010/03/12/install-subversion-for-vps-cpanel-under-centos/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Ubuntu 9.10 Karmic Koala released</title>
		<link>http://www.webxpert.ro/andrei/2009/10/29/ubuntu-9-10-karmic-koala-released/</link>
		<comments>http://www.webxpert.ro/andrei/2009/10/29/ubuntu-9-10-karmic-koala-released/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 16:30:14 +0000</pubDate>
		<dc:creator>andreiash</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[Jaunty Jackalope]]></category>
		<category><![CDATA[Karmic Koala]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.webxpert.ro/andrei/?p=549</guid>
		<description><![CDATA[Hey, Ubuntu 9.10 (Karmic Koala) is out of beta and is now available for download here. To see what&#8217;s new just check the release notes. From my feeling after testing the beta, It&#8217;s pretty similar to 9.04 (Jaunty Jackalope) but with some package updates and improvements. Don&#8217;t wait, go and take it. Related posts: Install [...]]]></description>
			<content:encoded><![CDATA[<p>Hey, Ubuntu 9.10 (Karmic Koala) is out of beta and is now available for download <a href="http://www.ubuntu.com/getubuntu/download" target="_blank">here</a>.</p>
<p>To see what&#8217;s new just check the <a href="http://www.ubuntu.com/getubuntu/releasenotes/910overview" target="_blank">release notes</a>. From my feeling after testing the beta, It&#8217;s pretty similar to 9.04 (Jaunty Jackalope) but with some package updates and improvements. </p>
<p>Don&#8217;t wait, <a href="http://www.ubuntu.com/getubuntu/download" target="_blank">go and take it</a>.</p>
<p><em><strong>Related posts:</strong></em></p>
<li><a href="http://www.webxpert.ro/andrei/2009/05/31/instal-oracle-10g-xe-on-ubuntu-server-904-jaunty-jackalope/">Install Oracle 10g XE on Ubuntu Server 9.04 Jaunty Jackalope</a></li>
<li><a href="http://www.webxpert.ro/andrei/2010/09/07/install-webmin-on-ubuntu-server-or-desktop-10-10-maverick-meerka/">Install Webmin on Ubuntu Server or Desktop 10.10 Maverick Meerkat</a></li>
<li><a href="http://www.webxpert.ro/andrei/2010/09/07/install-webmin-on-ubuntu-server-or-desktop-10-04-lucid-lynx/">Install Webmin on Ubuntu Server or Desktop 10.04 Lucid Lynx</a></li>
<li><a href="http://www.webxpert.ro/andrei/2010/03/12/install-subversion-for-vps-cpanel-under-centos/">Install subversion for VPS (cPanel) under CentOS</a></li>
<li><a href="http://www.webxpert.ro/andrei/2009/10/29/install-webmin-on-ubuntu-server-or-desktop-9-10-karmic-koala/">Install Webmin on Ubuntu Server or Desktop 9.10 Karmic Koala</a></li>
]]></content:encoded>
			<wfw:commentRss>http://www.webxpert.ro/andrei/2009/10/29/ubuntu-9-10-karmic-koala-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle Database 11gR2 is now GA</title>
		<link>http://www.webxpert.ro/andrei/2009/09/01/11gr2-is-now-ga/</link>
		<comments>http://www.webxpert.ro/andrei/2009/09/01/11gr2-is-now-ga/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 12:46:42 +0000</pubDate>
		<dc:creator>andreiash</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[11g]]></category>
		<category><![CDATA[11gR2]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[oracle]]></category>

		<guid isPermaLink="false">http://www.webxpert.ro/andrei/?p=503</guid>
		<description><![CDATA[Yes, it finally arrived! Check this out! Related posts: Oracle Database 11g Release 2 available on Windows&#8230; finally Upgrade Oracle APEX 3.2.1 to 4.0.1 on Oracle Database 10g Express Edition (XE) Install Oracle 10g XE on Ubuntu Server 9.04 Jaunty Jackalope Windows authentication connection to SQL Server from SQL Developer SQL Server 2005 named instance [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.webxpert.ro/andrei/wp-content/uploads/2009/03/oracle_11g_database.jpg"><img src="http://www.webxpert.ro/andrei/wp-content/uploads/2009/03/oracle_11g_database.jpg" alt="oracle_11g_database" title="oracle_11g_database" width="290" height="88" class="aligncenter size-full wp-image-383" /></a><br />
Yes, it finally arrived! Check <a href="http://www.oracle.com/technology/software/products/database/index.html">this </a>out!</p>
<p><em><strong>Related posts:</strong></em></p>
<li><a href="http://www.webxpert.ro/andrei/2010/04/03/oracle-database-11g-release-2-available-on-windows-finally/">Oracle Database 11g Release 2 available on Windows&#8230; finally</a></li>
<li><a href="http://www.webxpert.ro/andrei/2010/09/09/upgrade-oracle-apex-3-2-1-to-4-0-1-on-oracle-database-10g-express-edition-xe/">Upgrade Oracle APEX 3.2.1 to 4.0.1 on Oracle Database 10g Express Edition (XE)</a></li>
<li><a href="http://www.webxpert.ro/andrei/2009/05/31/instal-oracle-10g-xe-on-ubuntu-server-904-jaunty-jackalope/">Install Oracle 10g XE on Ubuntu Server 9.04 Jaunty Jackalope</a></li>
<li><a href="http://www.webxpert.ro/andrei/2009/05/29/windows-authentication-connection-to-sql-server-from-sql-developer/">Windows authentication connection to SQL Server from SQL Developer</a></li>
<li><a href="http://www.webxpert.ro/andrei/2009/05/22/sql-server-2005-named-instance-in-oracle-sql-developer/">SQL Server 2005 named instance in Oracle SQL Developer</a></li>
]]></content:encoded>
			<wfw:commentRss>http://www.webxpert.ro/andrei/2009/09/01/11gr2-is-now-ga/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Oracle 10g XE on Ubuntu Server 9.04 Jaunty Jackalope</title>
		<link>http://www.webxpert.ro/andrei/2009/05/31/instal-oracle-10g-xe-on-ubuntu-server-904-jaunty-jackalope/</link>
		<comments>http://www.webxpert.ro/andrei/2009/05/31/instal-oracle-10g-xe-on-ubuntu-server-904-jaunty-jackalope/#comments</comments>
		<pubDate>Sun, 31 May 2009 07:32:11 +0000</pubDate>
		<dc:creator>andreiash</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[10g]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[Jaunty Jackalope]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[XE]]></category>

		<guid isPermaLink="false">http://www.webxpert.ro/andrei/?p=433</guid>
		<description><![CDATA[Best way to have a easy to access XE database and APEX on top of it is to put them on a Ubuntu Server virtual machine that I start just when I need. Installation of 10g Express Edition should not take more than 10 minutes and the steps are below: 1. Prepare the swap space [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.webxpert.ro/andrei/wp-content/uploads/2009/03/xe_logo.gif" alt="xe_logo" title="xe_logo" width="75" height="35" class="alignleft size-full wp-image-367" />Best way to have a easy to access XE database and APEX on top of it is to put them on a Ubuntu Server virtual machine that I start just when I need.</p>
<p>Installation of 10g Express Edition should not take more than 10 minutes and the steps are below:</p>
<p><strong>1. Prepare the swap space</strong><br />
If you have less than 1GB memory run the following commands to create swap space:</p>
<div class="dean_ch" style="white-space: wrap;">$ <span class="kw2">sudo</span> <span class="kw2">dd</span> <span class="re2">if=</span>/dev/zero <span class="re2">of=</span>/swpfs1 <span class="re2">bs=</span>1M <span class="re2">count=</span><span class="nu0">1000</span><br />
$ <span class="kw2">sudo</span> mkswap /swpfs1<br />
$ <span class="kw2">sudo</span> swapon /swpfs1</div>
<p><span id="more-433"></span></p>
<p><strong>2. Add new Aptitude source and get the GPG key for Oracle</strong><br />
2.1. First modify /etc/apt/sources.list file:</p>
<div class="dean_ch" style="white-space: wrap;">$ <span class="kw2">sudo</span> vi /etc/apt/sources.list</div>
<p>2.2. Append following line:</p>
<div class="dean_ch" style="white-space: wrap;">deb http://oss.oracle.com/debian unstable main non-<span class="kw2">free</span></div>
<p>2.3. Save and close the file. Next import GPG key:</p>
<div class="dean_ch" style="white-space: wrap;">$ <span class="kw2">wget</span> http://oss.oracle.com/el4/RPM-GPG-KEY-oracle -O- | <span class="kw2">sudo</span> apt-key add -</div>
<p>2.4. Update package database:</p>
<div class="dean_ch" style="white-space: wrap;">$ <span class="kw2">sudo</span> apt-get update</div>
<p><strong>3. Install Oracle 10g XE:</strong></p>
<div class="dean_ch" style="white-space: wrap;">$ <span class="kw2">sudo</span> apt-get <span class="kw2">install</span> oracle-xe</div>
<p><strong>4. Post-install configuration</strong><br />
4.1. You must configure Oracle TCP/IP port and other parameters. Simply type the following command:</p>
<div class="dean_ch" style="white-space: wrap;">$ <span class="kw2">sudo</span> /etc/init.d/oracle-xe configure</div>
<p>4.2. Add environment variables in .profile</p>
<div class="dean_ch" style="white-space: wrap;">$ <span class="kw3">cd</span> ~<br />
$ vi .profile</div>
<p>Add the following lines:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw3">export</span> <span class="re2">ORACLE_SID=</span>XE<br />
<span class="kw3">export</span> <span class="re2">ORACLE_HOME=</span>/usr/lib/oracle/xe/app/oracle/product/<span class="nu0">10.2</span><span class="nu0">.0</span>/server<br />
<span class="kw3">export</span> <span class="re2">PATH=</span><span class="re1">$PATH</span>:<span class="re1">$ORACLE_HOME</span>/bin</div>
<p>Good luck,<br />
Andrei</p>
<p><em><strong>Related posts:</strong></em></p>
<li><a href="http://www.webxpert.ro/andrei/2010/09/09/upgrade-oracle-apex-3-2-1-to-4-0-1-on-oracle-database-10g-express-edition-xe/">Upgrade Oracle APEX 3.2.1 to 4.0.1 on Oracle Database 10g Express Edition (XE)</a></li>
<li><a href="http://www.webxpert.ro/andrei/2008/06/16/oracle-apex-31-installation-on-oracle-database-10g-xe/">Oracle APEX 3.1 installation on Oracle Database 10g XE</a></li>
<li><a href="http://www.webxpert.ro/andrei/2009/10/29/ubuntu-9-10-karmic-koala-released/">Ubuntu 9.10 Karmic Koala released</a></li>
<li><a href="http://www.webxpert.ro/andrei/2009/03/17/disadvantages-of-using-oracle-database-10g-xe-express-edition/">Disadvantages of using Oracle Database 10g XE (Express Edition)</a></li>
<li><a href="http://www.webxpert.ro/andrei/2010/04/03/oracle-database-11g-release-2-available-on-windows-finally/">Oracle Database 11g Release 2 available on Windows&#8230; finally</a></li>
]]></content:encoded>
			<wfw:commentRss>http://www.webxpert.ro/andrei/2009/05/31/instal-oracle-10g-xe-on-ubuntu-server-904-jaunty-jackalope/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>10 tools I am using everyday</title>
		<link>http://www.webxpert.ro/andrei/2009/05/30/10-tools-i-am-using-everyday/</link>
		<comments>http://www.webxpert.ro/andrei/2009/05/30/10-tools-i-am-using-everyday/#comments</comments>
		<pubDate>Sat, 30 May 2009 20:07:26 +0000</pubDate>
		<dc:creator>andreiash</dc:creator>
				<category><![CDATA[Gadgets]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.webxpert.ro/andrei/?p=419</guid>
		<description><![CDATA[Total Commander - File Manager &#8211; I am using it since version 3, ~10 year ago. Simply not replaceable. Pidgin - Instant Messaging &#8211; Single client for all protocols, including Oracle internal one. Launchy - Application Launcher &#8211; just press ALT+Space and write a few letters from app name to start it MPlayer &#8211; Movie [...]]]></description>
			<content:encoded><![CDATA[<p><strong><a href="http://www.ghisler.com" target="_blank">Total Commander</a> </strong>- File Manager &#8211; I am using it since version 3, ~10 year ago. Simply not replaceable.<br />
<a href="http://www.webxpert.ro/andrei/wp-content/uploads/2009/05/wcmdbig.gif"><img src="http://www.webxpert.ro/andrei/wp-content/uploads/2009/05/wcmdbig-300x213.gif" alt="wcmdbig" title="wcmdbig" width="300" height="213" class="aligncenter size-medium wp-image-439" /></a></p>
<p><strong><a href="http://pidgin.im" target="_blank">Pidgin</a> </strong>- Instant Messaging &#8211; Single client for all protocols, including Oracle internal one.</p>
<p><strong><a href="http://launchy.net" target="_blank">Launchy</a> </strong>- Application Launcher &#8211; just press ALT+Space and write a few letters from app name to start it</p>
<p><strong><a href="http://www.mplayerhq.hu" target="_blank">MPlayer</a></strong> &#8211; Movie Player &#8211; no GUI, just console, very quick, no need to install codecs. Some issues with external monitor.</p>
<p><strong><a href="http://www.mozilla.com/firefox" target="_blank">Firefox</a> </strong>- of course, user since version 0.9 Beta</p>
<p><strong><a href="http://getdropbox.com" target="_blank">Dropbox</a> </strong>- File Sync &#8211; simple sync of some folders between laptops or laptop and desktop. As a bonus files are stored online and you get revisions history</p>
<p><strong><a href="http://www.gmail.com" target="_blank">Google Mail</a></strong> &#8211; Personal Email &#8211; lot of space, even bought extra. Can also use it to read other POP3 accounts, all in a single interface.</p>
<p><strong><a href="http://www.google.com/reader" target="_blank">Google Reader</a></strong> &#8211; RSS reader &#8211; the best RSS reader</p>
<p><strong><a href="http://www.google.com/calendar" target="_blank">Google Calendar</a></strong> &#8211; Calendar &#8211; simple to use, simple to share, to sync. Can also use it to read other calendars.</p>
<p><strong><a href="http://www.tripit.com" target="_blank">TripIt</a></strong> &#8211; Booking Manager &#8211; just forward all the travel plans to Tripit and you&#8217;ll have your itinerary ready, published as a web calendar, links to online check-in and other usefull stuff. </p>
<p><em><strong>Related posts:</strong></em></p>
<li><a href="http://www.webxpert.ro/andrei/2008/06/16/oracle-sql-developer-151-is-out/">Oracle SQL Developer 1.5.1 is out</a></li>
<li><a href="http://www.webxpert.ro/andrei/2010/10/08/vista-cannot-get-ip-from-some-routers-or-some-dhcp-servers/">Vista cannot get IP from some routers or some DHCP servers</a></li>
<li><a href="http://www.webxpert.ro/andrei/2010/09/09/upgrade-oracle-apex-3-2-1-to-4-0-1-on-oracle-database-10g-express-edition-xe/">Upgrade Oracle APEX 3.2.1 to 4.0.1 on Oracle Database 10g Express Edition (XE)</a></li>
<li><a href="http://www.webxpert.ro/andrei/2010/04/03/oracle-database-11g-release-2-available-on-windows-finally/">Oracle Database 11g Release 2 available on Windows&#8230; finally</a></li>
<li><a href="http://www.webxpert.ro/andrei/2010/03/12/install-subversion-for-vps-cpanel-under-centos/">Install subversion for VPS (cPanel) under CentOS</a></li>
]]></content:encoded>
			<wfw:commentRss>http://www.webxpert.ro/andrei/2009/05/30/10-tools-i-am-using-everyday/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows authentication connection to SQL Server from SQL Developer</title>
		<link>http://www.webxpert.ro/andrei/2009/05/29/windows-authentication-connection-to-sql-server-from-sql-developer/</link>
		<comments>http://www.webxpert.ro/andrei/2009/05/29/windows-authentication-connection-to-sql-server-from-sql-developer/#comments</comments>
		<pubDate>Fri, 29 May 2009 19:01:30 +0000</pubDate>
		<dc:creator>andreiash</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[jdbc]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[sql developer]]></category>

		<guid isPermaLink="false">http://www.webxpert.ro/andrei/?p=417</guid>
		<description><![CDATA[Trying to connect to SQL Server 2000 or 2005 from Oracle SQL Developer having Windows Authentication enabled on SQL Server will fail with: &#8220;I/O Error: SSO Failed: Native SSPI Library not loaded. Check the java.library.path system property.&#8221; The solution is simple: place a dll called NTLMAUTH.DLL (NT authentication) in your system path and restart SQL [...]]]></description>
			<content:encoded><![CDATA[<p>Trying to connect to SQL Server 2000 or 2005 from Oracle SQL Developer having Windows Authentication enabled on SQL Server will fail with:<br />
<em><strong>&#8220;I/O Error: SSO Failed: Native SSPI Library not loaded. Check the java.library.path system property.&#8221;</strong></em><br />
<img src="http://www.webxpert.ro/andrei/wp-content/uploads/2009/05/sqldev_winauth.jpg" alt="sqldev_winauth" title="sqldev_winauth" width="670" height="480" class="aligncenter size-full wp-image-428" /></p>
<p>The solution is simple: place a dll called NTLMAUTH.DLL (NT authentication) in your system path and restart SQL Developer. Windows/System32 is always a wise choice.</p>
<p>Where to get this DLL? It is shipped with JTDS <a href="http://sourceforge.net/projects/jtds/files/">here</a>.</p>
<p>Is there another option? Yes, enable SQL Server authentication.</p>
<p><em><strong>Related posts:</strong></em></p>
<li><a href="http://www.webxpert.ro/andrei/2008/10/15/oracle-sql-developer-data-modeling-151-early-adopter-release-launched/">Oracle SQL Developer Data Modeling 1.5.1 Early Adopter release launched</a></li>
<li><a href="http://www.webxpert.ro/andrei/2008/06/16/oracle-sql-developer-151-is-out/">Oracle SQL Developer 1.5.1 is out</a></li>
<li><a href="http://www.webxpert.ro/andrei/2010/09/09/upgrade-oracle-apex-3-2-1-to-4-0-1-on-oracle-database-10g-express-edition-xe/">Upgrade Oracle APEX 3.2.1 to 4.0.1 on Oracle Database 10g Express Edition (XE)</a></li>
<li><a href="http://www.webxpert.ro/andrei/2010/04/03/oracle-database-11g-release-2-available-on-windows-finally/">Oracle Database 11g Release 2 available on Windows&#8230; finally</a></li>
<li><a href="http://www.webxpert.ro/andrei/2010/01/22/book-review-sql-developer-2-1-by-sue-harper-packt-publishing/">Book review: SQL Developer 2.1 by Sue Harper (Packt Publishing)</a></li>
]]></content:encoded>
			<wfw:commentRss>http://www.webxpert.ro/andrei/2009/05/29/windows-authentication-connection-to-sql-server-from-sql-developer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Thumbnail generation with PHP tutorial</title>
		<link>http://www.webxpert.ro/andrei/2009/01/08/thumbnail-generation-with-php-tutorial/</link>
		<comments>http://www.webxpert.ro/andrei/2009/01/08/thumbnail-generation-with-php-tutorial/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 08:19:25 +0000</pubDate>
		<dc:creator>andreiash</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[square]]></category>
		<category><![CDATA[thumbnail]]></category>

		<guid isPermaLink="false">http://www.webxpert.ro/andrei/?p=293</guid>
		<description><![CDATA[No, it&#8217;s not yet another PHP thumbnail generation tutorial! I recently needed a function to: create square thumbnails don&#8217;t crop the initial image, but scale it and fill with white background center the thumbnail in the square call the function in a loop to process an entire folder I found no suitable example and I [...]]]></description>
			<content:encoded><![CDATA[<p>No, it&#8217;s not yet another PHP thumbnail generation tutorial! I recently needed a function to:</p>
<ul>
<li>create <strong>square </strong>thumbnails</li>
<li><strong>don&#8217;t crop</strong> the initial image, but scale it and fill with <strong>white background</strong></li>
<li><strong>center </strong>the thumbnail in the square</li>
<li>call the function in a loop to <strong>process an entire folder</strong></li>
</ul>
<p>I found no suitable example and I decided that instead of digging too much it&#8217;s better to create my own function and a class for it.</p>
<p>Let&#8217;s start with a photo that we need to create a thumbnail for:<br />
<div id="attachment_295" class="wp-caption aligncenter" style="width: 490px"><img src="http://www.webxpert.ro/andrei/wp-content/uploads/2009/01/danut.jpg" alt="Nice kid, huh?" title="danut" width="480" height="640" class="size-full wp-image-295" /><p class="wp-caption-text">Nice kid, huh?</p></div><br />
&#8230; and what we want to achieve:<br />
<img src="http://www.webxpert.ro/andrei/wp-content/uploads/2009/01/danut_thumb.jpg" alt="danut_thumb" title="danut_thumb" width="167" height="167" class="aligncenter size-full wp-image-297" /></p>
<hr />
<strong>First step would be the thumbnail generation snippet:</strong><br />
<span id="more-293"></span></p>
<div class="dean_ch" style="white-space: wrap;">
<span class="re0">$square_size</span> = <span class="nu0">167</span>;<br />
<span class="re0">$quality</span> = <span class="nu0">100</span>;<br />
<span class="co1">//get original image attributes</span><br />
<a href="http://www.php.net/list"><span class="kw3">list</span></a><span class="br0">&#40;</span><span class="re0">$width</span>, <span class="re0">$height</span>, <span class="re0">$type</span>, <span class="re0">$attr</span><span class="br0">&#41;</span> = <a href="http://www.php.net/getimagesize"><span class="kw3">getimagesize</span></a><span class="br0">&#40;</span><span class="re0">$photos_dir</span>.<span class="st0">&quot;/&quot;</span>.<span class="re0">$file</span><span class="br0">&#41;</span>;<br />
<span class="re0">$thumb</span>=imagecreatefromjpeg<span class="br0">&#40;</span><span class="re0">$photos_dir</span>.<span class="st0">&quot;/&quot;</span>.<span class="re0">$file</span><span class="br0">&#41;</span>;<br />
<span class="re0">$thumb_p</span> = imagecreatetruecolor<span class="br0">&#40;</span><span class="re0">$square_size</span>, <span class="re0">$square_size</span><span class="br0">&#41;</span>;<br />
imagecopyresampled<span class="br0">&#40;</span><span class="re0">$thumb_p</span>, <span class="re0">$thumb</span>, <span class="nu0">0</span>, <span class="nu0">0</span>, <span class="nu0">0</span>, <span class="nu0">0</span>, <span class="re0">$square_size</span>, <span class="re0">$square_size</span>, <span class="re0">$width</span>, <span class="re0">$height</span><span class="br0">&#41;</span>;<br />
<span class="co1">//save the file</span><br />
imagejpeg<span class="br0">&#40;</span><span class="re0">$thumb_p</span>,<span class="re0">$thumbs_dir</span>.<span class="st0">&quot;/&quot;</span>.<span class="re0">$file</span>,<span class="re0">$quality</span><span class="br0">&#41;</span>;</div>
<p>This would be the result:<br />
<img src="http://www.webxpert.ro/andrei/wp-content/uploads/2009/01/danut1.jpg" alt="danut1" title="danut1" width="167" height="167" class="aligncenter size-full wp-image-306" /><br />
As we can see, <strong>the photo is distorted and we need to scale it</strong>, by adding 2 variables:</p>
<div class="dean_ch" style="white-space: wrap;">
<span class="co1">//set dimensions</span><br />
<span class="kw1">if</span><span class="br0">&#40;</span><span class="re0">$width</span>&gt; <span class="re0">$height</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$width_t</span>=<span class="re0">$square_size</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//respect the ratio</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$height_t</span>=<a href="http://www.php.net/round"><span class="kw3">round</span></a><span class="br0">&#40;</span><span class="re0">$height</span>/<span class="re0">$width</span>*<span class="re0">$square_size</span><span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span> <span class="kw1">elseif</span><span class="br0">&#40;</span><span class="re0">$height</span>&gt; <span class="re0">$width</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$height_t</span>=<span class="re0">$square_size</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$width_t</span>=<a href="http://www.php.net/round"><span class="kw3">round</span></a><span class="br0">&#40;</span><span class="re0">$width</span>/<span class="re0">$height</span>*<span class="re0">$square_size</span><span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span><br />
<span class="kw1">else</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$width_t</span>=<span class="re0">$height_t</span>=<span class="re0">$square_size</span>;<br />
<span class="br0">&#125;</span></div>
<p>We also need to change the <strong>imagecopyresampled </strong>function call to add these 2 new variables:</p>
<div class="dean_ch" style="white-space: wrap;">
imagecopyresampled<span class="br0">&#40;</span><span class="re0">$thumb_p</span>, <span class="re0">$thumb</span>, <span class="nu0">0</span>, <span class="nu0">0</span>, <span class="nu0">0</span>, <span class="nu0">0</span>, <span class="re0">$width_t</span>, <span class="re0">$height_t</span>, <span class="re0">$width</span>, <span class="re0">$height</span><span class="br0">&#41;</span>;</div>
<p>The new result would be:<br />
<img src="http://www.webxpert.ro/andrei/wp-content/uploads/2009/01/danut2.jpg" alt="danut2" title="danut2" width="167" height="167" class="aligncenter size-full wp-image-307" /><br />
The image is not distorted anymore but <strong>now it&#8217;s not centered</strong>. We need to move the point where the scaled image appears on the thumb to the right with a number of pixels equal to the half of the difference between height and width of the thumb. This offset is implemented also in the <strong>imagecopyresampled </strong>function, the first 2 zeros from the set of 4.</p>
<div class="dean_ch" style="white-space: wrap;">
<span class="co1">//set dimensions</span><br />
<span class="kw1">if</span><span class="br0">&#40;</span><span class="re0">$width</span>&gt; <span class="re0">$height</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$width_t</span>=<span class="re0">$square_size</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//respect the ratio</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$height_t</span>=<a href="http://www.php.net/round"><span class="kw3">round</span></a><span class="br0">&#40;</span><span class="re0">$height</span>/<span class="re0">$width</span>*<span class="re0">$square_size</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//set the offset</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$off_y</span>=<a href="http://www.php.net/ceil"><span class="kw3">ceil</span></a><span class="br0">&#40;</span><span class="br0">&#40;</span><span class="re0">$width_t</span>-<span class="re0">$height_t</span><span class="br0">&#41;</span>/<span class="nu0">2</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$off_x</span>=<span class="nu0">0</span>;<br />
<span class="br0">&#125;</span> <span class="kw1">elseif</span><span class="br0">&#40;</span><span class="re0">$height</span>&gt; <span class="re0">$width</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$height_t</span>=<span class="re0">$square_size</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$width_t</span>=<a href="http://www.php.net/round"><span class="kw3">round</span></a><span class="br0">&#40;</span><span class="re0">$width</span>/<span class="re0">$height</span>*<span class="re0">$square_size</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class="re0">$off_x</span>=<a href="http://www.php.net/ceil"><span class="kw3">ceil</span></a><span class="br0">&#40;</span><span class="br0">&#40;</span><span class="re0">$height_t</span>-<span class="re0">$width_t</span><span class="br0">&#41;</span>/<span class="nu0">2</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$off_y</span>=<span class="nu0">0</span>;<br />
<span class="br0">&#125;</span><br />
<span class="kw1">else</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$width_t</span>=<span class="re0">$height_t</span>=<span class="re0">$square_size</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$off_x</span>=<span class="re0">$off_y</span>=<span class="nu0">0</span>;<br />
<span class="br0">&#125;</span></div>
<p>We also need to change the <strong>imagecopyresampled </strong>function call to add these 2 new variables:</p>
<div class="dean_ch" style="white-space: wrap;">
imagecopyresampled<span class="br0">&#40;</span><span class="re0">$thumb_p</span>, <span class="re0">$thumb</span>, <span class="re0">$off_x</span>, <span class="re0">$off_y</span>, <span class="nu0">0</span>, <span class="nu0">0</span>, <span class="re0">$width_t</span>, <span class="re0">$height_t</span>, <span class="re0">$width</span>, <span class="re0">$height</span><span class="br0">&#41;</span>;</div>
<p>The new thumbnail look like this:<br />
<img src="http://www.webxpert.ro/andrei/wp-content/uploads/2009/01/danut3.jpg" alt="danut3" title="danut3" width="167" height="167" class="aligncenter size-full wp-image-308" /><br />
It&#8217;s better, the last thing I want is to <strong>set a white background to the thumb</strong> and I&#8217;m done. By default <strong>imagecreatetruecolor </strong>is creating a black canvas with no parameter to change it to white. In order to do this we need to declare a white background and fill the canvas with it <strong>BEFORE </strong>adding the scaled image:</p>
<div class="dean_ch" style="white-space: wrap;">
<span class="re0">$bg</span> = imagecolorallocate <span class="br0">&#40;</span> <span class="re0">$thumb_p</span>, <span class="nu0">255</span>, <span class="nu0">255</span>, <span class="nu0">255</span> <span class="br0">&#41;</span>;<br />
imagefill <span class="br0">&#40;</span> <span class="re0">$thumb_p</span>, <span class="nu0">0</span>, <span class="nu0">0</span>, <span class="re0">$bg</span> <span class="br0">&#41;</span>;</div>
<p>Now it&#8217;s what I want:<br />
<img src="http://www.webxpert.ro/andrei/wp-content/uploads/2009/01/danut4.jpg" alt="danut4" title="danut4" width="167" height="167" class="aligncenter size-full wp-image-309" /></p>
<p>The whole source code is the following:</p>
<div class="dean_ch" style="white-space: wrap;">
<span class="kw2">function</span> set_thumb<span class="br0">&#40;</span><span class="re0">$file</span>, <span class="re0">$photos_dir</span>=<span class="st0">&#8216;uploads/photos&#8217;</span>,<span class="re0">$thumbs_dir</span>=<span class="st0">&#8216;uploads/photos/thumbs&#8217;</span>, <span class="re0">$square_size</span>=<span class="nu0">167</span>, <span class="re0">$quality</span>=<span class="nu0">100</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//check if thumb exists</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>!<a href="http://www.php.net/file_exists"><span class="kw3">file_exists</span></a><span class="br0">&#40;</span><span class="re0">$thumbs_dir</span>.<span class="st0">&quot;/&quot;</span>.<span class="re0">$file</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//get image info</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/list"><span class="kw3">list</span></a><span class="br0">&#40;</span><span class="re0">$width</span>, <span class="re0">$height</span>, <span class="re0">$type</span>, <span class="re0">$attr</span><span class="br0">&#41;</span> = <a href="http://www.php.net/getimagesize"><span class="kw3">getimagesize</span></a><span class="br0">&#40;</span><span class="re0">$photos_dir</span>.<span class="st0">&quot;/&quot;</span>.<span class="re0">$file</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//set dimensions</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span><span class="re0">$width</span>&gt; <span class="re0">$height</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$width_t</span>=<span class="re0">$square_size</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//respect the ratio</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$height_t</span>=<a href="http://www.php.net/round"><span class="kw3">round</span></a><span class="br0">&#40;</span><span class="re0">$height</span>/<span class="re0">$width</span>*<span class="re0">$square_size</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//set the offset</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$off_y</span>=<a href="http://www.php.net/ceil"><span class="kw3">ceil</span></a><span class="br0">&#40;</span><span class="br0">&#40;</span><span class="re0">$width_t</span>-<span class="re0">$height_t</span><span class="br0">&#41;</span>/<span class="nu0">2</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$off_x</span>=<span class="nu0">0</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span> <span class="kw1">elseif</span><span class="br0">&#40;</span><span class="re0">$height</span>&gt; <span class="re0">$width</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$height_t</span>=<span class="re0">$square_size</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$width_t</span>=<a href="http://www.php.net/round"><span class="kw3">round</span></a><span class="br0">&#40;</span><span class="re0">$width</span>/<span class="re0">$height</span>*<span class="re0">$square_size</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$off_x</span>=<a href="http://www.php.net/ceil"><span class="kw3">ceil</span></a><span class="br0">&#40;</span><span class="br0">&#40;</span><span class="re0">$height_t</span>-<span class="re0">$width_t</span><span class="br0">&#41;</span>/<span class="nu0">2</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$off_y</span>=<span class="nu0">0</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">else</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$width_t</span>=<span class="re0">$height_t</span>=<span class="re0">$square_size</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$off_x</span>=<span class="re0">$off_y</span>=<span class="nu0">0</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$thumb</span>=imagecreatefromjpeg<span class="br0">&#40;</span><span class="re0">$photos_dir</span>.<span class="st0">&quot;/&quot;</span>.<span class="re0">$file</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$thumb_p</span> = imagecreatetruecolor<span class="br0">&#40;</span><span class="re0">$square_size</span>, <span class="re0">$square_size</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//default background is black</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$bg</span> = imagecolorallocate <span class="br0">&#40;</span> <span class="re0">$thumb_p</span>, <span class="nu0">255</span>, <span class="nu0">255</span>, <span class="nu0">255</span> <span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; imagefill <span class="br0">&#40;</span> <span class="re0">$thumb_p</span>, <span class="nu0">0</span>, <span class="nu0">0</span>, <span class="re0">$bg</span> <span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; imagecopyresampled<span class="br0">&#40;</span><span class="re0">$thumb_p</span>, <span class="re0">$thumb</span>, <span class="re0">$off_x</span>, <span class="re0">$off_y</span>, <span class="nu0">0</span>, <span class="nu0">0</span>, <span class="re0">$width_t</span>, <span class="re0">$height_t</span>, <span class="re0">$width</span>, <span class="re0">$height</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; imagejpeg<span class="br0">&#40;</span><span class="re0">$thumb_p</span>,<span class="re0">$thumbs_dir</span>.<span class="st0">&quot;/&quot;</span>.<span class="re0">$file</span>,<span class="re0">$quality</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
<p><em><strong>*Note</strong>: Nobody was hurt during this tutorial. The cute dude is <a href="http://rmilitaru.blogspot.com/">Razvan</a>&#8216;s son, Danut.</em></p>
<p>Read also:</p>
<li><a href="http://www.webxpert.ro/andrei/2009/01/14/thank-you-zendeditor/">Thank you ZendEditor !</a></li>
<li><a href="http://www.webxpert.ro/andrei/2010/09/09/upgrade-oracle-apex-3-2-1-to-4-0-1-on-oracle-database-10g-express-edition-xe/">Upgrade Oracle APEX 3.2.1 to 4.0.1 on Oracle Database 10g Express Edition (XE)</a></li>
<li><a href="http://www.webxpert.ro/andrei/2010/04/03/oracle-database-11g-release-2-available-on-windows-finally/">Oracle Database 11g Release 2 available on Windows&#8230; finally</a></li>
<li><a href="http://www.webxpert.ro/andrei/2010/03/14/book-review-php-5-e-commerce-development-by-michael-peacock-packt-publishing/">Book review: PHP 5 e-commerce Development by Michael Peacock (Packt Publishing)</a></li>
<li><a href="http://www.webxpert.ro/andrei/2010/03/12/install-subversion-for-vps-cpanel-under-centos/">Install subversion for VPS (cPanel) under CentOS</a></li>
]]></content:encoded>
			<wfw:commentRss>http://www.webxpert.ro/andrei/2009/01/08/thumbnail-generation-with-php-tutorial/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Looking for an old version of a specific software?</title>
		<link>http://www.webxpert.ro/andrei/2008/11/24/looking-for-an-old-version-of-a-specific-software/</link>
		<comments>http://www.webxpert.ro/andrei/2008/11/24/looking-for-an-old-version-of-a-specific-software/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 06:42:52 +0000</pubDate>
		<dc:creator>andreiash</dc:creator>
				<category><![CDATA[Gadgets]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[old version]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.webxpert.ro/andrei/?p=202</guid>
		<description><![CDATA[Most software companies are not offering anymore the old versions on their websites in order to promote their last release and get rid of support issues with old versions. But what if I don&#8217;t like the last version or it has something that is not working for me? Well&#8230; seems that somebody thought about this [...]]]></description>
			<content:encoded><![CDATA[<p>Most software companies are not offering anymore the old versions on their websites in order to promote their last release and get rid of support issues with old versions. But what if I don&#8217;t like the last version or it has something that is not working for me?</p>
<p>Well&#8230; seems that somebody thought about this and managed to collect all old versions of 182 programs (so far) and made them public. All licensing terms remain the same.</p>
<p><a href="http://www.webxpert.ro/andrei/wp-content/uploads/2008/11/oldversion.gif"><img src="http://www.webxpert.ro/andrei/wp-content/uploads/2008/11/oldversion.gif" alt="" title="oldversion" width="250" height="35" class="aligncenter size-full wp-image-203" /></a></p>
<p>The link is <a href="http://www.oldversion.com">www.OldVersion.com</a>.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webxpert.ro/andrei/2008/11/24/looking-for-an-old-version-of-a-specific-software/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

