Monday, February 08, 2010

The Groovy Spaceship Operator Explained | Object Partners Inc

The Groovy Spaceship Operator Explained | Object Partners Inc: "The spaceship operator has it’s roots in Perl and has found it’s way in to languages like Groovy and Ruby. The spaceship is a relational operator that performs like Java’s compareTo() comparing two objects and returning -1, 0, or +1 depending on the value of the left argument as compared to the right. If the left argument is greater than the right, the operator returns 1. If the left argument is less than the right, the operator returns −1. If the arguments are equal, 0 is returned. When using Groovy/Grails, if the arguments are not of comparable types, a ClassCastException is thrown.

While the spaceship could be used wherever you would use compareTo(), it seems most references to it are found in sorting. For example the following two lines would have identical results:

things.sort{ Thing a, Thing b -> b.beginDate <=> a.beginDate }

things.sort{ Thing a, Thing b -> b.beginDate.compareTo( a.beginDate ) }

Other examples of its behaviour from the Groovy Console:

groovy> def d = new Date()
groovy> println d <=> d
groovy> println 3 <=> 4
groovy> println “doberman” <=> “dachshund”
groovy> println d <=> new Date()

0
-1
1
-1

Perhaps the greatest advantage of using the Groovy comparison operators is the graceful handling of nulls such that x <=> y will never throw a NullPointerException:"

Elastic Search - Products

Elastic Search - Products: "ElasticSearch is an Open Source (Apache 2 license), distributed, RESTful Search Engine built for the cloud"

How to Make AJAX Requests With Raw Javascript | Nettuts+

How to Make AJAX Requests With Raw Javascript | Nettuts+: "avascript frameworks have turned simple AJAX functions into one-liners. This is quite incredible, considering the fact that it would require more than twenty to accomplish the same thing with raw Javascript. Nevertheless, it's important to learn what's 'under the hood'."

How to Plan for the Absence of JavaScript | Webdesigner Depot

How to Plan for the Absence of JavaScript | Webdesigner Depot: "Though the methods used to gather website traffic statistics call into question the validity of the stats themselves, the fact is that some of your website’s visitors will have JavaScript disabled.

You could divide your traffic sources into four broad categories:

Search engines, mobile visitors, visitors using screen readers and visitors who have JavaScript turned off.

When planning your information architecture and design, you must figure out how to deal with these special groups."

Sunday, February 07, 2010

The New Testament as History | Yale Literature Lecture

The New Testament as History | Yale Literature Lecture: "The accounts of Paul's travels in The Acts of the Apostles and Galatians seem to contradict each other at many points. Their descriptions of a meeting in Jerusalem--a major council in Acts versus a small, informal gathering in Galatians--also differ quite a bit. How do we understand these differences? A historical critical reading of these accounts does not force these texts into a harmonious unity or accept them at face value. Instead, a historical critical reading carefully sifts through the details of the texts and asks which of these is more likely to be historically accurate."

Convert Jar to EXE, jar file to executable, java JAR to EXE. Converting Jar to exe. | ViralPatel.net

Convert Jar to EXE, jar file to executable, java JAR to EXE. Converting Jar to exe. | ViralPatel.net: "Convert Jar file to EXE executable.

* By Viral Patel on February 3, 2009
* Java



java jar file to exe executableI remember the day when I created a Tic Tac Toe game using Java Swing and packed it in an executable JAR file to distribute it among my friends. As few of my friends were not from computer background, they were unable to execute the JAR file. Hence I converted the JAR into EXE and send them the EXE.

It is sometime desirable to convert the JAR file in to EXE (executable) and distribute the EXE. Although the exe can be executed only in Windows environment, this will definitely affects the “platform independency” of a Java program. Still if you want to convert a JAR file in EXE then following tools are for you.
JSmooth .exe wrapper

JSmooth is a Java Executable Wrapper. It creates native Windows launchers (standard .exe) for your java applications."

Top 100 Free Audio Books - Download Mp3 and iPod format today!

Top 100 Free Audio Books - Download Mp3 and iPod format today!: "Your source for free audio books. Download
one in mp3, iPod and iTunes format today!"

Saturday, February 06, 2010

David DeSandro: jQuery Masonry

David DeSandro: jQuery Masonry: "Masonry is a layout plugin for jQuery. Think of it as the flip side of CSS floats. Whereas floating arranges elements horizontally then vertically, Masonry arranges elements vertically then horizontally according to a grid. The result minimizes vertical gaps between elements of varying height, just like a mason fitting stones in a wa"

Friday, February 05, 2010

Design Stencils - Design Pattern Library - YDN

Design Stencils - Design Pattern Library - YDN: "Yahoo! Design Stencil Kit version 1.0 is available for OmniGraffle, Visio (XML), Adobe Illustrator (PDF and SVG), and Adobe Photoshop (PNG), and covers the following topics:"

Symbian Platform Now Fully Open Source | Javalobby

Symbian Platform Now Fully Open Source | Javalobby: "The world's most widely used smartphone operating system, Symbian, is now completely open source."

Thursday, February 04, 2010

Linda's Thoughts: Boy Scout Letter Home

Linda's Thoughts: Boy Scout Letter Home: "Dear Mom,

Our scout master told us all write to our parents in case you saw the flood on TV and worried. We are OK. Only 1 of our tents and 2 sleeping bags got washed away. Luckily, none of us got drowned because we were all up on the mountain looking for Chad when it happened.

Oh yes, please call Chad's mother and tell her he is OK. He can't write because of the cast. I got to ride in one of the search and rescue jeeps. It was neat.

We never would have found him in the dark if it hadn't been for the lightning. Scoutmaster Webb got mad at Chad for going on a hike alone without telling anyone. Chad said he did tell him, but it was during the fire so he probably didn't hear him. Did you know that if you put gas on a fire, the gas can will blow up? The wet wood still didn't burn, but one of our tents did. Also some of our clothes. John is going to look weird until his hair grows back.

We will be home on Saturday if Scoutmaster Webb gets the car fixed. It wasn't his fault about the wreck. The brakes worked OK when we left. Scoutmaster Webb said that a car that old you have to expect something to break down; that's probably why he can't get insurance on it. We think it's a neat car. He doesn't care if we get it dirty, and if its hot, sometimes he lets us ride on the tailgate. It gets pretty hot with 10 people in a car. He let us take turns riding in the trailer until the highway patrolman stopped and talked to us. Scoutmaster Webb is a neat guy. Don't worry, he is a good driver. In fact, he is teaching Terry how to drive. But he only lets him drive on the mountain roads where there isn't any traffic. All we ever see up there are logging trucks.

This morning all of the guys were diving off the rocks and swimming out in the lake. Scoutmaster Webb wouldn't let me because I can't swim and Chad was afraid he would sink because of his cast, so he let us take the canoe across the lake. It was great. You can still see some of the trees under the water from the flood. Scoutmaster Webb isn't crabby like some scoutmasters. He didn't even get mad about the life jackets. He has to spend a lot of time working on the car so we are trying not to cause him any trouble.

Guess what? We have all passed our first aid merit badges. When Dave dove in the lake and cut his arm, we got to see how a tourniquet works. Also Wade and I threw up. Scoutmaster Webb said it probably was just food poisoning from the leftover chicken. He said they got sick that way with the food they ate in prison. I'm so glad he got out and become our scoutmaster. He said he sure figured out how to get things done better while he was doing his time. I have to go now. We are going into town to mail our letters and buy bullets. Don't worry about anything. We are fine.

Love,

Cole

P.S. How long has it been since I had a tetanus shot?"

Wednesday, February 03, 2010

Recent News - SPOT Usability Testing - SPOT-DOCS

Recent News - SPOT Usability Testing - SPOT-DOCS: "This document summarizes key findings from the OCUL eBooks usability study completed November 5th and 6th, 2009."

USABILITY4LIB

USABILITY4LIB: "Welcome to the mailing list for library-based usability practitioners. The list is moderated by Brenda Reeb at the University of Rochester and hosted by Eric Lease Morgan at the University of Notre Dame."

The Little Known Secret to Getting Page 1 Google Rankings : Marketing :: American Express OPEN Forum

The Little Known Secret to Getting Page 1 Google Rankings : Marketing :: American Express OPEN Forum: "The answer is video. But not just any old video. It has to be search engine optimized video. Properly post that, and according to a recent study by Forrester Research, you stand a 53 times better chance of getting a Page 1 Google ranking."

SmartClient | Overview

SmartClient | Overview: "Client-side Ajax

In SmartClient, all presentation duties, and all HTML generation, takes place in the browser. No HTML generation or presentation duties are handled by the server. Once a SmartClient application has loaded, only data is transmitted between the browser and server.

By minimizing server contact, this architecture boosts responsiveness and scalability far beyond what is possible with server-side architectures such as JSF. By minimizing the amount of server-side code, the architecture also improves stability and reliability (only server code can crash the application for all users).

Multi-platform

SmartClient integrates with any server platform through standards-based approaches such as REST and WSDL web services.

SmartClient also includes a Java integration server for accelerated integration with Java servers, with special support for popular Java frameworks such as Java Beans/EJB, Spring, Struts and Hibernate.

Incremental upgrade

SmartClient components can be easily embedded in existing applications. Grids, forms, trees, dialogs, wizards and other SmartClient components can be added without making architectural changes.

When embedded in this fashion, SmartClient components are fully functional, still capable of drag and drop, dynamic databinding, data paging and adaptive client-side operations.

Object-oriented

SmartClient provides object-oriented, JavaScript APIs with a true class system. SmartClient components are created via XML or JavaScript, and exist as JavaScript objects that manage presentation automatically.

Using standard object-oriented approaches, you can extend, customize and create new SmartClient components without ever learning low-level Ajax techniques or doing cross-browser testing and debugging.

Ajax MVC (like Struts for Ajax)

Going beyond just widgets, SmartClient provides a model/view/controller architecture within the browser. Like a 'Struts for Ajax', the SmartClient MVC architecture provides a standardized model for server contact that simplifies Ajax applications and allows developers to quickly learn each other's code. This avoids the 'code soup' typical of projects that adopt widgets-only Ajax frameworks, where loading and saving of data is done differently on every screen.

Ajax MVC also provides tremendous performance and scalability benefits. All loading and saving of data is performed by intelligent data manager components, which:

* cache and reuse loaded data in multiple views without further server contact
* handle load on demand for high data volume applications
* adaptively perform operations such as sorting and filtering within the browser

Metadata-driven

The first step in Ajax adoption is often the most catastrophic: as developers create new screens with Ajax grids, forms and other components, they duplicate basic metadata such as field names, types, and validation rules in a vendor-specific format. This results in a brittle, difficult to maintain applications that are permanently tied to one technology.

SmartClient allows you to use standard sources of metadata, such as Java Beans or XML Schema, to configure SmartClient components. For example, the columns of a grid component can be derived from Java Bean properties, or the fields of a form can be derived from XML Schema definitions embedded in a WSDL file.

Presentation-specific attributes can be dynamically layered on top of standard metadata, combining the customization features necessary for delivering your final application with the simplicity of working with the metadata you already have.

Offline, desktop, mobile capable

Through the Adobe AIR platform, Firefox extensions, Google Gears and other technologies, SmartClient supports both offline capabilities and desktop-installable versions of SmartClient applications, without the need to change any code.

Through the Apple iPhone's support for the full Safari browser, as well as other devices that support full versions of the Opera or Internet Explorer browsers, SmartClient applications can reach the mobile world with no change in code."

Tuesday, February 02, 2010

Batch Import Performance with Grails and MySQL - Ted Naleid

Batch Import Performance with Grails and MySQL - Ted Naleid: "I’ve spent some time over the last couple of weeks working on a Grails service that allows us to import new records into our MySQL database.

A number of interesting techniques have popped out of this that I think would be useful for others doing similar types of importing using GORM/Hibernate/MySQL."

The Pragmatic Bookshelf | Beginning Mac Programming

The Pragmatic Bookshelf | Beginning Mac Programming: "You already know the reasons to get into Mac programming: millions of users rely on the Mac as their primary operating system. If you are searching for a new job, acquiring a skill set, or simply inspired to develop software for the Mac, Beginning Mac Programming is the practical and straightforward introduction to the basics you need to create innovative applications that people will seek out, discuss, and rely on. Beginners welcome!"

Open Source Two-factor authentication: The WiKID Community Edition — WIKID Strong Authentication

Open Source Two-factor authentication: The WiKID Community Edition — WIKID Strong Authentication: "The WiKID Community Version is a free-as-in-speech two-factor authentication system."