Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts

Friday, June 3, 2011

Linux running on JavaScript

Suddenly came across this amazing project.. Linux running ‘on’ the web browser. It’s a virtual machine written in JavaScript, it can boot a small linux image supporting basic commands, file system, vi, and even.. a C compiler!

URL: http://bellard.org/jslinux/

You can edit, compile and run the sample hello.c program using the compiler called tcc.

To compile: tcc -o hello hello.c
To run: ./hello

All that running on top of JavaScript!.. absolutely mind blowing!

By the way, only the following browsers are supported:
  • Firefox 4.x
  • Chrome 11
  • Opera 11.11
  • Internet Explorer 9

Tuesday, December 11, 2007

Ext JS 2.0 final is out

As the title says, Ext JS 2.0 final has been released on December 4, 2007. You can check it out and download it at extjs.com.

Ext JS 1.1 rocked my heart. I had used it in a bio-informatics web 2.0 application (basically a DNA sequence/template modification application with lots of complex business rules, built with .Net 2 and Ext JS). Ext JS 1.1 dramatically improved the application GUI over another GUI framework we used earlier.

Ext JS is definitely one of the best choices if you're planning for a heavy weight GUI based web application but may not be a good choice if you're planning for a lightweight application. The main reason behind this is the 'bluky' size of the library. To use all features of the library, you can include the full library in your application, which is around 580 KB for Ext JS 1.1.1 and 614 KB for Ext JS 2.0. In that case, the only thing may bother you, the lightweight lovers, 'a lot' is the load time of your page/application. It's definitely very noticeable in the slower speed internet connection (like dial-ups).

With Ext JS 1.1, it was difficult to choose the specific library parts of the library for any specific features or widgets, for example the nice window message box dialogs. 'Packages' didn't help much, or I do not know how to use them :). If you have any expectations from Ext JS 2.0 about being it any more lightweight or choosing specific library parts easily, it may disappoint you. But you'll definitely like the more dramatics Ext 2.0 has to offer over its predecessor.

Ext 2.0 offers newer components, layouts, better examples and a better documentation. It's worth of upgrading to it for your current web 2.0 application, if time permits.

Thursday, May 3, 2007

JavaScript - Yet another toggle (show/hide) combo box code

You probably already have found or used code to toggle 'select' elements (combo boxes). But some of them have prototype dependancies, some don't work for non-form based elements and some don't work with ajax based pages.

I just wrote this tiny code that seem to do the job on IE, both form and non-form based elements, both ajax and non-ajax based pages. Check it out:
/*
* toggle select boxes by Kaisar
*/
function toggleSelectBoxes()
{
var elems = document.getElementsByTagName("select");
if (elems)
for (i=0; i<elems.length; i++)
elems[i].style.display = elems[i].style.display == 'none' ? '' : 'none';
}