Wednesday, January 28, 2009

Companion.JS

Companion.JS (pronounced Companion dot JS or CJS) is a Javascript debugger for IE. The current version is 0.4.2.
Companion.JS adds the following features to IE :

  • Detailled javascript error reporting (call stack and real file name where the error occured).
  • "Firebug"-like Console API feature.
  • Javascript console feature useful to inspect javascript objects at runtime.
  • A toolbar icon to open the Companion.JS panel.
To be able to use Companion.JS you'll also need to install Microsoft Script Debugger. See Installing Companion.JS for details.



http://www.my-debugbar.com/wiki/CompanionJS/HomePage

Tuesday, January 27, 2009

History Manager for AJAX. Fix the back button on AJAX

One of the major issues on AJAX web applications is the accesibility and usability lacks. Many users have manies and don¡t undestands about AJAX, they only expects that if they click the back button then it must works as always and get them back to the previous screen.

Digitarald.de have developed a solution HistoryManager - The Ajax Back-Button (v1.0) for Mootools developers.

Download prototype.historyManager.js

http://www.flash-free.org/en/2008/07/05/history-manager-para-ajax-solucion-al-boton-back

ScrollBox.js

Usage

Simply create a new ScrollBox object and pass in the element you would like to become a scroll box. Note that the element passed used to create the object must be positioned either relative or absolute. The example css file includes this directive on the first line.

Example:
var sb = new ScrollBox($('description_box'));

Full documentation will follow when I have time. For now, there is a complete implementation example included in the zip.

Features

Fully customizable, mostly though simple CSS changes. A sample implementation is included in the download. Supports scrolling with the mouse wheel. The buttons support clicking and holding, the scrollbar has multiple selectable behaviors, and the handle is fully functional. Supports keyboard events up, down, page up, page down, home, and end. Works with named anchors.

http://theblogthatnoonereads.tunasoft.com/2007/04/08/scrollbox_js/

Monday, January 26, 2009

Captcha cracking in JavaScript with Canvas and neural nets

Everybody’s favourite glass shield to protect web apps are CAPTCHAS. These are the distorted characters displayed on a page that a user has to enter before gaining access or sending off a form. They annoy normal users, are largely inaccessible to blind users or dyslexic people and are not that safe as we think they are. PWNtcha continually reports successful cracks of various captchas on the web using OCR algos and backend systems.

What is pretty amazing though is that now you can even crack the images using JavaScript and Canvas. ShaunF wrote a GreaseMonkey script that automatically solves captchas of the file hosting site Megaupload. There’s a demo of it available.

As John Resig explains in his analysis of the script there’s some pretty nifty work going on:

  1. The HTML 5 Canvas getImageData API is used to get at the pixel data from the Captcha image. Canvas gives you the ability to embed an image into a canvas (from which you can later extract the pixel data back out again).
  2. The script includes an implementation of a neural network, written in pure JavaScript.
  3. The pixel data, extracted from the image using Canvas, is fed into the neural network in an attempt to divine the exact characters being used - in a sort of crude form of Optical Character Recognition (OCR).

True, Megaupload’s CAPTCHA is pretty basic, but it is still very impressive that you can use JavaScript to crack it. Seems like the getImageData API is something to have a closer look at.

http://ajaxian.com/archives/captcha-cracking-in-javascript-with-canvas-and-neural-nets

Thursday, January 22, 2009

ActiveRecordjs.js

Cross Browser, Cross Platform, JavaScript ORM

ActiveRecord.js makes it easy to begin working with databases in JavaScript on the client or server, with Google Gears & Chrome, Aptana Jaxer, Adobe AIR or any platform supporting the W3C HTML5 SQL Specification (currently Webkit and iPhone).

Contributors

ActiveRecord.js is the first released component of ActiveJS a JavaScript framework initiative sponsored by Aptana. This project is still in it's early stages and we welcome your thoughts and ideas on the future of JavaScript application development. Since this is a GitHub hosted project, if you would like to directly contribute we recommend you fork the project and initiate a pull request to merge your changes.

Project Features

ActiveRecord.js is a single file, MIT licensed, relies on no external JavaScript libraries, supports automatic table creation, data validation, data synchronization, relationships between models, life cycle callbacks and can use an in memory hash table to store objects if no SQL database is available.

http://www.activerecordjs.org/

Jump Start CC Processing

It may be 2009, but credit card processing remains in the Dark Ages.

Give yourself a jump start

Our little no-nonsense guide helps you get a firm grip on the slippery concepts of credit card processing:

  • the cc processing life cycle
  • key industry terms / actions
  • JavaScript code for validating & detecting card types
  • code samples for Ruby’s ActiveMerchant
  • getting started checklist & account information

All lovingly illustrated to make the concepts clear as a bell.

But wait, there’s more... planned!

We’re not done yet. Don’t miss out on version 2!

http://jumpstartcc.com/

Monday, January 19, 2009

HTML / CSS to PDF using Ruby on Rails

Ever tried to save a web page and send it to someone? What about printing a web page? Both pretty much suck.

A lot of people are talking about printing with HTML and CSS these days but what they don’t tell you is the following:

With CSS you can’t…
  • Determine where page breaks happen.
  • Set page size or type (landscape or portrait).
  • Print background colors…some browsers don’t even print images.
  • Set page footers.

Wow, that’s lame.

Ever tried sending someone a web page? Not a link, but the actual web page. It doesn’t work well at all.

http://sublog.subimage.com/2007/05/29/html-css-to-pdf-using-ruby-on-rails