Joe Kuan Defunc Code

Ajax/Prototype/Prototype-UI: Creating a modal busy screen

November 14, 2009 · Leave a Comment

Prototype-UIWhile I was developing a web based application, one of the operations took rather long to accomplish. So I was looking for ways to create a modal busy screen with spinning image at the center. Most of them involves quite a bit of code. Then I decided to see whether I can make use of Prototype-UI to create a modal busy page and it works!! Amazingly, it doesn’t involve a lot of CSS and Javascript code either. Here are the steps:

Keep reading →

→ Leave a CommentCategories: Ajax · Ajax/Prototype · Ajax/Prototype-UI · Javascript · Programming · Web
Tagged: , , , , ,

Awk scripts for reading and editing Ubuntu /etc/network/interfaces file (Part 2/2)

November 1, 2009 · 3 Comments

ubuntulogoFor modifying the /etc/network/interfaces file, I use another script and it is slightly more complicated. Keep reading →

→ 3 CommentsCategories: Awk · Networking · Operating System · Programming · Ubuntu
Tagged: , , ,

Awk scripts for reading and editing Ubuntu /etc/network/interfaces file (Part 1/2)

November 1, 2009 · Leave a Comment

ubuntulogoIt is pretty straightforward to setup permanent network configuration on Ubuntu 8.04. All you need is to edit /etc/network/interfaces file and a very thorough tutorial is given in http://www.cyberciti.biz/faq/setting-up-an-network-interfaces-file/ to show you how manually edit for DHCP, static and promiscuous mode. However, I cannot find any command line utility for configuring permanent network setup.

So here are couple awk scripts for reading and writing /etc/network/interfaces file. I hope someone will find it useful, especially for integrating with other programs. Keep reading →

→ Leave a CommentCategories: Awk · Networking · Operating System · Programming · Ubuntu
Tagged: , , ,

Internet Explorer Debugger – The way it reports errors is misleading

October 15, 2009 · Leave a Comment

ie_logoOne of my many annoyances of IE is the way it reports Javascript errors. It is misleading and it brings confusion. One of the typical errors is ‘Object Expected’, it generally means reference to an object is undefined. The common cause is a function hasn’t been declared or some syntax errors within. Keep reading →

→ Leave a CommentCategories: Browser/IE · Web
Tagged: , , , ,

Ajax/Prototype/Prototype-UI: How to setup Ajax.PeriodicalUpdater with UI.Window

October 10, 2009 · Leave a Comment

Prototype-UIThis tutorial shows you how to create a Prototype-UI window with Ajax.PeriodicalUpdater. Suppose you need to create an Ajax window and the content is constantly updating. My preferable approach is to wrap both the UI.Window and Ajax.PeriodicalUpdater into one object. To combine PeriodicalUpdater with UI.Window together, the PeriodicalUpdater must be stopped when the window is closed. In order to do that, the UI.Window close event handler must be overridden and the PeriodicalUpdater object is visible to the handler.

Keep reading →

→ Leave a CommentCategories: Ajax · Ajax/Prototype · Ajax/Prototype-UI · Javascript · Web
Tagged: , , , , , ,

Ajax/Prototype: Use onComplete to separate Javascript client code from HTML page

October 4, 2009 · Leave a Comment

PrototypeSuppose that you use Ajax.Updater to update the HTML content inside a DOM element. Usually, the HTML forms or table entries require a bit of embedded Javascript code for the event handlers. However, using the onComplete property can give a nice separation between the HTML page and Javascript code. Keep reading →

→ Leave a CommentCategories: Ajax · Ajax/Prototype · Javascript · Programming · Web
Tagged: , , , , , ,

Prototype-UI: A quick start guide on Ajax Windows

October 4, 2009 · Leave a Comment

Prototype-UIHere is a short tutorial showing you how to use Prototype-UI to create Ajax windows and control the properties between windows.

Introduction
There are many window based Ajax frameworks out there in the market, ZK, Backbase, Ext-JS, YUI, GWT, etc. It depends on whether your web application requires to be client or server centric or a bit of both and the complexity of it. They all need a bit of learning curve. Recently, I came across another window based Ajax product, Prototype-UI, which is based on the well known Prototype and Scriptaculous libraries. Prototype-UI is a client centric and it is an extension work on previously known as PCW window library. Keep reading →

→ Leave a CommentCategories: Ajax · Ajax/Prototype · Ajax/Prototype-UI · Javascript · Programming · Web
Tagged: , , , ,

Building the latest Intel ixgbe driver (1.9.0) on FreeBSD 7.1

September 25, 2009 · Leave a Comment

FreeBSDThis is a short note of what needed to be changes to get the Intel ixgbe driver build for the FreeBSD 7.1 kernel. I needed to build a product, INE Ultra, for a customer and the product is built on FreeBSD 7.1 with an Intel 10 Gigabit XF SR Dual Port Ethernet card.

When I booted the machine, there were no sign of Intel network devices apart from the motherboard ones. Then I found out, the card requires ixgbe driver which is not configured as part of the kernel compilation. Keep reading →

→ Leave a CommentCategories: FreeBSD · Operating System
Tagged: , , , , ,

Install and Boot Ubuntu from a Compact Flash card

August 18, 2009 · 1 Comment

ubuntulogoI have been trying to install Ubuntu 8.04 LTS on a Compact Flash card and boot from it. At first, I thought the whole exercise would be straightforward. The hardware I use is a Jetway Mini-ITX J7F2 board connected with a daughter board AD3RTLAN-G which provides 3 extra Gigabits ethernet ports. The chassis is a LinITX M200 with a 20 x 2 USB LCD front panel, 2 x USB ports and a CF reader which connects to the IDE bus and a pico power supply. Here is a photo of it. Keep reading →

→ 1 CommentCategories: Ubuntu
Tagged: , ,

CSS SyntaxHighlighter 2.0: short tutorial on how to create your own syntax highlighter

July 28, 2009 · 8 Comments

CSS SyntaxHighlighterIntroduction

This is a tutorial showing you how to create your own syntax highlighter using CSS SyntaxHighlighter 2.0. Before reading this tutorial you need to know regular expression pretty well. Keep reading →

→ 8 CommentsCategories: Javascript · Programming · Syntax Highlighter 2.0 · Web
Tagged: , , , , ,