<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>AverageCoder.Net - Programming - Software - Techie Stuffs</title>
	<link>http://averagecoder.net</link>
	<description>Just another personal weblog</description>
	<pubDate>Sat, 20 Mar 2010 21:21:18 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
	<language>en</language>
			<item>
		<title>Microsoft Excel Import External Data Problem: When Microsoft Query doesn&#8217;t recognize some of your parameters</title>
		<link>http://averagecoder.net/microsoft-excel-import-external-data-problem-when-microsoft-query-doesnt-recognize-some-of-your-parameter.htm</link>
		<comments>http://averagecoder.net/microsoft-excel-import-external-data-problem-when-microsoft-query-doesnt-recognize-some-of-your-parameter.htm#comments</comments>
		<pubDate>Sat, 18 Oct 2008 20:06:28 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.averagecoder.net/microsoft-excel-import-external-data-problem-when-microsoft-query-doesnt-recognize-some-of-your-parameter.htm</guid>
		<description><![CDATA[This is a summary pulled from a discussion on IT-Toolbox with Alejandro Rodriguez titled &#8220;Excel query doesn&#8217;t allow me create 3rd paremeter for a criteria&#8220;. He said there he was having a problem with Mirosoft Excel&#8217;s Import External Data feature. He posted on the forum that Microsoft Query is not recognizing one of his query [...]


Related posts:<ol><li><a href='http://averagecoder.net/pinoezprogramrun-running-external-program-from-delphi.htm' rel='bookmark' title='Permanent Link: PinoezProgramRun (Running external program from Delphi)'>PinoezProgramRun (Running external program from Delphi)</a></li><li><a href='http://averagecoder.net/an-example-using-cport-delphi-component-to-read-data-from-your-cellphone.htm' rel='bookmark' title='Permanent Link: An example: Using CPort Delphi Component to read data from your cellphone'>An example: Using CPort Delphi Component to read data from your cellphone</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.averagecoder.net/wp-content/uploads/averagecoder_article.jpg" alt="programming article" align="left" />This is a summary pulled from a discussion on IT-Toolbox with Alejandro Rodriguez titled &#8220;<a href="http://database.ittoolbox.com/groups/technical-functional/excel-l/excel-query-doesnt-allow-me-create-3rd-paremeter-for-a-criteria-2405697" title="Excel query doesn't allow me create 3rd paremeter for a criteria" target="_blank">Excel query doesn&#8217;t allow me create 3rd paremeter for a criteria</a>&#8220;. He said there he was having a problem with Mirosoft Excel&#8217;s Import External Data feature. He posted on the forum that Microsoft Query is not recognizing one of his query parameters.</p>
<p>I got curious about it and then I tried a simple test against Microsoft Query via Excel Import External Data feature, and Yes! Microsoft Query is not recognizing some of my test query parameters. If it does recognize the1st and the 2nd parameters, why it does not recognize the 3rd? I have no idea why, but I guess it&#8217;s a bug and they forget to debug it - so be it :D</p>
<p>Microsoft Query allows you to enter a hard coded SQL statement with parameters directly into the editor but it didn&#8217;t work as I described previously so we need to figure out another way to get around it.</p>
<p>As we know that most Database servers allow you to create a stored SQL statement for future use such as &#8220;<strong>query</strong>&#8221; on MS-Access and &#8220;<strong>stored procedure</strong>&#8221; on SQLServer. This ability gives me an idea:</p>
<blockquote><p>What if I create an MS-Access query which can accept parameters and then call it from Excel&#8217;s Import External Data feature? Can Microsoft Query recognize all the parameters with this kind of method? The answer is Yes! Microsoft Query is recognizing all of the parameters.</p></blockquote>
<p>Following are the steps on how to call stored procedure to Import External Data into Microsoft Excel. Some steps may look strange but based on my tests, each of them needs to be taken correctly,</p>
<p>___________________________________________________________________________</p>
<p><strong>MS-ACCESS PART</strong></p>
<ol>
<li>Open the your Access DB</li>
<li>Create a Query by using SQL mode</li>
<li>Enter your SQL statement there (inluding the ? sign)</li>
<li>Save it as &#8220;MyQuery&#8221;</li>
</ol>
<p><strong>ODBC SETTING </strong></p>
<ol>
<li>Create an ODBC Connection to your DB</li>
</ol>
<p><strong>EXCEL PART </strong></p>
<ol>
<li>Navigate to Data -&gt; Import External Data -&gt; New Database Query</li>
<li>On the Database Tab, select the ODBC name you had created</li>
<li>Click OK</li>
<li>Click Cancel (just do it)</li>
<li>Select Yes if Microsoft Query ask you to edit the query</li>
<li>Click Close on Add Tables dialog (just do it)</li>
<li>Click SQL button on the toolbar</li>
<li>Enter {Call MyQuery(?, ?, ?)}</li>
<li>Click OK &lt;- You will get an error message, Click OK to continue anyway</li>
<li>Enter each of your parameter</li>
<li>Close Microsoft Query</li>
<li>Insert The imported data on your worksheet</li>
<li>Select any cell on the area where you put the imported data then go to Data -&gt; Refresh Data</li>
</ol>
<p>___________________________________________________________________________</p>
<p>The question mark there is a sign that it can accept parameter. Let me give you an example to ease the understanding just in case this kind of stuff is a new one for you. So if you type an SQL statement like the one below into the MS-Access Query Designer (SQL Mode):</p>
<div class="codesnip-container" >
<div class="codesnip"><span class="kw1">SELECT</span> <span class="br0">&#91;</span>productid<span class="br0">&#93;</span>,<span class="br0">&#91;</span>productname<span class="br0">&#93;</span>,<span class="br0">&#91;</span>productquantity<span class="br0">&#93;</span> <span class="kw1">FROM</span> <span class="br0">&#91;</span>products<span class="br0">&#93;</span> <span class="kw1">WHERE</span> <span class="br0">&#91;</span>productquantity<span class="br0">&#93;</span>&gt;=?;</div>
</div>
<p>and then you save the query as &#8220;<strong>MyQuery</strong>&#8220;, when you call the query using the following syntax from Microsoft Query (SQL Mode):</p>
<div class="codesnip-container" >
<div class="codesnip"><span class="br0">&#123;</span>Call MyQuery<span class="br0">&#40;</span><span class="nu0">100</span><span class="br0">&#41;</span><span class="br0">&#125;</span></div>
</div>
<p>That call will pass the parameter value (100) to &#8220;<strong>MyQuery</strong>&#8221; and in the background it will actually generate an SQL statement like the following,</p>
<div class="codesnip-container" >
<div class="codesnip"><span class="kw1">SELECT</span> <span class="br0">&#91;</span>productid<span class="br0">&#93;</span>,<span class="br0">&#91;</span>productname<span class="br0">&#93;</span>,<span class="br0">&#91;</span>productquantity<span class="br0">&#93;</span> <span class="kw1">FROM</span> <span class="br0">&#91;</span>products<span class="br0">&#93;</span> <span class="kw1">WHERE</span> <span class="br0">&#91;</span>productquantity<span class="br0">&#93;</span>&gt;=<span class="nu0">100</span>;</div>
</div>
<p>That&#8217;s how it works, the question mark is replaced by the parameter value passed to MS-Access saved query.</p>
<p><strong>TIPS IF YOU USE SQLSERVER INSTEAD OF MS-ACCESS</strong></p>
<p>If you use SQLServer instead of MS-Access to Import External Data into MS-Excel, the method is the same but on SQLServer we call the saved query as &#8220;<strong>stored procedure</strong>&#8221; and here is the syntax to create it based on the example above:</p>
<div class="codesnip-container" >
<div class="codesnip"><span class="kw1">CREATE</span> PROCEDURE MyQuery<br />
@par_productquantity int = <span class="nu0">0</span><br />
<span class="kw1">AS</span><br />
BEGIN<br />
<span class="kw1">SET</span> NOCOUNT <span class="kw1">ON</span>;<br />
<span class="kw1">SELECT</span> <span class="br0">&#91;</span>productid<span class="br0">&#93;</span>,<span class="br0">&#91;</span>productname<span class="br0">&#93;</span>,<span class="br0">&#91;</span>productquantity<span class="br0">&#93;</span> <span class="kw1">FROM</span> <span class="br0">&#91;</span>products<span class="br0">&#93;</span> <span class="kw1">WHERE</span> <span class="br0">&#91;</span>productquantity<span class="br0">&#93;</span>&gt;=@par_productquantity;<br />
END</p>
<p>GO</p></div>
</div>
<p>So, if you are having the same problem with hard coded SQL Statement when you need to import external data into Microsoft Excel, you can try this method.</p>
<p>Good luck :) and don&#8217;t forget to check <a href="http://database.ittoolbox.com/groups/technical-functional/excel-l/excel-query-doesnt-allow-me-create-3rd-paremeter-for-a-criteria-2405697" title="Excel query doesn't allow me create 3rd paremeter for a criteria" target="_blank">the discussion thread</a> related to this issue on IT-Toolbox for more detail.</p>
]]></content:encoded>
			<wfw:commentRss>http://averagecoder.net/microsoft-excel-import-external-data-problem-when-microsoft-query-doesnt-recognize-some-of-your-parameter.htm/feed</wfw:commentRss>
		</item>
		<item>
		<title>TCPView for Windows, Tool to check TCP and UDP Connections on your system</title>
		<link>http://averagecoder.net/tcpview-for-windows-tool-to-check-tcp-and-udp-connections-on-your-system.htm</link>
		<comments>http://averagecoder.net/tcpview-for-windows-tool-to-check-tcp-and-udp-connections-on-your-system.htm#comments</comments>
		<pubDate>Thu, 09 Oct 2008 20:02:51 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
		
		<category><![CDATA[Tested Software]]></category>

		<guid isPermaLink="false">http://www.averagecoder.net/tcpview-for-windows-tool-to-check-tcp-and-udp-connections-on-your-system.htm</guid>
		<description><![CDATA[It was a suggestion from a good friend of mine who told me to try TCPView when I asked him about a tool to check SQLServer Connection instances created by my program.
All I need is to check whether my program is not forgetting to free any DB connection instances when it is terminated and this [...]


Related posts:<ol><li><a href='http://averagecoder.net/d2-remover-d2-virus-removal-tool.htm' rel='bookmark' title='Permanent Link: D2 Remover (d2 virus removal tool)'>D2 Remover (d2 virus removal tool)</a></li><li><a href='http://averagecoder.net/pduspy-a-good-tool-to-deal-with-gsm-sms-pdu.htm' rel='bookmark' title='Permanent Link: PDUSpy (A good tool to deal with GSM SMS PDU)'>PDUSpy (A good tool to deal with GSM SMS PDU)</a></li><li><a href='http://averagecoder.net/installing-apache-php-mysql-and-wordpress-on-windows-platform-part-1.htm' rel='bookmark' title='Permanent Link: Installing Apache, PHP, MySQL and Wordpress on Windows Platform - Part 1'>Installing Apache, PHP, MySQL and Wordpress on Windows Platform - Part 1</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.averagecoder.net/wp-content/uploads/tcpview.jpg" title="TCPView Screenshot Fullsize"><img src="http://www.averagecoder.net/wp-content/uploads/tcpview_small.jpg" alt="tcpview_small.jpg" align="left" /></a>It was a suggestion from a good friend of mine who told me to try TCPView when I asked him about a tool to check SQLServer Connection instances created by my program.</p>
<p>All I need is to check whether my program is not forgetting to free any DB connection instances when it is terminated and this TCPView for windows give me what I need.</p>
<p><strong>Using TCPView</strong></p>
<p>When you start TCPView it will enumerate all active TCP and UDP endpoints, resolving all IP addresses to their domain name versions. You can use a toolbar button or menu item to toggle the display of resolved names. On Windows NT, 2000 and XP systems TCPView shows the name of the process that owns each endpoint.</p>
<p>By default, TCPView updates every second, but you can use the View|Update Speed menu item to change the rate. Endpoints that change state from one update to the next are highlighted in yellow; those that are deleted are shown in red, and new endpoints are shown in green.</p>
<p>You can close established TCP/IP connections (those labeled with a state of ESTABLISHED) by selecting File|Close Connections, or by right-clicking on a connection and choosing Close Connections from the resulting context menu.</p>
<p>If you want to see who owns the domain registered for a remote address, select the item containing the name and choose Whois from the context menu or the File menu. You can save TCPView&#8217;s output window to a file using the Save menu item.</p>
<p><strong>Available Download<br />
</strong></p>
<ul>
<li><a href="http://technet.microsoft.com/en-us/sysinternals/bb897437.aspx" title="Download TCPView" target="_blank">Download TCPView For Windows</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://averagecoder.net/tcpview-for-windows-tool-to-check-tcp-and-udp-connections-on-your-system.htm/feed</wfw:commentRss>
		</item>
		<item>
		<title>SmartImageResizer Plugin, WordPress plugin based on Joe Lencioni&#8217;s Smart Image Resizer</title>
		<link>http://averagecoder.net/smartimageresizer-plugin-wordpress-plugin-based-on-joe-lencionis-smart-image-resizer.htm</link>
		<comments>http://averagecoder.net/smartimageresizer-plugin-wordpress-plugin-based-on-joe-lencionis-smart-image-resizer.htm#comments</comments>
		<pubDate>Sun, 05 Oct 2008 00:10:29 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.averagecoder.net/smartimageresizer-plugin-wordpress-plugin-based-on-joe-lencionis-smart-image-resizer.htm</guid>
		<description><![CDATA[ This is the next part of my previous post about Smart Image Resizer. I described there how to create a new resized or cropped image but I forgot to mention how to implement the functionality into your WordPress theme. To ease the implementaion, I had created a simple plugin as an interface to Joe [...]


Related posts:<ol><li><a href='http://averagecoder.net/resize-or-crop-your-wordpress-post-level-images-with-customizable-size-using-smart-image-resizer.htm' rel='bookmark' title='Permanent Link: Resize Image or Crop Image with Joe Lencioni&#8217;s Smart Image Resizer, WordPress Setup'>Resize Image or Crop Image with Joe Lencioni&#8217;s Smart Image Resizer, WordPress Setup</a></li><li><a href='http://averagecoder.net/the-code-snippet-plugin-my-favourite-syntax-highlighter-plugin-for-wordpress.htm' rel='bookmark' title='Permanent Link: The Code Snippet Plugin, my favourite syntax highlighter plugin for WordPress'>The Code Snippet Plugin, my favourite syntax highlighter plugin for WordPress</a></li><li><a href='http://averagecoder.net/contuttopdf-wordpress-plugin-to-convert-your-content-to-pdf.htm' rel='bookmark' title='Permanent Link: ContuttoPDF (Wordpress Plugin to convert your Content to PDF)'>ContuttoPDF (Wordpress Plugin to convert your Content to PDF)</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p><img src='http://averagecoder.net/wp-content/uploads/image.php/joice.jpg?width=150&#038;cropratio=1:1&#038;image=http://www.averagecoder.net/wp-content/uploads/raw.jpg' alt='joice.jpg' /> This is the next part of my <a href="http://averagecoder.net/resize-or-crop-your-wordpress-post-level-images-with-customizable-size-using-smart-image-resizer.htm" title=" Resize Image or Crop Image with Joe Lencioni?s Smart Image Resizer">previous post</a> about Smart Image Resizer. I described there how to create a new resized or cropped image but I forgot to mention how to implement the functionality into your WordPress theme. To ease the implementaion, I had created a simple plugin as an interface to Joe Lencioni&#8217;s <a href="http://averagecoder.net/resize-or-crop-your-wordpress-post-level-images-with-customizable-size-using-smart-image-resizer.htm" title=" Resize Image or Crop Image with Joe Lencioni?s Smart Image Resizer">Smart Image Resizer</a>. This post will show you how to use the plugin. This plugin requires you to install/setup the Smart Image Resizer first. If you haven&#8217;t done it, please read my previous post to get the steps on <a href="http://averagecoder.net/resize-or-crop-your-wordpress-post-level-images-with-customizable-size-using-smart-image-resizer.htm" title="Resize Image or Crop Image with Joe Lencioni?s Smart Image Resizer">how to install Smart Image Resizer</a> - it&#8217;s quite easy.</p>
<p>OK let&#8217;s get started. In order to generate a new image you need to know where to get the source of the image, as we all know that WordPress has the ability to attach files into a single post, including images. On the previous version of WordPress it can be done by adding a custom field to hold the attached files, but on the newer version it can be done by clicking the add media button on your post editor panel. Behind the screen, both has the same method, a database record that linked into a particular post-id on the wp_posts table. I am not going to explain the WordPress database design, I just want to show you how to get the attached image, resize or crop it with Smart Image Resizer and then display it as a thumbnail for your post as shown on <a href="http://averagecoder.net/wp-content/uploads/link_with_image.jpg" title="customized link to post">this image</a>.</p>
<p><strong>ADDING A CUSTOM FIELD TO HOLD THE ATTACHED IMAGE</strong></p>
<p>Open your post for editing or create a new post then find the Custom Field Box, enter &#8220;image&#8221; on the [Key] textbox then enter the url of the image on the [Value] textbox. Finally, click the [Add Custom Field] button.</p>
<p><img src="http://www.averagecoder.net/wp-content/uploads/custom_field.jpg" alt="custom_field.jpg" /></p>
<p><strong>GET THE ATTACHED IMAGE WITH THE PLUGIN</strong></p>
<p>As I said above, I had created a simple plugin to ease the implementation. Please <a href="http://averagecoder.net/wp-content/uploads/smartimageresizer.zip" title="smartimageresizer.zip">download the SmartImageResizer plugin</a> then install it as usual (Let me know if you&#8217;re a WP beginner and have no idea how to install a plugin, I will try to help).</p>
<p>To use this plugin is very simple. All you need to do is insert a trigger tag into your post. This trigger tag will be replaced by the appropriate URL to get the resized or cropped image from your custom field value (the &#8220;image&#8221; key). A working trigger tag will look like the following,</p>
<div class="codesnip-container" >
<div class="codesnip"><span class="br0">&#91;</span>custfieldimg=&quot;joice.jpg,<span class="nu0">150</span>,<span class="nu0">1</span>:<span class="nu0">1</span>&quot;<span class="br0">&#93;</span></div>
</div>
<p>Let me explain: Inside the double quotes there are 3 parts. The <strong>First</strong> one is the name to hold the resized image, can be anything. The <strong>Second</strong> one is the desired width of the resulting image, and the <strong>Third</strong> part is the cropratio, you use cropratio to control the size ratio when you want to crop image. The following image shows you how I put the image of a girl at the top of this post,</p>
<p><img src="http://www.averagecoder.net/wp-content/uploads/smartimageresizer.jpg" alt="smartimageresizer.jpg" /></p>
<p>Okay, we&#8217;re done here. Your feedbacks, whether it&#8217;s a question or a suggestion are welcome. Good luck Guys :)</p>
<p style="text-align: right"><em>Model: Joice Mewengkang - a friend</em>.</p>
<p><strong>Available download</strong></p>
<ul>
<li><a href="http://averagecoder.net/wp-content/uploads/smartimageresizer.zip" title="smartimageresizer.zip">download the SmartImageResizer plugin</a> [updated]</li>
</ul>
<p>_____________________________</p>
<p><strong>UPDATE :</strong></p>
<p>[March 21, 2010] Guys, I am sorry it took a year to update this one, to be honest it&#8217;s not that I am busy or anything but it&#8217;s just because I am too lazy to update this :D</p>
<p>OK, To satisfy Josh and Chuck Norton and I think their suggestions are good ideas, I changed the code of the plugin. The old trigger tag will still work but now you can display not just the first image but also the 2nd and the rest with ID parameter like this:</p>
<p>1st image:</p>
<div class="codesnip-container" >
<div class="codesnip"><span class="br0">&#91;</span>custfieldimg=&quot;joice.jpg,<span class="nu0">150</span>,<span class="nu0">1</span>:<span class="nu0">1</span>,<span class="nu0">0</span>&quot;<span class="br0">&#93;</span></div>
</div>
<p>or 2nd image</p>
<div class="codesnip-container" >
<div class="codesnip"><span class="br0">&#91;</span>custfieldimg=&quot;joice2.jpg,<span class="nu0">150</span>,<span class="nu0">1</span>:<span class="nu0">1</span>,<span class="nu0">1</span>&quot;<span class="br0">&#93;</span></div>
</div>
<p>And you can also put it on the template by calling the new function I just added:</p>
<div class="codesnip-container" >
<div class="codesnip">print<span class="br0">&#40;</span>GetProcessedImageID<span class="br0">&#40;</span>&quot;joice2.jpg&quot;,&quot;<span class="nu0">200</span>&quot;,&quot;<span class="nu0">4</span>:<span class="nu0">3</span>&quot;,&quot;<span class="nu0">1</span>&quot;<span class="br0">&#41;</span><span class="br0">&#41;</span>;</div>
</div>
<p>Enjoy and here is <a href="http://averagecoder.net/?p=204&amp;preview=true" title="Smart Image Resizer Test Page" target="_blank">the test page</a>, seems to work just fine here. Problem etc, just hit me via the comment section but I can&#8217;t promise when it will be replied ^^</p>
]]></content:encoded>
			<wfw:commentRss>http://averagecoder.net/smartimageresizer-plugin-wordpress-plugin-based-on-joe-lencionis-smart-image-resizer.htm/feed</wfw:commentRss>
		</item>
		<item>
		<title>Resize Image or Crop Image with Joe Lencioni&#8217;s Smart Image Resizer, WordPress Setup</title>
		<link>http://averagecoder.net/resize-or-crop-your-wordpress-post-level-images-with-customizable-size-using-smart-image-resizer.htm</link>
		<comments>http://averagecoder.net/resize-or-crop-your-wordpress-post-level-images-with-customizable-size-using-smart-image-resizer.htm#comments</comments>
		<pubDate>Mon, 29 Sep 2008 18:53:49 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.averagecoder.net/resize-or-crop-your-wordpress-post-level-images-with-customizable-size-using-smart-image-resizer.htm</guid>
		<description><![CDATA[UPDATE: I just created a WordPress plugin called smartimageresizer to get an easy use of this Smart Image Resizer functionality into your WordPress post. Click here to check it.
__________________________
If you use WordPress and you are blogging about something which requires a personalized image for every post such as Gadget blogs or you want to use [...]


Related posts:<ol><li><a href='http://averagecoder.net/smartimageresizer-plugin-wordpress-plugin-based-on-joe-lencionis-smart-image-resizer.htm' rel='bookmark' title='Permanent Link: SmartImageResizer Plugin, WordPress plugin based on Joe Lencioni&#8217;s Smart Image Resizer'>SmartImageResizer Plugin, WordPress plugin based on Joe Lencioni&#8217;s Smart Image Resizer</a></li><li><a href='http://averagecoder.net/resizing-image-on-the-fly-with-aspnet-using-the-systemdrawing-namespace.htm' rel='bookmark' title='Permanent Link: Resizing image on the fly with ASP.NET using the System.Drawing namespace'>Resizing image on the fly with ASP.NET using the System.Drawing namespace</a></li><li><a href='http://averagecoder.net/contuttopdf-wordpress-plugin-to-convert-your-content-to-pdf.htm' rel='bookmark' title='Permanent Link: ContuttoPDF (Wordpress Plugin to convert your Content to PDF)'>ContuttoPDF (Wordpress Plugin to convert your Content to PDF)</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p align="justify"><img src="http://www.averagecoder.net/wp-content/uploads/link_with_image.jpg" alt="link_with_image.jpg" align="left" /><strong>UPDATE</strong>: I just created a WordPress plugin called <a href="http://averagecoder.net/smartimageresizer-plugin-wordpress-plugin-based-on-joe-lencionis-smart-image-resizer.htm" title="SmartImageResizer Plugin, WordPress plugin based on Joe Lencioni?s Smart Image Resizer">smartimageresizer</a> to get an easy use of this Smart Image Resizer functionality into your WordPress post. <a href="http://averagecoder.net/smartimageresizer-plugin-wordpress-plugin-based-on-joe-lencionis-smart-image-resizer.htm" title="SmartImageResizer Plugin, WordPress plugin based on Joe Lencioni?s Smart Image Resizer">Click here</a> to check it.</p>
<p align="justify">__________________________</p>
<p align="justify">If you use WordPress and you are blogging about something which requires a personalized image for every post such as Gadget blogs or you want to use different images for every post you have for illustration purpose only like what we commonly found on the newspaper blogs, I think it&#8217;s a good idea to list the link to each post with an image attached to a particular post displayed along with the postname and if necessary with the excerpt on it.</p>
<p align="justify"> Oh man, it&#8217;s hard to describe it with words but what I am trying to say is displaying the link to a post with a layout format as shown on the image at the leftside.</p>
<p align="justify">Okay, there is a problem displaying that kind of layout on your page if you don&#8217;t have images with the same size attached to each post you have.  It won&#8217;t be big problem if you have the same ratio dimension on all of your images, resizing it with your CSS code will give the intended layout - it&#8217;s acceptable, even sometimes the hardcoded-resized image will get a little bit jagged, but if you have an image which has a different ratio dimension, the story will be different.</p>
<p align="justify"> There is only one solution to solve the issue if you&#8217;re not intended to upload images with the same ratio dimension. The solution is to generate a new image with the new size. The logic is simple, resize it and if necessary, crop it.</p>
<p align="justify"> How we&#8217;re going to do that? Of course with the help of phpGD library. Is there any function wrapper available to make the job easier? Yes! It&#8217;s called &#8220;<strong>Smart Image Resizer</strong>&#8221; created by <a href="http://shiftingpixel.com" title="Joe Lencioni of shiftingpixel.com" target="_blank">Joe Lencioni</a>.</p>
<p align="justify">But you have to know that it&#8217;s not a plugin, it&#8217;s basically a .php file so you need to do the setup manually.  Based on the description at the comment section of the file, this .php file can be used to resizes images, intelligently sharpens, crops based on width:height ratios, color fills transparent GIFs and PNGs, and caches variations for optimal performance - just perfect to do the job, at least for me. <strong><em>This file requires PHP 5.1.0+ and GD installed.</em></strong></p>
<p align="left"><strong>SETTING UP THE FILE </strong></p>
<ol>
<li>Download the <a href="http://shiftingpixel.com/downloads/image-1.4.1.zip" title="dowload image.php file" target="_blank">image.php</a> file from <a href="http://shiftingpixel.com/2008/03/03/smart-image-resizer/" target="_blank" title="download image.php">here</a>.</li>
<li>Extract the zipped file then place it on your /wp-content/uploads/ directory or something else you would like it to be.</li>
<li>With the assumption that you place the image.php file on /wp-content/uploads/, create a folder called &#8220;imagecache&#8221; under /wp-content/uploads/.</li>
<li>Make your &#8220;imagecache&#8221; directory writable by the web server (usually chmod 775).</li>
<li>Done!</li>
</ol>
<p align="left"><strong>TESTING IT</strong></p>
<ol>
<li>Put an image under your /wp-content/uploads/ directory. Pick the reasonably large one, for example 1024&#215;768 so you can easily see the different between the original and the processed one.</li>
<li>Rename it to raw.jpg or any other name.</li>
<li>Open your browser then try these url combinations:
<ul>
<li>/wp-content/uploads/image.php/processed.jpg?width=300?=/wp-content/uploads/raw.jpg</li>
<li>/wp-content/uploads/image.php/processed.jpg?width=300&amp;cropratio=1:1?=/wp-content/uploads/raw.jpg</li>
</ul>
</li>
<li>Go ahead and try with your own url combination.</li>
</ol>
<p align="justify">The following images are the result of Joe Lencioni&#8217;s <strong>image.php</strong> file applied on an image of this blog. You can right click them to check the image properties.</p>
<table>
<tr>
<td><img src="http://averagecoder.net/wp-content/uploads/image.php/processed.jpg?width=300&amp;image=/wp-content/uploads/raw.jpg" alt="Test1" /></td>
<td><img src="http://averagecoder.net/wp-content/uploads/image.php/processed.jpg?width=200&amp;cropratio=1:1&amp;image=/wp-content/uploads/raw.jpg" alt="Test2" /></td>
</tr>
<tr>
<td>w=300 cropratio= none</td>
<td>w=200 cropratio=1:1</td>
</tr>
</table>
<p><a href="http://averagecoder.net/wp-content/uploads/raw.jpg" title="raw.jpg">click here for the original image </a></p>
<p align="justify">If you done it correctly, you will see the processed image displayed on your browser. You can right click the image then select properties to check the attributes. You will see that the image location is the same with the url on the address bar of your browser. If something goes wrong, the error message will be displayed on the browser.</p>
<p align="justify">Let me know when you have problems setting up the file. You can either email me or put it on the comment section. I prefer the 2nd one though :)</p>
<p style="text-align: right"><em>Model: Joice Mewengkang - a friend</em>.</p>
<blockquote><p><strong>UPDATE</strong>: I just created a plugin called <a href="http://averagecoder.net/smartimageresizer-plugin-wordpress-plugin-based-on-joe-lencionis-smart-image-resizer.htm" title="SmartImageResizer Plugin, WordPress plugin based on Joe Lencioni?s Smart Image Resizer">smartimageresizer</a> to get an easy use of this functionality. <a href="http://averagecoder.net/smartimageresizer-plugin-wordpress-plugin-based-on-joe-lencionis-smart-image-resizer.htm" title="SmartImageResizer Plugin, WordPress plugin based on Joe Lencioni?s Smart Image Resizer">Click here</a> to check it.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://averagecoder.net/resize-or-crop-your-wordpress-post-level-images-with-customizable-size-using-smart-image-resizer.htm/feed</wfw:commentRss>
		</item>
		<item>
		<title>Free Softwares to help you learn Regular Expression or to enhance your RegEx skill</title>
		<link>http://averagecoder.net/free-softwares-to-help-you-learn-regular-expression-or-to-enhance-your-regex-skill.htm</link>
		<comments>http://averagecoder.net/free-softwares-to-help-you-learn-regular-expression-or-to-enhance-your-regex-skill.htm#comments</comments>
		<pubDate>Tue, 25 Mar 2008 18:42:19 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.averagecoder.net/free-softwares-to-help-you-learn-regular-expression-or-to-enhance-your-regex-skill.htm</guid>
		<description><![CDATA[Even some folks said that you will get better when you get used to Regular Expression, it is still a complex subject to explore and to master. But if you can&#8217;t hide from it, especially when you need to deal with .htaccess and mod_rewrite, here is the list of tools you can use to start [...]


Related posts:<ol><li><a href='http://averagecoder.net/replacing-and-filtering-text-with-regular-expression-using-delphi-visual-basic-and-asp.htm' rel='bookmark' title='Permanent Link: Replacing and filtering text with regular expression using Delphi, Visual Basic and ASP'>Replacing and filtering text with regular expression using Delphi, Visual Basic and ASP</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p align="justify">Even some folks said that you will get better when you get used to Regular Expression, it is still a complex subject to explore and to master. But if you can&#8217;t hide from it, especially when you need to deal with <a href="http://www.averagecoder.net/change-the-wordpress-permalink-structure-to-the-best-format.htm">.htaccess</a> and <a href="http://www.averagecoder.net/change-the-wordpress-permalink-structure-to-the-best-format.htm">mod_rewrite</a>, here is the list of tools you can use to start learning regular expression.</p>
<p align="justify">Please remember: I said they are free here because there is no time limit, while some of them also offer several features which require you to buy the full version but the basic features - in my opinion - are enough for you to learn and taste the regex for the first time.</p>
<p><strong>1. <a href="http://www.codeproject.com/KB/dotnet/regextutorial.aspx" title="Expresso download and tutorial">Expresso - Code Project Edition</a></strong></p>
<p style="text-align: justify"><img src="http://www.averagecoder.net/wp-content/uploads/expresso.thumbnail.jpg" alt="expresso.jpg" width="70" align="left" />Expresso editor is equally suitable as a teaching tool for the beginning user of regular expressions or as a full-featured development environment for the experienced programmer or web designer with an extensive knowledge of regular expressions. I like the interface, the simplicity give you an easy access to each feature. The RegEx builder is cool too. It is designed to run under .Net Framework.</p>
<p><strong>2. <a href="http://www.download3k.com/Install-Regular-Expression-Laboratory.html">Regular Expression Laboratory</a></strong></p>
<p align="justify"><a href="http://www.averagecoder.net/wp-content/uploads/rxlab.jpg" title="rxlab.jpg"><img src="http://www.averagecoder.net/wp-content/uploads/rxlab.thumbnail.jpg" alt="rxlab.jpg" width="70" align="left" /></a>Regular Expression Laboratory is an assistant FREEWARE simple to use tool to help you learn and prepare regular expressions. They said this one supports the incredible size of a stored regular expression up to 2MB. I am not sure about the 2MB announcement since I haven&#8217;t tested it yet. The interface provides simplified search and replace functions with some preset patterns available.</p>
<p><strong>3. <a href="http://www.radsoftware.com.au/regexdesigner/">Rad Software Regular Expression Designer</a></strong></p>
<p align="justify"><a href="http://www.averagecoder.net/wp-content/uploads/rad_regex_designer.jpg" title="rad_regex_designer.jpg"><img src="http://www.averagecoder.net/wp-content/uploads/rad_regex_designer.thumbnail.jpg" alt="rad_regex_designer.jpg" width="70" align="left" /></a>This Russ Donald&#8217;s tool requires .Net Framework to be able to run. The Language Elements treeview is very helpful. The Regex match results are listed in a tree with levels for Matches, Groups and Captures. Clicking on a Match, Group or Capture will highlight it in the Input text window.</p>
<p><strong>4. <a href="http://tools.osherove.com/CoolTools/TheRegulator/tabid/185/Default.aspx">The Regulator</a></strong></p>
<p align="justify"><a href="http://www.averagecoder.net/wp-content/uploads/the_regulator.jpg" title="the_regulator.jpg"><img src="http://www.averagecoder.net/wp-content/uploads/the_regulator.thumbnail.jpg" alt="the_regulator.jpg" width="70" align="left" /></a>This one is created by Roy Osherove. Similar to the others, this one provide Match, Replace and Split. When you type recognized character such as &#8220;(&#8221; and &#8220;\&#8221;, the editor will prompt you with syntax options similar to the code completion in modern programming language IDE. The Regulator is also integrated with <a href="http://regexlib.com/">RegexLib.com</a>, a free regular expressions library, and helps finding ready-to-use regular expressions.</p>
]]></content:encoded>
			<wfw:commentRss>http://averagecoder.net/free-softwares-to-help-you-learn-regular-expression-or-to-enhance-your-regex-skill.htm/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
