<?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>Geek is a Lift-Style. &#187; Normal</title>
	<atom:link href="http://www.taiwangeek.com/category/normal/feed" rel="self" type="application/rss+xml" />
	<link>http://www.taiwangeek.com</link>
	<description>Time has a wonderful way of showing us what really matters.</description>
	<lastBuildDate>Mon, 23 May 2011 07:18:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.2</generator>
		<item>
		<title>3 Unix Shell Scripts – User Activity, View Processes, Display Memory</title>
		<link>http://www.taiwangeek.com/2010-07/3-unix-shell-scripts-%e2%80%93-user-activity-view-processes-display-memory.html</link>
		<comments>http://www.taiwangeek.com/2010-07/3-unix-shell-scripts-%e2%80%93-user-activity-view-processes-display-memory.html#comments</comments>
		<pubDate>Thu, 29 Jul 2010 22:04:10 +0000</pubDate>
		<dc:creator>tung</dc:creator>
				<category><![CDATA[Normal]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[details-total]]></category>
		<category><![CDATA[echo]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[memory-space]]></category>
		<category><![CDATA[processes]]></category>
		<category><![CDATA[processes-based]]></category>
		<category><![CDATA[result]]></category>
		<category><![CDATA[start-time]]></category>
		<category><![CDATA[uniq]]></category>
		<category><![CDATA[unique-users]]></category>
		<category><![CDATA[user]]></category>

		<guid isPermaLink="false">http://www.taiwangeek.com/2010-07/3-unix-shell-scripts-%e2%80%93-user-activity-view-processes-display-memory.html</guid>
		<description><![CDATA[/bin/bash w > /tmp/a echo "Total number of unique users logged in currently" cat /tmp/a&#124; sed '1,2d' &#124; awk '{print $1}' &#124; uniq &#124; wc -l echo "" echo "List of unique users logged in currently" cat /tmp/a &#124; sed '1,2d'&#124; awk '{print $1}' ...]]></description>
			<content:encoded><![CDATA[<div readability="87.1730466702">
<p>You might find the following three Linux / Unix shell scripts helpful.</p>
<ul>
<li>Display processes based on either %CPU or Memory Usage.</li>
<li>Display which user is utilizing the CPU the most.</li>
<li>Display system’s memory information – total, used and free.</li>
</ul>
<h3>1. List Processes based on %CPU and Memory Usage</h3>
<p>This script list the processes based on %CPU and Memory usage, with out argument (by default), If you specify the argument (cpu or mem), it lists the processes based on CPU usage or memory usage.</p>
<pre>$ cat processes.sh
#! /bin/bash
#List processes based on %cpu and memory usage

echo "Start Time" `date`
# By default, it display the list of processes based on the cpu and memory usage #
if [ $# -eq 0 ]
then

	echo "List of processes based on the %cpu Usage"
	ps -e -o pcpu,cpu,nice,state,cputime,args --sort pcpu  # sorted based on %cpu
	echo "List of processes based on the memory Usage"
	ps -e -orss=,args= | sort -b -k1,1n # sorted bases rss value

# If arguements are given (mem/cpu)
else
	case "$1" in
	mem)
	 echo "List of processes based on the memory Usage"
 	 ps -e -orss=,args= | sort -b -k1,1n
	 ;;
 	cpu)
	 echo "List of processes based on the %cpu Usage"
	 ps -e -o pcpu,cpu,nice,state,cputime,args --sort pcpu
	 ;;
 	*)
		echo "Invalid Argument Given n"
		echo "Usage : $0 mem/cpu"
		exit 1
 	esac	

fi
echo "End Time" `date`
exit 0</pre>
<p>You can execute the above script as shown below.</p>
<pre>$ processes.sh

$ processes.sh mem

$ processes.sh cpu</pre>
<h3>2. Display Logged in users and who is using high CPU percentage</h3>
<p>This script displays few information about the currently logged in users and what they are doing.</p>
<pre>$ cat loggedin.sh
#! /bin/bash

w &gt; /tmp/a

echo "Total number of unique users logged in currently"
cat /tmp/a|  sed '1,2d' | awk '{print $1}' | uniq | wc -l
echo ""

echo "List of unique users logged in currently"
cat /tmp/a | sed '1,2d'|  awk '{print $1}' | uniq
echo ""

echo "The user who is using high %cpu"
cat /tmp/a | sed '1,2d' | awk   '$7 &gt; maxuid { maxuid=$7; maxline=$0 }; END { print maxuid, maxline }' 

echo ""
echo "List of users logged in and what they are doing"
cat /tmp/a</pre>
<pre>$ ./loggedin.sh
Total number of unique users logged in currently
4

List of unique users logged in currently
john
david
raj
reshma

The user who is using high %cpu
0.99s reshma   pts/5    192.168.2.1  15:26    3:01   1.02s  0.99s custom-download.sh

List of users logged in and what they are doing
 15:53:55 up 230 days,  2:38,  7 users,  load average: 0.19, 0.26, 0.24
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
john     pts/1    192.168.2.9   14:25    1:28m  0.03s  0.03s -bash
john     pts/2    192.168.2.9   14:41    1:11m  0.03s  0.03s -bash
raj      pts/0    192.168.2.6   15:07    9:08   0.11s  0.02s -bash
raj      pts/3    192.168.2.6   15:19    29:29  0.02s  0.02s -bash
john     pts/4    192.168.2.91  15:25    13:47  0.22s  0.20s vim error_log
reshma   pts/5    192.168.2.1   15:26    3:01   1.02s  0.99s custom-download.sh</pre>
<h3>3. Display Total, Used and Free Memory</h3>
<p>The following script displays the total, used and free memory space.</p>
<pre>$ cat mem.sh
#! /bin/bash

# Total memory space details

echo "Memory Space Details"
free -t -m | grep "Total" | awk '{ print "Total Memory space : "$2 " MB";
print "Used Memory Space : "$3" MB";
print "Free Memory : "$4" MB";
}'

echo "Swap memory Details"
free -t -m | grep "Swap" | awk '{ print "Total Swap space : "$2 " MB";
print "Used Swap Space : "$3" MB";
print "Free Swap : "$4" MB";
}'</pre>
<pre>$ ./mem.sh
Memory Space Details
Total Memory space : 4364 MB
Used Memory Space : 451 MB
Free Memory : 3912 MB
Swap memory Details
Total Swap space : 2421 MB
Used Swap Space : 0 MB
Free Swap : 2421 MB</pre>
<h3>If you enjoyed this article, you might also like..</h3>
<p><center><br />
</center><br />

				</div>
</p>
<p>Go here to see the original:<br />
<a  target="_blank" href="http://www.thegeekstuff.com/2010/07/3-shell-scripts/" title="3 Unix Shell Scripts – User Activity, View Processes, Display Memory">3 Unix Shell Scripts – User Activity, View Processes, Display Memory</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.taiwangeek.com/2010-07/3-unix-shell-scripts-%e2%80%93-user-activity-view-processes-display-memory.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Emacs Macro Tutorial: How to Record and Play</title>
		<link>http://www.taiwangeek.com/2010-07/emacs-macro-tutorial-how-to-record-and-play.html</link>
		<comments>http://www.taiwangeek.com/2010-07/emacs-macro-tutorial-how-to-record-and-play.html#comments</comments>
		<pubDate>Tue, 27 Jul 2010 22:02:51 +0000</pubDate>
		<dc:creator>tung</dc:creator>
				<category><![CDATA[Headline]]></category>
		<category><![CDATA[Normal]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[change-the-case]]></category>
		<category><![CDATA[cursor]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[emacs-tutorials]]></category>
		<category><![CDATA[snippet]]></category>
		<category><![CDATA[thegeekstuff]]></category>
		<category><![CDATA[tutorial-series]]></category>

		<guid isPermaLink="false">http://www.taiwangeek.com/2010-07/emacs-macro-tutorial-how-to-record-and-play.html</guid>
		<description><![CDATA[Let us take the following text snippet as an example. $ cat thegeekstuff.txt * virtualization technologies * sed and awk tips/tricks * emacs tutorials * bash scripting tutorial series ...]]></description>
			<content:encoded><![CDATA[<div id="post-5393" readability="69.9225941423">
<div class="headline_area" readability="8">
<p class="headline_meta">by <span class="author vcard fn">SathiyaMoorthy</span> on <abbr class="published" title="2010-07-28">July 28, 2010</abbr></p>
</p></div>
<div class="format_text entry-content" readability="65.2788461538">
<p><img src="http://www.thegeekstuff.com/wp-content/uploads/2010/07/emacs-macro-record-n-play.png" alt="" width="300" height="200" class="alignright size-full wp-image-5406" />Using Emacs Macro feature you can record and play a sequence of actions inside the editor.</p>
<p>This article explains how to perform record and play inside Emacs editor with an example.</p>
<p>If you are a Vim editor fan, refer to our <a  href="http://www.thegeekstuff.com/2009/01/vi-and-vim-macro-tutorial-how-to-record-and-play/">How to record and play inside Vim editor</a> article.<br /><span id="more-5393"></span></p>
<h3>High Level Steps to Record and Play inside Emacs</h3>
<ol>
<li> Start recording a macro by pressing <b>ctrl+x (</b>
</li>
<li> Perform any actions inside the Emacs editor that you would like to record.
</li>
<li> Stop recording by pressing <b>ctrl+x )</b>
</li>
<li> Play the last recorded macro by pressing <b>ctrl+x e</b>
</li>
</ol>
<p>For using multiple macros, you have to name and save the macros.</p>
<h3>High Level Steps for Naming and Saving emacs macro, and playing it later</h3>
<ol>
<li> Press Ctrl+x Ctrl+k n
</li>
<li> Give name-of-macro, and press ENTER
</li>
<li> Run the named macro by pressing, M-x name-of-macro
</li>
</ol>
<h3>Example: Title case first word in each bullet points</h3>
<p>Let us take the following text snippet as an example.</p>
<pre>
$ cat thegeekstuff.txt
        * virtualization technologies
        * sed and awk tips/tricks
        * emacs tutorials
        * bash scripting tutorial series
</pre>
<h3>1. Open the thegeekstuff.txt that has the bullet points</h3>
<p>Open the above sample text file, and by default the cursor will be placed in the first line.</p>
<pre>
$ emacs -nw thegeekstuff.txt
        * virtualization technologies
        * sed and awk tips/tricks
        * emacs tutorials
        * bash scripting tutorial series
</pre>
<h3>2. Start the Recording</h3>
<p>Type: Ctrl+x (</p>
<ul>
<li> Ctrl+x ( indicates start the recording
</li>
<li> When you do Ctrl+x (, it will display <strong>Defining kbd macro ..</strong> at the bottom of screen.
</li>
</ul>
<h3>3. Change the case of next</h3>
<p>Type: M-c</p>
<ul>
<li> Press M-c which will title case the next word, and places the cursor after the word.
</li>
</ul>
<h3>4. Go to the next line</h3>
<p>Type: C-n</p>
<h3>5. Go to the start of line</h3>
<p>Type: C-a</p>
<ul>
<li> Press C-a which will move the cursor to the starting of the line.
</li>
</ul>
<h3>6. Stop recording the macro</h3>
<p>Type: C-x )</p>
<ul>
<li> Ctrl+x ) indicates stop the recording
</li>
<li> When you do Ctrl+x ), it will display <b>Keyboard macro defined</b> in the bottom of screen.
</li>
</ul>
<h3>7. Give name and save macro</h3>
<p>Type: C-x C-k n title-case-macro</p>
<ul>
<li> Ctrl+x Ctrl+k n indicates name the previous macro
</li>
<li> When you do Ctrl+x Ctrl+k n, it will ask ‘Name for last kbd macro:’ (enter the name you require). I am naming it as <b>title-case-macro</b>.
</li>
</ul>
<h3>8. Execute the macro for required number of times</h3>
<p>Type: M-x title-case-macro</p>
<ul>
<li> M-x title-case-macro indicates execute the macro which is stored with that name.
</li>
</ul>
<p>To repeat the macro, just prepend the macro with C-u and count.</p>
<p>Type: C-u 3 M-x title-case-macro</p>
<ul>
<li> C-u N indicates N number of times
</li>
<li> M-x title-case-macro indicates execute the macro which is stored with that name.
</li>
</ul>
<p>So, now all your four lines are title cased, as shown below.</p>
<pre>
        * <b>V</b>irtualization technologies
        * <b>S</b>ed and awk tips/tricks
        * <b>E</b>macs tutorials
        * <b>B</b>ash scripting tutorial series
</pre>
<p>By default, emacs macro will not be available for further sessions.</p>
<h3>Saving the macro in .emacs for future session</h3>
<p>After you have named the macro,</p>
<ul>
<li> open the ~/.emacs file in another buffer ( from same session — do C-x C-f &amp; open ~/.emacs file )
</li>
<li> insert the macro by, Type: <b>M-x insert-kbd-macro</b>, which will ask you the name of macro to insert.
</li>
<li> Give the name with which you have saved already ( in this example it is title-case-macro ), which will insert some lisp code.
</li>
<li> Save, and exit. In all your future session you will be able to access this macro by M-x macroname.
</li>
</ul>
<h3>If you enjoyed this article, you might also like..</h3>
<p><center><br />
</center><br />

				</div>
</p></div>
</p>
<p><img src="http://www.taiwangeek.com/wp-content/uploads/2010/10/ade488d8cord-n-play-150x100.png" /></p>
<p>Read this article:<br />
<a  target="_blank" href="http://www.thegeekstuff.com/2010/07/emacs-macro-tutorial-how-to-record-and-play/" title="Emacs Macro Tutorial: How to Record and Play">Emacs Macro Tutorial: How to Record and Play</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.taiwangeek.com/2010-07/emacs-macro-tutorial-how-to-record-and-play.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CPU-LOADing Detect function</title>
		<link>http://www.taiwangeek.com/2010-06/cpu-loading-detect-function.html</link>
		<comments>http://www.taiwangeek.com/2010-06/cpu-loading-detect-function.html#comments</comments>
		<pubDate>Tue, 29 Jun 2010 05:42:51 +0000</pubDate>
		<dc:creator>tung</dc:creator>
				<category><![CDATA[Normal]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.taiwangeek.com/?p=819</guid>
		<description><![CDATA[Sometime you need to detect cup loading on server. This function was support window and linux cpu loading detect. function GetCpuLoad($Check=false, $NoComment=false) { if (!PHP_OS) return ($Check)?-1:0; if (strtoupper(substr(PHP_OS, 0,... <a class="meta-more" href="http://www.taiwangeek.com/2010-06/cpu-loading-detect-function.html">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>
Sometime you need to detect cup loading on server.<br />
This function was support window and linux cpu loading detect.
</p>
<pre class="brush:php">function GetCpuLoad($Check=false, $NoComment=false)
{
    if (!PHP_OS) return ($Check)?-1:0;
    if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
        global $Settings;
        if (!$Settings || !trim(ValidVar($Settings['All']-&gt;CPU_AVG_PATH))) return ($Check)?-1:0;
        $Data=@exec("\"".$Settings['All']-&gt;CPU_AVG_PATH."\"");
    }
    else $Data = @exec("uptime");
    if (!$Data) return ($Check)?-1:0;
    if (!$NoComment&amp;&amp;!$Check) echo $Data."\n";
    $Arr=array();
    @preg_match_all("/\d+[,\.]\d+/",$Data,$Arr);
    if (!isset($Arr[0][0])) return ($Check)?-1:0;
    $Data=$Arr[0][0];
    $Data=str_replace(",",".",$Data);
    return trim($Data);
}</pre>
<p>How to work:</p>
<pre class="brush:php">echo "CPU:",GetCpuLoad(true),"\n";
echo "CPU:",GetCpuLoad(true,true),"\n";
echo "CPU:",GetCpuLoad(),"\n";
</pre>
<p>Result:</p>
<pre class="brush:php">CPU:0.08
CPU:0.08
CPU: 16:02:42 up 13 days,  6:35,  2 users,  load average: 0.08, 0.15, 0.11</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.taiwangeek.com/2010-06/cpu-loading-detect-function.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spicing Up Your Website With jQuery Goodness</title>
		<link>http://www.taiwangeek.com/2010-06/spicing-up-your-website-with-jquery-goodness.html</link>
		<comments>http://www.taiwangeek.com/2010-06/spicing-up-your-website-with-jquery-goodness.html#comments</comments>
		<pubDate>Thu, 17 Jun 2010 02:38:26 +0000</pubDate>
		<dc:creator>tung</dc:creator>
				<category><![CDATA[Normal]]></category>

		<guid isPermaLink="false">http://www.taiwangeek.com/spicing-up-your-website-with-jquery-goodness.html</guid>
		<description><![CDATA[There comes a point in every website design when you simply want to give the website a little spice to impress the visitor and make it memorable. You want that... <a class="meta-more" href="http://www.taiwangeek.com/2010-06/spicing-up-your-website-with-jquery-goodness.html">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There comes a point in every website design when you simply want<br />
to give the website a little spice to impress the visitor and make<br />
it memorable. You want that sexy interaction to capture the user’s<br />
attention. In our previous articles, we showed you how to spice up<br />
your website with <a  href="http://www.smashingmagazine.com/2009/12/02/pushing-your-buttons-with-practical-css3/"><br />
sexy buttons</a>, <a  href="http://www.smashingmagazine.com/2009/12/16/stronger-better-faster-design-with-css3/"><br />
practical elements</a> and <a  href="http://www.smashingmagazine.com/2010/01/25/the-new-hotness-using-css3-visual-effects/"><br />
attractive visual effects</a>.</p>
<p class="c1">
<p>In this article, we’ll discuss how to seduce your visitors with<br />
a little JavaScript action. In our examples, we’ll be using jQuery,<br />
a fast and concise JavaScript library that simplifies HTML document<br />
traversing, event handling, animation and Ajax interactions for<br />
rapid Web development. Ready? Let’s get things rolling!</p>
<p>[Offtopic: by the way, did you know that there is a Smashing<br />
eBook Series? Book #1 is <a  href="http://shop.smashingmagazine.com/smashing-ebook-series-1-professional-web-design-intl.html"><br />
Professional Web Design</a>, 242 pages for just $9,90.]</p>
<h3>Ajax Image Uploader</h3>
<p>Image uploads will be much better after your read this.<br />
Guaranteed. By using a bit of jQuery, we can upload images with<br />
previews.</p>
<p>How do you upload images now? You select a file and click<br />
upload. Simple, right? Except that once you select your image, you<br />
can no longer see what was selected. The name of the file is at the<br />
end of the input field, and if the input field is short or the file<br />
path is deep, you won’t see anything useful. You’ll forget what you<br />
selected and have no idea what you’re about to upload.</p>
<p>Now try this variation on uploading an image. We ditch the<br />
“Upload” button in favor of a “Save” button and fire the Ajax<br />
upload event as soon as a file is selected. The image is processed<br />
server-side, and a thumbnail is loaded onto the existing page.<br />
Doesn’t that feel so much better? We now have a visual<br />
representation (imagine that!) of the image we selected.</p>
<p><a  href="http://www.zurb.com/playground/ajax_upload"><img alt="Ajax-upload-lead in Spicing Up Your Website With jQuery Goodness" src="/Images/google-reader-share-ajax-upload-lead.jpg" /></a></p>
<p>This is particularly useful in larger forms where many fields<br />
will be submitted in a single action. It allows the user to review<br />
the form before pressing “Save” and see what image (or images) they<br />
selected.</p>
<p><strong>How does it work?</strong> Here’s the code. You’l need<br />
jQuery and the <a  href="http://valums.com/ajax-upload/">Ajax Upload<br />
jQuery plug-in</a>. Link them up, and make sure jQuery is loaded<br />
first.</p>
<pre class="brush: xml">
 &lt;script src="/js/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="/js/ajaxupload.js" type="text/javascript"&gt;&lt;/script&gt;
</pre>
<p>Here is the JavaScript we will use in its entirety.</p>
<pre class="brush: js">
 $(document).ready(function(){      var thumb = $('img#thumb');             new AjaxUpload('imageUpload', {                 action: $('form#newHotnessForm').attr('action'),                name: 'image',          onSubmit: function(file, extension) {                   $('div.preview').addClass('loading');           },              onComplete: function(file, response) {                  thumb.load(function(){                          $('div.preview').removeClass('loading');                                thumb.unbind();                         });                     thumb.attr('src', response);            }       }); });
</pre>
<p>Let’s break the code down now and look at what’s really going<br />
on. First, we attach the AjaxUpload behavior to our<br />
<code>file</code> form element.</p>
<pre class="brush: js">
        new AjaxUpload('imageUpload', {
</pre>
<p>Next, we specify where to post the Ajax upload. We want to keep<br />
all of our URLs in our HTML document, so we pass this URL using the<br />
<code>action</code> attribute of our <code>form</code> element.</p>
<pre class="brush: js">
         action: $('form#newHotnessForm').attr('action'),
</pre>
<p>Set the name of the <code>file</code> form element that will be<br />
posted to your server.</p>
<pre class="brush: js">
     name: 'image',
</pre>
<p>Add a <code>class</code> to your preview <code>div</code> to<br />
indicate that the image is uploading. In our case, we are applying<br />
a background image to the preview <code>div</code>. We also need to<br />
set the image tag to <code>display: none;</code> in the preview<br />
<code>div</code>, so that the loading background image is visible,<br />
as well as for a more subtle reason explained below.</p>
<pre class="brush: js">
 onSubmit: function(file, extension) {      $('div.preview').addClass('loading'); },
</pre>
<p>When the image has been uploaded, we have to do two things:</p>
<ul>
<li>First, we have to set the <code>src</code> attribute of our<br />
preview <code>img</code> tag to the new thumb.</li>
<li>Secondly, we have to remove the loading class. If we simply<br />
execute these things in that order, then we would see an annoying<br />
flicker of the old image when the loading class has been removed<br />
but the new image has not yet loaded.</li>
</ul>
<p>We avoid the annoying flicker of the old image by waiting to<br />
remove the loading class until after the preview image’s<br />
<code>load</code> event fires. We also <code>unbind</code> our<br />
listener after it has fired because we want to capture this event<br />
only once.</p>
<pre class="brush: js">
 onComplete: function(file, response) {        thumb.load(function(){          $('div.preview').removeClass('loading');                thumb.unbind();         });
</pre>
<p>Lastly, we set the source of the preview image to the thumbnail<br />
that our server has just created. In this example, the response<br />
from the Ajax call is just the thumbnail’s URL as text. You could<br />
return it in whatever fancy format you like.</p>
<pre class="brush: js">
    thumb.attr('src', response); }
</pre>
<p>If JavaScript-support is disabled in user’s browsers, they will<br />
get the good old submit form without the interactive preview. Clean<br />
and functional solution, with rich interactions for users with more<br />
capable browsers.</p>
<div class="c4"><a  href="http://www.zurb.com/playground/ajax_upload" class="c2"><img alt="Ajax-upload-box in Spicing Up Your Website With jQuery Goodness" src="/Images/google-reader-share-ajax-upload-box.png" /></a></p>
<h4 class="c3"><a  href="http://www.zurb.com/playground/ajax_upload">Better Image<br />
Uploads</a></h4>
<p>Want to try out and implement the image uploader yourself? Check<br />
out a live demo, the example code and more for this improved way to<br />
support image uploads on your website.</p>
<p><a  href="http://www.zurb.com/playground/ajax_upload">Check out<br />
the live demo »</a></p>
</div>
<h3>Validation With jQuery Text-Change Event</h3>
<p>Here’s a pretty <strong>common problem</strong>: you have a text<br />
form to validate client-side. Doing this is easy enough when the<br />
form is submitted, but in some cases doing it as the user is typing<br />
is best. For example, imagine how annoying <a  href="http://twitter.com">Twitter</a> would be if you had to submit your<br />
tweet before you were told how many characters it was.</p>
<p>Keep in mind, though, that this kind of immediate validation can<br />
be overused or abused. Don’t insult the user by congratulating them<br />
for every piece of text they enter in a field.</p>
<p><a  href="http://www.zurb.com/playground/jquery-text-change-custom-event"><img alt="Image22 in Spicing Up Your Website With jQuery Goodness" src="/Images/google-reader-share-Image22.jpg" /></a></p>
<p>Implementing this requires that you bind events to the<br />
<code>keyup</code> event — and a couple other events if you want to<br />
detect text changes on cut-and-paste events. Even if you’re a<br />
JavaScript god, having to keep writing this logic over and over<br />
again is tedious. We created a text-change event plug-in to help<br />
you handle all text-change events.</p>
<h4>Detecting the Text (Better Than Twitter)</h4>
<p>We begin by detecting text in the standard<br />
<code>textarea</code>. Look at the shot below: looks like a<br />
standard <code>textarea</code> with a disabled “Save” button.</p>
<p><a  href="http://www.zurb.com/playground/jquery-text-change-custom-event"><img alt="Detecttextone in Spicing Up Your Website With jQuery Goodness" src="/Images/google-reader-share-detecttextone.png" /></a></p>
<p>If you add text to the field, then the “Save” button enables and<br />
then disables when no text is in the field. Moderately impressive,<br />
right?</p>
<p><a  href="http://www.zurb.com/playground/jquery-text-change-custom-event"><img alt="Detectext in Spicing Up Your Website With jQuery Goodness" src="/Images/google-reader-share-detectext.png" /></a></p>
<p>Now, what if you try copying, pasting or cutting text with the<br />
shortcut keys? That works as well. What about right-clicking or<br />
using the “Edit” menu? Works, too. (By the way, Twitter doesn’t<br />
support the click or menu interactions.)</p>
<p>The code behind this is pretty simple. You’ll need to download<br />
and link up the <a  href="http://www.zurb.com/javascripts/plugins/jquery.textchange.min.js">textchange<br />
plug-in</a>.</p>
<pre class="brush: xml">
 &lt;script src="/javascripts/plugins/jquery.textchange.js"&gt;&lt;/script&gt;
</pre>
<p>The plug-in adds the <code>hastext</code> and<br />
<code>notext</code> events, to which you can bind<br />
<code>input</code> and <code>textarea</code> elements.</p>
<pre class="brush: xml">
 $('#exhibita').bind('hastext', function () {   $('#exhibitaButton').removeClass('disabled').attr('disabled', false); }); $('#exhibita').bind('notext', function () {   $('#exhibitaButton').addClass('disabled').attr('disabled', true); });
</pre>
<p>The <code>hastext</code> event fires when the element goes from<br />
having no text to having text, and the <code>notext</code> event<br />
fires when the element goes from having text to being blank.<br />
Looking for more advanced validation? Keep reading.</p>
<h4>Detecting Text Change</h4>
<p>What about detecting text change in the field?</p>
<p><a  href="http://www.zurb.com/playground/jquery-text-change-custom-event"><img alt="Change in Spicing Up Your Website With jQuery Goodness" src="/Images/google-reader-share-change.png" /></a></p>
<p>This is very easy, too. A third <code>textchange</code> event<br />
fires whenever the text changes, and it provides you with the<br />
previous value.</p>
<pre class="brush: js">
 $('#exhibitb').bind('textchange', function (event, previousText) {   $('#output').append(' Text changed from &lt;strong&gt;' +     previousText + '&lt;/strong&gt; to &lt;strong&gt;' + $(this).val() +     '&lt;/strong&gt; &lt;/p&gt;'); });
</pre>
<h4>Twitter-Style Validation</h4>
<p><a  href="http://www.zurb.com/playground/jquery-text-change-custom-event"><img alt="Twit in Spicing Up Your Website With jQuery Goodness" src="/Images/google-reader-share-twit.png" /></a></p>
<p>We can implement some simple Twitter-like validation with just a<br />
single line and our <code>textchange</code> event.</p>
<pre class="brush: js">
 $('#twitter').bind('textchange', function (event, previousText) {   $('#charactersLeft').html( 140 - parseInt($(this).val().length) ); });
</pre>
<h4>Ajax Save</h4>
<p><a  href="http://www.zurb.com/playground/jquery-text-change-custom-event"><img alt="Ajax in Spicing Up Your Website With jQuery Goodness" src="/Images/google-reader-share-ajax.png" /></a></p>
<p>With a little more code and <code>setTimeout</code>, we can hook<br />
up an Ajax call to save a few seconds once the user stops editing.<br />
The Ajax call is just stubbed out here, but you get the idea.</p>
<pre class="brush: js">
 var timeout; $('#ajaxSave').bind('textchange', function () {   clearTimeout(timeout);   $('#ajaxFired').html('<strong>Typing...</strong>');     var self = this;     timeout = setTimeout(function () {     $('#ajaxFired').html('<strong>Saved</strong>: ' + $(self).val());   }, 1000); });
</pre>
<h4>Validate Text</h4>
<p><a  href="http://www.zurb.com/playground/jquery-text-change-custom-event"><img alt="Comp in Spicing Up Your Website With jQuery Goodness" src="/Images/google-reader-share-comp.png" /></a></p>
<p>This may sound contrived, but say you would like to ensure that<br />
the two words “<a  href="http://en.wikipedia.org/wiki/Portal_(video_game)">companion<br />
cube</a>” are in the emergency intelligence incinerator (i.e. the<br />
text field) before allowing the user to continue. No problem:</p>
<pre class="brush: js">
 $('#emergencyIntelligenceIncinerator').bind('textchange', function () {   if ($(this).val().indexOf('companion cube') !== -1) {     $('#continue').removeClass('disabled').attr('disabled', false);   } });
</pre>
<p>jQuery Text-Change event can be very useful for web applications<br />
that are aiming for a high level of interactivity and visual<br />
feedback. You may even want to analyze some of the input and<br />
provide helpful clues. For instance, if the user is opening a new<br />
ticket in your support area, you may want to present links to<br />
possibly related answers in the support forum. Be sure not to<br />
analyze every keystroke, though, as it could result in a<br />
significant overhead for the back-end. And it is also important to<br />
keep in mind that the immediacy of the application should be subtle<br />
and should not interrupt user’s interaction.</p>
<div class="c4"><a  href="http://www.zurb.com/playground/jquery-text-change-custom-event" class="c2"><img alt="Text-change-box in Spicing Up Your Website With jQuery Goodness" src="/Images/google-reader-share-text-change-box.png" /></a></p>
<h4 class="c3"><a  href="http://www.zurb.com/playground/jquery-text-change-custom-event">Text<br />
Change Events</a></h4>
<p>Don’t fret about complicated validation, text events and edge<br />
cases. Check out the live demo and download the plug-in, which<br />
makes it a snap to perform a number of functions on text boxes to<br />
look for values, changes and more.</p>
<p><a  href="http://www.zurb.com/playground/jquery-text-change-custom-event">Check<br />
out the live demo »</a></p>
</div>
<h3>JavaScript Annotation Plug-In</h3>
<p><a  href="http://www.zurb.com/playground/javascript-annotation-plugin"><img alt="Image12 in Spicing Up Your Website With jQuery Goodness" src="/Images/google-reader-share-Image12.jpg" /></a></p>
<p>An application that we recently developed (<a  href="http://www.notableapp.com">Notable</a>) allows users to collect<br />
user feedback through interactive tools. Most of these tools<br />
require the user to annotate an image. We figured that many folks<br />
are trying to solve the same problem, so why not create a plug-in<br />
that they can use? This is the result. Our plug-in uses jQuery and<br />
makes it very simple to add and save image annotations.</p>
<p>To start off, download the <a  href="http://www.zurb.com/javascripts/plugins/jquery.annotate.js">JS<br />
Annotation Plug-In</a>. To use the plug-in, just link up jQuery<br />
(1.2.3 or higher) and our plug-in.</p>
<pre class="brush: xml">
 &lt;script src="/javascripts/plugins/jquery.js"&gt;&lt;/script&gt; &lt;script src="/javascripts/plugins/jquery.annotate.js"&gt;&lt;/script&gt;
</pre>
<p>Meet Nutmeg the Dog. After clicking on a random spot on Nutmeg,<br />
you’ll see the black circle appear.</p>
<p><a  href="http://www.zurb.com/playground/javascript-annotation-plugin"><img alt="First in Spicing Up Your Website With jQuery Goodness" src="/Images/google-reader-share-first.jpg" /></a></p>
<pre class="brush: js">
 function blackNote() {   return $(document.createElement('span')).addClass('black circle note') } $('#nutmeg').annotatableImage(blackNote);
</pre>
<p>Here’s how it works: The first parameter to<br />
<code>annotatableImage</code> is a function that is implemented by<br />
you and that defines the element to be added when you click. In the<br />
example above, that function is called <code>blackNote</code>.<br />
Simple, right?</p>
<h4>How to Save the Annotations?</h4>
<p>Glad you asked. Use the jQuery selector to grab all the elements<br />
that you want to serialize, and call the<br />
<code>serializeAnnotations</code> function.</p>
<pre class="brush: js">
 $('#nutmeg span.note').serializeAnnotations();
</pre>
<p>These values are returned in an array of objects, so you can<br />
easily save them with an Ajax call. The <code>response_time</code><br />
variable is the time in milliseconds that the user took to add the<br />
annotation after you made the call to<br />
<code>annotatableImage</code>.</p>
<p><a  href="http://www.zurb.com/playground/javascript-annotation-plugin"><img alt="Savea in Spicing Up Your Website With jQuery Goodness" src="/Images/google-reader-share-savea.png" /></a></p>
<h4>Let’s Get Relative</h4>
<p>In our website feedback tool we needed to show our annotations<br />
in different-sized versions of our original image. The full size is<br />
just won’t always cut it in the world of good design. To make this<br />
easier, we store the x and y positions of our annotations relative<br />
to the width and height of the image.</p>
<p><a  href="http://www.zurb.com/playground/javascript-annotation-plugin"><img alt="Small in Spicing Up Your Website With jQuery Goodness" src="/Images/google-reader-share-small.jpg" /></a></p>
<p>If you didn’t pass fifth-grade math, don’t worry: our plug-in<br />
does all the basic arithmetic for you. Warning: if you change the<br />
aspect ratio or crop the image, this will not work properly. Also,<br />
be sure to always store x and y as floating-point data types.</p>
<pre class="brush: js">
 $('#smallNutmeg').addAnnotations(blackNote, annotations);
</pre>
<p>The annotations variable is an array of objects with x and y<br />
attributes. It looks exactly like the array returned by the<br />
<code>serializeAnnotations</code> function without the<br />
<code>response_time</code> attribute. What other attributes might<br />
you put in the annotation object? Read on…</p>
<h4>Passing Attributes</h4>
<p>We may want to pass some data to each of our annotations when<br />
adding existing annotations. Maybe we have numbered our<br />
annotations, or have added special classes or behaviors,<br />
whatever.</p>
<p><a  href="http://www.zurb.com/playground/javascript-annotation-plugin"><img alt="Numdata in Spicing Up Your Website With jQuery Goodness" src="/Images/google-reader-share-numdata.jpg" /></a></p>
<p>The function we pass to <code>annotatableImage</code> accepts a<br />
single parameter, which is the annotation object from the array<br />
that you passed to <code>addAnnotations</code>. In this example, we<br />
added a position attribute, which we will display.</p>
<pre class="brush: js">
 $('#numberedNutmeg').addAnnotations(function(annotation){   return $(document.createElement('span')).     addClass('black circle note').html(annotation.position); },[     {x: 0.3875, y: 0.3246, position: 4},     {x: 0.57, y: 0.329, position: 2}   ] );
</pre>
<h4>Hitting All the Positions</h4>
<p>When we were annotating Nutmeg, you may have noticed that the<br />
annotation was centered at your click position. This may be great<br />
for circles and sparkly unicorns, but sometimes we may want to<br />
position our annotations differently.</p>
<p>The <code>xPosition</code> and <code>yPosition</code> options<br />
allow you to indicate where the annotation is positioned relative<br />
to the click. Options are middle (default), left, right and middle<br />
(default), top, bottom, respectively.</p>
<pre class="brush: js">
 $('#labeledNutmeg').annotatableImage(function(annotation){   return $(document.createElement('span')).addClass('set-label'); }, {xPosition: 'left'});
</pre>
<p>Give Nutmeg some clicks on our demo page to see what we’re<br />
talking about. In this example, we are positioning the click on the<br />
<strong>left</strong> side of the annotation.</p>
<p>Warning: make sure to pass the <code>xPosition</code> and<br />
<code>yPosition</code> to the <code>serializeAnnotations</code><br />
function if you set these options in <code>annotatableImage</code>.<br />
The default behavior is to calculate the x and y values from the<br />
middle of the annotation.</p>
<div class="c4"><a  href="http://www.zurb.com/playground/javascript-annotation-plugin" class="c2"><img alt="Javascript-annotations-box in Spicing Up Your Website With jQuery Goodness" src="/Images/google-reader-share-javascript-annotations-box.png" /></a></p>
<h4 class="c3"><a  href="http://www.zurb.com/playground/javascript-annotation-plugin">JavaScript<br />
Annotations Plug-In</a></h4>
<p>Start supporting powerful, easily implemented annotations on<br />
your website or app with this plug-in. Adding notes, descriptions<br />
and more to these annotations is simple.</p>
<p><a  href="http://www.zurb.com/playground/javascript-annotation-plugin">Check<br />
out the live demo »</a></p>
</div>
<h3>Bonus: CSS Grid Builder</h3>
<p><a  href="http://www.zurb.com/playground/css-grid-builder"><img alt="Grid-builder-lead in Spicing Up Your Website With jQuery Goodness" src="/Images/google-reader-share-grid-builder-lead.png" /></a></p>
<p>In our design process, we have been using a flexible grid<br />
framework that lets us rapidly prototype and implement websites.<br />
Recently, we’ve created some variant grids for different widths and<br />
gutter sizes, so we thought, why not just create grids on the fly<br />
with a simple tool?</p>
<p>Please feel free to use the <a  href="http://www.zurb.com/playground/css-grid-builder">ZURB CSS Grid<br />
Builder</a> to build and generate source code for a simple,<br />
flexible grid framework for variable grid sizes and column numbers.<br />
Play around with it — we prefer it to a more full-featured solution<br />
such as YUI because it’s lighter and a little more flexible.</p>
<div class="c4"><a  href="http://www.zurb.com/playground/css-grid-builder" class="c2"><img alt="Grid-builder-box in Spicing Up Your Website With jQuery Goodness" src="/Images/google-reader-share-grid-builder-box.png" /></a></p>
<h4 class="c3"><a  href="http://www.zurb.com/playground/css-grid-builder">CSS Grid<br />
Builder</a></h4>
<p>Check out the CSS Grid Builder in the playground. You can<br />
preview the grid in different-sized browser windows and output a<br />
complete CSS framework.</p>
<p><a  href="http://www.zurb.com/playground/css-grid-builder">Check<br />
out the grid builder »</a></p>
</div>
<p><em>(al)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.taiwangeek.com/2010-06/spicing-up-your-website-with-jquery-goodness.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keeping You in the Loop – Bash For, While, Until Loop Examples</title>
		<link>http://www.taiwangeek.com/2010-06/keeping-you-in-the-loop-%e2%80%93-bash-for-while-until-loop-examples.html</link>
		<comments>http://www.taiwangeek.com/2010-06/keeping-you-in-the-loop-%e2%80%93-bash-for-while-until-loop-examples.html#comments</comments>
		<pubDate>Sun, 27 Jun 2010 22:02:06 +0000</pubDate>
		<dc:creator>tung</dc:creator>
				<category><![CDATA[Normal]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[bash-until-loop]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[ping]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[result]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[until-example]]></category>

		<guid isPermaLink="false">http://www.taiwangeek.com/2010-06/keeping-you-in-the-loop-%e2%80%93-bash-for-while-until-loop-examples.html</guid>
		<description><![CDATA[/bin/bash # Find files which has .zip for file in `find /root -name "*.zip*" -type f` do # Skip the extension .zip dirname=`echo ${file} &#124; awk -F'.' '{print $1}'` # Create the directory mkdir $dirname # Copy the zip file cp ${file} ...]]></description>
			<content:encoded><![CDATA[<div readability="173.726843525">
<p><img src="http://www.thegeekstuff.com/wp-content/uploads/2010/06/bash-tutorial-for-loop-300x176.png" alt="" title="Linux Bash Loop - For, While, Until" width="300" height="176" class="alignright size-medium wp-image-5023" />Looping statements are used to force a program to repeatedly execute a statement. The executed statement is called the loop body.</p>
<p>Loops execute until the value of a controlling expression is 0. The controlling expression may be any scalar data type.<br /><span id="more-5011"></span><br />The shell language also provide several iteration or looping statements. In this article let us review the looping statements which bash provides using some examples.</p>
<p>Bash supports following three types of looping statement</p>
<ol>
<li>For loop</li>
<li>While loop</li>
<li>Until loop</li>
</ol>
<p>This article is part of the on-going <a  href="http://www.thegeekstuff.com/tag/bash-tutorial/">Bash Tutorial</a> series.</p>
<p>Loops can be nested. Like any other programming language, bash also supports break statement to exit the current loop, and continue statement to resume the next iteration of the loop statement.</p>
<h3>Bash For Loop – First Method</h3>
<p>For loops are typically used when the number of iterations is known before entering the bash loop. Bash supports two kinds of for loop. The first form of bash for loop is:</p>
<pre>for varname in list
	do
		commands ##Body of the loop
	done</pre>
<p>In the above syntax:</p>
<p>    <center>&#13;<br />
      &#13;<br />
    </center></p>
<ul>
<li> for, in, do and done are keywords</li>
<li> List is any list which has list of items</li>
<li> varname is any Bash variable name.</li>
</ul>
<p>In this form, the for statement executes the command enclosed in a body, once for each item in the list. The current item from the list will be stored in a variable “varname” each time through the loop. This varname can be processed in the body of the loop. This list can be a variable that contains several words separated by spaces. If list is missing in the for statement, then it takes the positional parameter that were passed into the shell.</p>
<h3>Bash For Loop Example 1. Unzip all the Zip file</h3>
<p>The following example finds the list of files which matches with “*.zip*” in the root directory, and creates a new directory in the same location where the zip file exists, and unzip the zip file content.</p>
<pre># cat zip_unzip.sh
#! /bin/bash
# Find files which has .zip
for file in `find /root -name "*.zip*" -type f`
do

# Skip the extension .zip
dirname=`echo ${file} | awk -F'.' '{print $1}'`

# Create the directory
mkdir $dirname

# Copy the zip file
cp ${file} ${dirname}
cd $dirname

# Unzip the zip file from newly created directory
unzip ${dirname}/$(echo ${file##/*/})
done</pre>
<ul>
<li>In this example find command returns the list of files, from which each file will be processed through a loop.</li>
<li>For each item, it creates the directory with the name of the zip file, and copies the zip file to the newly created directory and unzip the zip file from there.</li>
<li>The echo statement, echo ${file##/*/} gives you only the file name not the path.</li>
</ul>
<pre># ./zip_unzip.sh
Archive:  /root/test2/test2.zip
 extracting: t1/p
 extracting: t1/q
 extracting: t1/r
 extracting: t1/s
 extracting: t1/t
 extracting: t1/u
 extracting: t1/v
Archive:  /root/test1/test1.zip
 extracting: t/a
 extracting: t/b
 extracting: t/c
 extracting: t/d
 extracting: t/e</pre>
<p>Similar to the Bash loop, Awk also provides for loop and while loop as we discussed in our <a  href="http://www.thegeekstuff.com/2010/02/unix-awk-do-while-for-loops/">Awk While and For Loop</a> article.</p>
<h3>Bash For Loop – Second Method</h3>
<p>The second form of for loop is similar to the for loop in ‘C’ programming language, which has three expression (initialization, condition and updation).</p>
<pre>for (( expr1; expr2; expr3 ))
         do
		commands
         done</pre>
<ul>
<li>In the above bash for command syntax, before the first iteration, expr1 is evaluated. This is usually used to initialize variables for the loop.</li>
<li>All the statements between do and done is executed repeatedly until the value of expr2 is TRUE.</li>
<li>After each iteration of the loop, expr3 is evaluated. This is usually use to increment a loop counter.</li>
</ul>
<p>The following example generates the n number of random numbers.</p>
<h3>Bash For Example 2. Generate n random numbers</h3>
<pre>$ cat random.sh
#! /bin/bash

echo -e "How many random numbers you want to generate"
read max

for (( start = 1; start &lt;= $max; start++ ))
do
        echo -e $RANDOM
done

$ ./random.sh
How many random numbers you want to generate
5
6119
27200
1998
12097
9181</pre>
<p>In the above code snippet, the for loop generates the random number at max number of times. RANDOM is an internal bash function that returns a random integer at each invocation.</p>
<h3>Bash While Loop</h3>
<p>Another iteration statement offered by the shell programming language is the while statement.</p>
<pre>Syntax:
while expression
do
	commands
done
</pre>
<p>In the above while loop syntax:</p>
<ul>
<li> while, do, done are keywords</li>
<li> Expression is any expression which returns a scalar value</li>
<li> While statement causes a block of code to be executed while a provided conditional expression is true.</li>
</ul>
<h3>Bash While Example 3. Write contents into a file</h3>
<p>The following example reads the data from the stdout and writes into a file.</p>
<pre>$ cat writefile.sh
#! /bin/bash

echo -e "Enter absolute path of the file name you want to create"
read file
while read line
do
echo $line &gt;&gt; $file
done

$ sh writefile.sh
Enter absolute path of the file name you want to create
/tmp/a
while
for
until

$ cat /tmp/a
while
for
until</pre>
<p>The above example, reads the filename from the user, and reads the lines of data from stdin and appends each line to a given filename. When EOF enters, read will fail, so the loop ends there.</p>
<p>If you are writing lot of bash scripts, you can use Vim editor as a Bash IDE using the <a  href="http://www.thegeekstuff.com/2009/02/make-vim-as-your-bash-ide-using-bash-support-plugin/">Vim bash-support plugin</a> as we discussed earlier.</p>
<h3>Bash While Example 4. Read the contents of a file</h3>
<p>In the previous example, it reads the data from stdout and write it into a file. In this example, it reads the file<br />content and write it into a stdout.</p>
<pre>$ cat read.sh
#! /bin/bash
echo -e "Enter absolute path of the file name you want to read"
read file
exec &lt;$file # redirects stdin to a file
while read line
do
echo $line
done

$ ./read.sh

Enter absolute path of the file name you want to read
/tmp/a
while
for
until</pre>
<p>In this example, it gets the filename to read, and using exec it redirects stdin to a file. From that point on, all stdin comes from that file, rather than from keyboard. read command reads the line from stdin, so while loop reads the stdin, till EOF occurs.</p>
<h3>Bash Until Loop</h3>
<p>The until statement is very similar in syntax and function to the while statement. The only real difference between the two is that the until statement executes its code block while its conditional expression is false, and the while statement executes its code block while its conditional expression is true.</p>
<pre>syntax:

until expression
	do
	   commands #body of the loop
	done
</pre>
<p>In the above bash until syntax:<br />where until, do, done are keywords<br />expression any conditional expression</p>
<h3>Bash Until Example 5. Monitor the logfile</h3>
<p>This example monitors the size of the logfile, once the logfile size reaches 2000bytes, it takes the copy of that logfile.</p>
<pre>$ cat monitor.sh

file=/tmp/logfile
until [ $(ls -l $file | awk '{print $5}') -gt 2000 ]
        do
            echo "Sleeping for next 5 seconds"
            sleep 5
        done
date=`date +%s`
cp $file "$file-"$date.bak

$ ./monitor.sh
Sleeping for next 5 seconds
Sleeping for next 5 seconds

$ ls -l /tmp/logfile*
-rw-r--r-- 1 sss sss      2010 Jun 24 12:29 logfile
-rw-r--r-- 1 sss sss      2005 Jun 24 16:09 logfile-1277474574.bak</pre>
<p>The until statement continues to execute the body of the loop, till the condition becomes true. In this example condition is size of the file greater than 2000 bytes, so it copies the file once it reaches the 2000 bytes.</p>
<p>Also, make sure to refer to our earlier <a  href="http://www.thegeekstuff.com/2010/06/bash-array-tutorial/">Bash Array examples</a>.</p>
<h3>Bash Until Example 6. Waiting for the Machine to come up</h3>
<p>This example is used to wait till the machine comes up before doing a ssh to that machine. The until loop statement ends only when the ping gives the responses.</p>
<pre>$ cat mac_wait.sh
#! /bin/bash

read -p "Enter IP Address:" ipadd
echo $ipadd
until ping -c 1 $ipadd
do
        sleep 60;
done
ssh $ipadd

$./mac_wait.sh
Enter IP Address:192.143.2.10
PING 192.143.2.10 (192.143.2.10) 56(84) bytes of data.

--- 192.143.2.10 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms

PING 192.143.2.10 (192.143.2.10) 56(84) bytes of data.
64 bytes from 192.143.2.10: icmp_seq=1 ttl=64 time=0.059 ms

--- 192.143.2.10 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.059/0.059/0.059/0.000 ms
The authenticity of host '192.143.2.10 (192.143.2.10)' can't be established.
Are you sure you want to continue connecting (yes/no)? yes</pre>
<p>Until loop is quite useful at the command line, as a way of waiting for certain events to occur.</p>
<h3>If you enjoyed this article, you might also like..</h3>
<p><center><br />
</center><br />

				</div>
</p>
<p><img src="http://www.taiwangeek.com/wp-content/uploads/2010/10/82df985doop-300x176-150x88.png" /></p>
<p>Read more here:<br />
<a  target="_blank" href="http://www.thegeekstuff.com/2010/06/bash-for-while-until-loop-examples/" title="Keeping You in the Loop – Bash For, While, Until Loop Examples">Keeping You in the Loop – Bash For, While, Until Loop Examples</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.taiwangeek.com/2010-06/keeping-you-in-the-loop-%e2%80%93-bash-for-while-until-loop-examples.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C# 用語</title>
		<link>http://www.taiwangeek.com/2010-06/cc-%e7%94%a8%e8%aa%9e.html</link>
		<comments>http://www.taiwangeek.com/2010-06/cc-%e7%94%a8%e8%aa%9e.html#comments</comments>
		<pubDate>Thu, 24 Jun 2010 17:01:05 +0000</pubDate>
		<dc:creator>tung</dc:creator>
				<category><![CDATA[Normal]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.taiwangeek.com/?p=815</guid>
		<description><![CDATA[以下內容全文轉自:http://www.dotblogs.com.tw/jimmyyu/archive/2009/08/09/9961.aspx 為了讓大家不用再連到MSDN上，我直接全文轉過來，會轉這篇的主要原因是這些詞很常被用到，但 跟別人討論時往往需解釋一段時間，有空的時候再針對每個用語加些圖示說明吧。 另外再提供.net framework字彙：http://msdn.microsoft.com/zh-tw/library/6c701b8w(VS.80).aspx Access Modifier &#8211; 存取修飾詞 關鍵字 (例如， private、 protected、 internal 或 public)，會限制對型別或型別成員的存取。如需詳細資訊，請參閱 存取修飾詞。 Accessible Member &#8211; 可存取成員 某個型別可以存取的成員。某個型別可以存取的成員其他型別不一定能存取。如需詳細資訊，請參閱 存取修飾詞和 Friend 組件。 Accessor &#8211; 存取子 是一種方法，可設定或擷取與屬性相關的私用 (Private)... <a class="meta-more" href="http://www.taiwangeek.com/2010-06/cc-%e7%94%a8%e8%aa%9e.html">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>以下內容全文轉自:http://www.dotblogs.com.tw/jimmyyu/archive/2009/08/09/9961.aspx</p>
<p>為了讓大家不用再連到MSDN上，我直接全文轉過來，會轉這篇的主要原因是這些詞很常被用到，但 跟別人討論時往往需解釋一段時間，有空的時候再針對每個用語加些圖示說明吧。</p>
<p>另外再提供.net framework字彙：<a  href="http://msdn.microsoft.com/zh-tw/library/6c701b8w%28VS.80%29.aspx">http://msdn.microsoft.com/zh-tw/library/6c701b8w(VS.80).aspx</a></p>
<div>
<dt><span style="text-decoration: underline;"><strong>Access  Modifier &#8211; 存取修飾詞</strong></span> </dt>
<dd>關鍵字 (例如，<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl01" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl01',this);" href="http://msdn.microsoft.com/zh-tw/library/st6sy9xe.aspx"><span style="color: #0033cc;"> private</span></a>、<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl02" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl02',this);" href="http://msdn.microsoft.com/zh-tw/library/bcd5672a.aspx"><span style="color: #0033cc;"> protected</span></a>、<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl03" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl03',this);" href="http://msdn.microsoft.com/zh-tw/library/7c5ka91b.aspx"><span style="color: #0033cc;"> internal</span></a> 或 <a  id="ctl00_MTContentSelector1_mainContentContainer_ctl04" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl04',this);" href="http://msdn.microsoft.com/zh-tw/library/yzh058ae.aspx"><span style="color: #0033cc;">public</span></a>)，會限制對型別或型別成員的存取。如需詳細資訊，請參閱<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl05" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl05',this);" href="http://msdn.microsoft.com/zh-tw/library/ms173121.aspx"><span style="color: #0033cc;"> 存取修飾詞</span></a>。</p>
</dd>
<dt><span style="text-decoration: underline;"><strong>Accessible Member &#8211;  可存取成員</strong></span> </dt>
<dd>某個型別可以存取的成員。某個型別可以存取的成員其他型別不一定能存取。如需詳細資訊，請參閱<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl06" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl06',this);" href="http://msdn.microsoft.com/zh-tw/library/ms173121.aspx"><span style="color: #0033cc;"> 存取修飾詞</span></a>和 <a  id="ctl00_MTContentSelector1_mainContentContainer_ctl07" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl07',this);" href="http://msdn.microsoft.com/zh-tw/library/0tke9fxk.aspx"><span style="color: #0033cc;">Friend 組件</span></a>。</p>
</dd>
<dt><span style="text-decoration: underline;"><strong>Accessor &#8211; 存取子</strong> </span></dt>
<dd>是一種方法，可設定或擷取與屬性相關的私用 (Private) 資料成員值。讀寫屬性擁有 get 和  set  存取子。唯讀的屬性只有一個 get 存取子。如需詳細資訊，請參閱<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl08" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl08',this);" href="http://msdn.microsoft.com/zh-tw/library/x9fsa0sw.aspx"><span style="color: #0033cc;"> 屬性</span></a>。</p>
</dd>
<dt><span style="text-decoration: underline;"><strong>Anonymous Method &#8211;  匿名方法</strong> </span></dt>
<dd>匿名方法是當做參數傳遞至<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl09" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl09',this);" href="http://msdn.microsoft.com/zh-tw/library/900fyy8e.aspx"><span style="color: #0033cc;"> 委派</span></a>的程式碼區塊。如需詳細資訊，請參閱<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl10" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl10',this);" href="http://msdn.microsoft.com/zh-tw/library/0yw3tz5k.aspx"><span style="color: #0033cc;"> 匿名方法</span></a>。</p>
</dd>
<dt><span style="text-decoration: underline;"><strong>Base Class &#8211; 基底類別</strong> </span></dt>
<dd>由其他「衍生」類別所繼承的<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl11" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl11',this);" href="http://msdn.microsoft.com/zh-tw/library/0b0thckt.aspx"><span style="color: #0033cc;"> 類別</span></a>。如需詳細資訊，請參閱<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl12" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl12',this);" href="http://msdn.microsoft.com/zh-tw/library/ms173149.aspx"><span style="color: #0033cc;"> 繼承</span></a>。</p>
</dd>
<dt><span style="text-decoration: underline;"><strong>Call Stack &#8211; 呼叫堆疊</strong> </span></dt>
<dd>從 程式的起始位置開始到目前執行階段正在執行的陳述式，所經歷的一連串方法呼叫。</p>
</dd>
<dt><span style="text-decoration: underline;"><strong>Class &#8211; 類別</strong> </span></dt>
<dd>描 述物件的資料型別。類別同時包含資料以及在該資料上作用的方法。如需詳細資訊，請參閱<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl13" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl13',this);" href="http://msdn.microsoft.com/zh-tw/library/x9afc042.aspx"><span style="color: #0033cc;"> 類別</span></a></p>
</dd>
<dt><span style="text-decoration: underline;"><strong>Constructor &#8211; 建構函式</strong> </span></dt>
<dd>在 類別或結構 (Struct) 中，將型別的物件初始化的特殊方法。如需詳細資訊，請參閱<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl14" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl14',this);" href="http://msdn.microsoft.com/zh-tw/library/ace5hbzh.aspx"><span style="color: #0033cc;"> 建構函式</span></a>。</p>
</dd>
<dt><span style="text-decoration: underline;"><strong>Delegate &#8211; 委派</strong> </span></dt>
<dd>委 派是參考方法的一種型別，一旦將一個方法指定給某委派，則該委派的行為便會與該方法完全相同。如需詳細資訊，請參閱<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl15" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl15',this);" href="http://msdn.microsoft.com/zh-tw/library/ms173171.aspx"><span style="color: #0033cc;"> 委派</span></a>。</p>
</dd>
<dt><span style="text-decoration: underline;"><strong>Derived Class &#8211; 衍生類別</strong> </span></dt>
<dd>此<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl16" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl16',this);" href="http://msdn.microsoft.com/zh-tw/library/0b0thckt.aspx"><span style="color: #0033cc;"> 類別</span></a>會利用繼承關係取得、擴大或修改其他「基底」類別的行為和資料。如需詳細資訊，請參閱<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl17" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl17',this);" href="http://msdn.microsoft.com/zh-tw/library/ms173149.aspx"><span style="color: #0033cc;"> 繼承</span></a>。</p>
</dd>
<dt><span style="text-decoration: underline;"><strong>Destructor &#8211; 解構函式</strong> </span></dt>
<dd>在<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl18" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl18',this);" href="http://msdn.microsoft.com/zh-tw/library/0b0thckt.aspx"><span style="color: #0033cc;"> 類別</span></a>或<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl19" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl19',this);" href="http://msdn.microsoft.com/zh-tw/library/ah19swz4.aspx"><span style="color: #0033cc;"> 結構</span></a>中，準備由系統將執行個體解構的特殊方法。如需詳細資訊，請參閱<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl20" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl20',this);" href="http://msdn.microsoft.com/zh-tw/library/66x5fx1b.aspx"><span style="color: #0033cc;"> 解構函式</span></a>。</p>
</dd>
<dt><span style="text-decoration: underline;"><strong>Event &#8211; 事件</strong> </span></dt>
<dd>傳 送變更通知的<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl21" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl21',this);" href="http://msdn.microsoft.com/zh-tw/library/0b0thckt.aspx"><span style="color: #0033cc;"> 類別</span></a>成員或<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl22" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl22',this);" href="http://msdn.microsoft.com/zh-tw/library/ah19swz4.aspx"><span style="color: #0033cc;"> 結構</span></a>成員。如需詳細資訊，請參閱<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl23" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl23',this);" href="http://msdn.microsoft.com/zh-tw/library/awbftdfh.aspx"><span style="color: #0033cc;"> 事件</span></a>。</p>
</dd>
<dt><span style="text-decoration: underline;"><strong>Field &#8211; 欄位</strong> </span></dt>
<dd>可 直接存取之<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl24" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl24',this);" href="http://msdn.microsoft.com/zh-tw/library/0b0thckt.aspx"><span style="color: #0033cc;"> 類別</span></a>或<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl25" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl25',this);" href="http://msdn.microsoft.com/zh-tw/library/ah19swz4.aspx"><span style="color: #0033cc;"> 結構</span></a>的資料成員。</p>
</dd>
<dt><span style="text-decoration: underline;"><strong>Generics &#8211; 泛型</strong> </span></dt>
<dd>泛型能讓您定義使用型別參數加以定義的<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl26" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl26',this);" href="http://msdn.microsoft.com/zh-tw/library/0b0thckt.aspx"><span style="color: #0033cc;"> 類別</span></a>及方法。當用戶端程式碼具現化型別時，它會指定特定型別做為引數。如需詳細資訊，請參閱<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl27" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl27',this);" href="http://msdn.microsoft.com/zh-tw/library/512aeb7t.aspx"><span style="color: #0033cc;"> 泛型</span></a>。</p>
</dd>
<dt><span style="text-decoration: underline;"><strong>IDE</strong> </span></dt>
<dd>整 合式開發環境為各種開發工具提供統一使用者介面的應用程式包括有：編譯器、偵錯工具、程式碼編輯器和設計工具。</p>
</dd>
<dt><span style="text-decoration: underline;"><strong>Immutable  Type &#8211; 不變的型別</strong> </span></dt>
<dd>此型別的執行個體資料 (欄位和屬性)  在建立執行個體之後不會再變更。大部分實值型別 (Value Type) 都是不變的。</p>
</dd>
<dt><span style="text-decoration: underline;"><strong>Inaccessible  Member &#8211; 無法存取成員</strong> </span></dt>
<dd>無法由指定型別存取的成員。某個型別無法存取的成員其他型別不一定無法存 取。如需詳細資訊，請參閱<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl28" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl28',this);" href="http://msdn.microsoft.com/zh-tw/library/ms173121.aspx"><span style="color: #0033cc;"> 存取修飾詞</span></a>。</p>
</dd>
<dt><span style="text-decoration: underline;"><strong>Inheritance &#8211; 繼承</strong> </span></dt>
<dd>C# 支援繼承，所以衍生自其他類別 (就是所謂的基底類別) 的<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl29" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl29',this);" href="http://msdn.microsoft.com/zh-tw/library/0b0thckt.aspx"><span style="color: #0033cc;"> 類別</span></a>會繼承相同的方法和屬性。繼承涉及基底類別和衍生類別。如需詳細資訊，請參閱<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl30" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl30',this);" href="http://msdn.microsoft.com/zh-tw/library/ms173149.aspx"><span style="color: #0033cc;"> 繼承</span></a>。</p>
</dd>
<dt><span style="text-decoration: underline;"><strong>Interface &#8211; 介面</strong> </span></dt>
<dd>此 型別只包含公用方法、事件和委派的簽章。繼承介面的物件必須實作定義於介面的所有方法和事件。類別或結構可繼承任何數目的介面。如需詳細資訊，請參閱<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl31" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl31',this);" href="http://msdn.microsoft.com/zh-tw/library/ms173156.aspx"><span style="color: #0033cc;"> 介面</span></a>。</p>
</dd>
<dt><span style="text-decoration: underline;"><strong>Iterator</strong></span> </dt>
<dd>Iterator  是啟用<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl32" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl32',this);" href="http://msdn.microsoft.com/zh-tw/library/0b0thckt.aspx"><span style="color: #0033cc;"> 類別</span></a>消費者的方法，此類別包含集合或陣列，使用 <a  id="ctl00_MTContentSelector1_mainContentContainer_ctl33" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl33',this);" href="http://msdn.microsoft.com/zh-tw/library/ttw7t8t6.aspx"><span style="color: #0033cc;">foreach, in (C# 參考)</span></a> 逐一查看該集合或陣列。</p>
</dd>
<dt><span style="text-decoration: underline;"><strong>Member  &#8211; 成員</strong> </span></dt>
<dd>在<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl34" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl34',this);" href="http://msdn.microsoft.com/zh-tw/library/0b0thckt.aspx"><span style="color: #0033cc;"> 類別</span></a>或<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl35" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl35',this);" href="http://msdn.microsoft.com/zh-tw/library/ah19swz4.aspx"><span style="color: #0033cc;"> 結構</span></a>上宣告的欄位、屬性、方法或事件。</p>
</dd>
<dt><span style="text-decoration: underline;"><strong>Method &#8211;  方法</strong> </span></dt>
<dd>具名的程式碼區塊，提供<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl36" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl36',this);" href="http://msdn.microsoft.com/zh-tw/library/0b0thckt.aspx"><span style="color: #0033cc;"> 類別</span></a>或<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl37" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl37',this);" href="http://msdn.microsoft.com/zh-tw/library/ah19swz4.aspx"><span style="color: #0033cc;"> 結構</span></a>的行為。</p>
</dd>
<dt><span style="text-decoration: underline;"><strong>Mutable Type &#8211;  可變動型別</strong> </span></dt>
<dd>此型別的執行個體資料 (欄位和屬性) 在建立執行個體之後可以變更。大部分<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl38" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl38',this);" href="http://msdn.microsoft.com/zh-tw/library/490f96s2.aspx"><span style="color: #0033cc;"> 參考型別</span></a>都是可變動的。</p>
</dd>
<dt><span style="text-decoration: underline;"><strong>Nested Type &#8211;  巢狀型別</strong> </span></dt>
<dd>在另一個型別宣告內進行宣告的型別。</p>
</dd>
<dt><span style="text-decoration: underline;"><strong>Object &#8211; 物件</strong> </span></dt>
<dd><a  id="ctl00_MTContentSelector1_mainContentContainer_ctl39" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl39',this);" href="http://msdn.microsoft.com/zh-tw/library/0b0thckt.aspx"><span style="color: #0033cc;">類別</span></a>的執行個體。存在於記憶體中的物件，且具有資料以及在該資料上作用的方法。如需詳細資訊，請 參閱<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl40" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl40',this);" href="http://msdn.microsoft.com/zh-tw/library/ms173109.aspx"><span style="color: #0033cc;"> 物件、類別和結構</span></a>。</p>
</dd>
<dt><span style="text-decoration: underline;"><strong>Property &#8211; 原型</strong> </span></dt>
<dd>藉由存取子存取的資料成員。如需詳細資訊，請參閱<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl41" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl41',this);" href="http://msdn.microsoft.com/zh-tw/library/x9fsa0sw.aspx"><span style="color: #0033cc;"> 屬性</span></a>。</p>
</dd>
<dt><span style="text-decoration: underline;"><strong>Refactoring- 重構</strong></span> </dt>
<dd>重複使用先前輸入的程式碼。Visual C# Express  程式碼編輯器能夠以智慧方式重新格式化程式碼，例如，將反白顯示的程式碼區塊轉成方法。如需詳細資訊，請參閱<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl42" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl42',this);" href="http://msdn.microsoft.com/zh-tw/library/719exd8s.aspx"><span style="color: #0033cc;"> 重構</span></a>。</p>
</dd>
<dt><span style="text-decoration: underline;"><strong>Reference Type &#8211; 參考型別</strong> </span></dt>
<dd>資料型別。宣告為參考型別的變數會指向儲存資料的位置。如需詳細資訊，請參閱<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl43" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl43',this);" href="http://msdn.microsoft.com/zh-tw/library/490f96s2.aspx"><span style="color: #0033cc;"> 參考型別</span></a>。</p>
</dd>
<dt><span style="text-decoration: underline;"><strong>Static &#8211; 靜態</strong> </span></dt>
<dd>不 需先使用關鍵字 new  將宣告為靜態的類別或方法具現化，此類別或方法即可存在。<span style="font-size: x-small;">Main()</span> 是一種靜態方法。如需詳細資訊，請參閱<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl44" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl44',this);" href="http://msdn.microsoft.com/zh-tw/library/79b3xss3.aspx"><span style="color: #0033cc;"> 靜態類別和靜態類別成員</span></a>。</p>
</dd>
<dt><span style="text-decoration: underline;"><strong>Struct &#8211; 結構</strong></span> </dt>
<dd>複合資料型別，通常用來包含具有某種邏輯關聯性的數個變數。結構也可以包含方法和事件。結構不支援繼承，但支援介面。結構是<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl45" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl45',this);" href="http://msdn.microsoft.com/zh-tw/library/s1ax56ch.aspx"><span style="color: #0033cc;"> 實值型別</span></a>，而<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl46" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl46',this);" href="http://msdn.microsoft.com/zh-tw/library/0b0thckt.aspx"><span style="color: #0033cc;"> 類別</span></a>是<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl47" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl47',this);" href="http://msdn.microsoft.com/zh-tw/library/490f96s2.aspx"><span style="color: #0033cc;"> 參考型別</span></a>。如需詳細資訊，請參閱<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl48" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl48',this);" href="http://msdn.microsoft.com/zh-tw/library/saxz13w4.aspx"><span style="color: #0033cc;"> 結構</span></a>。</p>
</dd>
<dt><span style="text-decoration: underline;"><strong>Value Type &#8211; 實值型別</strong></span> </dt>
<dd>實值型別是配置在堆疊上的資料型別，與配置在堆積上的參考型別相反。<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl49" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl49',this);" href="http://msdn.microsoft.com/zh-tw/library/ya5y69ds.aspx"><span style="color: #0033cc;"> 內建型別</span></a> (包含數字型別、結構型別及可為 null 的型別) 都是實值型別。<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl50" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl50',this);" href="http://msdn.microsoft.com/zh-tw/library/0b0thckt.aspx"><span style="color: #0033cc;"> 類別</span></a>型別和<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl51" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl51',this);" href="http://msdn.microsoft.com/zh-tw/library/362314fe.aspx"><span style="color: #0033cc;"> 字串</span></a>型別則為<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl52" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl52',this);" href="http://msdn.microsoft.com/zh-tw/library/490f96s2.aspx"><span style="color: #0033cc;"> 參考型別</span></a>。如需詳細資訊，請參閱<a  id="ctl00_MTContentSelector1_mainContentContainer_ctl53" onclick="javascript:Track('ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl53',this);" href="http://msdn.microsoft.com/zh-tw/library/s1ax56ch.aspx"><span style="color: #0033cc;"> 實值型別 (C# 參考)</span></a>。</p>
</dd>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.taiwangeek.com/2010-06/cc-%e7%94%a8%e8%aa%9e.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>45 Fresh Useful JavaScript and jQuery Techniques and Tools</title>
		<link>http://www.taiwangeek.com/2010-06/45-fresh-useful-javascript-and-jquery-techniques-and-tools.html</link>
		<comments>http://www.taiwangeek.com/2010-06/45-fresh-useful-javascript-and-jquery-techniques-and-tools.html#comments</comments>
		<pubDate>Mon, 14 Jun 2010 03:23:15 +0000</pubDate>
		<dc:creator>tung</dc:creator>
				<category><![CDATA[Normal]]></category>

		<guid isPermaLink="false">http://www.taiwangeek.com/202-45-fresh-useful-javascript-and-jquery-techniques-and-tools.html</guid>
		<description><![CDATA[Yes, this is another round-up of fresh and useful Javascript techniques, tools and resources. But don’t close the tab yet, as you might find this one very useful. In this... <a class="meta-more" href="http://www.taiwangeek.com/2010-06/45-fresh-useful-javascript-and-jquery-techniques-and-tools.html">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Yes, this is another round-up of <strong>fresh and useful<br />
Javascript techniques, tools and resources</strong>. But don’t<br />
close the tab yet, as you might find this one very useful. In this<br />
selection we present calendars, forms, buttons, navigation,<br />
debugging, optimization and compatibility tables as well as handy<br />
resources and tools. We also cover various jQuery-plugins that will<br />
help you extend the functionality of your website and improve user<br />
experience with ready components or coding solutions.</p>
<p>The last section also covers a number of useful educational<br />
resources such as a compilation of useful JavaScript coding<br />
practices, a detailed comparison of JavaScript frameworks and<br />
general JavaScript programming conventions. We are looking forward<br />
to your feedback.</p>
<p>You may be interested in the following related posts:</p>
<ul>
<li><a  href="http://www.smashingmagazine.com/2009/06/21/50-fresh-javascript-tools-that-will-improve-your-workflow/"><br />
50 Fresh JavaScript Tools That Will Improve Your Workflow</a></li>
<li><a  href="http://www.smashingmagazine.com/2010/01/12/45-powerful-css-javascript-techniques/"><br />
45 Powerful CSS/JavaScript-Techniques</a></li>
<li><a  href="http://www.smashingmagazine.com/2009/03/08/70-new-useful-ajax-and-javascript-techniques/"><br />
70 Useful AJAX And JavaScript Techniques</a></li>
</ul>
<p>[Offtopic: by the way, did you know that Smashing Magazine has<br />
one of the most influential and popular Twitter accounts? Join our<br />
discussions and get updates about useful tools and resources —<br />
<a  href="http://creatives.commindo-media.de/www/delivery/ck.php?oaparams=2__bannerid=1252__zoneid=0__cb=c3f655874b__oadest=http%3A%2F%2Ftwitter.com%2Fsmashingmag"><br />
follow us on Twitter</a>!]</p>
<h3>Calendars and Timelines</h3>
<p><a  href="http://www.radoslavdimov.com/jquery-plugins/jquery-plugin-digiclock/"><br />
jDigiClock – Digital Clock (HTC Hero inspired)</a><br />
jDigiClock is a jQuery plugin inspired from HTC Hero Clock<br />
Widget.</p>
<p class="showcase"><a  href="http://www.radoslavdimov.com/jquery-plugins/jquery-plugin-digiclock/"><br />
<img src="/Images/google-reader-share-javascript-techniques-82.jpg" alt="Javascript-techniques-82 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://home.comcast.net/~vonholdt/test/clock_slide/index.htm">jQuery<br />
Sliding Clock v1.1</a><br />
jQuery transpearant Slider clock with CSS sprites.</p>
<p class="showcase"><a  href="http://home.comcast.net/~vonholdt/test/clock_slide/index.htm"><img src="/Images/google-reader-share-javascript-techniques-67.jpg" alt="Javascript-techniques-67 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://home.jongsma.org/software/js/datepicker">Date /<br />
Time Picker</a><br />
Note that this control is not designed to work in IE6; although it<br />
will function correctly in most cases, the positioning of the<br />
calendar may be way off depending on how your page is styled.</p>
<p class="showcase"><a  href="http://home.jongsma.org/software/js/datepicker"><img src="/Images/google-reader-share-javascript-techniques-05.jpg" alt="Javascript-techniques-05 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<h3>JavaScript Debugging and Validation Tools</h3>
<p><a  href="http://www.mozilla.org/projects/venkman/">Venkman<br />
JavaScript Debugger project page</a><br />
Venkman is the code name for Mozilla’s JavaScript Debugger. Venkman<br />
aims to provide a powerful JavaScript debugging environment for<br />
Gecko-based browsers namely Firefox 3.x, the Netscape 7.x series of<br />
browsers, Netscape 9.x series, Mozilla Seamonkey 1.x and Mozilla<br />
Seamonkey 2.x. It does not include Gecko-based browsers such as<br />
K-Meleon 1.x, Galeon 2.x and Netscape 8.x. The debugger is<br />
available as an add-on package in XPI format. Venkman JavaScript<br />
Debugger has been provided as part of the Mozilla install<br />
distribution since October 3rd 2001.</p>
<p class="showcase"><a  href="http://www.mozilla.org/projects/venkman/"><img src="/Images/google-reader-share-javascript-techniques-14.jpg" alt="Javascript-techniques-14 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://www.my-debugbar.com/wiki/CompanionJS/HomePage">CompanionJS</a></p>
<p>Companion.JS (pronounced Companion dot JS or CJS) is a Javascript<br />
debugger for IE.</p>
<p class="showcase"><a  href="http://www.my-debugbar.com/wiki/CompanionJS/HomePage"><img src="/Images/google-reader-share-javascript-techniques-32.jpg" alt="Javascript-techniques-32 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://net.tutsplus.com/tutorials/javascript-ajax/how-to-test-your-javascript-code-with-qunit/"><br />
How to Test your JavaScript Code with QUnit</a><br />
QUnit is a powerful JavaScript unit testing framework that helps<br />
you to debug code. It’s written by members of the jQuery team, and<br />
is the official test suite for jQuery. But QUnit is general enough<br />
to test any regular JavaScript code, and it’s even able to test<br />
server-side JavaScript via some JavaScript engine like Rhino or<br />
V8.</p>
<p class="showcase"><a  href="http://net.tutsplus.com/tutorials/javascript-ajax/how-to-test-your-javascript-code-with-qunit/"><br />
<img src="/Images/google-reader-share-javascript-techniques-44.jpg" alt="Javascript-techniques-44 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://jsbin.com/">JS Bin – Collaborative JavaScript<br />
Debugging</a><br />
JS Bin is an open source collaborative JavaScript debugging<br />
tool.</p>
<p class="showcase"><a  href="http://jsbin.com/"><img src="/Images/google-reader-share-javascript-techniques-12.jpg" alt="Javascript-techniques-12 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<h3>Forms, Buttons &amp; Navigation</h3>
<p><a  href="http://tutorialzine.com/2009/10/google-wave-history-slider-jquery/"><br />
Making a Google Wave History Slider</a><br />
Here is shown how to create a Google Wave-like history slider.<br />
Using it will enable visitors to go back and forth in time to view<br />
the changes that take place on a comment thread.</p>
<p class="showcase"><a  href="http://tutorialzine.com/2009/10/google-wave-history-slider-jquery/"><br />
<img src="/Images/google-reader-share-javascript-techniques-73.jpg" alt="Javascript-techniques-73 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://theodin.co.uk/blog/design/fancy-radio-buttons-jquery.html">Fancy<br />
Radio Buttons With jQuery</a><br />
Creation of 2 mandatory option sets that a user could choose, while<br />
hiding off the radio button inputs and using an anchor links to<br />
make it a bit more usable.</p>
<p class="showcase"><a  href="http://theodin.co.uk/blog/design/fancy-radio-buttons-jquery.html"><img src="/Images/google-reader-share-javascript-techniques-62.jpg" alt="Javascript-techniques-62 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://www.tutorial9.net/web-tutorials/creative-button-animations-with-sprites-and-jquery-part-2/"><br />
Creative Button Animations with Sprites and JQuery</a><br />
Fading hover effect for which the transition is smoothed with<br />
JavaScript, using jQuery library.</p>
<p class="showcase"><a  href="http://www.tutorial9.net/web-tutorials/creative-button-animations-with-sprites-and-jquery-part-2/"><br />
<img src="/Images/google-reader-share-javascript-techniques-83.jpg" alt="Javascript-techniques-83 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://www.vileworks.com/password-unmasking">Password<br />
(un)Masking</a><br />
JavaScript jQuery that toggles the masking and unmasking of the<br />
password field.</p>
<p class="showcase"><a  href="http://www.vileworks.com/password-unmasking"><img src="/Images/google-reader-share-javascript-techniques-68.jpg" alt="Javascript-techniques-68 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://css-tricks.com/jquery-magicline-navigation/">jQuery<br />
MagicLine Navigation</a><br />
These “sliding” style navigation bars have been around a while, and<br />
turns out it’s really pretty darn easy. Here are put two examples<br />
together.</p>
<p class="showcase"><a  href="http://css-tricks.com/jquery-magicline-navigation/"><img src="/Images/google-reader-share-javascript-techniques-49.jpg" alt="Javascript-techniques-49 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://tympanus.net/codrops/2009/12/11/fixed-fade-out-menu-a-css-and-jquery-tutorial/"><br />
Fixed Fade Out Menu: A CSS and jQuery Tutorial</a><br />
The aim is to have a fixed navigation that follows the user when he<br />
scrolls, and only subtly showing itself by fading out and becoming<br />
almost transparent. When the user hovers over it, the menu then<br />
becomes opaque again. Inside of the navigation we will have some<br />
links, a search input and a top and bottom button that let the user<br />
navigate to the top or the bottom of the page.</p>
<p class="showcase"><a  href="http://tympanus.net/codrops/2009/12/11/fixed-fade-out-menu-a-css-and-jquery-tutorial/"><br />
<img src="/Images/google-reader-share-javascript-techniques-52.jpg" alt="Javascript-techniques-52 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://cssglobe.com/post/7161/jquery-plugin-simplest-twitterlike-dynamic-character-count-for-textareas"><br />
jQuery plugin: Simplest Twitter-like dynamic character count for<br />
textareas and input fields</a><br />
The best way to explain what this plugin does is to mention<br />
Twitter. Twitter posts are limited to 140 characters. While typing<br />
the Twitter post there is this always present information about how<br />
many characters the users have before reaching the limit. The<br />
information is not only provided merely by displaying a number,<br />
there are different colors applied to certain stages to notify the<br />
user about the status.</p>
<p><a  href="http://www.csskarma.com/blog/sliding-labels-v2/">Sliding Labels<br />
v2</a><br />
Form label keeping the label inline, but sliding it off to the left<br />
rather than going away on click.</p>
<p class="showcase"><a  href="http://www.csskarma.com/blog/sliding-labels-v2/"><img src="/Images/google-reader-share-javascript-techniques-87.jpg" alt="Javascript-techniques-87 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="100" /></a></p>
<p><a  href="http://demos.usejquery.com/ketchup-plugin/index.html">Ketchup<br />
Plugin</a><br />
Ketchup is a slim jQuery Plugin that validates your forms. It aims<br />
to be very flexible and extendable for its appearance and<br />
functionality.</p>
<p class="showcase"><a  href="http://demos.usejquery.com/ketchup-plugin/index.html"><img src="/Images/google-reader-share-javascript-techniques-84.jpg" alt="Javascript-techniques-84 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<h3>Layout tools</h3>
<p><a  href="http://www.kromosome.net/cssdesignergrid/">jQuery<br />
{css}designerGrid Plugin</a><br />
{css} designerGrid is A jQuery Plugin developed for website<br />
interface developers who use the grid system of layout. {css}<br />
designerGrid is intended to assist these developers with CSS<br />
prototyping.</p>
<p class="showcase"><a  href="http://www.kromosome.net/cssdesignergrid/"><img src="/Images/google-reader-share-javascript-techniques-80.jpg" alt="Javascript-techniques-80 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://code.google.com/p/css-template-layout/">css-template-layout</a></p>
<p>JavaScript (jQuery) implementation of the CSS Template Layout<br />
Module</p>
<p class="showcase"><a  href="http://code.google.com/p/css-template-layout/"><img src="/Images/google-reader-share-javascript-techniques-33.jpg" alt="Javascript-techniques-33 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://blog.creativityden.com/fluid-grid-using-jquery/">How to<br />
create a fluid grid with jQuery</a><br />
Grid-based layout is probably the more preferred way to style up a<br />
webpage to give it more magazine-like look and feel. This tutorial<br />
is about how to use CSS and Javascript to create a fluid grid-based<br />
layout (See demo here). The algorithm/procedure used in this<br />
tutorial is very simple and straightforward. There are more<br />
advanced algorithms out there which can handle multiple scenarios.<br />
But the purpose is to understand the basic logic on how to create<br />
such layout. So here it goes…</p>
<p class="showcase"><a  href="http://blog.creativityden.com/fluid-grid-using-jquery/"><img src="/Images/google-reader-share-javascript-techniques-51.jpg" alt="Javascript-techniques-51 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://code.google.com/p/closure-templates/">closure-templates</a></p>
<p>Closure Templates are a client- and server-side templating system<br />
that helps you dynamically build reusable HTML and UI elements.<br />
They are easy to learn and customizable to fit your application’s<br />
needs. Closure Templates support JavaScript and Java and use a data<br />
model and expression syntax that works for either language. You can<br />
also use the built-in message support to easily localize your<br />
applications.</p>
<p class="showcase"><a  href="http://code.google.com/p/closure-templates/"><img src="/Images/google-reader-share-javascript-techniques-46.jpg" alt="Javascript-techniques-46 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<h3>Useful jQuery Plugins</h3>
<p><a  href="http://code.drewwilson.com/entry/tiptip-jquery-plugin">TipTip<br />
jQuery Plugin</a><br />
TipTip detects the edges of the browser window and will make sure<br />
the tooltip stays within the current window size. As a result the<br />
tooltip will adjust itself to be displayed above, below, to the<br />
left or to the right of the element with TipTip applied to it,<br />
depending on what is necessary to stay within the browser window.<br />
TipTip is a very lightweight and intelligent custom tooltip jQuery<br />
plugin. It uses ZERO images and is completely customizable via CSS.<br />
It’s also only 3.5kb minified!</p>
<p class="showcase"><a  href="http://code.drewwilson.com/entry/tiptip-jquery-plugin"><img src="/Images/google-reader-share-javascript-techniques-65.jpg" alt="Javascript-techniques-65 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://fredhq.com/projects/roundabout/">jQuery<br />
Roundabout</a><br />
Roundabout is a jQuery plugin that converts a structure of static<br />
HTML elements into a highly customizable turntable-like interactive<br />
area. (And now, not just turntables, but many shapes!)</p>
<p class="showcase"><a  href="http://fredhq.com/projects/roundabout/"><img src="/Images/google-reader-share-javascript-techniques-69.jpg" alt="Javascript-techniques-69 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://jparse.kylerush.net/">jParse – jQuery XML Parse<br />
Plugin</a><br />
jParse is a jQuery plugin that allows you to parse XML that was<br />
fetched with the jQuery .ajax method (making it fully<br />
customizable).</p>
<p class="showcase"><a  href="http://jparse.kylerush.net/"><img src="/Images/google-reader-share-javascript-techniques-72.jpg" alt="Javascript-techniques-72 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://razorjack.net/quicksand/">jQuery Quicksand<br />
plugin</a><br />
Reorder and filter items with a nice shuffling animation.</p>
<p class="showcase"><a  href="http://razorjack.net/quicksand/"><img src="/Images/google-reader-share-javascript-techniques-48.jpg" alt="Javascript-techniques-48 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://thinkinginweb.com/sections/articles/18-11-2009-typeQuery-change-website-typography-with-jquery.aspx"><br />
typeQuery, change website typography with jquery</a><br />
typeQuery gives the flexibility to change the font-family for<br />
everything you define with class, id, or tag, this example is<br />
referring to the selected item on a select object with id=”tag” and<br />
the font-family value at select object with id=”family”:<br />
<code>$($("#tag").val()).css("font-family",<br />
$("#family").val());</code></p>
<p class="showcase"><a  href="http://thinkinginweb.com/sections/articles/18-11-2009-typeQuery-change-website-typography-with-jquery.aspx"><br />
<img src="/Images/google-reader-share-javascript-techniques-70.jpg" alt="Javascript-techniques-70 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://lab.smashup.it/flip/">Flip! A jQuery plugin<br />
v0.9.9</a><br />
Flip is a jQuery plugin that will flip easily your elements in four<br />
directions.</p>
<p class="showcase"><a  href="http://lab.smashup.it/flip/"><img src="/Images/google-reader-share-javascript-techniques-55.jpg" alt="Javascript-techniques-55 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://www.webresourcesdepot.com/data-encryption-with-javascript-jcryption/"><br />
Data Encryption With JavaScript: jCryption</a><br />
jCryption is a jQuery plugin for encrypting POST/GET data submitted<br />
by forms. It uses public-key algorithm of RSA for the encryption<br />
&amp; has a PHP file for handling the decryption of data.</p>
<p class="showcase"><a  href="http://www.webresourcesdepot.com/data-encryption-with-javascript-jcryption/"><br />
<img src="/Images/google-reader-share-javascript-techniques-24.jpg" alt="Javascript-techniques-24 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://trif3cta.com/blog/entry/jquery-plugins-under-4k/">Minimalist<br />
jQuery: 11 useful plugins under 4K</a><br />
jQuery makes our lives easier. So much so that it’s tempting to use<br />
it all the time, inadvertently slowing our page load times (cue<br />
<a  href="http://developer.yahoo.com/yslow/">YSlow</a> and <a  href="http://stevesouders.com/hammerhead/">Hammerhead</a>). Combining,<br />
compressing, and delivering scripts at the end of your page helps<br />
in the HTTP request department. On the file size front, below are<br />
jQuery plugins that give solid bang for your performance buck.</p>
<p class="showcase"><a  href="http://trif3cta.com/blog/entry/jquery-plugins-under-4k/"><img src="/Images/google-reader-share-javascript-techniques-79.jpg" alt="Javascript-techniques-79 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://jscott.me/jquery.undoable.html">Undo/Redo in<br />
jQuery</a><br />
An easy-to-use plugin for adding undo/redo capabilities to a jQuery<br />
application. It is based loosely on the Objective-C/Cocoa way of<br />
doing things.</p>
<p class="showcase"><a  href="http://jscott.me/jquery.undoable.html"><img src="/Images/google-reader-share-javascript-techniques-81.jpg" alt="Javascript-techniques-81 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://code.google.com/p/editease/">editease</a><br />
editEase – jQuery CMS | no fuss, no database, no worries</p>
<p class="showcase"><a  href="http://code.google.com/p/editease/"><img src="/Images/google-reader-share-javascript-techniques-78.jpg" alt="Javascript-techniques-78 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://www.jgc.org/blog/2009/10/what-is-jshub.html">jsHub</a></p>
<p>jsHub is a single piece of JavaScript (a “tag”) that can handle<br />
reading different sorts of page information and then send them to<br />
many different vendors’ products. One piece of code to send to<br />
Google Analytics, Omniture SiteCatalyst, WebTrends and Mixpanel.<br />
Instead of one piece of JavaScript per vendor, jsHub has a single<br />
piece of code (the “hub”) and plugins that know how to translate<br />
into the required wire protocol for each vendor. Vendors only<br />
maintain the plugin for their product.</p>
<p class="showcase"><a  href="http://www.jgc.org/blog/2009/10/what-is-jshub.html"><img src="/Images/google-reader-share-javascript-techniques-22.jpg" alt="Javascript-techniques-22 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<h3>Educational JavaScript Resources and Tutorials</h3>
<p><a  href="http://justin.harmonize.fm/index.php/2009/09/an-introduction-to-javascripts-this/"><br />
Caffeinated Simpleton</a><br />
JavaScript is an amazing little language, but it’s got some quirks<br />
that turn a lot of people off. One of those quirks is<br />
<code>this</code>, and how it’s not necessarily what you expect it<br />
to be. <code>this</code> isn’t that complicated, but there are very<br />
few explanations of how it works on the internet. This article is<br />
an attempt to explain how <code>this</code> works and how to use it<br />
properly.</p>
<p class="showcase"><a  href="http://justin.harmonize.fm/index.php/2009/09/an-introduction-to-javascripts-this/"><br />
<img src="/Images/google-reader-share-javascript-techniques-07.jpg" alt="Javascript-techniques-07 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://www.smashingmagazine.com/2009/08/01/what-you-need-to-know-about-javascript-scope/"><br />
What You Need To Know About JavaScript Scope</a><br />
This article discusses how JavaScript handles scope and how various<br />
JavaScript libraries provide methods for dealing with it and how<br />
they smooth out a few bumps. We’ll also look at how you can get<br />
back to basics and do some interesting scope wrangling without a<br />
library, a useful approach if you’re writing code that needs to<br />
stand alone.</p>
<p class="showcase"><a  href="http://www.smashingmagazine.com/2009/08/01/what-you-need-to-know-about-javascript-scope/"><br />
<img src="/Images/google-reader-share-javascript-techniques-25.jpg" alt="Javascript-techniques-25 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://ejohn.org/apps/learn/">Learning Advanced<br />
JavaScript</a><br />
A very nice tutorial to learn JavaScript, containing code and<br />
discussion from the upcoming book Secrets of the JavaScript Ninja<br />
by John Resig.</p>
<p class="showcase"><a  href="http://ejohn.org/apps/learn/"><img src="/Images/google-reader-share-javascript-techniques-30.jpg" alt="Javascript-techniques-30 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://www.brucelawson.co.uk/2010/highlight-search-terms-automagically-with-javascript-and-mark/"><br />
Highlight search terms automagically with JavaScript and<br />
mark</a><br />
Script surrounding the search term(s) with the <code>mark</code><br />
element rather than a <code>span</code>, although the class<br />
<var>searchword</var> is retained in case you want to style these<br />
<code>mark</code>s differently from others. In the CSS, the rule<br />
<code>article mark</code> is just added to turn it a gentle shade<br />
of pink.</p>
<p><a  href="http://net.tutsplus.com/tutorials/javascript-ajax/10-super-helpful-traversing-functions-in-jquery/"><br />
10 Really Helpful Traversing Functions in jQuery</a><br />
With jQuery, selecting HTML elements is laughably easy. But at<br />
times, we may wish to further refine the selection, which can be a<br />
hassle when the HTML structure is complicated. In this tutorial,<br />
we’ll explore ten ways that we can refine and extend a set of<br />
wrapped elements that we wish to operate upon.</p>
<p class="showcase"><a  href="http://net.tutsplus.com/tutorials/javascript-ajax/10-super-helpful-traversing-functions-in-jquery/"><br />
<img src="/Images/google-reader-share-javascript-techniques-74.jpg" alt="Javascript-techniques-74 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://www.catswhocode.com/blog/using-keyboard-shortcuts-in-javascript"><br />
Using keyboard shortcuts in Javascript</a><br />
If you want to enhance your web app, Javascript keyboards shortcuts<br />
is definitely something to consider. In this article, you’ll learn<br />
to use JS keyboard shortcuts, with and without the JQuery<br />
framework.</p>
<p class="showcase"><a  href="http://www.catswhocode.com/blog/using-keyboard-shortcuts-in-javascript"><br />
<img src="/Images/google-reader-share-javascript-techniques-29.jpg" alt="Javascript-techniques-29 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://javascript.crockford.com/code.html">Code<br />
Conventions for the JavaScript Programming Language</a><br />
This is a set of coding conventions and rules for use in JavaScript<br />
programming.</p>
<p class="showcase"><a  href="http://javascript.crockford.com/code.html"><img src="/Images/google-reader-share-javascript-techniques-31.jpg" alt="Javascript-techniques-31 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://www.myphpetc.com/2009/03/jquery-select-element-cheat-sheet.html"><br />
jQuery – Select element cheat sheet</a><br />
This cheat sheet helps you to find the index of a selected option,<br />
set the selected option by value, set the selected option by text,<br />
insert a new option before or after another and get the text or<br />
value of the selected option.</p>
<p class="showcase"><a  href="http://www.myphpetc.com/2009/03/jquery-select-element-cheat-sheet.html"><br />
<img src="/Images/google-reader-share-javascript-techniques-76.jpg" alt="Javascript-techniques-76 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://www.ibm.com/developerworks/web/library/wa-jsframeworks/index.html"><br />
Compare JavaScript frameworks</a><br />
Modern Web sites and Web applications tend to rely quite heavily on<br />
client-side JavaScript to provide rich interactivity, particularly<br />
through the advent of asynchronous HTTP requests that do not<br />
require page refreshes to return data or responses from a<br />
server-side script or database system. In this article, you will<br />
discover how JavaScript frameworks make it easier and faster to<br />
create highly interactive and responsive Web sites and Web<br />
applications.</p>
<p class="showcase"><a  href="http://www.ibm.com/developerworks/web/library/wa-jsframeworks/index.html"><br />
<img src="/Images/google-reader-share-javascript-techniques-77.jpg" alt="Javascript-techniques-77 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://dailyjs.com/2010/01/27/pro-practices-1/">Park<br />
your Horse, Code Cowboy: Professional JavaScript Workflows, Part<br />
1</a><br />
In this series, we’ll talk about tools &amp; techniques you can use<br />
to cover those No’s, and cut a lot of strife &amp; embarrassment<br />
from your JavaScript experience.</p>
<p class="showcase"><a  href="http://dailyjs.com/2010/01/27/pro-practices-1/"><img src="/Images/google-reader-share-javascript-techniques-47.jpg" alt="Javascript-techniques-47 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://www.java2s.com/Code/JavaScriptReference/CatalogJavaScriptReference.htm"><br />
JavaScript Reference examples (example source code)</a><br />
JavaScript Reference examples, organized by Objects, Properties,<br />
Methods &amp; Collections. Some Event Handlers Reference are also<br />
available.</p>
<p class="showcase"><a  href="http://www.java2s.com/Code/JavaScriptReference/CatalogJavaScriptReference.htm"><br />
<img src="/Images/google-reader-share-javascript-techniques-20.jpg" alt="Javascript-techniques-20 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://dev.opera.com/articles/view/javascript-best-practices/">JavaScript<br />
best practices</a><br />
A compilation of best practices and good advice I’ve amassed over<br />
the years, much of it learnt the hard way (experimentation and<br />
suchlike). Take the advice below to heart and keep it in a part of<br />
your brain that has a quick access route so you can apply it<br />
without thinking about it. I am sure you will find things to<br />
disagree with, and that is a good thing – you should question what<br />
you read, and strive to find better solutions. However, I have<br />
found that following these principles has made me a more effective<br />
developer and allowed other developers to build upon my work more<br />
easily.</p>
<p class="showcase"><a  href="http://dev.opera.com/articles/view/javascript-best-practices/"><img src="/Images/google-reader-share-javascript-techniques-15.jpg" alt="Javascript-techniques-15 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a  href="http://wtfjs.com/">wtfjs</a><br />
JavaScript is a language we love despite it giving us so much to<br />
hate. This is a collection of those very special irregularities,<br />
inconstancies and just plain painfully unintuitive moments for the<br />
language of the web.</p>
<p class="showcase"><a  href="http://wtfjs.com/"><img src="/Images/google-reader-share-javascript-techniques-41.jpg" alt="Javascript-techniques-41 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<h3>Related Posts</h3>
<p>You may be interested in the following related posts:</p>
<ul>
<li><a  href="http://www.smashingmagazine.com/2009/06/21/50-fresh-javascript-tools-that-will-improve-your-workflow/"><br />
50 Fresh JavaScript Tools That Will Improve Your Workflow</a></li>
<li><a  href="http://www.smashingmagazine.com/2010/01/12/45-powerful-css-javascript-techniques/"><br />
45 Powerful CSS/JavaScript-Techniques</a></li>
<li><a  href="http://www.smashingmagazine.com/2009/03/08/70-new-useful-ajax-and-javascript-techniques/"><br />
70 Useful AJAX And JavaScript Techniques</a></li>
</ul>
<h3>Poll</h3>
<p><a  href="http://answers.polldaddy.com/poll/2842024/">What<br />
programming language should we cover in next<br />
round-up?</a><span class="c1"><a  href="http://www.polldaddy.com">surveys</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.taiwangeek.com/2010-06/45-fresh-useful-javascript-and-jquery-techniques-and-tools.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing Tweetbacks Plugin for WordPress</title>
		<link>http://www.taiwangeek.com/2010-06/introducing-tweetbacks-plugin-for-wordpress.html</link>
		<comments>http://www.taiwangeek.com/2010-06/introducing-tweetbacks-plugin-for-wordpress.html#comments</comments>
		<pubDate>Sat, 12 Jun 2010 04:22:21 +0000</pubDate>
		<dc:creator>tung</dc:creator>
				<category><![CDATA[Normal]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.taiwangeek.com/6-introducing-tweetbacks-plugin-for-wordpress.html</guid>
		<description><![CDATA[Just yesterday we introduced Twitter Avatars In Comments plugin for WordPress that enables bloggers to have both Twitter and Gravatar avatars in blog comments. We are certainly not going to... <a class="meta-more" href="http://www.taiwangeek.com/2010-06/introducing-tweetbacks-plugin-for-wordpress.html">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Just yesterday we introduced <a  href="http://www.smashingmagazine.com/2009/01/08/twitter-avatars-in-comments-wordpress-plugin/">Twitter Avatars In Comments</a> plugin for WordPress that enables bloggers to have both Twitter and Gravatar avatars in blog comments. We are certainly not going to turn Smashing Magazine into a repository of Twitter plugins for WordPress, but we are confident that it does make sense to introduce another plugin that enables another kind of Twitter integration in blogs.</p>
<p><a  href="http://yoast.com/wordpress/tweetbacks/"><img src="/Images/smashingmagazine3-tweetbacks.png" width="373" height="213" alt="Tweetbacks in Introducing Tweetbacks Plugin for WordPress" /></a></p>
<p>This is why this post releases the <strong>Twittbacks WordPress Plugin</strong> that was developed and released especially for Smashing Magazine &mdash; this plugin imports tweets about your posts as comments. You can display them in between the other comments on your blog, or display them separately.</p>
<h4>Advantages of our implementation</h4>
<p>This implementation is inspired by Dan Zarrella&#8217;s great work on TweetBacks. Although <a  href="http://danzarrella.com/tweetbacks-beta.html">his implementation</a> does what it promises, we felt that it could be done in another way and offer users an alternative to display tweets in a more convenient way.</p>
<p>Dan&#8217;s solution uses JavaScript, which will work on more platforms, but we felt that it would be useful to actually store the tweets in the database instead of using JavaScript to display them. Because our implementation stores Tweets in the database, you can create new plugins that use this data on the top of our plugin.</p>
<p>Besides, our implemenation does not does not require JavaScript and requires significantly less time to load (server-side, not client-side). (Because we know you want to test this, and be able to ditch the plugin if you don&#8217;t like it, we&#8217;ve added an <strong>uninstall function</strong>, which will delete all the stored tweets from your WordPress database.)</p>
<h4>Installation</h4>
<p>The installation couldn&#8217;t be simpler:</p>
<ol>
<li><a  href="http://yoast.com/wordpress/tweetbacks/">download the plugin from Joost de Valk&#8217;s release post</a>,</li>
<li>copy the &#8220;<code>tweetbacks</code>&#8221; folder to your plugin folder (<code>wp_root/wp-content/plugins</code>);</li>
<li>login inside your WordPress administrator panel and activate this plugin (Click &#8220;Plugins&#8221; and then &#8220;Activate&#8221; near to the plugin title);</li>
<li>if you are using WordPress 2.7, just add the code presented in the next section of this post (<em>Styling and Adding Tweetbacks in WordPress 2.7</em>) and you are done.</li>
<li>otherwise if you are using older versions of WordPress, you can add Twitterbacks similarly to the way it is presented in <a  href="http://wphacks.com/how-to-separate-wordpress-comments-and-trackbacks/">this</a> tutorial:
<ol>
<li>Access your <code>comments.php</code> file and locate the following code:
<pre class="brush: php;"> &lt;?php foreach ($comments as $comment) : ?&gt;</pre>
</p>
<p>Immediately after the above code, place this code:</p>
<p>
<pre class="brush: php;"> &lt;?php 	$comment_type = get_comment_type(); 	if($comment_type == 'comment') { ?&gt; </pre>
</p>
</li>
<li>Next, scroll down a little bit and locate the following code:
<pre class="brush: php;"> &lt;?php endforeach; /* end for each comment */ ?&#038;gt </pre>
<p>Put the following code right before the above code:</p>
<pre class="brush: php;"> &lt;?php } /* End of is_comment statement */ ?&gt; </pre>
<p>This will filter out all of the tweetbacks, trackbacks and pingbacks from your main comments loop. Now we need to create a second comments loop to display tweetbacks, and a third loop to display the trackbacks and pingbacks.</p>
</li>
<li>Right under the code from step 2 you should find this code:
<pre class="brush: php;"> &lt;?php else : // this is displayed if there are no comments so far ?&gt; </pre>
<p>Put the following code right before the above code:</p>
<pre class="brush: php;"> &lt;h3&gt;Tweetbacks&lt;/h3&gt; &lt;ol&gt; &lt;?php foreach ($comments as $comment) : ?&gt; 	&lt;?php $comment_type = get_comment_type(); ?&gt; 	&lt;?php if($comment_type == 'tweetback') { ?&gt; 		&lt;li&gt;&lt;?php comment_author_link() ?&gt;: &lt;?php comment_text() ?&gt;&lt;/li&gt; 	&lt;?php } ?&gt; &lt;?php endforeach; ?&gt; </pre>
<p>Followed by this:</p>
<pre class="brush: php;"> &lt;h3&gt;Trackbacks&lt;/h3&gt; &lt;ol&gt; &lt;?php foreach ($comments as $comment) : ?&gt; 	&lt;?php $comment_type = get_comment_type(); ?&gt; 	&lt;?php if($comment_type != &#x27;comment&#x27; &#038;&#038; $comment_type != &#x27;tweetback&#x27;) { ?&gt; 		&lt;li&gt;&lt;?php comment_author_link() ?&gt;&lt;/li&gt; 	&lt;?php } ?&gt; &lt;?php endforeach; ?&gt; &lt;/ol&gt;</pre>
</li>
<li>And you are done.</li>
</ol>
</li>
</ol>
<h4>Styling and Adding Tweetbacks in WordPress 2.7</h4>
<p>As the plugin will import these tweets into your comments, they will by default be shown as normal comments on your blog. They will get the class <code>tweetback</code>. If you&#8217;re using WordPress 2.7 and the default theme, or any other theme that has taken the styling from the comments from the default theme (which is a sensible thing to do), you could style these tweetbacks by adding something like this to your stylesheet:</p>
<pre class="brush: css;"> .commentlist li.tweetback { 	background-color: #94E4E8; }</pre>
<p>If you want to display them separately, you&#8217;ll have to separate your comments, pingbacks and tweetbacks from each other. A great tutorial on how to do that is <a  href="http://sivel.net/2008/10/wp-27-comment-separation/">Separating Pings from Comments in WordPress 2.7</a>.</p>
<p>After you&#8217;ve done that, you can add the following code to display the tweetbacks:</p>
<pre class="brush: php;"> if ( !empty($comments_by_type[&#x27;tweetback&#x27;]) ) <img src='http://www.taiwangeek.com/wp-includes/images/smilies/icon_confused.gif' alt=':?' class='wp-smiley' /> &gt; 	&lt;h2 id=&quot;tweetbacks&quot;&gt;&lt;?php echo count($comments_by_type[&#x27;tweetback&#x27;]);?&gt; Tweetbacks to &#8220;&lt;?php the_title(); ?&gt;&#8221;&lt;/h2&gt; 	&lt;ul class=&quot;commentslist tweets&quot;&gt; 		&lt;?php wp_list_comments(&#x27;type=tweetback&#x27;); ?&gt; 	&lt;/ul&gt; &lt;?php endif; </pre>
<p>If you want to give that list of tweetbacks a different look and feel, you can add a callback to the <code>wp_list_comments</code> call above. The callback could make them look like this, for instance:</p>
<p><img src="/Images/smashingmagazine3-separated-tweetbacks.png" width="500" height="198" alt="Separated-tweetbacks in Introducing Tweetbacks Plugin for WordPress" /></p>
<p>The code for the callback used above looks like this:</p>
<pre class="brush: php;"> function yoast_list_tweetbacks($comment, $args, $depth) { 	$GLOBALS[&#x27;comment&#x27;] = $comment; 	$avatarurl = str_replace(&quot;twitter:&quot;,&quot;http://s3.amazonaws.com/twitter_production/profile_images/&quot;,$comment-&gt;comment_author_email); ?&gt; 	&lt;li class=&quot;tweetback&quot; id=&quot;comment-&lt;?php comment_ID(); ?&gt;&quot;&gt; 		&lt;div id=&quot;div-comment-&lt;?php comment_ID(); ?&gt;&quot;&gt; 			&lt;div class=&quot;comment-author vcard&quot;&gt; 				&lt;img alt=&#x27;&#x27; src=&#x27;&lt;?php echo $avatarurl ?&gt;&#x27; class=&#x27;avatar avatar-40 photo avatar-default&#x27; height=&#x27;40&#x27; width=&#x27;40&#x27; /&gt; 				&lt;cite class=&quot;fn&quot;&gt;&lt;a href=&quot;&lt;?php echo $comment-&gt;comment_author_url; ?&gt;&quot; rel=&#x27;external nofollow&#x27; class=&#x27;url&#x27;&gt;&lt;?php comment_author(); ?&gt;&lt;/a&gt;&lt;/cite&gt; &lt;span class=&quot;says&quot;&gt;says:&lt;/span&gt; 			&lt;/div&gt; 			&lt;div class=&quot;comment-meta commentmetadata&quot;&gt;&lt;a href=&quot;#comment-&lt;?php comment_ID(); ?&gt;&quot;&gt;&lt;?php comment_date(&#x27;F jS, Y&#x27;); ?&gt; at &lt;?php comment_date(&#x27;H:i:s&#x27;); ?&gt;&lt;/a&gt;&lt;/div&gt; 			&lt;p&gt;&lt;?php comment_text(); ?&gt;&lt;/p&gt; 		&lt;/div&gt; 	&lt;/li&gt; &lt;?php } </pre>
<p>Because these tweetbacks are stored as comments in your database, you can all sorts of cool things with them. <a  href="http://www.improvingtheweb.com/">Improving the Web</a> has written a Widget pack that will work with this plugin, called <a  href="http://www.improvingtheweb.com/wordpress-plugins/tweet-stats/">Tweet Stats</a>. It allows you to add widgets with &#8220;Recently tweeted posts&#8221; and &#8220;Most tweeted posts&#8221; (see examples below).</p>
<p><img src="/Images/smashingmagazine3-twitt-plugs.gif" width="300" height="286" alt="Twitt-plugs in Introducing Tweetbacks Plugin for WordPress" /></p>
<p>If you have any installation problems, questions or suggestions for this plugin, please either comment on this post or add your suggestions in the <a  href="http://wordpress.org/tags/tweetbacks">support forum</a> on WordPress.org.</p>
<h4>About the author</h4>
<p>The plugin was developed by <a  href="http://yoast.com/">Joost de Valk</a>, a Dutch geek and WordPress developer. You can <a  href="http://twitter.com/jdevalk">follow him on Twitter</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.taiwangeek.com/2010-06/introducing-tweetbacks-plugin-for-wordpress.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Color Paper: A Free WordPress Theme</title>
		<link>http://www.taiwangeek.com/2010-06/color-paper-a-free-wordpress-theme.html</link>
		<comments>http://www.taiwangeek.com/2010-06/color-paper-a-free-wordpress-theme.html#comments</comments>
		<pubDate>Mon, 14 Jun 2010 02:10:22 +0000</pubDate>
		<dc:creator>tung</dc:creator>
				<category><![CDATA[Normal]]></category>
		<category><![CDATA[Freebies]]></category>
		<category><![CDATA[themes]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.taiwangeek.com/97-color-paper-a-free-wordpress-theme.html</guid>
		<description><![CDATA[We are offering you the opportunity to showcase your work in our magazine by releasing a high-quality freebie. We try to keep high standards and we have high expectations because... <a class="meta-more" href="http://www.taiwangeek.com/2010-06/color-paper-a-free-wordpress-theme.html">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We are offering you the opportunity to <strong>showcase your work in our magazine</strong> by releasing a high-quality freebie. We try to keep high standards and we have high expectations because we want our readers to really see what you, as a designer, are capable of, what one can learn from you and why you should be hired. Average freebies usually get average publicity: we want you to get the best publicity and the biggest exposure from our magazine. Therefore, we want your work to stand out. Please <a  href="http://www.smashingmagazine.com/contact/index.php/form">contact us</a> if you want to feature your work in our magazine.</p>
<p>Many designers take advantage of this opportunity; in fact, we are receiving more and more emails regarding freebie releases. Please note that we can&#8217;t answer all emails, but we read each of them. However, to get featured on Smashing Magazine, you really need to show us something that makes you different than the &#8220;usual&#8221; crowd.</p>
<p><a  title="Visit the demo" href="http://freethemelayouts.com/blog/index.php?wptheme=Color%20Paper"><img src="/Images/smashingmagazine3-web.jpg" alt="Web in Color Paper: A Free WordPress Theme" width="500" height="400" /></a></p>
<p>Today, we are glad to release <strong>Color Paper: a free professional WordPress theme</strong>, created by the <a  href="http://www.dreamtemplate.com">DreamTemplate</a> team. This theme aims to combine visual appeal with clean typography and vivid design elements. It was created especially for Smashing Magazine and its readers.</p>
<h4>Download the theme for free!</h4>
<p>The theme is released under the Creative Commons Attribution-Share Alike 3.0 License (<a  href="http://creativecommons.org/licenses/by-sa/3.0/">details of the license</a>). You can use the theme freely for all of your projects, without any restrictions. However, it’s forbidden to sell or redistribute the theme without both the designer’s and Smashing Magazine’s permission. Please link to this article if you would like to spread the word. You may modify the theme as you wish, but if you are planning to release your modification, please ask our permission first.</p>
<ul>
<li><a  href="http://freethemelayouts.com/blog/index.php?wptheme=Color%20Paper">live demo</a></li>
<li><a  href="http://freethemelayouts.com/dls/colorpaper.zip">download the theme</a> (.zip, 1.8 Mb)</li>
<li><a  href="http://freethemelayouts.com/dls/colorpaper-psd.zip">download the PSD</a> (.zip, 24 Mb)</li>
</ul>
<h4>Showcase of the theme</h4>
<p>Here are some detailed screenshots of the theme:</p>
<p><a  title="Visit the demo" href="http://freethemelayouts.com/blog/index.php?wptheme=Color%20Paper"><img src="/Images/smashingmagazine3-pu.jpg" alt="Pu in Color Paper: A Free WordPress Theme" width="500" height="414" /></a><br /> <em>Feature block at the top of the layout, with a style switcher on the left-hand side</em></p>
<p><a  title="Visit the demo" href="http://freethemelayouts.com/blog/index.php?wptheme=Color%20Paper"><img src="/Images/smashingmagazine3-list.jpg" alt="List in Color Paper: A Free WordPress Theme" width="500" height="430" /></a><br /> <em>List of articles on the front page</em></p>
<p><a  title="Visit the demo" href="http://freethemelayouts.com/blog/index.php?wptheme=Color%20Paper"><img src="/Images/smashingmagazine3-comments.jpg" alt="Comments in Color Paper: A Free WordPress Theme" width="500" height="425" /></a><br /> <em>Comments styling</em></p>
<p><a  title="Visit the demo" href="http://freethemelayouts.com/blog/index.php?wptheme=Color%20Paper"><img src="/Images/smashingmagazine3-mains.jpg" alt="Mains in Color Paper: A Free WordPress Theme" width="400" height="535" /></a><br /> <em>Sidebar styling (upper part)</em></p>
<p><a  title="Visit the demo" href="http://freethemelayouts.com/blog/index.php?wptheme=Color%20Paper"><img src="/Images/smashingmagazine3-sidebar.jpg" alt="Sidebar in Color Paper: A Free WordPress Theme" width="350" height="511" /></a><br /> <em>Sidebar styling (bottom part)</em></p>
<p>Thank you, guys. We appreciate your work and your good intentions.</p>
<h4>Last but not least…</h4>
<p>We are regularly looking for creative designers and artists. You might not know it yet, but we may feature you in one of our upcoming posts.</p>
<p>If you would like to release a free high-quality font, a WordPress theme, some wallpapers or an icon set, please <a  href="http://www.smashingmagazine.com/contact/index.php/form">contact us</a>. We would like to support you (both financially and with the broad coverage of Smashing Magazine).</p>
<p>You may be interested in the following free WordPress themes as well:</p>
<ul>
<li><a  href="http://www.smashingmagazine.com/2008/09/08/agregado-a-free-wordpress-theme/">Agregado: A Free WordPress Theme</a></li>
<li><a  href="http://www.smashingmagazine.com/2008/08/08/infinity-a-free-wordpress-theme/">Infinity: A Free WordPress Theme</a></li>
<li><a  href="http://www.smashingmagazine.com/2008/07/16/wordpress-fun-a-free-wordpress-theme/">WordPress.Fun: A Free WordPress Theme</a></li>
<li><a  href="http://www.smashingmagazine.com/2008/08/05/fervens-a-free-wordpress-theme/">Fervens: A Free WordPress Theme</a></li>
<li><a  href="http://www.smashingmagazine.com/2007/12/21/dilectio-a-smashing-wordpress-theme/">Dilectio: A Free WordPress Theme</a></li>
<li><a  href="http://www.smashingmagazine.com/2008/10/01/simply-ornate-a-free-wordpress-theme/">Simply Ornate: A Free WordPress Theme</a></li>
<li><a  href="http://www.smashingmagazine.com/2007/09/07/smashing-freefont-and-wordpress-theme/">Smashing: A Free WordPress Theme</a></li>
</ul>
<p><em>(al)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.taiwangeek.com/2010-06/color-paper-a-free-wordpress-theme.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>50 Fresh JavaScript Tools That Will Improve Your Workflow</title>
		<link>http://www.taiwangeek.com/2010-06/50-fresh-javascript-tools-that-will-improve-your-workflow.html</link>
		<comments>http://www.taiwangeek.com/2010-06/50-fresh-javascript-tools-that-will-improve-your-workflow.html#comments</comments>
		<pubDate>Sat, 12 Jun 2010 04:22:34 +0000</pubDate>
		<dc:creator>tung</dc:creator>
				<category><![CDATA[Normal]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.taiwangeek.com/30-50-fresh-javascript-tools-that-will-improve-your-workflow.html</guid>
		<description><![CDATA[JavaScript is an integral part of the RIA revolution. JavaScript allows developers to create rich and interactive web interfaces and establish asynchronous communication with servers for constantly up-to-date data without... <a class="meta-more" href="http://www.taiwangeek.com/2010-06/50-fresh-javascript-tools-that-will-improve-your-workflow.html">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>JavaScript</strong> is an  integral part of the RIA revolution. JavaScript allows developers to create  rich and interactive web interfaces and establish asynchronous communication  with servers for constantly up-to-date data without a page refresh.</p>
<p>Many things that were once accomplished using Flash objects  can now be built using JavaScript &#8211; with the added benefit that it is free,  typically more web and mobile accessible under most circumstances using best  practices for development techniques, and without the need to use proprietary  software for development.</p>
<p>Though JavaScript has been around for a while, new tools,  techniques, and information are constantly being pumped out to continually push  the technology into greater heights. In this article, we wish to share with you a <strong>huge list of fresh and new tools and  resources</strong> that JavaScript developers will find useful and informative.</p>
<p>Here are a few other posts that you might find interesting:</p>
<ul>
<li><a  href="http://www.smashingmagazine.com/2009/02/08/50-extremely-useful-javascript-tools/">50  Useful JavaScript Tools</a></li>
<li><a  href="http://www.smashingmagazine.com/2009/03/02/40-stand-alone-javascript-libraries-for-specific-purposes/">40  Useful JavaScript Libraries</a></li>
<li><a  href="http://www.smashingmagazine.com/2008/09/16/jquery-examples-and-best-practices/">jQuery  and JavaScript Coding</a></li>
</ul>
<p>[Offtopic: by the way, did you know that there is a Smashing eBook Series? Book #1 is <a  href="http://shop.smashingmagazine.com/smashing-ebook-series-1-professional-web-design-intl.html">Professional Web Design</a>, 242 pages for just $9,90.]</p>
<h3>Useful JavaScript Tools</h3>
<p><a  href="http://ejohn.org/blog/fireunit/">FireUnit</a><br /> Unit testing is an integral part of building high-performance  and efficient web applications. John Resig (creator of jQuery library) and Jan  Odvarko have developed an excellent Firefox/Firebug extension called FireUnit  which gives developers logging and testing capabilities via a simple JavaScript  API. For those interested in the tool, you should also read Odvarko&#8217;s post  detailing the <a  href="http://www.softwareishard.com/blog/firebug/fireunit-testing-in-the-firebug-world/">usage  of FireUnit</a>.</p>
<p class="showcase"><a  href="http://ejohn.org/blog/fireunit/"><img src="/Images/smashingmagazine3-fireunit.jpg" alt="Fireunit in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="431" height="462" /></a></p>
<p><a  href="http://sugartest.scriptia.net/">Sugar Test</a><br /> SugarTest makes it easy to write elegant and understandable JavaScript tests. Its API is inspired by both RSpec, Shoulda and jQuery. It works as a DSL running on top of JsUnitTest.</p>
<p class="showcase"><a  href="http://sugartest.scriptia.net/"><img src="/Images/smashingmagazine3-sugar.gif" alt="Sugar in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="482" height="237" /></a></p>
<p><a  href="http://jsclass.jcoglan.com/">JS.Class: Ruby-style JavaScript</a><br /> JS.Class is a library designed to facilitate object-oriented development in JavaScript. It implements Ruby’s core object, module and class system and some of its metaprogramming facilities, giving you a powerful base to build well-structured OO programs.</p>
<p class="showcase"><a  href="http://jsclass.jcoglan.com/"><img src="/Images/smashingmagazine3-ruby.jpg" alt="Ruby in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="482" height="237" /></a></p>
<p><a  href="http://jsonformatter.curiousconcept.com/">JSON Formatter and Validator</a><br /> The JSON Formatter was created to help with debugging. As data expressed as JSON is often written without line breaks to save space, it became extremely difficult to actually read it. This tool hopes to solve the problem by formatting the JSON into data that is easily readable by human beings.</p>
<p><a  href="http://icant.co.uk/sandbox/fauxconsole/">Faux Console: Simulating a Firebug, Safari or Opera debugging in IE</a><br /> Browsers like Safari, Opera and Firefox use the Firebug extension that offers a developer a comfortable way to output debugging information using the console.log() command. Microsoft Internet Explorer does not support this though – Faux Console is a small JavaScript that you can embed in the document to have a basic debugging console in IE.</p>
<p><a  href="http://jsbin.com/">JS Bin</a><br /> JS Bin is a web application for testing and debugging  JavaScript and CSS collaboratively. You input your source code and save it to a  publicly-accessible URL which you can then share to your fellow developers or  in social networking outlets like Twitter or Facebook groups. Be sure to check out  the <a  href="http://jsbin.com/about#video">video introduction</a> to see JS Bin  in action.</p>
<p class="showcase"><a  href="http://jsbin.com/"><img src="/Images/smashingmagazine3-js-bin.jpg" alt="Js-bin in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="480" height="209" /></a></p>
<p><a  href="http://phpjs.org/">PHP.JS</a><br /> PHP.JS is an open source project in which we try to port PHP functions to JavaScript. By including the PHP.JS library in your own projects, you can use your favorite PHP functions client-side.</p>
<p><a  href="http://code.google.com/speed/page-speed/">Page  Speed</a><br /> Page Speed, released by Google, is a Firefox/Firebug  extension very similar to <a  href="http://developer.yahoo.com/yslow/">YSlow</a> that evaluates your web pages for performance. Read more about <a  href="http://code.google.com/speed/page-speed/index.html">Page Speed</a> best  practices to see what aspects of a web page are being evaluated. YSlow and Page  Speed are based off <a  href="http://stevesouders.com/">Steve Souder&#8217;s work</a> (who worked for Yahoo! and now works for Google).</p>
<p class="showcase"><a  href="http://code.google.com/speed/page-speed/"><img src="/Images/smashingmagazine3-pagespeed.jpg" alt="Pagespeed in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="480" height="235" /></a></p>
<p><a  href="http://james.padolsey.com/javascript/prettyprint-for-javascript/">prettyPrint</a><br /> prettyPrint is an in-browser JavaScript utility for dumping  variable information, inspired by ColdFusion&#8217;s built-in <a  href="http://www.petefreitag.com/images/blog/jsdump.gif">cfdump</a> utility  function. Using prettyPrint on JS objects, variables, and arrays will give you  a large array of information about them, which you can then use for debugging  purposes or simply for gathering data about them for documentation.</p>
<p class="showcase"><a  href="http://james.padolsey.com/javascript/prettyprint-for-javascript/"><img src="/Images/smashingmagazine3-prettyprint.jpg" alt="Prettyprint in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="480" height="161" /></a></p>
<p><a  href="http://www.spket.com/">Spket IDE</a><br /> Spket is an excellent toolkit for JavaScript and XML  development. It has a robust and intuitive GUI, and integrates with popular and  powerful JavaScript/Ajax libraries such as Y!UI and jQuery. Its <a  href="http://www.spket.com/javascript-formatter.html">JavaScript Formatter</a> feature  gives you unparalleled control and standardization for you or your team&#8217;s  JavaScript code formatting standards.</p>
<p class="showcase"><a  href="http://www.spket.com/"><img src="/Images/smashingmagazine3-spket.jpg" alt="Spket in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="480" height="208" /></a></p>
<p><a  href="http://robertnyman.com/obtrusive-javascript-checker/">Obtrusive  JavaScript Checker</a><br /> Obtrusive JavaScript Checker, created by Robert Nyman, is a  tool for finding inline JavaScript on web pages. It highlights elements that  have inline JavaScript properties and provides a summary report when you mouse  over them. The tool is available as a <a  href="https://addons.mozilla.org/en-US/firefox/addon/9505">Firefox extension</a> or a <a  href="http://code.google.com/p/obtrusivejavascriptchecker/downloads/detail?name=ObtrusiveJavaScriptChecker-0.8.user.js&#038;can=2">Greasemonkey  script</a>.</p>
<p><a  href="http://softwaremaniacs.org/soft/highlight/en/">Highlight.js</a><br /> Highlight.js highlights syntax in code examples on blogs, forums and other web pages. The tool works automatically: it finds blocks of code, detects a language and highlights it accordingly.</p>
<p class="showcase"><a  href="http://softwaremaniacs.org/soft/highlight/en/"><img src="/Images/smashingmagazine3-high.gif" alt="High in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="482" height="237" /></a></p>
<p><a  href="http://javascriptcompressor.com/">Javascript Compressor</a><br /> Javascript Compressor is a web-based tool for compressing  your JavaScript to reduce their file sizes. It works by removing unnecessary  characters (such as extra tabs and spaces). Developers who use the tool to  compress their code can also use the decoding feature to uncompress their  source code. It also obfuscates your code, making it harder to read &#8211; which can  be desirable if you want to delay prying eyes from analyzing your  publicly-available code base.</p>
<p class="showcase"><a  href="http://javascriptcompressor.com/"><img src="/Images/smashingmagazine3-javascript-compressor.jpg" alt="Javascript-compressor in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="480" height="307" /></a></p>
<p><a  href="http://www.incaseofstairs.com/firediff/">Firediff</a><br /> Firediff is a Firefox/Firebug extension that allows you to  track changes in the DOM and CSS. By logging these changes, you can gain  information about how web applications work, and what elements (and what  properties) are being altered by way of DOM manipulation.</p>
<p class="showcase"><a  href="http://www.incaseofstairs.com/firediff/"><img src="/Images/smashingmagazine3-firediff.jpg" alt="Firediff in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="452" height="245" /></a></p>
<p><a  href="http://rockstarapps.com/joomla-1.5.8/products/razor-web-profiler/overview.html">RockStar  Web Profiler</a><br /> RockStar Web Profiler (aka Razor) logs and profiles  information about client-side performance. It provides developers with a  console for analyzing the data gathered by the tool. Check out the <a  href="http://docs.google.com/Present?docid=acmj49ptxpc7_7dx5qzcf4">RockStar Web  Profiler presentation</a> to get an overview of its many awesome features.</p>
<p><a  href="http://userjs.up.seesaa.net/js/bookmarklet.html">bookmarklet  maker</a><br /> This plain and simple web tool allows you to create  JavaScript-based bookmarklets. Usage is simple: simply copy and paste your  source code into it and it will output the processed code in the lower pane.</p>
<p class="showcase"><a  href="http://userjs.up.seesaa.net/js/bookmarklet.html"><img src="/Images/smashingmagazine3-bookmarlet-maker.jpg" alt="Bookmarlet-maker in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="480" height="201" /></a></p>
<p><a  href="http://tinyjs.com/">Tiny JS</a><br /> Tiny JS is an online directory of small but powerful plugins  for popular JavaScript/Ajax libraries (MooTools, jQuery, and YUI at the moment).  Its aim is to hunt down and feature lightweight plugins that give you a lot of  bang for the buck.</p>
<p class="showcase"><a  href="http://tinyjs.com/"><img src="/Images/smashingmagazine3-tiny-js.jpg" alt="Tiny-js in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="480" height="299" /></a></p>
<p><a  href="http://www.jscharts.com/home">JSCharts</a><br /> JS Charts is a free JavaScript based chart generator that requires little or no coding. With JS Charts drawing charts is a simple and easy task, since you only have to use client-side scripting (i.e. performed by your web browser). No additional plugins or server modules are required. It&#8217;s enough to include the scripts, prepare your chart data in XML or JavaScript Array and your chart is ready.</p>
<p><a  href="http://visitmix.com/lab/glimmer">Glimmer</a><br /> Glimmer is an interactive design tool for incorporating  slick JavaScript-based animation effects using the jQuery library. Glimmer  comes with a wizard-style user interface which can reduce the amount of coding  that you have to write manually.</p>
<p class="showcase"><a  href="http://visitmix.com/lab/glimmer"><img src="/Images/smashingmagazine3-glimmer.jpg" alt="Glimmer in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="480" height="272" /></a></p>
<p><a  href="http://jania.pe.kr/aw/moin.cgi/JSSpec">JSSPec</a><br /> A testing environment for JavaScript that runs on IE 6+, Firefox 2+ and Safari 3+. The tool shows differences between expected value and actual value, displays the failed line exactly and supports conditional execution. Released under GNU and available for <a  href="http://code.google.com/p/jsspec/downloads/list">free download</a>.</p>
<p><a  href="http://www.coderun.com/Search/?q=Ajax">CodeRun Code  Search</a><br /> CodeRun&#8217;s Code Search tool lets you search and view  user-submitted Ajax,  PHP, and .NET source code. Once you&#8217;ve found a script or project that you&#8217;re  interested in, you can edit it via their <a  href="http://www.coderun.com/ide/">web-based  IDE</a> without having to download the project locally.</p>
<p><a  href="http://iphoneized.com/2009/04/basejs-mobile-safari-javascript-framework/">BaseJS: A Mobile (Safari) Javascript Framework</a><br /> a simple, lightweight framework created specifically for Mobile Safari (perfect for iPhone development).</p>
<p class="showcase"><a  href="http://www.coderun.com/Search/?q=Ajax"><img src="/Images/smashingmagazine3-coderun.jpg" alt="Coderun in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="480" height="299" /></a></p>
<p><a  href="http://mochaui.com/">MochaUI</a><br /> MochaUI is a web-based tool for building web application interfaces  built on top of the MooTools JavaScript framework. Jump right in by taking  MochaUI for a spin in their <a  href="http://mochaui.com/demo/">demo page</a>.</p>
<p class="showcase"><a  href="http://mochaui.com/"><img src="/Images/smashingmagazine3-mochaui.jpg" alt="Mochaui in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="480" height="342" /></a></p>
<h3>Utility Libraries and Components for JavaScript</h3>
<p><a  href="http://narwhaljs.org/">narwhal</a><br /> narwhal is a server-side JavaScript library following the <a  href="https://wiki.mozilla.org/ServerJS">ServerJS</a> standard. Developers can  create and share &#8220;packages&#8221; for website widgets, site features,  programming patterns, in a similar fashion as <a  href="http://pear.php.net/">PEAR</a> for PHP.</p>
<p><a  href="http://www.uploadify.com/">uploadify</a><br /> uploadify is a useful jQuery plugin for dealing with file  uploads. It&#8217;s powered by a simple PHP script for handling the server-side <em>stuff</em>. Be sure to check out the <a  href="http://www.uploadify.com/demo/">uploadify demos</a> to see the plugin in  action.</p>
<p><a  href="http://www.gscottolson.com/blackbirdjs/">Blackbird</a><br /> Blackbird lets you log messages in JavaScript using a simple  and intuitive JS-based API. The library also provides you with an attractive  console GUI for viewing and analyzing messages. No more annoying alert()  functions to see your objects&#8217; contents (which can be frustrating for printing  out array values) and for setting breakpoints.</p>
<p class="showcase"><a  href="http://www.gscottolson.com/blackbirdjs/"><img src="/Images/smashingmagazine3-blackbird.jpg" alt="Blackbird in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="480" height="188" /></a></p>
<p><a  href="http://www.digitalhymn.com/argilla/booklaylet/">Booklaylet</a><br /> Booklaylet is a JS library for letting you easily deploy  your <a  href="http://en.wikipedia.org/wiki/Bookmarklet">bookmarklet</a> applications. The implementation is dead simple: take the Booklaylet source and  modify it to point to your app&#8217;s URL.</p>
<p><a  href="http://javascriptools.sourceforge.net/">JavaScripTools</a><br /> JavaScipTools is a collection of useful JS components,  functions, and classes with the aim of addressing some of the more common web  developer tasks such as parsing and formatting of data types (i.e. date and  time). It also comes with a dynamic table function for creating sortable HTML  tables.</p>
<p><a  href="http://www.lamberta.org/blog/doodle/">Doodle.js</a><br /> HTML 5&#8217;s <a  href="http://www.whatwg.org/specs/web-apps/current-work/#the-canvas-element">Canvas</a> element gives developers a way to draw stuff on web pages programmatically.  Doodle.js is a utility library/framework for working with more complex and  robust Canvas drawing processes. Check out <a  href="http://www.lamberta.org/demo/js/doodle/examples/01/spiral.html" target="_blank">Spiral Pattern</a> demo and the <a  href="http://www.lamberta.org/demo/js/doodle/examples/01/rotate.html" target="_blank">Marbles in Space</a> (3D simulation) demo in a browser that  already supports Canvas to get a feel for how Doodle.js works.</p>
<p class="showcase"><a  href="http://www.lamberta.org/blog/doodle/"><img src="/Images/smashingmagazine3-doodle-js.jpg" alt="Doodle-js in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="480" height="241" /></a></p>
<p><a  href="http://digitalhymn.com/argilla/liteajax/">liteAJaX</a><br /> liteAJaX is a lightweight JavaScript class for working with AJAX. This library is  perfect for projects that don&#8217;t use a JavaScript/Ajax framework or projects  that don&#8217;t need a more robust and fully-featured framework.</p>
<p><a  href="http://hyper-metrix.com/#Burst">Burst</a><br /> Burst is a vector animation engine for HTML 5&#8217;s Canvas  element. With it, you can create smooth, Flash-like animation effects for  browsers that support Canvas.</p>
<p class="showcase"><a  href="http://hyper-metrix.com/#Burst"><img src="/Images/smashingmagazine3-burst.jpg" alt="Burst in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="480" height="235" /></a></p>
<p><a  href="http://code.google.com/p/js-test-driver/">JSTestDriver</a><br /> JSTestDriver is a Java-based framework for creating unit  test following <a  href="http://en.wikipedia.org/wiki/Test-driven_development">Test-Driven  Development</a> philosophies and best practices. Be sure to check out this <a  href="http://www.youtube.com/watch?v=V4wYrR6t5gE&#038;eurl=http%3A%2F%2Fwww%2Egmodules%2Ecom%2Fgadgets%2Fifr%3Furl%3Dhttp%253A%252F%252Fgoogle%2Dcode%2Dproject%2Dhosting%2Dgadgets%2Egooglecode%2Ecom%252Fsvn%252Fbuild%252Fprod%252Fv&#038;feature=player_embedded">video  demonstration of JSTestDriver in action</a>.</p>
<p><a  href="http://code.google.com/p/jspdf/">jsPDF</a><br /> This library allows you to create PDF&#8217;s using nothing else  but JavaScript. See <a  href="http://jspdf.googlecode.com/svn/trunk/examples/basic.htm">the jsPDF demo  page</a> to see the library in action.</p>
<h3>Useful JavaScript Libraries</h3>
<p><a  href="http://www.glassbox-js.com/">GlassBox</a><br /> GlassBox is a beautiful and refreshing take on modal windows  that creates an interesting feeling of transparency as if you were looking  through a glass. Check out the <a  href="http://www.glassbox-js.com/#examples">example  page</a> to see different types of GlassBox implementations.</p>
<p class="showcase"><a  href="http://www.glassbox-js.com/"><img src="/Images/smashingmagazine3-glassbox.jpg" alt="Glassbox in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="480" height="259" /></a></p>
<p><a  href="http://flowplayer.org/tools/index.html">jQuery TOOLS</a><br /> jQuery TOOLS is a toolbox that gives developers some of the  most popular UI design patterns at their disposal in an easy-to-use manner.  View some of the things you can do with jQuery TOOLS in the project&#8217;s <a  href="http://flowplayer.org/tools/demos/index.html">demo page</a>.</p>
<p class="showcase"><a  href="http://flowplayer.org/tools/index.html"><img src="/Images/smashingmagazine3-jquery-tools.jpg" alt="Jquery-tools in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="480" height="145" /></a></p>
<p><a  href="http://neofreeman.freepgs.com/Moousture/">Moousture</a><br /> Moosture is a JavaScript library for dealing with mouse  gestures, written on top of the MooTools framework.</p>
<p><a  href="http://cssglobe.com/lab/tablecloth/">Tablecloth</a><br /> Tablecloth is a lightweight and unobtrusive JavaScript  library for styling and adding dynamic user interaction to HTML tables.</p>
<p class="showcase"><a  href="http://cssglobe.com/lab/tablecloth/"><img src="/Images/smashingmagazine3-tablecloth.jpg" alt="Tablecloth in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="480" height="235" /></a></p>
<p><a  href="http://www.frequency-decoder.com/2007/11/15/unobtrusive-table-actions-script">Unobtrusive  Table Actions Script</a><br /> This simple and lightweight library brings together a set of  common and useful functions for dealing with HTML tables, such as  zebra-striping rows, highlighting rows on mouse over, and column highlighting.</p>
<p><a  href="http://livepipe.net/">LivePipe</a><br /> LivePipe is a set of widgets and controls for adding common  user interaction components to web applications using the Prototype JavaScript  framework.</p>
<p class="showcase"><a  href="http://livepipe.net/"><img src="/Images/smashingmagazine3-livepipe.jpg" alt="Livepipe in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="480" height="235" /></a></p>
<p><a  href="http://www.greywyvern.com/code/javascript/keyboard">JavaScript Graphical  / Virtual Keyboard Interface</a><br /> This JavaScript package adds a  virtual keyboard interface into web pages.</p>
<p class="showcase"><a  href="http://www.greywyvern.com/code/javascript/keyboard"><img src="/Images/smashingmagazine3-javascript-graphical-virtual-keyboard.jpg" alt="Javascript-graphical-virtual-keyboard in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="480" height="193" /></a></p>
<p><a  href="http://digitalhymn.com/argilla/tipmage/">Tipmage</a><br /> Tipmage is a JavaScript class for handling tooltips and  annotations on images, similar to annotated images on Flickr.</p>
<p class="showcase"><a  href="http://digitalhymn.com/argilla/tipmage/"><img src="/Images/smashingmagazine3-tipmage.jpg" alt="Tipmage in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="402" height="245" /></a></p>
<p><a  href="http://qgallery.quadrifolia.de/">qGallery</a><br /> qGallery is a simple but beautiful JavaScript for creating  image galleries with smooth and slick animation effects.</p>
<p class="showcase"><a  href="http://qgallery.quadrifolia.de/"><img src="/Images/smashingmagazine3-qgallery.jpg" alt="Qgallery in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="402" height="245" /></a></p>
<h3>Educational JavaScript Resources and Tutorials</h3>
<p><a  href="http://www.athenz.com/app/decision/center/ajax">Ajax  Frameworks Decision Center</a><br /> For large companies, committing to a JavaScript/Ajax  framework such as Prototype, MooTools, or jQuery is a big decision because it  affects a large amount of employees and will dictate the direction of the company&#8217;s  client-side interaction and RIA development philosophies. Using the Ajax Frameworks   Decision Center  gives you an organized, quantitative, and thorough method for making a solid  decision.</p>
<p class="showcase"><a  href="http://www.athenz.com/app/decision/center/ajax"><img src="/Images/smashingmagazine3-ajax-decision-center.jpg" alt="Ajax-decision-center in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="480" height="241" /></a></p>
<p><a  href="http://jqueryvsmootools.com/">jQuery vs MooTools</a><br /> This single-page site by MooTools Dev Team member Aaron  Newton is a comparative look into jQuery versus MooTools.</p>
<p><a  href="http://raibledesigns.com/rd/entry/ajax_framework_analysis_results">Ajax  Framework Analysis Results</a><br /> This analysis of popular JavaScript/Ajax frameworks (Dojo,  Ext JS, GWT, YUI) is a great resource for gathering research data for your own  frameworks: the analysis matrix factors in criteria such as scalability,  extensibility, quality and quantity of documentation, and much more. You can  adapt this matrix, tweak their weights, and modify criterions to help you  decide which JS framework to go with.</p>
<p class="showcase"><a  href="http://raibledesigns.com/rd/entry/ajax_framework_analysis_results"><img src="/Images/smashingmagazine3-ajax-frameworks-analysis-results.jpg" alt="Ajax-frameworks-analysis-results in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="402" height="245" /></a></p>
<p><a  href="http://www.noupe.com/tutorial/drop-down-menu-jquery-css.html">Sexy Drop  Down Menu w/ jQuery &amp; CSS</a><br /> In this tutorial, you&#8217;ll learn how to create a multi-tiered  drop down menu with the use of the jQuery library.</p>
<p class="showcase"><a  href="http://www.noupe.com/tutorial/drop-down-menu-jquery-css.html"><img src="/Images/smashingmagazine3-sexy-dropdown.jpg" alt="Sexy-dropdown in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="480" height="235" /></a></p>
<p><a  href="http://designm.ag/tutorials/jquery-display-switch/">Easy  Display Switch with CSS and jQuery</a><br /> This tutorial outlines a method for using jQuery to  smoothly-transition into different viewing modes, which can be helpful in image  galleries.</p>
<p class="showcase"><a  href="http://designm.ag/tutorials/jquery-display-switch/"><img src="/Images/smashingmagazine3-display-switch-tutorial.jpg" alt="Display-switch-tutorial in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="480" height="235" /></a></p>
<p><a  href="http://sixrevisions.com/tutorials/javascript_tutorial/create-a-slick-and-accessible-slideshow-using-jquery/">Create  a Slick and Accessible Slideshow Using jQuery</a><br /> This is a step-by-step jQuery tutorial that I wrote for  creating a simple and slick slideshow that can be adapted to display different  content types. Check out the <a  href="http://sixrevisions.com/demo/slideshow/final.html">demo page</a> to see  the slideshow in action.</p>
<p class="showcase"><a  href="http://sixrevisions.com/tutorials/javascript_tutorial/create-a-slick-and-accessible-slideshow-using-jquery/"><img src="/Images/smashingmagazine3-accessible-jquery-slideshow.jpg" alt="Accessible-jquery-slideshow in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="480" height="315" /></a></p>
<p><a  href="http://ejohn.org/apps/learn/">Learning Advanced  JavaScript</a><br /> John Resig has a slideshow-style, web-based tutorial on  advanced JavaScript development. It is a wonderful stepping-stone for  JavaScript developers ready to make the leap into RIA development using  JavaScript.</p>
<p class="showcase"><a  href="http://ejohn.org/apps/learn/"><img src="/Images/smashingmagazine3-learning-advanced-javascript.jpg" alt="Learning-advanced-javascript in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="402" height="245" /></a></p>
<p><a  href="http://robertnyman.com/javascript/">JavaScript  tests &amp; Compatibility tables</a><br /> This resource is a well-organized cheatsheet for JavaScript  methods cross-browser compatibility backed by sample tests that you can run to  see how they work (or don&#8217;t work) in your browser.</p>
<p class="showcase"><a  href="http://robertnyman.com/javascript/"><img src="/Images/smashingmagazine3-javascript-tests-compatibility-tables.jpg" alt="Javascript-tests-compatibility-tables in 50 Fresh JavaScript Tools That Will Improve Your Workflow" width="402" height="245" /></a></p>
<p><a  href="http://javascript.crockford.com/code.html">Code  Conventions for the JavaScript</a><br /> On this page, you can find suggested coding conventions  for JavaScript. It is important to note that there is no one correct  convention, but this is a great place to start developing your own.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.taiwangeek.com/2010-06/50-fresh-javascript-tools-that-will-improve-your-workflow.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (request URI doesn't have a trailing slash)

Served from: www.taiwangeek.com @ 2012-02-10 20:56:48 -->
