<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>blog</title>
        <description>my little blog</description>
        <link>http://www.alexandru.es/blog/feed.php?type=rss&amp;tag=</link>
        <lastBuildDate>Tue, 07 Feb 2012 16:09:39 -0800</lastBuildDate>
        <generator>Wordcraft 0.3</generator>
        <item>
            <guid>http://www.alexandru.es/blog/</guid>
            <title>Decided, going to make a refresh to this blog</title>
            <link>http://www.alexandru.es/blog/</link>
            <description><![CDATA[I just got decided, even if there are very few people reading this blog, I want to use it more, and post about things.<br><br>What would be changed?<br>1. The design, I want to make a design inspired in Half Life game, and with better layout, to find place for everything.<br>2. Change the blog system that I'm using right now, and use something like Wordpress for a better editor and widgets support.<br>3. Keep posting whenever I feel to and about what I want, and try to do it more often.<br><br>Good night! :)]]></description>
            <dc:creator>atrandafir</dc:creator>
            <pubDate>Sat, 11 Sep 2010 02:07:00 -0700</pubDate>
            <category>blog</category>
            <category>decision</category>
            <category>redesign</category>
        </item>
        <item>
            <guid>http://www.alexandru.es/blog/</guid>
            <title>Reading Agile Web Application Development with Yii</title>
            <link>http://www.alexandru.es/blog/</link>
            <description><![CDATA[<div>I have just got the first Yii Framework book named 'Agile Web Application Development with Yii' and I'm going to read it all to see how it can improve my development skills, and then I'll write a little review here about it.</div><br><div>There is a free chapter available if you want to take a look:</div><div><a href="https://www.packtpub.com/sites/default/files/9584-chapter-9-iteration-6-adding-user-comments.pdf">Iteration 6: Adding User Comments</a><br></div><br><div>Or if you wish, get the whole book here:</div><div><a href="https://www.packtpub.com/yii-1-1-and-php5-for-agile-web-application-development/book">https://www.packtpub.com/yii-1-1-and-php5-for-agile-web-application-development/book</a><br></div><br><div><span style="text-decoration: underline;">And a little history..</span></div><br>Until about last year I have been developing my PHP projects without the support of a framework, then I have started to test some of them, Symfony, CodeIgniter, CakePHP and Yii, I have tried to get started with one of this frameworks and I don't subestimate any of them but I found it easier to start with Yii, and I liked it.<br><div>I have learned Yii from the online guide and from the blog tutorial, and ofcourse by applying it to a couple of projects during this year. I feel that I am missing some tricks that this framework has and I hope I'll find some in this book! :)</div>]]></description>
            <dc:creator>atrandafir</dc:creator>
            <pubDate>Thu, 02 Sep 2010 10:37:00 -0700</pubDate>
            <category>application</category>
            <category>book</category>
            <category>development</category>
            <category>ebook</category>
            <category>framework</category>
            <category>php</category>
            <category>yii</category>
        </item>
        <item>
            <guid>http://www.alexandru.es/blog/</guid>
            <title>PDO bindParam not working for LIKE condition</title>
            <link>http://www.alexandru.es/blog/</link>
            <description><![CDATA[If you use PDO bindParam to do a search with a LIKE condition you cannot put the percentages and quotes to the param placeholder '%:keyword%'.<br><br>This is WRONG:<br><strong>"SELECT * FROM `users` WHERE `firstname` LIKE '%:keyword%'";</strong><br><br>The CORRECT solution is to leave clean the placeholder like this:<br><strong>"SELECT * FROM `users` WHERE `firstname` LIKE :keyword";</strong><br><br>And then add the percentages to the php variable where you store the keyword:<br><strong>$keyword = "%".$keyword."%";</strong><br><br>And finally the quotes will be automatically added by PDO when executing the query so you don't have to worry about them.<br><br>So the full example would be:<br>&lt;?php<br>// Get the keyword from query string<br>$keyword = $_GET['keyword'];<br>// Prepare the command<br>$sth = $dbh-&gt;prepare('SELECT * FROM `users` WHERE `firstname` LIKE :keyword');<br>// Put the percentage sing on the keyword<br>$keyword = "%".$keyword."%";<br>// Bind the parameter<br>$sth-&gt;bindParam(':keyword', $keyword, PDO::PARAM_STR);<br>?&gt;<br><div firebugversion="1.5.4" style="display: none;" id="_firebugConsole"></div>]]></description>
            <dc:creator>atrandafir</dc:creator>
            <pubDate>Tue, 31 Aug 2010 15:23:00 -0700</pubDate>
            <category>bindparam</category>
            <category>like</category>
            <category>pdo</category>
            <category>php</category>
        </item>
        <item>
            <guid>http://www.alexandru.es/blog/</guid>
            <title>Zeitgeist Addendum, Venus Project, The Zeitgeist Movement</title>
            <link>http://www.alexandru.es/blog/</link>
            <description><![CDATA[<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/EewGMBOB4Gg&amp;hl=es_ES&amp;fs=1?rel=0"><param name="allowFullScreen" value="true"><param name="allowscriptaccess" value="always"><embed src="http://www.youtube.com/v/EewGMBOB4Gg&amp;hl=es_ES&amp;fs=1?rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></object></p>
<p>
Please share it, and find more information on the website: <a href="http://www.thezeitgeistmovement.com/">http://www.thezeitgeistmovement.com/</a>
</p>]]></description>
            <dc:creator>atrandafir</dc:creator>
            <pubDate>Wed, 14 Jul 2010 04:07:00 -0700</pubDate>
            <category>Addendum</category>
            <category>Movement</category>
            <category>Project</category>
            <category>Venus</category>
            <category>Zeitgeist</category>
        </item>
        <item>
            <guid>http://www.alexandru.es/blog/</guid>
            <title>TheFingerFor is back on track!</title>
            <link>http://www.alexandru.es/blog/</link>
            <description><![CDATA[The project I've started a while a go, about a website where to say your opinion about what bothers you, is now alive again, I have just set it up on the new domain and I hope people will start to use it more!<br><br>Go and check it up:<br><a href="http://www.thefingerfor.com">http://www.thefingerfor.com</a><br><br>Any feedback is welcome!]]></description>
            <dc:creator>atrandafir</dc:creator>
            <pubDate>Sat, 03 Jul 2010 23:35:00 -0700</pubDate>
            <category>project</category>
            <category>TheFingerFor</category>
        </item>
        <item>
            <guid>http://www.alexandru.es/blog/</guid>
            <title>My 1TB Western Digital HDD shows in bios as 0MB or 33MB after connecting it to a friend's computer</title>
            <link>http://www.alexandru.es/blog/</link>
            <description><![CDATA[It results that the motherboard of my friend's computer has a bug and then the BIOS writes a copy on the hard disk and then it hides that part using HPA.<br><br>There are tools like HDAT2 that allow you to remove the HPA setting and reset the drive's space without losing anything, atleast I did not lost a file.<br><br>I'm going to write a fragment here from a blog post:<br><br>--- BLOG POST ---<br><br>Do you have a Gigabyte motherboard with Xpress Recovery BIOS?<br><br>If 
so, then the BIOS has truncated the drive after backing up a copy of 
itself to a small HPA (approximately 2000 sectors) at the top end of the
 drive.<br><br>GDB is detecting the correct partition size from the 
partition table in sector 0.<br><br>The reason the drive is reporting 
33MB is that Gigabyte's BIOS has a bug that incorrectly adjusts the 
drive's capacity after creating the HPA. 1TB drives are reduced to 33MB,
 1.5TB become 500GB, and 2TB become 1TB.<br><br>The solution is to use a
 tool such as HDAT2 or the HDD Capacity Restore Tool to remove the HPA 
(Host Protected Area).<br><br>I would also update the BIOS afterwards.<br><br>--- BLOG POST END ---<br><br>You can fully read it here:<br><a target="_blank" href="http://forum.hddguru.com/lost-partition-hitachi-1gb-hdt721010sla360-t15662.html">http://forum.hddguru.com/lost-partition-hitachi-1gb-hdt721010sla360-t15662.html</a><br><br>And here are some other links reported by other user:<br><a target="_blank" href="http://forums.seagate.com/t5/ATA-and-Serial-ATA-drives/1-5TB-SATA-suddenly-showing-at-500GB-and-asking-to-be-formated/m-p/52238">http://forums.seagate.com/t5/ATA-and-Serial-ATA-drives/1-5TB-SATA-suddenly-showing-at-500GB-and-asking-to-be-formated/m-p/52238</a><br><a target="_blank" href="http://tw2005.giga-byte.com/MotherBoard/FileList/NewTech/tech_xpress3.htm">http://tw2005.giga-byte.com/MotherBoard/FileList/NewTech/tech_xpress3.htm</a><br><a target="_blank" href="http://www.hdat2.com/hdat2_faq.html#q1">http://www.hdat2.com/hdat2_faq.html#q1</a> &lt;-- The tool that I've used to fix it.<br><br>I hope this helps someone like it helped me, good luck! :)]]></description>
            <dc:creator>atrandafir</dc:creator>
            <pubDate>Fri, 21 May 2010 18:56:00 -0700</pubDate>
            <category>0mb</category>
            <category>33mb</category>
            <category>bios</category>
            <category>hdat2</category>
            <category>hdd</category>
            <category>hpa</category>
        </item>
        <item>
            <guid>http://www.alexandru.es/blog/</guid>
            <title>AutoDbUp - Automatically update the mySQL database of your PHP project</title>
            <link>http://www.alexandru.es/blog/</link>
            <description><![CDATA[Hello,<br><br>I want to introduce you a simple tool for updating the mySQL database of your PHP project. I'll explain how it works, it is dedicated to the developers so they can share the updates between them without much headache.<br><br>I'll write a case here about how it's ment to work. Let's sopose you are working also with a version control system like SVN, when you make changes to your database, you run queries on a desktop mysql client or an online one like phpMyAdmin, after that you copy the code you just executed and then save it to a sql file, and send it to other developers and tell them to use it to update their database.<br><br>So, this way, you must let them know about your changes and they must remember to run the sql file on their machine or otherwise the application can complain about missing tables or fields in the database.<br><br>With this tool what you accomplish is that you still have to manually save the changes into a sql file but when you commit it to subversion and the other developers download it on their machine, then the next move they make in the application it will automatically read the sql file and update the database before any other action. And also, the changes from other developers will be automatically updated on your local database after you download the new code from SVN.<br><br>Okay, so now I'll explain how to configure it, it's a single PHP class that must be included and run at the top of every page of your application.<br><br>This is an example about how you must use it, place this inside a file that you run when you initializate your application:<br>
<pre>&lt;?php<br><br># Include the script.<br>include_once('AutoDbUp.php');<br><br># Load the script and specify the path where all sql files are saved,<br># the files inside that directory must contain numeric names and increasing<br># that will be the revision number of your database, example:<br># 1.sql, 2.sql, 3.sql, 4.sql, 5.sql and so on, for each update you make.<br>$autoDbUp = new AutoDbUp('path/to/sql/files');<br><br># Run the script's upgrade method to search all the new sql files and run them.<br>$autoDbUp-&gt;upgrade();<br><br>?&gt;<br></pre>

For the correct working of this script, you will have to customize some methods inside the class to make them compatible with your application, because the tool checks the version of your database and after running one sql file it updates that version to the new one, some of the functions that need to be customized are the followng:<br><ul>


<li>getDbVer() - Command that consults your configuration table and retrieves the current database version, you can also make it write the current version number to a file instead of saving it in a table.</li>
<li>updateDbVer - Updates the database version after an sql file has been succesfully executed.</li>
<li>dbQuery() and getMysqlError() - Change this two if you have your own database class for mysql, and also check the last functions that BEGIN, ROLLBACK, and COMMIT a mysql transaction if you need to change them.</li>
</ul>
<br>
That's all, you can download the class here:<br><a target="_blank" href="http://www.alexandru.es/scripts/AutoDbUp.rar">http://www.alexandru.es/scripts/AutoDbUp.rar</a><br><br>Let me know if you have installation issues or any feedback! :)<br><br>Thanks for the parse_mysql_dump function posted on PHP website:<br><a target="_blank" href="http://www.php.net/manual/en/function.mysql-query.php#55811">http://www.php.net/manual/en/function.mysql-query.php#55811</a><br><br>I'll get back with a better explained use and a full downloadable application that implements it.]]></description>
            <dc:creator>atrandafir</dc:creator>
            <pubDate>Thu, 01 Apr 2010 13:05:00 -0700</pubDate>
            <category>AutoDbUp</category>
            <category>automatically</category>
            <category>mysql</category>
            <category>php</category>
            <category>update</category>
        </item>
        <item>
            <guid>http://www.alexandru.es/blog/</guid>
            <title>You can win by Shiv Khera</title>
            <link>http://www.alexandru.es/blog/</link>
            <description><![CDATA[A good book to read:<br><br>

<a title="View You Can Win by Shiv Khera on Scribd" href="http://www.scribd.com/doc/3755215/You-Can-Win-by-Shiv-Khera" style="margin: 12px auto 6px; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: normal; font-size-adjust: none; font-stretch: normal; display: block; text-decoration: underline;">You Can Win by Shiv Khera</a> <object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" id="doc_368726810327941" name="doc_368726810327941" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" rel="media:document" resource="http://d1.scribdassets.com/ScribdViewer.swf?document_id=3755215&amp;access_key=key-y007gexojkmn6k886d2&amp;page=1&amp;version=1&amp;viewMode=" xmlns:media="http://search.yahoo.com/searchmonkey/media/" xmlns:dc="http://purl.org/dc/terms/" width="100%" align="middle" height="500">		<param name="movie" value="http://d1.scribdassets.com/ScribdViewer.swf?document_id=3755215&amp;access_key=key-y007gexojkmn6k886d2&amp;page=1&amp;version=1&amp;viewMode="> 		<param name="quality" value="high"> 		<param name="play" value="true">		<param name="loop" value="true"> 		<param name="scale" value="showall">		<param name="wmode" value="opaque"> 		<param name="devicefont" value="false">		<param name="bgcolor" value="#ffffff"> 		<param name="menu" value="true">		<param name="allowFullScreen" value="true"> 		<param name="allowScriptAccess" value="always"> 		<param name="salign" value="">  				<embed src="http://d1.scribdassets.com/ScribdViewer.swf?document_id=3755215&amp;access_key=key-y007gexojkmn6k886d2&amp;page=1&amp;version=1&amp;viewMode=" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" play="true" loop="true" scale="showall" wmode="opaque" devicefont="false" bgcolor="#ffffff" name="doc_368726810327941_object" menu="true" allowfullscreen="true" allowscriptaccess="always" salign="" type="application/x-shockwave-flash" width="100%" align="middle" height="500">	</object>]]></description>
            <dc:creator>atrandafir</dc:creator>
            <pubDate>Sun, 20 Sep 2009 16:05:00 -0700</pubDate>
            <category>books</category>
        </item>
        <item>
            <guid>http://www.alexandru.es/blog/</guid>
            <title>three free web templates, atrandafir582, homeofprojects001 and primavera989</title>
            <link>http://www.alexandru.es/blog/</link>
            <description><![CDATA[<p><strong><span style="text-decoration: underline;">atrandafir582</span></strong>
<br><br>
<a href="/templates/atrandafir582/?phpMyAdmin=AIECZEuIAdLhFGjDq4irGSGKOjf" target="_blank"><img  src="/templates/atrandafir582/atrandafir582.jpg" style="width: 500px; " title="atrandafir582 preview" alt="atrandafir582 preview"></a>
<br><br>
<a href="/templates/atrandafir582/?phpMyAdmin=AIECZEuIAdLhFGjDq4irGSGKOjf" target="_blank">Preview</a>&nbsp;| <a href="/templates/atrandafir582/atrandafir582.zip?phpMyAdmin=AIECZEuIAdLhFGjDq4irGSGKOjf">Download</a>
</p>

<p><strong><span style="text-decoration: underline;">homeofprojects001</span></strong>
<br><br>
<a href="/templates/homeofprojects001/?phpMyAdmin=AIECZEuIAdLhFGjDq4irGSGKOjf" target="_blank"><img  src="/templates/homeofprojects001/homeofprojects001.jpg" style="width: 500px; " title="homeofprojects001 preview" alt="homeofprojects001 preview"></a>
<br><br>
<a href="/templates/homeofprojects001/?phpMyAdmin=AIECZEuIAdLhFGjDq4irGSGKOjf" target="_blank">Preview</a>&nbsp;| <a href="/templates/homeofprojects001/homeofprojects001.zip?phpMyAdmin=AIECZEuIAdLhFGjDq4irGSGKOjf">Download</a>
</p>

<p><strong><span style="text-decoration: underline;">primavera989</span></strong>
<br><br>
<a href="/templates/primavera989/?phpMyAdmin=AIECZEuIAdLhFGjDq4irGSGKOjf" target="_blank"><img  src="/templates/primavera989/primavera989.jpg" style="width: 500px; " title="primavera989 preview" alt="primavera989 preview"></a>
<br><br>
<a href="/templates/primavera989/?phpMyAdmin=AIECZEuIAdLhFGjDq4irGSGKOjf" target="_blank">Preview</a>&nbsp;| <a href="/templates/primavera989/primavera989.zip?phpMyAdmin=AIECZEuIAdLhFGjDq4irGSGKOjf">Download</a>
</p>]]></description>
            <dc:creator>atrandafir</dc:creator>
            <pubDate>Sun, 07 Jun 2009 17:52:00 -0700</pubDate>
            <category>atrandafir582</category>
            <category>homeofprojects001</category>
            <category>primavera989</category>
            <category>templates</category>
        </item>
        <item>
            <guid>http://www.alexandru.es/blog/</guid>
            <title>Vota a Home Of Projects en BBVA, Vote for Home Of Project on BBVA</title>
            <link>http://www.alexandru.es/blog/</link>
            <description><![CDATA[<p>El proyecto <a target="_blank" href="http://dev.homeofprojects.com">Home Of Projects</a> ha sido elegido en la lista de votación de BBVA y puede ganar la subvencion de desarollo! Por favor hagan su voto a continuación!</p>

<p><a target="_blank" href="http://dev.homeofprojects.com">Home Of Projects</a> has been approved on the BBVA project voting list and we can win the development subvention! Please vote below!</p>]]></description>
            <dc:creator>atrandafir</dc:creator>
            <pubDate>Tue, 17 Mar 2009 08:51:00 -0700</pubDate>
            <category>bbva</category>
            <category>homeofprojects</category>
            <category>vote</category>
        </item>
        <item>
            <guid>http://www.alexandru.es/blog/</guid>
            <title>Infected with virus and can't open antivirus pages</title>
            <link>http://www.alexandru.es/blog/</link>
            <description><![CDATA[Is this your case? Well I just got this problem on my workstation, I have managed to download SpyBot Search &amp; Destroy from download.com but now when I try to install it, it says it can't find the server to download, a fast way to fix that is doing this:<br><br><ol>
<li>Go to C:\WINDOWS\SYSTEM32\DRIVERS\ETC</li>
<li>Open hosts file with notepad or any other simple text editor (not WORD)</li>
<li>Add these lines at the end of the file: <br>89.238.64.39&nbsp;&nbsp;&nbsp; safer-networking.org<br>89.238.64.39&nbsp;&nbsp;&nbsp; safer-networking.org</li>
<li>Now save &amp; close the file and retry the installation and voila! It works! You can also go and surf the website now <a href="http://www.safer-networking.org/">http://www.safer-networking.org/</a></li>
</ol>
</li>
NOTE: You can try this procedure for any website that it's not working, to find the IP number go to a PC that is not infected and: <br><ol>
<li>Go to 'Start' =&gt; 'Run'</li>
<li>Type 'cmd', a black window opens</li>
<li>Type there 'ping <span>www.safer-networking.org</span>'</li>
<li>When pinging a message will be displayed saying 'Pinging <span>www.safer-networking.org [</span>89.238.64.39<span>]..</span>'</li>
<li>The IP address is that between []</li>
</ol>
</li>
If you got any problems with this you can contact me! I hope it helps someone ;)<br><br>Happy Virus Killing Day!]]></description>
            <dc:creator>atrandafir</dc:creator>
            <pubDate>Mon, 16 Feb 2009 10:02:00 -0800</pubDate>
            <category>dns</category>
            <category>virus</category>
        </item>
        <item>
            <guid>http://www.alexandru.es/blog/</guid>
            <title>I just want to work on my websites</title>
            <link>http://www.alexandru.es/blog/</link>
            <description><![CDATA[Are you a freelancer?<br>Are you doing a lot of work for others?<br>Would you like to work on your personal favorite projects instead of others?<br><br>Well.. I think I'm going crazy, I work from 08:30 to 16:30 at a company and then I go back home and work some hours until I go to sleep on other freelance projects so I can pay the bills.. and I never have time to spend working on my <a href="http://www.homeofprojects.com">Home Of Projects</a> site, and not even for writing a poem on <a href="http://www.crazypoems.net">CrazyPoems</a>! I keep doing that until the weekend comes, I almost never get the feeling of 'ended work and relax', sometimes I even spend half of the weekend working too.. and never have time to do my hobbies or stay with my girlfriend.<br><br>Well that's me, are you a web designer? how are you doing it to finish work, pay bills and also have free time for yourself?<br><br>Waiting for your comments,<br>have a nice day! ;)]]></description>
            <dc:creator>atrandafir</dc:creator>
            <pubDate>Mon, 12 Jan 2009 19:41:00 -0800</pubDate>
            <category>personal</category>
            <category>work</category>
        </item>
        <item>
            <guid>http://www.alexandru.es/blog/</guid>
            <title>How to resize images using VBScript or ASP and ImageMagick</title>
            <link>http://www.alexandru.es/blog/</link>
            <description><![CDATA[Hi there,<br><br>I am going to write a simple technique to resize all images in a folder using ImageMagick and a simple VBscript. At the end of the article I'll tell you how to use this from an ASP website.<br><br><span style="text-decoration: underline;"><strong>Step 1 : Download and install ImageMagick<br><br></strong></span>Download ImageMagick from <a title="http://www.imagemagick.org/download/binaries/ImageMagick-6.4.3-6-Q16-windows-dll.exe" href="http://www.imagemagick.org/download/binaries/ImageMagick-6.4.3-6-Q16-windows-dll.exe">here</a> and then install it, make sure to check the box that says "Install ImageMagickObject OLE Control for VBscript, Visual Basic, and WSH".<br><br><span style="text-decoration: underline;"><strong>Step 2: Download or copy the script</strong></span><br><br>Copy the following code to a new file named imageResizer.vbs or just download it from <a title="http://www.alexandru.es/scripts/imageResizer.vbs" href="http://www.alexandru.es/scripts/imageResizer.vbs">here</a>.<br>

<pre>Option Explicit<br><br>' Define some variables<br>Dim objFSO, folderSRC, pathSourceJPG, file, outputFolder<br>Dim userHeight, userWidth, userConfirmation<br>userWidth = InputBox("Please enter new width for the images:", "imageResizer.vbs", "640")<br>userHeight = InputBox("Please enter new height for the images:", "imageResizer.vbs", "480")<br><br>' Check if user has entered the width and height<br>if len(userHeight) = 0 or len(userWidth) = 0 then<br> wscript.echo "Missing parameter, width or height, quitting."<br> wscript.quit<br>end if<br><br>' Let the user confirm before continuing<br>userConfirmation = MsgBox("Resize all images in the folder to "&amp; userWidth &amp; "x" &amp; userHeight&amp;"?", 1, "imageResizer.vbs")<br>if userConfirmation &lt;&gt; 1 then<br> wscript.echo "Script was canceled, quitting."<br> wscript.quit<br>end if<br><br>Set objFSO = createobject("Scripting.FileSystemObject")<br>pathSourceJPG = objFSO.GetAbsolutePathName(".\")<br>outputFolder = pathSourceJPG &amp; "\_thumbs\"<br>Set folderSRC = objFSO.GetFolder(pathSourceJPG)<br><br>' Create output folder<br>if objFSO.FolderExists(outputFolder) then<br> wscript.echo "Output folder """ &amp; outputFolder &amp; """ already exists, I'm going to continue anyway."<br>else<br> objFSO.CreateFolder(outputFolder)<br>end if<br><br>' Browse files<br>For each file in folderSRC.Files<br> ' Check for extensions<br> Dim fileExt<br> fileExt = lcase(objFSO.GetExtensionName(pathSourceJPG &amp;"\"&amp; file.Name))<br> If fileExt = "jpg" or fileExt = "jpeg" or fileExt = "gif" or fileExt = "png" or fileExt = "bmp" Then<br> ' Run the resize function<br> resizeImage pathSourceJPG &amp;"\"&amp; file.Name, userWidth, userHeight, outputFolder &amp; file.Name<br> end if<br>next<br><br>set folderSRC = nothing<br>	<br>'--------------------------<br>' resizeImage(input image, new height, new width, output image)<br>' Modifica el tamaño de la imagen y guarda una nueva.<br>'--------------------------<br>function resizeImage(sourceFile, toWidth, toHeight, destinationFile)<br>	<br>	Dim imgWidth, imgHeight, img<br>	Dim xScale, yScale<br>	Dim newWidth, newHeight<br>	Dim conversion<br>	<br>	' Load ImageMagick<br>	Set img = CreateObject("ImageMagickObject.MagickImage.1")<br>	<br>	' Get current image size<br>	imgWidth = img.Identify ("-format", "%w", sourceFile)<br>	imgHeight = img.Identify ("-format", "%h", sourceFile)<br>	<br>	' Calculate scale<br>	xScale = imgWidth / toWidth<br>	yScale = imgHeight / toHeight<br>	<br>	' Calculate new width and height<br>	if yScale &gt; xScale then<br>		newWidth = round(imgWidth * (1/yScale))<br>		newHeight = round(imgHeight * (1/yScale))<br>	else<br>		newWidth = round(imgWidth * (1/xScale))<br>		newHeight = round(imgHeight * (1/xScale))<br>	end if<br>	<br>	' Run Convert to resize the image.<br>	conversion = img.Convert("-resize", newWidth&amp;"x"&amp;newHeight&amp;"!", sourceFile, destinationFile)<br>	set conversion = nothing<br>	<br>end function</pre>

<strong><span style="text-decoration: underline;">Step 3: Place it in a folder with images and run it!<br><br></span></strong>

Copy imageResizer.vbs into a folder full of images and double-click it, it will then create a folder named "_thumbs" and store there all the resized images. You're done!<br><br>

<span style="text-decoration: underline;"><strong>How to use the resize function from an ASP website</strong></span><br><br>

You have to modify the following line in the resizeImage function:<br><br>

From this: <br>
<pre>Set img = CreateObject("ImageMagickObject.MagickImage.1")</pre>
To this: <br>
<pre>Set img = Server.CreateObject("ImageMagickObject.MagickImage.1")</pre>


Then copy and paste the function inside your ASP page, and run it like this:<br>&nbsp;resizeImage("C:\Inetput\wwwroot\mywebsite\images\test.jpg", 640, 480, "C:\Inetput\wwwroot\mywebsite\images\test_resized.jpg")<br><br>That's all, comments are welcome if you have any!]]></description>
            <dc:creator>atrandafir</dc:creator>
            <pubDate>Tue, 16 Sep 2008 09:56:00 -0700</pubDate>
            <category>scripting</category>
            <category>vbscript</category>
        </item>
        <item>
            <guid>http://www.alexandru.es/blog/</guid>
            <title>Project: The Finger For</title>
            <link>http://www.alexandru.es/blog/</link>
            <description><![CDATA[<span style="text-decoration: underline;"><strong><span>What is The Finger For?</span></strong></span><span><br><br>This is a website project that
tries to say <strong>NO</strong> to the things you don't like, by reasoning why that
thing is not okay. You can let people see what you think<span style="font-family: monospace;"> </span>about something and write their own opinions about it. Together we can make a good</span><span style="font-family: monospace;"> </span>change!<br><br><span style="text-decoration: underline;"><strong>Why the finger?</strong></span><br><br>This is just a symbolic way to express your feelings about something you don't agree with. The translation of "The Finger For" will be like "I don't like that", "I don't agree with it".<br><br><span style="text-decoration: underline;"><strong>Why bother?</strong></span><br><br>There are many things we have to accept that are not decided by us or people that do what they want and don't care about others.<br><br><span style="text-decoration: underline;"><strong>Some screenshots</strong></span><br>

<p class="avatars">
<a href="http://www.alexandru.es/thefingerfor/screenshot1.png" target="_blank" style="float: left; text-decoration: none;">
<img  src="http://www.alexandru.es/thefingerfor/screenshot1_thumb.png" alt="Main Page">
</a>
<a href="http://www.alexandru.es/thefingerfor/screenshot2.png" target="_blank" style="float: left; text-decoration: none;">
<img  src="http://www.alexandru.es/thefingerfor/screenshot2_thumb.png" alt="Add New Finger Page">
</a>
<span style="display: block; clear: both;"></span>
</p>

<br><p><span style="text-decoration: underline;"><strong>Test website</strong></span></p>
<p>There is a testing website up where you can see how developing goes: <a href="http://www.alexandru.es/thefingerfor" target="_blank">http://www.alexandru.es/thefingerfor</a></p>
<p>Please feel free to leave a comment saying what you think about it. </p>]]></description>
            <dc:creator>atrandafir</dc:creator>
            <pubDate>Wed, 06 Aug 2008 10:14:00 -0700</pubDate>
            <category>the finger for</category>
        </item>
        <item>
            <guid>http://www.alexandru.es/blog/</guid>
            <title>I need money for vacations</title>
            <link>http://www.alexandru.es/blog/</link>
            <description><![CDATA[<p>
I won't give up until I'll make enough money to afford the vacations and pay off all my bills. I like designing websites in a nice and clean way for people who care about that. I <strong>need</strong> new small projects that I can do until 15th of August and also after the vacations.<br><br>You can see here some of the work I have done:
</p>

<p>
<!-- reparacionderejillas.es -->
<a href="http://www.reparacionderejillas.es" title="reparacionderejillas.es PÃ¡gina para una tienda de muebles de Barcelona" target="_blank">
reparacionderejillas.es
</a>
<br>
<!-- portideschise.com -->
<a href="http://www.portideschise.com" title="portideschise.com PÃ¡gina ONG" target="_blank">
portideschise.com 	
</a>
<br>
<!-- visasolar.es -->
<a href="http://www.visasolar.es" title="visasolar.es Empresa de energÃ­a solar tÃ©rmica y fotovoltaica." target="_blank">
visasolar.es
</a>
<br>
<!-- homeofprojects --> <a href="http://www.alexandru.es/homeofprojects" target="_blank">www.alexandru.es/homeofprojects</a> - unfinished project that I'm planning.
</p>

<p>If you like what I do and you are interested you will enjoy what I can do for your website.</p>

<p>Thank you! :)<br>Alex.</p>]]></description>
            <dc:creator>atrandafir</dc:creator>
            <pubDate>Mon, 21 Jul 2008 02:01:00 -0700</pubDate>
        </item>
        <item>
            <guid>http://www.alexandru.es/blog/</guid>
            <title>New and old avatars for messenger</title>
            <link>http://www.alexandru.es/blog/</link>
            <description><![CDATA[<p>Hello, I am just writing cause I want to.. here you got some avatars I have not published on the 'About' page yet. If you like any you can do whatever you want with it. To download you have to Right Click the image and choose 'Save image as'.</p>

<p class="avatars">
English avatars:<br><br>
<img  src="http://www.alexandru.es/gallery/icons/afraid.png" alt="Afraid to talk!">
<img  src="http://www.alexandru.es/gallery/icons/dontgiveup.png" alt="Don't give up!">
<img  src="http://www.alexandru.es/gallery/icons/challenge.png" alt="Life is a challenge that you are not allowed to lose!">
<img  src="http://www.alexandru.es/gallery/icons/needtime.png" alt="Need time..">
<img  src="http://www.alexandru.es/gallery/icons/sleep.png" alt="I must go to sleep, kick me!!">
<img  src="http://www.alexandru.es/gallery/icons/tired.png" alt="Tired.">
<img  src="http://www.alexandru.es/gallery/icons/wazzanigga.png" alt="Wazza niggaa!!!">
<img  src="http://www.alexandru.es/gallery/icons/whatif.png" alt="What if we are wrong and there is no way back?">
<img  src="http://www.alexandru.es/gallery/icons/whocares.png" alt="Who cares? Someone should care..">
<img  src="http://www.alexandru.es/gallery/icons/worse.png" alt="When you're fucked up remember it could be WORSE!"></p>

<p class="avatars" style="clear: both;">
And some romanian avatars:<br><br>
<img  src="http://www.alexandru.es/gallery/icons/caution.png" alt="SUNT MURDAR SI PUT!">
<img  src="http://www.alexandru.es/gallery/icons/awake.png" alt="Cu ultimele cuvinte iti spun, eu nu sunt beat! Sunt doar putin luat!">
<img  src="http://www.alexandru.es/gallery/icons/morning.png" alt="E dimineata!">
<img  src="http://www.alexandru.es/gallery/icons/notalone.png" alt="You are not alone! Mai e(sunt) si gandaci prin casa!">
<img  src="http://www.alexandru.es/gallery/icons/plecatinvacanta.png" alt="Avatarul meu e plecat in vacanta!">
<img  src="http://www.alexandru.es/gallery/icons/tzaranprost.png" alt="Sunt taran prost de la Priboiu!">
<img  src="http://www.alexandru.es/gallery/icons/whenimhappy.png" alt="When I'm happy rand ca prostu!">
<img  src="http://www.alexandru.es/gallery/icons/whenimhappy2.png" alt="When I'm happy rand ca proasta!">
<span style="display: block; clear: both;"></span>
</p>]]></description>
            <dc:creator>atrandafir</dc:creator>
            <pubDate>Mon, 07 Jul 2008 22:50:00 -0700</pubDate>
            <category>avatars</category>
        </item>
        <item>
            <guid>http://www.alexandru.es/blog/</guid>
            <title>14 Rules for a great relationship</title>
            <link>http://www.alexandru.es/blog/</link>
            <description><![CDATA[<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" id="doc_718012308681725" name="doc_718012308681725" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" align="middle" height="500" width="450"> <param name="movie" value="http://documents.scribd.com/ScribdViewer.swf?document_id=3608014&amp;access_key=key-2rvuez4vqwbeit5dbwo&amp;page=1&amp;version=1"> <param name="quality" value="high"> <param name="play" value="true"> <param name="loop" value="true"> <param name="scale" value="showall"> <param name="wmode" value="opaque"> <param name="devicefont" value="false"> <param name="bgcolor" value="#ffffff"> <param name="menu" value="true"> <param name="allowFullScreen" value="true"> <param name="allowScriptAccess" value="always"> <param name="salign" value=""> <embed src="http://documents.scribd.com/ScribdViewer.swf?document_id=3608014&amp;access_key=key-2rvuez4vqwbeit5dbwo&amp;page=1&amp;version=1" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" play="true" loop="true" scale="showall" wmode="opaque" devicefont="false" bgcolor="#ffffff" name="doc_718012308681725_object" menu="true" allowfullscreen="true" allowscriptaccess="always" salign="" type="application/x-shockwave-flash" align="middle" height="500" width="450"> </object><div style="font-size: 10px; text-align: center;"><a href="http://www.scribd.com/doc/3608014/14-Rules-for-a-Great-Relationship">14 Rules for a Great Relationship</a> - <a href="http://www.scribd.com/upload">Upload a Document to Scribd</a></div><div style="display: none;"> Read this document on Scribd: <a href="http://www.scribd.com/doc/3608014/14-Rules-for-a-Great-Relationship">14 Rules for a Great Relationship</a> </div>]]></description>
            <dc:creator>atrandafir</dc:creator>
            <pubDate>Tue, 01 Jul 2008 10:28:00 -0700</pubDate>
            <category>relationship</category>
        </item>
        <item>
            <guid>http://www.alexandru.es/blog/</guid>
            <title>Carrotmob</title>
            <link>http://www.alexandru.es/blog/</link>
            <description><![CDATA[<em>Carrotmob organizes consumers to make purchases that give financial
rewards to those companies who agree to make environmentally friendly
choices.<br><br>I have no time to write, go check the website:<br><br><a title="External link" target="_blank" href="http://www.carrotmob.org/">http://www.carrotmob.org/</a><br></em>]]></description>
            <dc:creator>atrandafir</dc:creator>
            <pubDate>Mon, 30 Jun 2008 12:00:00 -0700</pubDate>
            <category>cool</category>
        </item>
        <item>
            <guid>http://www.alexandru.es/blog/</guid>
            <title>love should always win</title>
            <link>http://www.alexandru.es/blog/</link>
            <description><![CDATA[love should always win, no matter what happens]]></description>
            <dc:creator>atrandafir</dc:creator>
            <pubDate>Sun, 22 Jun 2008 15:55:00 -0700</pubDate>
        </item>
        <item>
            <guid>http://www.alexandru.es/blog/</guid>
            <title>the blog is up and running!</title>
            <link>http://www.alexandru.es/blog/</link>
            <description><![CDATA[The blog has been installed! <br>Now I have to create a new template for it!]]></description>
            <dc:creator>atrandafir</dc:creator>
            <pubDate>Sun, 22 Jun 2008 13:16:00 -0700</pubDate>
            <category>template</category>
        </item>
    </channel>
</rss>

