<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><!-- generator="wordpress/2.3.2" --><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>AverageCoder.Net - Programming - Software - Techie Stuffs » Programming</title>
	<link>http://averagecoder.net</link>
	<description>Just another personal weblog</description>
	<pubDate>Fri, 23 Oct 2009 10:44:58 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
	<language>en</language>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/averagecoder_programming" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Microsoft Excel Import External Data Problem: When Microsoft Query doesn’t recognize some of your parameters</title>
		<link>http://feedproxy.google.com/~r/averagecoder_programming/~3/hga0oFayqnA/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>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/averagecoder_programming?a=hga0oFayqnA:2CP028GxqTw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/averagecoder_programming?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></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>
		<feedburner:origLink>http://averagecoder.net/microsoft-excel-import-external-data-problem-when-microsoft-query-doesnt-recognize-some-of-your-parameter.htm</feedburner:origLink></item>
		<item>
		<title>SmartImageResizer Plugin, WordPress plugin based on Joe Lencioni’s Smart Image Resizer</title>
		<link>http://feedproxy.google.com/~r/averagecoder_programming/~3/7rawe5aCrso/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></li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/averagecoder_programming?a=7rawe5aCrso:vEPJ3rnAwi8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/averagecoder_programming?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://averagecoder.net/smartimageresizer-plugin-wordpress-plugin-based-on-joe-lencionis-smart-image-resizer.htm/feed</wfw:commentRss>
		<feedburner:origLink>http://averagecoder.net/smartimageresizer-plugin-wordpress-plugin-based-on-joe-lencionis-smart-image-resizer.htm</feedburner:origLink></item>
		<item>
		<title>Resize Image or Crop Image with Joe Lencioni’s Smart Image Resizer, WordPress Setup</title>
		<link>http://feedproxy.google.com/~r/averagecoder_programming/~3/akikicjKoXU/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>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/averagecoder_programming?a=akikicjKoXU:Zc6olA-IMaQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/averagecoder_programming?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></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>
		<feedburner:origLink>http://averagecoder.net/resize-or-crop-your-wordpress-post-level-images-with-customizable-size-using-smart-image-resizer.htm</feedburner:origLink></item>
		<item>
		<title>Free Softwares to help you learn Regular Expression or to enhance your RegEx skill</title>
		<link>http://feedproxy.google.com/~r/averagecoder_programming/~3/6bEtGvZX3ow/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><li><a href='http://averagecoder.net/smartftp-client-is-no-longer-free-what-would-be-the-best-replacement-for-it.htm' rel='bookmark' title='Permanent Link: SmartFTP Client is no longer Free. What would be the best replacement for it?'>SmartFTP Client is no longer Free. What would be the best replacement for it?</a></li><li><a href='http://averagecoder.net/sweet-home-3d-a-free-home-design-software.htm' rel='bookmark' title='Permanent Link: Sweet Home 3D, a free home design software'>Sweet Home 3D, a free home design software</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>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/averagecoder_programming?a=6bEtGvZX3ow:GqyTAsJx5Js:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/averagecoder_programming?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></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>
		<feedburner:origLink>http://averagecoder.net/free-softwares-to-help-you-learn-regular-expression-or-to-enhance-your-regex-skill.htm</feedburner:origLink></item>
		<item>
		<title>ConsoleProgressBar - Simple Progress Bar Function for your VB.Net Console Application</title>
		<link>http://feedproxy.google.com/~r/averagecoder_programming/~3/uyJzeKB0IlE/simple-progress-bar-function-for-your-vbnet-console-application.htm</link>
		<comments>http://averagecoder.net/simple-progress-bar-function-for-your-vbnet-console-application.htm#comments</comments>
		<pubDate>Sat, 15 Mar 2008 19:11:16 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.averagecoder.net/simple-progress-bar-function-for-your-vbnet-console-application.htm</guid>
		<description><![CDATA[It is good to know that long process is still ticking and one of the best way to provide the indicator is to have a progress bar. I am pretty sure you already knew how to display progress bar when you deal with windows form application but what about console application, is there any progress [...]


Related posts:<ol><li><a href='http://averagecoder.net/passing-arguments-to-your-vbnet-console-application.htm' rel='bookmark' title='Permanent Link: Passing arguments to your VB.NET console application'>Passing arguments to your VB.NET console application</a></li><li><a href='http://averagecoder.net/how-to-get-user-input-and-allowing-more-than-256-characters-to-be-entered-on-net-console-application.htm' rel='bookmark' title='Permanent Link: How to Get User Input and allowing more than 256 characters to be entered on .NET Console Application'>How to Get User Input and allowing more than 256 characters to be entered on .NET Console Application</a></li><li><a href='http://averagecoder.net/bringing-the-lovely-vbscript-split-function-into-delphi-with-a-custom-function.htm' rel='bookmark' title='Permanent Link: Bringing the Lovely VBScript Split Function into Delphi with a Custom Function'>Bringing the Lovely VBScript Split Function into Delphi with a Custom Function</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.averagecoder.net/wp-content/uploads/averagecoder_article.jpg" alt="progress bar for console application" />It is good to know that long process is still ticking and one of the best way to provide the indicator is to have a progress bar. I am pretty sure you already knew how to display progress bar when you deal with windows form application but what about console application, is there any progress bar component which can be easily incorporated into the console screen?</p>
<p>I&#8217;ve searched the internet to find this kind of stuff but I found nothing (let me know if I am wrong), so there is no other way than to create it myself and here it is: my own progress bar for console application written in VB.Net.</p>
<p>It&#8217;s very simple. I use a single sub procedure instead of packing it as a class since I don&#8217;t think it&#8217;s required. A sub procedure called <strong>RenderProgressBar</strong> is the only procedure responsible to process and render the progress bar on the console screen.</p>
<p><a href="http://www.averagecoder.net/wp-content/uploads/progressbar.jpg" title="progressbar.jpg"><img src="http://www.averagecoder.net/wp-content/uploads/progressbar.thumbnail.jpg" alt="progressbar.jpg" /></a>There are <strong>two options</strong> you can use with this function. <strong>The first</strong> one is to display the progress bar with maximum limit specified. With this option the percentage of process and the &#8220;bar&#8221; itself will be displayed. <strong>The second</strong> one is displaying the progress without specifying the max limit so there is no &#8220;bar&#8221; with this option, it will only display the iteration value - it&#8217;s good when you have no idea when a process will be completed but you still want to show that the process is still ticking.</p>
<p>Following is the <strong>RenderProgressBar</strong> code:</p>
<div class="codesnip-container" >
<div class="codesnip"><span class="kw6">Sub</span> RenderProgressBar<span class="br0">&#40;</span><span class="kw2">ByVal</span> intMaxValue <span class="kw2">As</span> <span class="kw4">Integer</span>, <span class="kw2">ByVal</span> intProgress <span class="kw2">As</span> <span class="kw4">Integer</span>, <span class="kw2">ByVal</span> intLeftPos <span class="kw2">As</span> <span class="kw4">Integer</span>, <span class="kw2">ByVal</span> intTopPos <span class="kw2">As</span> <span class="kw4">Integer</span><span class="br0">&#41;</span><br />
<span class="kw6">Dim</span> strResult <span class="kw2">As</span> <span class="kw2">String</span><br />
<span class="kw6">Dim</span> intPercent <span class="kw2">As</span> <span class="kw4">Integer</span></p>
<p><span class="kw6">If</span> <span class="br0">&#40;</span>intMaxValue &amp;gt; <span class="nu0">0</span><span class="br0">&#41;</span> <span class="kw2">Then</span><br />
intPercent = Math.<span class="me1">Round</span><span class="br0">&#40;</span><span class="br0">&#40;</span>intProgress / intMaxValue<span class="br0">&#41;</span> * <span class="nu0">100</span>, <span class="nu0">0</span><span class="br0">&#41;</span><br />
<span class="kw6">If</span> intPercent &amp;gt;= <span class="nu0">10</span> <span class="kw2">Then</span><br />
strResult = <span class="st0">&#8220;| &#8220;</span> &amp;amp; intPercent &amp;amp; <span class="st0">&#8220;% |&#8221;</span> &amp;amp; StrDup<span class="br0">&#40;</span>intPercent \ <span class="nu0">10</span>, <span class="st0">&#8220;=&#8221;</span><span class="br0">&#41;</span> &amp;amp; StrDup<span class="br0">&#40;</span><span class="nu0">10</span> - <span class="br0">&#40;</span>intPercent \ <span class="nu0">10</span><span class="br0">&#41;</span>, <span class="st0">&#8221; &#8220;</span><span class="br0">&#41;</span> &amp;amp; <span class="st0">&#8220;|&#8221;</span><br />
<span class="kw2">Else</span><br />
strResult = <span class="st0">&#8220;| &#8220;</span> &amp;amp; intPercent &amp;amp; <span class="st0">&#8220;% |&#8221;</span> &amp;amp; StrDup<span class="br0">&#40;</span><span class="nu0">10</span>, <span class="st0">&#8221; &#8220;</span><span class="br0">&#41;</span> &amp;amp; <span class="st0">&#8220;|&#8221;</span><br />
<span class="kw6">End</span> <span class="kw6">If</span><br />
<span class="kw2">Else</span><br />
intPercent = intProgress<br />
strResult = <span class="st0">&#8220;| &#8220;</span> &amp;amp; <span class="kw7">FormatNumber</span><span class="br0">&#40;</span>intPercent, <span class="nu0">0</span><span class="br0">&#41;</span> &amp;amp; <span class="st0">&#8221; |&#8221;</span><br />
<span class="kw6">End</span> <span class="kw6">If</span><br />
Console.<span class="me1">CursorVisible</span> = <span class="kw1">False</span><br />
Console.<span class="me1">SetCursorPosition</span><span class="br0">&#40;</span>intLeftPos, intTopPos<span class="br0">&#41;</span><br />
Console.<span class="kw6">Write</span><span class="br0">&#40;</span>strResult<span class="br0">&#41;</span><br />
Console.<span class="me1">CursorVisible</span> = <span class="kw1">True</span><br />
<span class="kw6">End</span> <span class="kw6">Sub</span></div>
</div>
<p>The demo project along with the RenderProgressBar sub procedure is included in this post. Feel free to enhance this function as you wish, in fact I encourage you to do it. You may pack it as a class or anything as long as it gets better. Good luck :)</p>
<p><strong>Available Download:</strong></p>
<ul>
<li><a href="http://averagecoder.net/wp-content/uploads/consoleprogressbardemo.zip" title="consoleprogressbardemo.zip">Download SimpleProgressBar Demo Project</a> (60 KB)</li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/averagecoder_programming?a=uyJzeKB0IlE:XepuBCTD1qU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/averagecoder_programming?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://averagecoder.net/simple-progress-bar-function-for-your-vbnet-console-application.htm/feed</wfw:commentRss>
		<feedburner:origLink>http://averagecoder.net/simple-progress-bar-function-for-your-vbnet-console-application.htm</feedburner:origLink></item>
	</channel>
</rss>
