<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>American Butifarra &#187; Tutorials</title> <atom:link href="http://claude.betancourt.us/topic/tutorials/feed/" rel="self" type="application/rss+xml" /><link>http://claude.betancourt.us</link> <description>Claude Betancourt&#039;s Personal Blog</description> <lastBuildDate>Fri, 16 Dec 2011 02:43:25 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Clean up XML files in Vim</title><link>http://claude.betancourt.us/clean-up-xml-files-in-vim/</link> <comments>http://claude.betancourt.us/clean-up-xml-files-in-vim/#comments</comments> <pubDate>Tue, 21 Jun 2011 15:10:42 +0000</pubDate> <dc:creator>Claude</dc:creator> <category><![CDATA[How-To]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[Clean-up]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Vim]]></category> <category><![CDATA[XML]]></category> <category><![CDATA[xmllint]]></category><guid isPermaLink="false">http://claude.betancourt.us/?p=826</guid> <description><![CDATA[Sometimes we need to clean up XML files before being able to make sense of them. Here is a quick way to get nicely formatted and readable XML files while using Vim. <a href="http://claude.betancourt.us/clean-up-xml-files-in-vim/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>Sometimes we need to clean up XML files before being able to make sense of them. Here is a quick way to get nicely formatted and readable XML files while using <code>Vim</code>.</p><h3>Requirements</h3><p>Make sure <code>xmllint</code> is installed on your machine and it is in your path. It&#8217;s part of <code>libxml</code>.</p><pre class="brush: plain; title: ; notranslate">man xmllint</pre><p>The command above should display the manual for <code>xmllint</code> if the program has been installed. Hit the <code>q</code> key to exit.</p><h3>Create a Custom Function</h3><p>Add the following user defined command to your <code>.vimrc</code> file:</p><pre class="brush: plain; title: ; notranslate">vim ~/.vimrc</pre><pre class="brush: bash; title: ; notranslate">
function! DoCleanXML()
        &quot; save the filetype so we can restore it later
        let l:origft = &amp;ft
        set ft=
        &quot; delete the xml header if it exists. This will
        &quot; permit us to surround the document with fake tags
        &quot; without creating invalid xml.
        1s/&lt;?xml .*?&gt;//e
        &quot; insert fake tags around the entire document.
        &quot; This will permit us to pretty-format excerpts of
        &quot; XML that may contain multiple top-level elements.
        0put ='&lt;CleanXML&gt;'
        $put ='&lt;/CleanXML&gt;'
        silent %!xmllint --format --encode utf-8 -
        &quot; xmllint will insert an &lt;?xml?&gt; header setting its
        &quot; encoding type to utf-8
        &quot; delete the fake tags
        2d
        $d
        &quot; restore the normal indentation
        silent %&lt;
        &quot; back to home
        1
        &quot; restore the filetype
        exe &quot;set ft=&quot; . l:origft
endfunction
command! CleanXML call DoCleanXML()
</pre><p>Set the indent character by adding the following environment variable to your <code>.profile</code> or similar file. In my case I inserted a tab between the double quotes.</p><pre class="brush: plain; title: ; notranslate">export XMLLINT_INDENT=&quot; &quot;</pre><p>Reload your environment</p><pre class="brush: plain; title: ; notranslate">source ~/.profile</pre><h3>How to use it</h3><p>Your custom command, CleanXML, is now available within your Vim editor. To use it, edit an XML file and type the following command to clean up its contents: <code>:CleanXML</code> and hit enter.</p><p class="alert">This was adapted from a solution found on the <a href="http://vim.wikia.com/wiki/Pretty-formatting_XML">Vim Tips Wiki</a></p> ]]></content:encoded> <wfw:commentRss>http://claude.betancourt.us/clean-up-xml-files-in-vim/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Compress JavaScript and CSS as Part of your Build Process</title><link>http://claude.betancourt.us/compress-javascript-and-css-as-part-of-your-build-process/</link> <comments>http://claude.betancourt.us/compress-javascript-and-css-as-part-of-your-build-process/#comments</comments> <pubDate>Mon, 05 Jul 2010 04:56:20 +0000</pubDate> <dc:creator>Claude</dc:creator> <category><![CDATA[How-To]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[Compression]]></category> <category><![CDATA[Concatenation]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[Performance]]></category> <category><![CDATA[Web Developement]]></category><guid isPermaLink="false">http://claude.betancourt.us/?p=736</guid> <description><![CDATA[Web page performance is critical to keeping customers and visitors moving along on your site. Slow responses typically result in frustrated users, unhappy customers and worse, abandoned orders. It is important to reduce the number of requests generated by a web page in order to increase its actual and perceived performance. <a href="http://claude.betancourt.us/compress-javascript-and-css-as-part-of-your-build-process/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>Web page performance is critical to keeping customers and visitors moving along on your site. Slow responses typically result in frustrated users, unhappy customers and worse, abandoned orders. It is important to reduce the number of requests generated by a web page in order to increase its actual and perceived performance.</p><p>One critical way is to reduce the number of external files loaded by a page. Another one is to reduce their size through compression. This post aims to take this concept a step further by automating this tedious process using open-source libraries.</p><p><span id="more-736"></span></p><h3>Example</h3><p>This example will accomplish the task by executing the following steps:</p><ol><li>Create a temporary directory, <code>/build</code></li><li>Compress each JS file into <code>{original}-min.js</code> files</li><li>Compress each CSS file into <code>{original}-min.css</code> files</li><li>Concatenate all compressed JS files into <code>/js/complete.js</code></li><li>Concatenate all compressed CSS files into <code>/css/complete.css</code></li></ol><h3>Requirements</h3><ul><li>Make sure <a href="http://ant.apache.org/" alt="Apache Ant" title="Apache Ant">Apache Ant</a> has been installed on your system.</li><li>Check out a copy of the <a href="http://svn.betancourt.us/public/yui-compression-sample/">sample project</a> from my public SVN repository. This project already contains the open-source libraries necessary, <a href="http://yhoo.it/3FXTgK">YUI compressor</a> and <a href="http://bit.ly/avcPrG">YUI compressor Ant task</a>.</li><li>Setup a system variable, <code>COMPRESSOR_HOME</code> that points to the location of the sample project&#8217;s <code>/lib</code> directory.<ul><li>On Windows, right click My Computer and select properties. Then click the &#8220;Environment Variables&#8221; button under the advanced tab. Add a new system variable, <code>COMPRESSOR_HOME</code>, and set its value to your local path, for example: <code>C:\Documents and Settings\username\Desktop\yui-compression-sample\lib</code></li><li>On Mac OSX and Linux, update <code>~/.profile</code> or similar file and add <code>export COMPRESSOR_HOME=~/YourProjectDir/yui-compression-sample/lib</code></li></ul></li></ul><h3>Examine the configuration</h3><p>Take a look at the contents of <code>build.xml</code>. The first portion defines variables and locations of the libraries.</p><pre class="brush: xml; title: ; notranslate">
&lt;!-- tells Ant to refer to your environment vars --&gt;
&lt;property environment=&quot;env&quot; /&gt;

&lt;!-- defines location of libraries --&gt;
&lt;property name=&quot;lib.dir&quot; value=&quot;${env.COMPRESSOR_HOME}&quot; /&gt;

&lt;!-- defines output directory --&gt;
&lt;property name=&quot;build.dir&quot; value=&quot;build&quot; /&gt;

&lt;!-- output files, one for JS one for CSS --&gt;
&lt;property name=&quot;final_js&quot; value=&quot;${basedir}/js/complete.js&quot; /&gt;
&lt;property name=&quot;final_css&quot; value=&quot;${basedir}/css/complete.css&quot; /&gt;

&lt;!-- define nicknames for libraries --&gt;
&lt;property name=&quot;yui-compressor&quot; location=&quot;${lib.dir}/yuicompressor-2.4.2.jar&quot; /&gt;
&lt;property name=&quot;yui-compressor-ant-task&quot; location=&quot;${lib.dir}/yui-compressor-ant-task-0.5.jar&quot; /&gt;

&lt;!-- adds libraries to the classpath --&gt;
&lt;path id=&quot;yui.classpath&quot;&gt;
	&lt;pathelement location=&quot;${yui-compressor}&quot; /&gt;
	&lt;pathelement location=&quot;${yui-compressor-ant-task}&quot; /&gt;
&lt;/path&gt;

&lt;!-- define tasks --&gt;
&lt;taskdef name=&quot;yui-compressor&quot; classname=&quot;net.noha.tools.ant.yuicompressor.tasks.YuiCompressorTask&quot;&gt;
	&lt;classpath refid=&quot;yui.classpath&quot; /&gt;
&lt;/taskdef&gt;
</pre><p>The second portion of <code>build.xml</code> defines the Ant targets to be executed. These tell YUI compressor how the source files are to be processed.</p><pre class="brush: xml; title: ; notranslate">
&lt;!-- targets --&gt;
&lt;target name=&quot;concat&quot;&gt;

	&lt;!-- concatenates all compressed JS files into one --&gt;
	&lt;concat destfile=&quot;${final_js}&quot; force=&quot;true&quot; fixlastline=&quot;true&quot;&gt;
		&lt;fileset dir=&quot;${build.dir}&quot; includes=&quot;**/*.js&quot; /&gt;
		&lt;fileset dir=&quot;${build.dir}&quot; includes=&quot;**/widgets/*.js&quot; /&gt;
	&lt;/concat&gt;

	&lt;!-- concatenates all compressed CSS files into one --&gt;
	&lt;concat destfile=&quot;${final_css}&quot; force=&quot;true&quot; fixlastline=&quot;true&quot;&gt;
		&lt;fileset dir=&quot;${build.dir}&quot; includes=&quot;**/*.css&quot; /&gt;
		&lt;fileset dir=&quot;${build.dir}&quot; includes=&quot;**/flexgrid/*.css&quot; /&gt;
	&lt;/concat&gt;

&lt;/target&gt;

&lt;target name=&quot;compress&quot;&gt;

	&lt;!-- compresses each JavaScript and CSS file --&gt;
	&lt;!-- and saved as {original_name}-min.{extension} --&gt;
	&lt;yui-compressor
		warn=&quot;false&quot;
		munge=&quot;true&quot;
		preserveallsemicolons=&quot;false&quot;
		fromdir=&quot;${basedir}&quot;
		todir=&quot;${build.dir}&quot;
	/&gt;

&lt;/target&gt;

&lt;!-- deletes the temporary directory and all its contents --&gt;
&lt;target name=&quot;clean&quot;&gt;
	&lt;delete dir=&quot;${build.dir}&quot;/&gt;
&lt;/target&gt;

&lt;!-- creates the temporary directory --&gt;
&lt;target name=&quot;start&quot;&gt;
	&lt;mkdir dir=&quot;${build.dir}&quot; /&gt;
&lt;/target&gt;

&lt;target name=&quot;main&quot; depends=&quot;start,compress,concat,clean&quot; /&gt;
</pre><h3>What does this do?</h3><p>If you are new to Ant you are probably wondering why the tasks are defined in reverse order of execution. This is just a personal preference and it does not affect execution.</p><p>The order of execution is controlled by the <code>main</code> task. This is the task Ant runs when a target is not passed to it. The attribute <code>depends</code> tells Ant the order in which the tasks must be executed.</p><h3>Give it a try</h3><p>All you have to do to execute the entire operation is open a command prompt (or a terminal window on OS X), change into the project directory where <code>build.xml</code> lives and type <code>ant</code> and hit <code>Enter</code>. You should see some output that looks like this:</p><pre class="brush: plain; highlight: [19,20,32]; light: true; title: ; notranslate">
claude$ ant
Buildfile: build.xml

start:
     [echo] Building JS-CSS-Compression-and-Concat-Sample with Apache Ant version 1.7.1 compiled on April 8 2010 - System Java 1.6
    [mkdir] Created dir: /Users/claude/Documents/www/yui-compression-sample/build

compress:
[yui-compressor] [53%] global-print.css [920] ---&gt; global-print-min.css [488]
[yui-compressor] [80%] global.css [11895] ---&gt; global-min.css [9564]
[yui-compressor] [79%] style.css [1148] ---&gt; style-min.css [910]
[yui-compressor] [64%] googlemaps-yelp-ext.js [6604] ---&gt; googlemaps-yelp-ext-min.js [4270]
[yui-compressor] [70%] split-filepath.js [814] ---&gt; split-filepath-min.js [576]
[yui-compressor] [73%] ContactForm.js [4711] ---&gt; ContactForm-min.js [3461]
[yui-compressor] [57%] InfoTabs.js [1160] ---&gt; InfoTabs-min.js [669]
[yui-compressor] [55%] InfoWindow.js [1228] ---&gt; InfoWindow-min.js [686]
[yui-compressor] [68%] Intraday.js [9559] ---&gt; Intraday-min.js [6536]
[yui-compressor] [68%] MediaCenter.js [5728] ---&gt; MediaCenter-min.js [3906]
[yui-compressor] [JavaScript] Compressed 7 files to 67% (29KB to 19KB, saving 10KB)
[yui-compressor] [CSS] Compressed 3 files to 78% (13KB to 10KB, saving 3KB)
[yui-compressor] Compressed 10 files to 70% (42KB to 30KB, saving 12KB)

concat:
     [echo] Building /Users/claude/Documents/www/yui-compression-sample/js/complete.js
     [echo] Building /Users/claude/Documents/www/yui-compression-sample/css/complete.css

clean:
   [delete] Deleting directory /Users/claude/Documents/www/yui-compression-sample/build

main:

BUILD SUCCESSFUL
Total time: 1 second
</pre><h3>What Now?</h3><p>Change your HTML code to point to the newly created <code>complete.js</code> and <code>complete.css</code> instead of the individual files. Your page will load and render faster.</p><p>Squeeze even more performance out of your site by implementing other best practices. Get a copy of <a href="http://amzn.to/cueRAt">High Performance Web Sites</a> by Steve Souders and read <a href="http://yhoo.it/bjbsh4">Yahoo&#8217;s rules for exceptional performance</a>.</p><p class="note">Watch <a href="http://www.youtube.com/watch?v=BTHvs3V8DBA#t=90s">Steve Souders&#8217; presentation at Google Tech Talks</a>. Audio problems are fixed 5 minutes in. Skip the first 90 seconds to listen to Steve.</p> ]]></content:encoded> <wfw:commentRss>http://claude.betancourt.us/compress-javascript-and-css-as-part-of-your-build-process/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>ExtJS ComboBox Hidden Field Issues</title><link>http://claude.betancourt.us/extjs-combobox-hidden-field-issues/</link> <comments>http://claude.betancourt.us/extjs-combobox-hidden-field-issues/#comments</comments> <pubDate>Tue, 09 Mar 2010 18:57:26 +0000</pubDate> <dc:creator>Claude</dc:creator> <category><![CDATA[Ext JS]]></category> <category><![CDATA[Framework]]></category> <category><![CDATA[How-To]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[Ext JS 3]]></category><guid isPermaLink="false">http://claude.betancourt.us/?p=721</guid> <description><![CDATA[Despite looking like a typical select box, Ext.form.ComboBox does not behave exactly as you would expect. It submits the display text instead of the selected option's value. This post provides a solution to this problem. <a href="http://claude.betancourt.us/extjs-combobox-hidden-field-issues/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p class="alert">This post refers to version 3.x of the Ext-JS framework.</p><p>Despite looking like a typical select box, <a href="http://www.extjs.com/deploy/dev/docs/?class=Ext.form.ComboBox"><strong>Ext.form.ComboBox</strong></a> doesn&#8217;t behave exactly as you would expect since it submits the display text instead of the selected option&#8217;s value. The documentation states:</p><blockquote><p>A ComboBox works in a similar manner to a traditional HTML &lt;select&gt; field. The difference is that to submit the valueField, you must specify a hiddenName to create a hidden input field to hold the value of the valueField. The displayField is shown in the text field which is named according to the name.</p></blockquote><pre class="brush: jscript; highlight: [5,6]; title: ; notranslate">
this.add([
	{
		xtype: 'combo',
		name: 'suffix',
		hiddenName: 'suffixId', // post this name
		hiddenValue: 0, // default value
		fieldLabel: 'Suffix',
		mode: 'local',
		store: this.suffixStore,
		valueField: 'key',
		displayField: 'display',
		triggerAction: 'all',
		forceSelection: true,
		allowBlank: true
	}
]);
</pre><p>Adding a <strong>hiddenName</strong> and a default value in <strong>hiddenValue</strong> does the trick, the default value (0) is set in the hidden field until a user chooses a different value. Unfortunately this breaks when the ComboBox is set to allow blanks and the user tabs over the field. When this happens, the hiddenValue is set to a null string and the user is never prompted to select a value.</p><p>Upon form submission, the hiddenField (<strong>suffixId</strong>) will be set to neither the default nor a valid value.</p><p>One solution is to listen for the <strong>focus</strong> and <strong>blur</strong> events to reset the value of the hidden field when it has been set to a null string.</p><pre class="brush: jscript; highlight: [15,16,17,18,19]; title: ; notranslate">
this.add([
	{
		xtype: 'combo',
		name: 'suffix',
		hiddenName: 'suffixId',
		hiddenValue: 0,
		fieldLabel: 'Suffix',
		mode: 'local',
		store: this.suffixStore,
		valueField: 'key',
		displayField: 'display',
		triggerAction: 'all',
		forceSelection: true,
		allowBlank: true,
		listeners: {
			'focus': this.handleSuffixChange,
			'blur': this.handleSuffixChange,
			scope: this
		}
	}
]);

handleSuffixChange: function(field) {
	if (field.value==='') {
		field.hiddenField.value = '0';
	}
}
</pre><p>Upon form submission you will be guaranteed a valid value, which is especially beneficial if you&#8217;re using the form values to populate a server side bean object.</p> ]]></content:encoded> <wfw:commentRss>http://claude.betancourt.us/extjs-combobox-hidden-field-issues/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Ext-JS Tasks &amp; Progressbars a Match Made in Heaven</title><link>http://claude.betancourt.us/ext-js-tasks-progressbars-a-match-made-in-heaven/</link> <comments>http://claude.betancourt.us/ext-js-tasks-progressbars-a-match-made-in-heaven/#comments</comments> <pubDate>Wed, 29 Oct 2008 12:25:46 +0000</pubDate> <dc:creator>Claude</dc:creator> <category><![CDATA[Articles]]></category> <category><![CDATA[Ext JS]]></category> <category><![CDATA[Tutorials]]></category><guid isPermaLink="false">http://claude.betancourt.us/?p=184</guid> <description><![CDATA[Chris Boersma posted this example of using TaskRunner and TaskManager to keep a user informed while a task is handled server-side.]]></description> <content:encoded><![CDATA[<p><span class="drop_cap">C</span>hris Boersma posted <strong><a href="http://www.kungfuice.com/index.php/2008/10/29/ext-js-tasks-progressbars-a-match-made-in-heaven/">this example</a></strong> of using TaskRunner and TaskManager to keep a user informed while a task is handled server-side.</p> ]]></content:encoded> <wfw:commentRss>http://claude.betancourt.us/ext-js-tasks-progressbars-a-match-made-in-heaven/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Tutorial: Ext-JS Charting and Mapping with Google Visualizations</title><link>http://claude.betancourt.us/tutorial-ext-charting-and-mapping-with-google-visualizations/</link> <comments>http://claude.betancourt.us/tutorial-ext-charting-and-mapping-with-google-visualizations/#comments</comments> <pubDate>Tue, 14 Oct 2008 02:27:57 +0000</pubDate> <dc:creator>Claude</dc:creator> <category><![CDATA[Ext JS]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[Data]]></category> <category><![CDATA[Google]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[Library]]></category> <category><![CDATA[LinkedIn]]></category> <category><![CDATA[Visualization]]></category><guid isPermaLink="false">http://claude.betancourt.us/?p=159</guid> <description><![CDATA[Aaron Conran posted an entry about Ext.ux.GVisualizationPanel, a user extension that takes advantage of the similarities between the Ext data store and Google's data table to allow reuse of an Ext data store with Google's Visualization API. <a href="http://claude.betancourt.us/tutorial-ext-charting-and-mapping-with-google-visualizations/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p><a href="http://extjs.com/blog/2008/10/13/google-visualization/">Aaron Conran posted an entry</a> about Ext.ux.GVisualizationPanel, a user extension that takes advantage of the similarities between the Ext data store and Google&#8217;s data table to allow reuse of an Ext data store with Google&#8217;s Visualization API.</p><div><a href="http://code.betancourt.us/ext-google-visualization/"><img src="/images/blog/assets/timeline-full.jpg?2ce803" border="0" alt="" /></a></div><p><a href="http://code.betancourt.us/ext-google-visualization/"><strong>Proceed to the tutorial</strong></a>.</p> ]]></content:encoded> <wfw:commentRss>http://claude.betancourt.us/tutorial-ext-charting-and-mapping-with-google-visualizations/feed/</wfw:commentRss> <slash:comments>7</slash:comments> </item> <item><title>Tutorial: Flickr Photo Gallery</title><link>http://claude.betancourt.us/flickr-photo-gallery/</link> <comments>http://claude.betancourt.us/flickr-photo-gallery/#comments</comments> <pubDate>Sat, 04 Oct 2008 00:02:56 +0000</pubDate> <dc:creator>Claude</dc:creator> <category><![CDATA[Ext JS]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[Ajax]]></category> <category><![CDATA[Demo]]></category> <category><![CDATA[Flickr]]></category> <category><![CDATA[PHP]]></category><guid isPermaLink="false">http://localhost/?p=45</guid> <description><![CDATA[This demo shows you how to retrieve today's top rated photos from <strong>Flickr</strong> as well as the most recent uploads using jQuery and phpFlickr. <a href="http://claude.betancourt.us/flickr-photo-gallery/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p><span class="drop_cap">T</span><a href="http://code.betancourt.us/flickr/"><strong>his demo</strong></a> shows you how to retrieve today&#8217;s top rated photos from <strong>Flickr</strong> as the most recent uploads using jQuery and phpFlickr.</p> ]]></content:encoded> <wfw:commentRss>http://claude.betancourt.us/flickr-photo-gallery/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Creating an Apple Style Menu with Animation</title><link>http://claude.betancourt.us/create-apple-style-top-navigation/</link> <comments>http://claude.betancourt.us/create-apple-style-top-navigation/#comments</comments> <pubDate>Mon, 28 Jul 2008 22:23:29 +0000</pubDate> <dc:creator>Claude</dc:creator> <category><![CDATA[How-To]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[Apple]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[Photoshop]]></category> <category><![CDATA[Sprites]]></category><guid isPermaLink="false">http://claude.betancourt.us/blog/?p=107</guid> <description><![CDATA[Kriesi Budschedl has posted a very detailed tutorial to help you build your own Apple.com style menu and adds a nice touch by animating it. <a href="http://claude.betancourt.us/create-apple-style-top-navigation/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p><span class="drop_cap">K</span>riesi Budschedl has <a href="http://www.kriesi.at/archives/apple-menu-improved-with-jquery"><b>posted a very detailed tutorial</b></a> to help you build your own Apple.com style menu and adds a nice touch by animating it.</p><p><img class="alignleft frame" src="/images/blog/assets/tutorial-kwicks-home.jpg?2ce803" border="0" /></p><p>To construct the basic menu, Kriesi takes advantage of <a href="http://www.alistapart.com/articles/sprites" title="CSS Sprites: Image Slicing's Kiss of Death">CSS Sprites</a>, a technique to reduce the number of image files necessary to accomplish things like rollovers, without the need to preload the images using JavaScript.</p><p>A single image contains all the navigation menu options in their normal and active states and CSS rules are used to move the appropriate menu option into view. Once the basic menu is working, animation is added by using <a href="http://www.jeremymartin.name/projects.php?project=kwicks">Kwicks for jQuery</a>, a plugin written by Jerry Martin, resulting in the <a href="http://www.kriesi.at/wp-content/extra_data/kwicks_tutorial/kwicks_final.html">final product seen here</a>.</p><p><a href="http://www.kriesi.at/wp-content/extra_data/kwicks_tutorial/kwicks_final.html" title="Final product"><img class="aligncenter" src="/images/blog/assets/tutorial-kwicks-working-menu.png?2ce803" border="0" /></a></p> ]]></content:encoded> <wfw:commentRss>http://claude.betancourt.us/create-apple-style-top-navigation/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Google Maps Component for Ext-JS</title><link>http://claude.betancourt.us/googlemap-extjs/</link> <comments>http://claude.betancourt.us/googlemap-extjs/#comments</comments> <pubDate>Tue, 01 Jul 2008 14:41:25 +0000</pubDate> <dc:creator>Claude</dc:creator> <category><![CDATA[Articles]]></category> <category><![CDATA[Ext JS]]></category> <category><![CDATA[How-To]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[Component]]></category> <category><![CDATA[ext.ux.gmappanel]]></category> <category><![CDATA[gmappanel]]></category> <category><![CDATA[GoogleMaps]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[Library]]></category> <category><![CDATA[Map]]></category> <category><![CDATA[Sencha]]></category><guid isPermaLink="false">http://claude.betancourt.us/blog/?p=75</guid> <description><![CDATA[Shea Frederick has created a user-defined extension to integrate Google Maps with ExtJS. <a href="http://claude.betancourt.us/googlemap-extjs/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>Shea Frederick has created a user-defined extension to <a href="http://extjs.com/blog/2008/07/01/integrating-google-maps-api-with-extjs/">integrate Google Maps with ExtJS</a>.</p><p><strong>UPDATE:</strong>I&#8217;ve created a <a href="http://code.betancourt.us/ext-map/">tutorial that uses the latest version of the extension and Ext-JS</a>.</p><pre class="brush: jscript; title: ; notranslate">
Ext.ns('Sample');
Sample.ExtGMap = function() {

	var el = 'ext-map';

	function _init() {

		new Ext.Panel({
			renderTo: el,
			layout: 'fit',
			height: 300,
			hideLabel: true,
			items: [
		        {
		        	xtype: 'gmappanel',
		        	gmapType: 'map',
		        	zoomLevel: 14,
		            setCenter: {
		        		lat: 40.782686,
		        		lng: -73.96524,
			            marker: {
		        			title: 'Central Park'
			            }
			        }
		        }
			]
		});

	}

	return {
		init: _init
	}

}();
Ext.onReady(Sample.ExtGMap.init, Sample.ExtGMap);
</pre><p>Configuration options:</p><blockquote><p>It’s just as easy to create a Google map window that maps addresses and places markers at their locations (which could just as easily be nested in a layout instead).</p><p>A couple of the primary Google maps handlers and settings are setup as configuration options. For instance, ‘addControl’ allows adding of a standard Google map control (zoom, pan, etc) and the ‘zoomLevel’ sets a default zoom level for the map.</p><p>Geocoding can be used by substituting the lat/long configuration options with a ‘geoCodeAddr’ string.</p><p>The ’setCenter’ configuration allows the default center location of the map to be set, along with a marker. More markers can be added to the map using the ‘markers’ array.</p></blockquote> ]]></content:encoded> <wfw:commentRss>http://claude.betancourt.us/googlemap-extjs/feed/</wfw:commentRss> <slash:comments>14</slash:comments> </item> <item><title>Flex-Ajax Bridge Tutorial</title><link>http://claude.betancourt.us/flex-ajax-bridge-tutorial/</link> <comments>http://claude.betancourt.us/flex-ajax-bridge-tutorial/#comments</comments> <pubDate>Thu, 04 May 2006 11:05:07 +0000</pubDate> <dc:creator>Claude</dc:creator> <category><![CDATA[Tutorials]]></category> <category><![CDATA[Adobe]]></category> <category><![CDATA[Ajax]]></category> <category><![CDATA[Flex]]></category><guid isPermaLink="false">http://claude.betancourt.us/blog/?p=41</guid> <description><![CDATA[Here is an interesting tutorial about Flex and Ajax integration. April 6th, 2009 UPDATE &#8211; The original article appears to have been lost when webmonkey.com was redesigned. This other article of theirs references the same broken link. Sorry.]]></description> <content:encoded><![CDATA[<p>Here is an <a target="_blank" href="http://www.webmonkey.com/webmonkey/06/18/index4a.html"><strong>interesting tutorial</strong></a> about Flex and Ajax integration.</p><p class="alert"><span class="amp">April 6th, 2009 UPDATE</span> &ndash; The original article appears to have been lost when webmonkey.com was redesigned. <a href="http://www.webmonkey.com/blog/Test_Driving_the_Flex-Ajax_Bridge">This other article</a> of theirs references the same broken link. Sorry.</p> ]]></content:encoded> <wfw:commentRss>http://claude.betancourt.us/flex-ajax-bridge-tutorial/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>CFHTTP Trouble: Connecting to Web Services that Use GZip Compression</title><link>http://claude.betancourt.us/cfhttp-trouble-connecting-to-web-services-that-use-gzip-compression/</link> <comments>http://claude.betancourt.us/cfhttp-trouble-connecting-to-web-services-that-use-gzip-compression/#comments</comments> <pubDate>Sat, 31 Dec 2005 00:29:00 +0000</pubDate> <dc:creator>Claude</dc:creator> <category><![CDATA[Protocol]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[ColdFusion]]></category><guid isPermaLink="false">http://claude.betancourt.us/blog/?p=36</guid> <description><![CDATA[Rob Gonda posted this today, which I had also experienced while attempting to connect to the Yahoo! Maps API. The solution in my case was to add charset=&#8221;utf-8&#8243; to the cfhttp call.]]></description> <content:encoded><![CDATA[<p>Rob Gonda <a href="http://www.robgonda.com/blog/index.cfm/2005/12/30/cfhttp-and-gzip-compression">posted this today</a>, which I had also experienced while attempting to connect to the Yahoo! Maps API.</p><p>The solution in my case was to add charset=&#8221;utf-8&#8243; to the cfhttp call.</p> ]]></content:encoded> <wfw:commentRss>http://claude.betancourt.us/cfhttp-trouble-connecting-to-web-services-that-use-gzip-compression/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Served from: claude.betancourt.us @ 2012-02-07 15:10:13 by W3 Total Cache -->
