Syntax Highlightling with Chili

Posted by Jetlogs @ 9:55 pm
Category: jQuery,Web Development

During my research on doing AJAX with JQuery, I have encountered a very wonderful tool for highlighting code snippets in HTML. For those who still don’t know, Chili is a syntax highlighting tool based on JQuery. What’s great about this library is that you don’t need to hassle yourself in setting up any scripts and stylesheets. All you need to do is upload the chili plugin to a folder to your web directory of choice, and import the javascript files by inserting this sample code within your site’s <head> element. Here is the code taken from Chili’s manual:


<script type="text/javascript" src="chili/jquery-1.1.2.pack.js"></script>
<script type="text/javascript" src="chili/metaobjects-1.3.js"></script>
<script type="text/javascript" src="chili/chili-1.7b.pack.js"></script>

<!-- Chili settings for a dynamic setup -->
<script type="text/javascript">
ChiliBook.recipeFolder = "chili/";
ChiliBook.stylesheetFolder = "chili/";
</script>

and from now on, any source codes within a <code> tag will automatically be highlighted, provided you enter the language appropriate for the selection


<pre>
  <code class="html">
    <!--Sample code snippet goes here-->
  </code>
</pre>

Currently, Chili supports the following languages: C++, C#, CSS, Delphi, Java, JavaScript, LotusScript, MySQL, PHP, and XHTML

I hope to expect that Chili may have an option to highlight Python code in the next release. All of my programming articles have been upgraded to have syntax highlighting. So feel free to visit these articles:

 


Item Dupe Wipe Implemented for pRO

Posted by Jetlogs @ 12:18 am
Category: Video Games

Starting yesterday, LUG and Gravity finally released a script to finally get rid of the duplicated items and equipments, as well as illegally generated items. For the average player, this means a lot to be celebrated about. No longer will there be an imbalance of power due to the oversupply of boss cards and rare weapons, and the faith of the community will be restored to the game.

However, for those people with higher economic powers, this signifies a different story.
Rally at Prontera - Post script

Read more »


Worst-Designed Kids Toy

Posted by Jetlogs @ 11:30 pm
Category: Humor

Proper design is a very important part of our lives. In our everyday stroll, we usually encounter several WTF’s along the way. It may be a wrong-facing door, or maybe just a simple design flaw. Some things are also made to be explicitly mind-boggling like the solar-powered flashlight. However, its usually the subliminal things that usually get our attention. For instance this toy from “Dora the Explorer” has some very explicit design that makes you go: “Who the hell designed this thing!?”

Warning: the following image may be disturbing to other people. Click continue at your own peril: Read more »


JQuery Tutorial: Passing Input Arrays

Posted by Jetlogs @ 10:13 am
Category: jQuery,Web Development

For today’s programming tutorial, I’m going to show how to pass input arrays through an AJAX request using JQuery. This tutorial will assume that you have at least basic knowledge of using JQuery, and also have knowledge of any scripting language of choice (Perl, PHP, Python, Ruby, etc).

For those who have been using JQuery, its been quite frustrating to know that the usual method for passing multi-valued parameters like checkboxes is by giving each checkbox a unique name or id. Sure its a little hassle at first when processing your backend if you only have a few selections needed, but what about larger forms with 20 or more inputs? The solution for this is using the traditional input arrays for forms. But how do you do it? Here’s how: Read more »


StarCraft Addiction

Posted by Jetlogs @ 9:26 am
Category: Humor,Papercraft,Video Games

In the advent of StarCraft2, it seems that the mania is starting already.

StarCraft Origami

Some people just have too much time in their hands, or they are just too passionate in playing the game. Either way, another great game from Blizzard will be coming soon

And for those that are addicted to origami, check out 4chan’s /po/ boards


« Previous PageNext Page »
  • Archives

  • Donations

  • Social Bookmarks

  • Jetlogs.org
    Some Rights Reserved 2007
    Creative Commons License