general

Rinspeed – sQuba

Three decades ago James Bond (then enacted by British star Roger Moore) wowed the world with a car that could ‘fly’ under water in the movie The Spy Who Loved Me. Only, it was animation and not an actual scene.


But Frank M Rinderknecht, the 52-year-old automobile visionary and boss of Swiss automaker Rinspeed, has turned a dream into reality with his ‘sQuba.’

Rinspeed sQuba is the most exciting thing at this year’s Geneva Motor Show and is creating many a ripple.

sQuba is the world’s first real submersible car that can ‘move like a fish underwater’.

It can dive up to 32.8 feet (10 mt) below the surface of the water and can move at a sedate 1.8 miles per hour.

The sQuba has an open cockpit for ‘safety reasons’ (so that people can get out easily anytime in case of an emergency). The occupants of the car have to breathe compressed air through built-in scuba masks.

sQuba is an electric car that uses rechargeable lithium-ion batteries and 3 electric motors for propulsion. It is a zero-emission car as documented by the rotating license plate in the rear. It produces no exhaust emissions.

The ‘sQuba’s’ filling station is the water reservoir.? It is no surprise that the vehicle features powerful yet energy-saving LED lighting technology.


The first car that could drive underwater was Quandt’s Amphibicar, built in 1968. Only 3,878 were produced but many are still being driven on roads.


Then Gibbs Technologies came up with Gibbs Aquada in 2004 which Virgin boss Richard Branson used to break the speed record for crossing the English Channel.
However, the sQuba seems to be the most exciting of them all.


To drive on the roads, the sQuba ‘relies on a stainless coil-over suspension from KW automotive and large Pirelli tires mounted on custom-made forged light-weight wheels from AEZ with 17- and 18-inch diameters.’

Technical data

Standard
apis, development, JavaScript

Build powerful Web interfaces with a free JavaScript framework

Scriptaculous allows you to easily add powerful AJAX-based user interface features to Web 2.0 applications. Web developer Tony Patton explains why you should use it and describes how to use it.

Scriptaculous is a framework for building dynamic Web 2.0 interfaces. It utilizes another freely available framework called prototype. Scriptaculous simplifies the ins and outs of implementing an AJAX-based Web interface. It allows you to easily add animation and custom data controls, as well as utilities for working with the DOM and JavaScript testing.

Why use it?
AJAX is a great marriage of technologies, but it can be confusing and time-consuming to build AJAX-powered applications from scratch. The scriptaculous framework makes it easy to include AJAX-based features in your applications, plus all of the development and testing has been done, so you can devote your time to more important tasks.

Getting started

The first step in utilizing the scriptaculous framework is downloading and installation. The download is basically a zip file with JavaScript files along with various HTML files for testing and demonstration. The JavaScript source files are the most important. The following list contains an overview:

Keep your developer skills sharp by signing up for TechRepublic’s free Web Development Zone newsletter, delivered each Tuesday.

  • lib\prototype.js: The source for the prototype JavaScript framework.
  • scr\builder.js: Allows you to easily create DOM elements dynamically.
  • src\controls.js; Includes the core components for working with the custom data controls.
  • src\dragdrop.js: Provides the code for utilizing the custom data controls for drag-and-drop related functions.
  • src\effects.js: The Visual Effects library includes all you need to add advanced JavaScript animation to your Web application.
  • src\scriptaculous.js: The base code library for utilizing the scriptaculous framework.
  • src\slider.js: Provides the code for utilizing the slider data control.

The previous list includes the default directory where each file is installed. You can place these JavaScript files anywhere on the Web server, but using the default directories makes it easier to work with the examples.

You may be wondering about the overhead of including these files in a Web page. The complete library (all files in the list) consumes approximately 150KB. The two core files—prototype.js and scriptaculous.js—add up to 50KB. So, all other combinations will be between 50 and 150KB depending on the files used.

By default, scriptaculous.js loads all of the other JavaScript files necessary for effects, drag-and-drop, sliders, and all of the other scriptaculous features. You can limit the additional scripts that get loaded by specifying them in a comma-separated list (via the load command) when loading the scriptaculous JavaScript file.

Once you have downloaded and installed the framework, it is easy to use it within a Web page. The first step is linking to the JavaScript source files within the head portion of the Web page. See Listing A.

The various functions available are accessed via HTML script tags. You can gain a better understanding by examining one of the test files installed with the framework (or an online example). As an example, I loaded the slider_test.html file located in the test\functional directory of a default installation. The complete contents of the file are too much to list here, but I can examine one portion that loads the first slider control on the page—a standard horizontal slider:

<script type="text/javascript">
// <![CDATA[
new Control.Slider('handle1','track1',{
sliderValue:0.5,

onSlide:function(v){$('debug1').innerHTML='slide: '+v},

onChange:function(v){$('debug1').innerHTML='changed! '+v}});

// ]]>

</script>

Using the CDATA section sidesteps issues encountered when using characters like < and > in your JavaScript. The code creates a new Slider control (via the Control class) and sets its initial position to the middle of the control (0.5) and adds handlers for the slide and change events. Also, framework functionality is easily used via onClick events.

A drawback of many freely available (and some commercial) tools is a lack of documentation and examples. The scriptaculous framework includes extensive example code and basic documentation via its Wiki. In addition, a quick Google search yields more help. A good example is the various cheat sheets available that provide a quick reference sheet for using the framework.

The framework includes an extensive set of examples that are included in the functional subdirectory of the test directory. You can dive into the test files to get a good idea of how to use framework functions within your application. In addition, the demos section of the scriptaculous Web site provides great examples.

Standard
java

Just-in-time compilation

In computing, just-in-time compilation (JIT), also known as dynamic translation, is a technique for improving the runtime performance of a computer program. JIT builds upon two earlier ideas in run-time environments: bytecode compilation and dynamic compilation. It converts code at runtime prior to executing it natively, for example bytecode into native machine code. The performance improvement over interpreters originates from caching the results of translating blocks of code, and not simply reevaluating each line or operand each time it is met (see Interpreted language). It also has advantages over statically compiling the code at development time, as it can recompile the code if this is found to be advantageous, and may be able to enforce security guarantees. Thus JIT can combine some of the advantages of interpretation and static compilation.

Several modern runtime environments, such as Microsoft‘s .NET Framework and most implementations of Java and most recently Actionscript 3, rely on JIT compilation for high-speed code execution.

In a bytecode-compiled system, source code is translated to an intermediate representation known as bytecode. Bytecode is not the machine code for any particular computer, and may be portable among computer architectures. The bytecode may then be interpreted, or run, on a virtual machine. A just-in-time compiler can be used as a way to speed up execution of bytecode. At the time the bytecode is run, the just-in-time compiler will compile some or all of it to native machine code for better performance. This can be done per-file, per-function or even on any arbitrary code fragment; the code can be compiled when it is about to be executed (hence the name “just-in-time”).

In contrast, a traditional interpreted virtual machine will simply interpret the bytecode, generally with much lower performance. Some interpreters even interpret source code, without the step of first compiling to bytecode, with even worse performance. Statically compiled code or native code is compiled prior to deployment. A dynamic compilation environment is one in which the compiler can be used during execution.

A common goal of using JIT techniques is to reach or surpass the performance of static compilation, while maintaining the advantages of bytecode interpretation: Much of the “heavy lifting” of parsing the original source code and performing basic optimization is often handled at compile time, prior to deployment: compilation from bytecode to machine code is much faster than compiling from source. The deployed bytecode is portable, unlike native code. Since the runtime has control over the compilation, like interpreted bytecode, it can run in a secure sandbox. Compilers from bytecode to machine code are easier to write, because the portable bytecode compiler has already done much of the work.

References

John Aycock, “A brief history of just-in-time”
Wiki, Just-in-time compilation

Standard
space

Nebula

A nebula (from Latin: “mist” [1]; pl. nebulae or nebulæ, with ligature or nebulas) is an interstellar cloud of dust, hydrogen gas and plasma. It is the first stage of a star‘s cycle. Originally nebula was a general name for any extended astronomical object, including galaxies beyond the Milky Way (some examples of the older usage survive; for example, the Andromeda Galaxy was referred to as the Andromeda Nebula before galaxies were discovered by Edwin Hubble). Nebulae often form star-forming regions, such as in the Eagle Nebula. This nebula is depicted in one of NASA‘s most famous images, the “Pillars of Creation“. In these regions the formations of gas, dust and other materials ‘clump’ together to form larger masses, which attract further matter, and eventually will become big enough to form stars. The remaining materials are then believed to form planets, and other planetary system objects.

References:

^ The Messier Catalog: Diffuse Nebulae. University of Illinois SEDS. Retrieved on 200706-12.

The Wikipedia

Standard
articles, java

Is Java Windows for Unix?

Is Java Windows for Unix? by ZDNet‘s Paul Murphy — The key conceptual difference between C and Java as used in business applications development and run-times is simply this: the C you learn in school is the C you find in things like Solaris, but the Java you learn in school has very little, if anything, to do with the Java you see in things like Sun’s identity management packages.

Standard