About this siteFeed sources and resources
unknown (71)
2008 November 20 (9)2008 November 19 (3)2008 November 18 (2)2008 November 17 (5)2008 November 16 (1)2008 November 14 (3)2008 November 13 (3)2008 November 12 (3)2008 November 11 (10)2008 November 10 (6)2008 November 09 (1)2008 November 08 (4)2008 November 07 (2)2008 November 06 (6)2008 November 05 (3)2008 November 04 (3)2008 November 01 (1)2008 November 03 (1)
2008 October 31 (2)2008 October 29 (2)2008 October 28 (3)2008 October 27 (4)2008 October 26 (1)2008 October 24 (2)2008 October 22 (4)2008 October 21 (4)2008 October 20 (5)2008 October 17 (2)2008 October 16 (2)2008 October 15 (3)2008 October 14 (2)2008 October 13 (2)2008 October 11 (1)2008 October 10 (2)2008 October 08 (2)2008 October 07 (2)2008 October 06 (2)2008 October 03 (2)2008 October 01 (2)2008 October 23 (1)2008 October 09 (1)2008 October 02 (1)
2008 September 26 (2)2008 September 25 (3)2008 September 24 (2)2008 September 21 (2)2008 September 16 (1)2008 September 13 (1)2008 September 12 (9)2008 September 11 (10)2008 September 10 (6)2008 September 09 (7)2008 September 08 (5)2008 September 07 (2)2008 September 06 (3)2008 September 05 (6)2008 September 04 (7)2008 September 03 (5)2008 September 02 (4)2008 September 01 (6)2008 September 30 (1)2008 September 29 (1)2008 September 23 (1)2008 September 22 (1)2008 September 19 (1)2008 September 18 (1)
2008 August 31 (4)2008 August 30 (2)2008 August 29 (9)2008 August 28 (6)2008 August 27 (21)2008 August 26 (9)2008 August 25 (7)2008 August 24 (3)2008 August 23 (2)2008 August 22 (8)2008 August 21 (18)2008 August 20 (14)2008 August 19 (21)2008 August 18 (16)2008 August 17 (8)2008 August 16 (9)2008 August 15 (6)2008 August 14 (10)2008 August 13 (13)2008 August 12 (12)2008 August 11 (13)2008 August 10 (6)2008 August 09 (6)2008 August 08 (7)2008 August 07 (15)2008 August 06 (15)2008 August 05 (24)2008 August 04 (65)2008 August 03 (19)2008 August 02 (23)2008 August 01 (62)
2008 July 31 (87)2008 July 30 (12)2008 July 29 (10)2008 July 28 (4)2008 July 27 (13)2008 July 26 (3)2008 July 25 (3)2008 July 24 (2)2008 July 23 (4)2008 July 22 (11)2008 July 21 (1)2008 July 20 (20)2008 July 19 (3)2008 July 18 (3)2008 July 17 (5)2008 July 16 (6)2008 July 15 (14)2008 July 14 (8)2008 July 13 (2)2008 July 12 (2)2008 July 11 (5)2008 July 10 (17)2008 July 09 (1)2008 July 08 (6)2008 July 07 (11)2008 July 06 (1)2008 July 05 (4)2008 July 03 (5)2008 July 02 (3)2008 July 01 (14)

The Many Faces of a Sequence Comprehension  (blogs.sun.com)  

Last month I held a presentation about the JavaFX Script programming language at my university. It was easy to impress the audience by showing how fast a graphical user interface can be done. Last year I worked as a teaching assistant for a Java course, where I had to use Eclipse as an IDE. Due to not having a visual GUI editor, I spent a whole day preparing a simple Swing source code example (the students then used it for an exercise). In the JavaFX Script programming language the more intuitive way of writing (and reading) Swing applications is a great relief.

In the functional part of my presentation I used a sequence comprehension, similar to that I found in the draft language reference [1], to decide if a number is a prime number or not.

for (i in [2..n/2] where n % i == 0) i       (1)

It returns a list of factors of a natural number n, not including 1 and n, so that n is prime iff the sequence of factors is empty. In mathematics one could say, there is a corresponding set of factors of n denoted by

{i | i ∈ [2..n/2], n mod i = 0}.

A sequence comprehension consists of three parts: a list of input sequences, a filter and an expression. The expression is "applied" to the filtered input. The expression in (1) is i, so that just the identity function is applied to the filtered input. We get the same result by only filtering [2..n/2].

   function filter (  lst : Integer [] 
                    , f   : function(:Integer):Boolean ) : Integer [] { 

       var res : Integer [] = [];

       for (i in lst) {
           if (f(i)) {
               insert i into res;
           }
       }

       return res;
   }

   function factors (n : Integer) : Integer [] {
       return filter(  [2..n/2]
                     , function(i) { return n%i == 0; } );
   }

Instead of defining a filter function, that takes a sequence and a predicate and returns a new sequence, we could use the built-in selection syntax.

[2..n/2][i | n % i == 0]

On the other hand, the filter function demonstrates the possibility of passing functions as arguments. The predicate passed by factors is an anonymous function.

There is also an equivalent sequence comprehension for a sequence syntax without filtering. The filter has just to be always true.

Link

Hey you twits, use Java ME tech-enabled Tiny Twitter  (blogs.sun.com)  

It's tiny. It twitters. It's a Java ME tech-enabled version of Twitter for your cell phone.

See:

Use Twitter from a Java ME mobile device

Here's a quote:

 This is where TinyTwitter comes in: 
 a free, tiny, widely compatible [J]ava 
 app, that twitters via your GPRS data 
 connection(usually much cheaper than 
 SMS).

 Simple and effective, this application 
 allows you to send twitterings, receive 
 those of your friends and that?s about 
 all.  But it works on most mobile 
 phones, it?s easy to set up and use. 
 It simply works.  What else could a 
 Twitter fan wish for?
Indeed! Creating things that are simple and effective is what Java ME technology is all about--as evidenced by developers like the one who wrote TinyTwitter.

Sun Thrives on the Web  (blogs.sun.com)  

Sun Technologies are the most important in the web space and web companies especially web 2.0 start ups need to make the best use of Sun technologies to be technically relevant in todays fast paced world.


Most Important Reasons being to prove it :
UltraSparc - Worlds First true System on a Chip
Solaris Operating System
Crossbow - Network Virtualisation and Resource Control
ZFS
Glassfish - Open Source Application Server
MySQL
, PostgreSQL, JavaDB
Java
Javafx for generating Rich Internet Applications
Sun's Next Generation Web Technologies

Now let me
explain each Technology in detail so that you get to know why SUN
technologies are the best for web and solve the myth.
Let us start
from server side. Typically a web company ( Web 2.0 Social networking
sites, Web application Service providers and others) needs a Good Web
Server ( Hardware and Software)
Web Servers need good computing speed and power. Sun has the perfect stack for running the latest Technologies.
Lets Start from the microelectronic layer - Yes UltraSparc T2 Processor powered Server.
UltarSparct2Some of its cool features:
Higher performance and throughput, more network bandwidth, integrated security, low power consumption
Optimized to run multithreaded applications rapidly, efficiently, and securely
Superior consolidation and virtualization capabilities: Up to 64 domains on a single processor
Leverages Solaris 10, the most advanced OS available
Built in Virtualisation facilities like Ldoms
Features and Benefits
Revolutionary Multithreaded Networking
Unprecedented Throughput
Faster I/O Expansion
The Consolidation Processor
"Zero Cost" Security
Advantages for OEMs and Developers

With All
these cool features its no doubt Sun Ultra Sparc supported Processors
can handle the load efficiently which a Typical Web Application (
Example Online Transaction Analytical Processing ) would impose on the
underlying OS /Hardware.
Next we come
to Solaris Operating System - The Best and Most Advanced OS on the
Planet. Lot of innovation has been happening in OS like Dynamic Tracing
(Dtrace) , Zetta Byte File System (ZFS) , Service Management Facility
(SMF), Predictive Self Healing, Virtualisation using Zones ( Containers
), Network Virtualisation and Resource Management using Project
Crossbow etc.
Perhaps the most revolutionary Technology applicable to the web is the Database. And Sun has 3 databases to offer.
MySQL PostgreSQL JavaDB
The best in the pack being MySQL which it recently acquired. The coolest features based on my personal experience are :
Easy to use and very Developer Friendly - even a newborn can start creating tables and forms.
Well integrated with PHP , Python , Java , Ruby etc. The Database ODBC Drivers are easily available.
Open Source , Hence No vendor Lock in.
Free . Customer needs to just pay for the Support / Service. Hence lower TOTAL cost of ownership (TCO).
Has a pluggable Database Engine which is a great innovation unique to MYSQL.
All these amazing Database Technologies Along with ZFS storage
solutions can store really large amounts of Data at very cheap cost and
also retrieve data within a flash giving a good experience for a user
visiting a user.
Now we get to Application Layer where you have a plethora of
technologies supported by SUN. Java leads the way. You have JavaFX to
develop sexy rich internet Applications ( RIAs) . JavaFX Script allows
you to make cool Applications in a very short time. You also have
visual tools to help ease of Development. And wait..... JavaFX is not
just for web. It also takes care of Mobile clients too. The processing
and networking capabilities in today's mobile handsets have the
potential to deliver a new class of rich, Internet-enabled content. To
allow content creators to tap into this power, Sun Microsystems is
bringing JavaFX technology to mobile devices. Moreover, JavaFX Mobile
builds on top of the market-leading Java ME platform to take advantage
of its powerful, device-level capabilities.
JavaFX Mobile
Just check the following web pages to experience Javafx.
JavaFX Technology at a Glance
JavaFX Home
JavaFX Learning Centre