<?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; Programming</title>
	<atom:link href="http://www.webxpert.ro/andrei/category/programming/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>Book review: PHP 5 e-commerce Development by Michael Peacock (Packt Publishing)</title>
		<link>http://www.webxpert.ro/andrei/2010/03/14/book-review-php-5-e-commerce-development-by-michael-peacock-packt-publishing/</link>
		<comments>http://www.webxpert.ro/andrei/2010/03/14/book-review-php-5-e-commerce-development-by-michael-peacock-packt-publishing/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 17:53:19 +0000</pubDate>
		<dc:creator>andreiash</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[book review]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[michael peacock]]></category>
		<category><![CDATA[packt]]></category>

		<guid isPermaLink="false">http://www.webxpert.ro/andrei/?p=657</guid>
		<description><![CDATA[PHP is one of my preferred languages. I&#8217;ve been using it for almost 10 years, since version 3, I witnessed the release of 4.0&#8230; in some words: I have a bit of experience. I&#8217;ve been given by Packt one of the latest PHP books they published, called &#8220;PHP 5 e-Commerce Development&#8220;. The title sounds very [...]]]></description>
			<content:encoded><![CDATA[<p>PHP is one of my preferred languages. I&#8217;ve been using it for almost 10 years, since version 3, I witnessed the release of 4.0&#8230; in some words: I have a bit of experience.<br />
I&#8217;ve been given by Packt one of the latest PHP books they published, called &#8220;<a href="http://www.packtpub.com/php-5-e-commerce-development/book">PHP 5 e-Commerce Development</a>&#8220;. The title sounds very promising and I expected to get an update on the latest technologies and techniques related to e-Commerce out of it.</p>
<p><img src="http://www.webxpert.ro/andrei/wp-content/uploads/2010/03/184719964X-243x300.jpg" alt="184719964X" title="184719964X" width="243" height="300" class="aligncenter size-medium wp-image-685" /></p>
<p>First, the book is following what it says in the title, creating one e-Commerce site from the ground. From authentication to discount codes, everything is covered by the book. It touches also some APIs from payment gateways and Google. So who wants to have a ride in knowing how to build an eCommerce site with PHP 5 should read the book.</p>
<p>If you want just the positive feedback you should stop here.<span id="more-657"></span></p>
<p>Secondly, I don&#8217;t think the book has a well defined target, because author&#8217;s own framework is used all over the book and the explanations are not sufficient enough in my opinion. When there are so many frameworks on the market, it&#8217;s a very high chance that the users to use one of these frameworks (not the author&#8217;s one) to build the eShop. In this case most of the code is useless and you&#8217;ll remain just with the explanation of the logic behind. I also expected more specific info on payment processing, SEO, marketing, newsletters, admin alerts, and not necessary all the source code out there. </p>
<p>I reckon I didn&#8217;t read the description, excerpt or anything else about the book before starting to read it, so that&#8217;s why I was a bit dissapointed. The book&#8217;s description on Packt is correct: &#8220;<i>This is a fast-paced tutorial focusing on creating a framework and using it to build an online store through an ongoing case study. Later chapters include examples to illustrate how easily the framework can be adapted for different situations. The framework and code are enhanced and built upon with each chapter, adding more and more functionality. </i>&#8220;. So online store is just a case study, the book is focused on the framework.</p>
<p>However, the book is still very interesting for people that want to create their own in-house light framework and that don&#8217;t want to rely on a fat framework like CodeIgniter, phpCake, ZendFramework.</p>
<p><strong>My conclusion</strong>: a nice reading, 4 stars out of 5, but if you don&#8217;t plan to use the framework presented in the book, then the source code is too much and hard to follow. </p>
<p>****~ (4.0/5)</p>
<p>openSource e-shop solutions: <a href="http://www.prestashop.com">prestaShop</a>, <a href="http://www.oscommerce.com">osCommerce</a>.</p>
<p>Enjoy!</p>
<p><em><strong>Related posts:</strong></em></p>
<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>
<li><a href="http://www.webxpert.ro/andrei/2009/10/15/im-going-to-review-onesome-packt-books/">I&#8217;m going to review one/some Packt book(s)</a></li>
<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/2009/01/08/thumbnail-generation-with-php-tutorial/">Thumbnail generation with PHP tutorial</a></li>
]]></content:encoded>
			<wfw:commentRss>http://www.webxpert.ro/andrei/2010/03/14/book-review-php-5-e-commerce-development-by-michael-peacock-packt-publishing/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>Passed Google Analytics Individual Qualification (IQ)</title>
		<link>http://www.webxpert.ro/andrei/2009/11/09/passed-google-analytics-individual-qualification-iq/</link>
		<comments>http://www.webxpert.ro/andrei/2009/11/09/passed-google-analytics-individual-qualification-iq/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 08:02:48 +0000</pubDate>
		<dc:creator>andreiash</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[certification]]></category>
		<category><![CDATA[certified]]></category>
		<category><![CDATA[GA]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[IQ]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[RTD Server]]></category>
		<category><![CDATA[RUEI]]></category>

		<guid isPermaLink="false">http://www.webxpert.ro/andrei/?p=561</guid>
		<description><![CDATA[I&#8217;m a constant user of Google Analytics. It&#8217;s a great piece of software with lots of useful reports, easy to read and to understand. However, I was never curious how far I can go with it. Last week I had a discussion with someone in Oracle about Real-Time Decision (RTD) Server and Real User Experience [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a constant user of Google Analytics. It&#8217;s a great piece of software with lots of useful reports, easy to read and to understand. However, I was never curious how far I can go with it.</p>
<p>Last week I had a discussion with someone in Oracle about <a href="http://www.oracle.com/technology/products/bi/rtd.html" target="_blank">Real-Time Decision (RTD) Server</a> and <a href="http://www.oracle.com/technology/products/oem/prod_focus/realuserexperienceinsight.html" target="_blank">Real User Experience Insight (RUEI)</a>, so I decided to find out first all the capabilities of Google Analytics.<br />
After half of day of reading the course materials on <a href="http://www.google.com/support/conversionuniversity/?hl=en" target="_blank">Google Conversion University</a>, I decided that a challenge might worth 50$, so I took the exam.</p>
<p>More than an hour later I passed the 70 questions exam, much difficult than I expected, with a score of 87%:<br />
<a href="http://www.webxpert.ro/andrei/wp-content/uploads/2009/11/2009-11-08_1752.png"><img src="http://www.webxpert.ro/andrei/wp-content/uploads/2009/11/2009-11-08_1752-300x241.png" alt="Google Analytics IQ - Andrei Daneasa" title="Google Analytics IQ - Andrei Daneasa" width="300" height="241" class="aligncenter size-medium wp-image-562" /></a></p>
<p>Now having the proof I understood correctly what&#8217;s happening with Google Analytics, I can jump into conclusions:<span id="more-561"></span></p>
<ul>
<li>GA it&#8217;s a great piece of software for analyzing trends, keywords and content.</li>
<li>GA it&#8217;s staying on another server than your web server and the communication is uni-directional. This means GA will get information about your site, but you cannot implement real-time decisions based on GA</li>
<li>GA it&#8217;s free, same Urchin, so if you own a blog or have a small budget, these will be your choices</li>
<li>Both RTD Server and RUEI are licensed products with a price per processor over 80K USD, which makes them a choice just for big enterprises</li>
<li>RTD Server will be able to serve real-time content based on your behavior, just like Amazon is doing</li>
<li>GA is not able to track 404-pages, loading times, code execution times</li>
</ul>
<p>To summarize: <strong>if you&#8217;re big, go with RTD and/or RUEI. If you&#8217;re not so big, stay with GA, Urchin or other free stuff like them.</strong></p>
<p><em><strong>Related posts:</strong></em></p>
<li><a href="http://www.webxpert.ro/andrei/2009/02/23/oracle-10g11g-install-on-windows-2008-server/">Oracle 10g/11g installation on Windows 2008 Server</a></li>
<li><a href="http://www.webxpert.ro/andrei/2008/12/25/achieved-ocp-dba-certification/">Achieved OCP DBA certification</a></li>
<li><a href="http://www.webxpert.ro/andrei/2011/05/14/first-post-on-2011/">First post on 2011</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/09/old-geek-more-than-5-years-of-blogging/">Old geek&#8230; more than 5 years of blogging</a></li>
]]></content:encoded>
			<wfw:commentRss>http://www.webxpert.ro/andrei/2009/11/09/passed-google-analytics-individual-qualification-iq/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Google.com has interstitials ?</title>
		<link>http://www.webxpert.ro/andrei/2009/01/31/googlecom-has-interstitials/</link>
		<comments>http://www.webxpert.ro/andrei/2009/01/31/googlecom-has-interstitials/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 15:41:38 +0000</pubDate>
		<dc:creator>andreiash</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Poor services]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[crash]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[interstitials]]></category>

		<guid isPermaLink="false">http://www.webxpert.ro/andrei/?p=316</guid>
		<description><![CDATA[Today afternoon on any seach on google.com the user was unable to click any of the results since google said it has interstitials. I mean strange, very strange&#8230;. all of them? For those of you that don&#8217;t know what an interstitial is, it&#8217;s an intermediate page shown before the desired page, usually used to advertise [...]]]></description>
			<content:encoded><![CDATA[<p>Today afternoon on any seach on google.com the user was unable to click any of the results since google said it has <strong>interstitials</strong>. I mean strange, very strange&#8230;. all of them? </p>
<p>For those of you that don&#8217;t know what an interstitial is, it&#8217;s an intermediate page shown before the desired page, usually used to advertise something.</p>
<p>Here is the proof that it was either a hack either a very poor programming:<br />
- A search for word &#8220;<strong>google</strong>&#8220;:<br />
<a href="http://www.webxpert.ro/andrei/wp-content/uploads/2009/01/badgoogle.jpg"><img src="http://www.webxpert.ro/andrei/wp-content/uploads/2009/01/badgoogle-300x204.jpg" alt="badgoogle" title="badgoogle" width="300" height="204" class="aligncenter size-medium wp-image-317" /></a></p>
<p>- If i am clicking the link for Google.com, I&#8217;ve got: &#8220;<em><strong>Warning &#8211; visiting this site may harm your computer!</strong></em>&#8220;:<br />
<a href="http://www.webxpert.ro/andrei/wp-content/uploads/2009/01/badgoogle2.jpg"><img src="http://www.webxpert.ro/andrei/wp-content/uploads/2009/01/badgoogle2-300x231.jpg" alt="badgoogle2" title="badgoogle2" width="300" height="231" class="aligncenter size-medium wp-image-318" /></a></p>
<p>Now after more than half an hour Google is working well again&#8230; hopefully this will not happen again in the future&#8230;</p>
<p>Andrei</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webxpert.ro/andrei/2009/01/31/googlecom-has-interstitials/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thank you ZendEditor !</title>
		<link>http://www.webxpert.ro/andrei/2009/01/14/thank-you-zendeditor/</link>
		<comments>http://www.webxpert.ro/andrei/2009/01/14/thank-you-zendeditor/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 16:21:42 +0000</pubDate>
		<dc:creator>andreiash</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[thumbnail]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://www.webxpert.ro/andrei/?p=314</guid>
		<description><![CDATA[Seems that my thumbnail generation tutorial was somehow appreciated by community and somebody posted an article on Zend Developer Zone describing my tutorial as &#8220;Advanced Thumbnail Trickery with PHP&#8220;. First, thank you! Second, I never had so many visitors coming from the same referred. When I saw my statistics I thought that my internal statistics [...]]]></description>
			<content:encoded><![CDATA[<p>Seems that my <a href="http://www.webxpert.ro/andrei/2009/01/08/thumbnail-generation-with-php-tutorial/">thumbnail generation tutorial</a> was somehow appreciated by community and somebody posted an article on Zend Developer Zone describing my tutorial as &#8220;<a href="http://devzone.zend.com/article/4162-Advanced-Thumbnail-Trickery-with-PHP">Advanced Thumbnail Trickery with PHP</a>&#8220;. </p>
<p>First, thank you!<br />
Second, I never had so many visitors coming from the same referred. When I saw my statistics I thought that my internal statistics tool went crazy and I checked my google analytics account. Seems that it&#8217;s true.</p>
<p>I promise I will elaborate the topic and make a class with it. I will also try to do the same thing with ImageMagick as a visitor suggested.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webxpert.ro/andrei/2009/01/14/thank-you-zendeditor/feed/</wfw:commentRss>
		<slash:comments>0</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>Oracle SQL Developer Data Modeling 1.5.1 Early Adopter release launched</title>
		<link>http://www.webxpert.ro/andrei/2008/10/15/oracle-sql-developer-data-modeling-151-early-adopter-release-launched/</link>
		<comments>http://www.webxpert.ro/andrei/2008/10/15/oracle-sql-developer-data-modeling-151-early-adopter-release-launched/#comments</comments>
		<pubDate>Wed, 15 Oct 2008 19:13:46 +0000</pubDate>
		<dc:creator>andreiash</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[data modeling]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[early adopter]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[sql developer]]></category>

		<guid isPermaLink="false">http://www.webxpert.ro/andrei/?p=139</guid>
		<description><![CDATA[I expected this release for some months, but didn&#8217;t have the time to test it yet. What you can do? Here&#8217;s the official description: &#8220;SQL Developer Data Modeling offers a full spectrum of data and database modeling tools and utilities, including Entity Relationship modeling, Relational (Database Design), Data Type and Multidimensional modeling, full forward and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.webxpert.ro/andrei/wp-content/uploads/2008/10/2008-10-15-215930.png"><img src="http://www.webxpert.ro/andrei/wp-content/uploads/2008/10/2008-10-15-215930-300x190.png" alt="" title="SQL Developer Data Modeling" width="300" height="190" class="aligncenter size-medium wp-image-141" /></a></p>
<p>I expected this release for some months, but didn&#8217;t have the time to test it yet. What you can do? Here&#8217;s the official description:<br />
&#8220;<em>SQL Developer Data Modeling offers a full spectrum of data and database modeling tools and utilities, including Entity Relationship modeling, Relational (Database Design), Data Type and Multidimensional modeling, full forward and reverse engineering and code generation. It includes importing from and exporting to a variety of sources and targets, provides a variety of formatting options and validates the models through a predefined set of Design Rules.</em>&#8220;.<br />
<span id="more-139"></span><br />
The official download link is <a href="http://www.oracle.com/technology/products/database/sql_developer/files/Modeling.html">here</a>. Pay attention that it&#8217;s still an early adopter release.<br />
<a href="http://www.webxpert.ro/andrei/wp-content/uploads/2008/10/multi.png"><img src="http://www.webxpert.ro/andrei/wp-content/uploads/2008/10/multi-300x227.png" alt="" title="SQL Developer data modelling screenshot" width="300" height="227" class="aligncenter size-medium wp-image-142" /></a></p>
<p><strong>Read also</strong></p>
<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/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/2008/10/15/oracle-sql-developer-data-modeling-151-early-adopter-release-launched/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to change proxy in Windows console</title>
		<link>http://www.webxpert.ro/andrei/2008/09/16/how-to-change-proxy-in-windows-console/</link>
		<comments>http://www.webxpert.ro/andrei/2008/09/16/how-to-change-proxy-in-windows-console/#comments</comments>
		<pubDate>Tue, 16 Sep 2008 14:47:42 +0000</pubDate>
		<dc:creator>andreiash</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[command prompt]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.webxpert.ro/andrei/?p=110</guid>
		<description><![CDATA[Apparently windows console does not take the environmental settings from Internet Explorer, so if you properly set your proxy in IE, it is not valid in console. And if you are running a console application that need to connect to the web and you are after a proxy, then you have a problem. The solutions [...]]]></description>
			<content:encoded><![CDATA[<p>Apparently windows console does not take the environmental settings from Internet Explorer, so if you properly set your proxy in IE, it is not valid in console.<br />
And if you are running a console application that need to connect to the web and you are after a proxy, then you have a problem.</p>
<p>The solutions are:</p>
<ul>
<li>run windows utility <strong>proxycfg.exe</strong> like this:
<div class="dean_ch" style="white-space: wrap;">C<span class="co2">:&gt;proxycfg -p proxy_name:proxy_port</span></div>
</li>
<li>move to a network where you don&#8217;t need a proxy <img src='http://www.webxpert.ro/andrei/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
</ul>
<p>Enjoy</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webxpert.ro/andrei/2008/09/16/how-to-change-proxy-in-windows-console/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle APEX 3.1 installation on Oracle Database 10g XE</title>
		<link>http://www.webxpert.ro/andrei/2008/06/16/oracle-apex-31-installation-on-oracle-database-10g-xe/</link>
		<comments>http://www.webxpert.ro/andrei/2008/06/16/oracle-apex-31-installation-on-oracle-database-10g-xe/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 09:47:14 +0000</pubDate>
		<dc:creator>andreiash</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Programming]]></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=87</guid>
		<description><![CDATA[I&#8217;ve been asked many times if there is possible to install Oracle Application Express on Express Edition of 10g database, both of them being free products. The answer is YES, and the procedure is quite simple, as very well indicated on Oracle website The steps would be: Download the latest version from APEX website Unzip [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://www.webxpert.ro/andrei/wp-content/uploads/2008/06/31_home_page.png'><img src="http://www.webxpert.ro/andrei/wp-content/uploads/2008/06/31_home_page-300x112.png" alt="Oracle apex 3.1" title="31_home_page" width="300" height="112" class="aligncenter size-medium wp-image-88" /></a></p>
<p>I&#8217;ve been asked many times if there is possible to install <a href="http://apex.oracle.com">Oracle Application Express</a> on <a href="http://www.oracle.com/technology/software/products/database/xe/index.html">Express Edition of 10g database</a>, both of them being free products. The answer is YES, and the procedure is quite simple, as very well indicated on <a href="http://www.oracle.com/technology/products/database/application_express/html/3.1_and_xe.html">Oracle website</a></p>
<p>The steps would be:<span id="more-87"></span></p>
<ul>
<li>Download the latest version from <a href="http://www.oracle.com/technology/products/database/application_express/download.html">APEX website</a></li>
<li>Unzip the archive in a convenient location on your hard-disk</li>
<li>Start a SQL*Plus from that location( <code>C:\apex\> sqlplus / as sysdba</code> )</li>
<li>Install apex:
<div class="dean_ch" style="white-space: wrap;">@apexins SYSAUX SYSAUX TEMP /i/</div>
</li>
<li>Change admin password:
<div class="dean_ch" style="white-space: wrap;">@apxchpwd</div>
</li>
<li>Set images path (APEX_HOME is the folder where you unziped the archive):
<div class="dean_ch" style="white-space: wrap;">@APEX_HOME/apex/apxldimg.sql APEX_HOME</div>
</li>
<li>Run the following script where &#8220;password&#8221; is the admin password set 2 steps before:
<div class="dean_ch" style="white-space: wrap;">@APEX_HOME/apex/apxxepwd.sql password</div>
</li>
</ul>
<p>Good luck</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webxpert.ro/andrei/2008/06/16/oracle-apex-31-installation-on-oracle-database-10g-xe/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

