Processing 1.0: Composite Object and Mouse Events
After looking at FIDGT Visualizer, I was tempted to get some hands on with Processing 1.0.
I have come up with a simple example which demonstrates:
1) Building a complex shape (combination of simple shapes)
2) Adding mouse event to the application
3) Transforming shape based on mouse event
4) Drag and Drop object

ChannelCircle is a simple circle object with basic parameters like position, radius and color.
Channel is a complex object (combination of four co-centric ChannelCircles.
Here I have implemented Channel as a complete object to demonstrate mouse events.
Prototype Window Login Form with Ajax/RJS
Here is a simple tutorial to demonstrate the use of prototype Window login form with RubyOnRails and Ajax. The idea behind this is to override Ok event of Dialog.confirm() form and send Ajax request to controller. The demo application makes use of RJS for Ajax callbacks.
To begin with, download prototype windows library, copy javascripts in your public/javascripts folder and themes to stylesheets folder.
Include the javascripts and stylesheets in layout header.Look at our application.rhtml layout for complete details.
Arkanoid Alpha Ready
After few days efforts and some sleepless nights, I have an alpha version of my Arkanoid ready. This is a fully functional application but currently the ball lacks proper physics and kinetics. I am working on a improved kinetic and vector model for ball movement. It is taking long as we do not have floating point arithmetic in J2ME.
Hopefully I expect to complete this application in next week.
Prototype Ajax with Apache Struts
A simple example of Ajax on Struts using prototype.js
ScrapLogger is a simple example of integrating prototype and scriptaculous effects with struts. The logger is a demonstration of single ajax updater call, and scriptaculous Highlight effect.
My Java struts application contain a single action class, one form bean and two JSPs.
Dynamic Subdomains with Ruby on Rails
Following is a step by step guide to configure an application for dynamic subdomains. We are trying to set up wildcard subdomain feature similar to the one done by blogspot.com and wordpress.com.
Step 1
In advanced DNS settings of your domain, add an A record as follows
*.domain.com IN A ***.***.***.*** (server IP address)
Step 2
Modify http.conf to set up a serveralias *.domain.com for http://www.domain.com/.
Make sure you have access, or ask your service provider to do this.
Step 3
Add a wildcard entry for your domain in the Zone file for http://www.domain.com/, so that nonexistant subdomains are resolved to same public_html folder.
Now to check this, keep an index.html file in the public_html folder.
Try browsing http://www.domain.com/ and http://anything.domain.com/ . Both should resolve to the same index.html file. If this succeeds, your dynamic subdomains are set up.
To catch the subdomain in RubyOnRails modify application.rb as follows,
Now you have a subdomain catched by your application controller which can be used in all controllers.
For example, MyController makes use of @subdomain and decides what action to take. (it is a simple redirect action in this case)


