Tuesday, November 17, 2009

PHP based login form code and style sheet issues

1. I was trying to setup login mechanism in my PHP based mechanism.
for this, i thought of using direct code from internet.
i found this code snippet to be really straightforward.

http://www.phpeasystep.com/phptu/6.html

2. This took my lot of time. I wanted to stretch my image in such a way that it fits to the window and on resizing, it should not create any issues.

Idea was to create two div and use image tag in one of the div. set the z-index to -1
Do the regular stuff in other div and set z-index as +1. there are few other things like padding and position that we need to take care so for that i copied the code from this site....
http://www.quackit.com/html/codes/html_stretch_background_image.cfm

SJ

Monday, November 16, 2009

php select problem...

First thing...
if sql code is not working then wants to see the output then first go to php directory and from command line say some thing like this:

php.exe

this will through the error and u can fix it accordingly...
if we call from browser then there is no way to find the error message..

second is:
Use "" quotes while forming html string and '' while forming sql string.
i am not sure if this is the rule that should be followed to fix my problem but this is the way it works...

SJ

WAMP setup

For a while i was struggling with wamp setup.
The problem was that PHP-mysql connection was not working properly.

I followed instruction on this page to set things up for me.
http://www.devarticles.com/c/a/Apache/Installing-PHP-under-Windows/5/
http://httpd.apache.org/docs/1.3/windows.html#down
http://forums.mysql.com/read.php?52,69846,69846#msg-69846

The problem was that i had not un-commented php-mysql connection lines in the php.ini file located in apache2.2 folder in program files..

SJ

Sunday, November 15, 2009

CEGUI skinning

I had this problem of not able to align text properly on top of button in vanilla skin of cegui. I decided to switch to taharezlook as it provides more options for windowing as well as text alignment property.

This was seriously tricky. I was in no mood to read that tutorial so just jumped into data files to see what can be done.
CEGUI follows a layering based approach for any widget.
General CEGUI widget looknfeel looks likes this:







.
.


use the properties value


.
more layers
.
.




CEGUI also provides controlProperties which helps in hiding some of imagery section and make other accessible...

By this way, i separated the logic of default image and custom image of button in taharez look and without using imagebutton thingy, i achieved "text on top of image acting as a button" functionality.

Now i am starting with WAMP model.. my first major foray in PHP.. till now i used to work on j2ee....
--Saurabh

Wednesday, November 11, 2009

Internal working of a router

This page explains the internal working of a router...
I remember reading once but was not able to find the page... so here it is..
http://www.erg.abdn.ac.uk/users/gorry/eg3567/inet-pages/router-opn.html

Thoroughly explains the internals...

Sunday, November 8, 2009

Interfaces vs abstarct classes

This page gives a very nice and detailed discussion on interfaces and abstract classes...

http://mindprod.com/jgloss/interfacevsabstract.html

SJ

Friday, November 6, 2009

Color recognition using openCV

Nowdays, i am working on sonar sensors and color detection problem using openCV...
For sonar sensors...
-> In built support for pioneer robots..
-> Problem at corners
-> Range generally 15-20 m
-> Use sound waves

For OpenCV based image capturing and recognition ...
I am still wondering on how to proceed on this... My sub task is to mount camera on robot, take pictures of object, trigger the color detection code and take appropriate action.

Will post more on this as i learn more details...

SJ