If this blog gets posted then this justifies why I chose to use Blogger as my tech blog. Email blogging and it costs me nothing :)
Tuesday, 10 June 2008
The Reason
log.Info("Hello World")
Hi there,
This blog will be strictly related to any tech related ideas in my life or knowledge that I have acquired that is tech related.
This blog will be strictly related to any tech related ideas in my life or knowledge that I have acquired that is tech related.
Open Rico Ajax Fix
Originally posted: April 6, 2006
Drag and drop is a popular javascript element that developers can use to make their webpages look cooler or function alot better. Imagine rearranging 125 elements on a page....that would be quite troublesome.
At work I used the Open Rico project handle my drag and drop. I customized my draggables and dropzone. One thing that wasn't apparent to me at the time was scrolling while dragging. The element your dragging follows the mouse but what happens with the dropzone? It doesn't update with the position. This effect is not noticable with a small screen but when the page expands vertically it is noticable. Click here to see their implementation (Drag and Drop Open Rico)
What I had to do to fix this problem is to get the correct range of the box when the code checks for if the element is in a drop zone. Basically I changed most of their code to use RicoUtils.docScrollTop() to get the new vertical position. To get the correct rectangular position I used this simple idea: call absoluteRectangle, this returns the position of the rectangle (or dropzone), now you will add (startingScrollTopPosition - currentScrollTopPosition).
Maybe I am a noob, but everything works perfectly in Firefox and IE, so I am a happy man, but if this could've been done easier, please leave me a comment.
Drag and drop is a popular javascript element that developers can use to make their webpages look cooler or function alot better. Imagine rearranging 125 elements on a page....that would be quite troublesome.
At work I used the Open Rico project handle my drag and drop. I customized my draggables and dropzone. One thing that wasn't apparent to me at the time was scrolling while dragging. The element your dragging follows the mouse but what happens with the dropzone? It doesn't update with the position. This effect is not noticable with a small screen but when the page expands vertically it is noticable. Click here to see their implementation (Drag and Drop Open Rico)
What I had to do to fix this problem is to get the correct range of the box when the code checks for if the element is in a drop zone. Basically I changed most of their code to use RicoUtils.docScrollTop() to get the new vertical position. To get the correct rectangular position I used this simple idea: call absoluteRectangle, this returns the position of the rectangle (or dropzone), now you will add (startingScrollTopPosition - currentScrollTopPosition).
Maybe I am a noob, but everything works perfectly in Firefox and IE, so I am a happy man, but if this could've been done easier, please leave me a comment.
Using Javascript
Originally posted: March 19, 2006
I remember when I was young javascript was used to make things look cool. Ie. menus or making things move from one side of the page to the other.
As I got to university people I knew started using the fading and animation of text to make their AsianAvenue.com pages funky.
Then at work this term, I overheard, AJAX. What is this? Asynchronous Javascript with XML, Okiee...this is a pretty nice concept that is being used on alot of new pages online. Led by the force of Google and Yahoo people are jumping on this bandwagon like crazy.
I too have jumped on this bandwagon. Deciding to make my application a rich app web applicaton by using the ideas and concepts from AJAX such as drag and drop, in line editing and loading messaging. This is truly an interesting project...never knew you could have classes in javascript. lol. DHTML...i remember i was trying to learn this when i was younger. Now it comes back to the forefront. Which bandwagon did I jump on? Projects that used the Prototype.js, script.aculo.us and open rico. (http://www.musingsfrommars.org/2006/03/ajax-dhtml-library-scorecard.html)
I remember when I was young javascript was used to make things look cool. Ie. menus or making things move from one side of the page to the other.
As I got to university people I knew started using the fading and animation of text to make their AsianAvenue.com pages funky.
Then at work this term, I overheard, AJAX. What is this? Asynchronous Javascript with XML, Okiee...this is a pretty nice concept that is being used on alot of new pages online. Led by the force of Google and Yahoo people are jumping on this bandwagon like crazy.
I too have jumped on this bandwagon. Deciding to make my application a rich app web applicaton by using the ideas and concepts from AJAX such as drag and drop, in line editing and loading messaging. This is truly an interesting project...never knew you could have classes in javascript. lol. DHTML...i remember i was trying to learn this when i was younger. Now it comes back to the forefront. Which bandwagon did I jump on? Projects that used the Prototype.js, script.aculo.us and open rico. (http://www.musingsfrommars.org/2006/03/ajax-dhtml-library-scorecard.html)
Black Magic
Originally posted: March 19, 2006
Oh man, so not fun sometimes. Linking my actions through XML files. Linking my relational databases as object relational databases through XML. Having properties for my application in an XML file. Wow! XML is everywhere.
If you have 3 actions per page (minimum)....add/modify/remove...you will be adding 3 lines in your struts-config.xml file. If you have 10 pages...that is 30 lines. But wait you gotta go to the back end and set up the mappings of your spring.xml file to link ur actions to your requests to your broker.
Great now im at my broker....i gotta link my tables to make sure that my broker (using Hibernate) can call my tables.
If set up perfectly...it is the greatest thing...writing code to query stuff from the db now is one line. Linking actions is great for flexibility. But man if you screw up something or doing it for the first time...it is kinda overwhelming.
More and more i get more comfortable with it and it becomes less of a scary chore...rather black magic. Because you will be thinking....hmmm how does it know what to call....it is java's black magic.
Oh man, so not fun sometimes. Linking my actions through XML files. Linking my relational databases as object relational databases through XML. Having properties for my application in an XML file. Wow! XML is everywhere.
If you have 3 actions per page (minimum)....add/modify/remove...you will be adding 3 lines in your struts-config.xml file. If you have 10 pages...that is 30 lines. But wait you gotta go to the back end and set up the mappings of your spring.xml file to link ur actions to your requests to your broker.
Great now im at my broker....i gotta link my tables to make sure that my broker (using Hibernate) can call my tables.
If set up perfectly...it is the greatest thing...writing code to query stuff from the db now is one line. Linking actions is great for flexibility. But man if you screw up something or doing it for the first time...it is kinda overwhelming.
More and more i get more comfortable with it and it becomes less of a scary chore...rather black magic. Because you will be thinking....hmmm how does it know what to call....it is java's black magic.
Resources
Originally posted: November 4, 2005
Ok, long time ago when I was young I thought Radio Shack was the place to go to get parts.
Recently I went to Radio Shack to take a look at what they have to offer for electronics for hobbyist or just projects in the form of resistors, tools or parts for that matter.
I go there nothing. Lol I see a soldering iron and a few parts nothing much.
Yesterday I found out that yes there is a store where I dont have to buy 100 chips or a minimum of $50 on parts. And this store was in walking distance of the University of Waterloo.
This place was called Sayal Electronics. It was a great store. So many parts and when I started talking bout what I wanted the guy knew exactly what I was talking about and knew the price at the top of his head. Anyways I ended up buying a digital multimeter there for future uses. I needed to do more research on what to get for my project. I found out and I saw on their website that yes they had the parts. I didn't even ask to them to ask around to different stores to see if they have it in stock. They emailed me that yes in scarborough we have 12 parts. I was like wow, great service. And through another email, the guy ordered it for me to get it shipped to Waterloo. No hassle. Good service. Now to play the waiting game for the parts of my project to come to me =).
Ok, long time ago when I was young I thought Radio Shack was the place to go to get parts.
Recently I went to Radio Shack to take a look at what they have to offer for electronics for hobbyist or just projects in the form of resistors, tools or parts for that matter.
I go there nothing. Lol I see a soldering iron and a few parts nothing much.
Yesterday I found out that yes there is a store where I dont have to buy 100 chips or a minimum of $50 on parts. And this store was in walking distance of the University of Waterloo.
This place was called Sayal Electronics. It was a great store. So many parts and when I started talking bout what I wanted the guy knew exactly what I was talking about and knew the price at the top of his head. Anyways I ended up buying a digital multimeter there for future uses. I needed to do more research on what to get for my project. I found out and I saw on their website that yes they had the parts. I didn't even ask to them to ask around to different stores to see if they have it in stock. They emailed me that yes in scarborough we have 12 parts. I was like wow, great service. And through another email, the guy ordered it for me to get it shipped to Waterloo. No hassle. Good service. Now to play the waiting game for the parts of my project to come to me =).
Old Skool meets New School
Originally posted: October 21, 2005
Here is my idea of interfacing the ol' skool nintendo controllers to be wireless....there is hope.

I finally found the pin layout of an NES controller
Now the timing diagram of how the signals are sent

Now how to send these signals over the air?
Serial transmitter
The transmitter will be interface to the controller using the serial port. And when I apply the power everything should be jus going as normal.
Time to bring my nintendo system to waterloo and acquire the parts to make the circuit.
I dont think i should be super hardcore and try to make everything from scratch. I think I will jus buy the circuit kits (wankstas styles).
Here is my idea of interfacing the ol' skool nintendo controllers to be wireless....there is hope.

I finally found the pin layout of an NES controller
+----> Power (white)
|
5 +---------+ 7
| x x o \
| o o o o |
4 +------------+ 1
| | | |
| | | +-> Ground (brown)
| | +----> Pulse (red)
| +-------> Latch (orange)
+----------> Data (yellow)
Now the timing diagram of how the signals are sent

Now how to send these signals over the air?
Serial transmitter
Serial Transmitter | Serial Receiver | |
![]() | ![]() |
The transmitter will be interface to the controller using the serial port. And when I apply the power everything should be jus going as normal.
Time to bring my nintendo system to waterloo and acquire the parts to make the circuit.
I dont think i should be super hardcore and try to make everything from scratch. I think I will jus buy the circuit kits (wankstas styles).
Subscribe to:
Posts (Atom)