Sunday, December 27, 2009

DOJO Charting and php mysql connection thingy

yesterday i was trying to get my ajax-php-mysql code working..
Following are the problems that i faced...
1. I wanted to avoid call to mysql_connect method multiple times because in my perception, this would lead to multiple handles to database and hence wastage of resource and time... I was trying to save the handle of database in $_session variable but it was fruitless because i was getting server side error that database not connected ... then i checked documentation of mysql_connect and it says that if same arguments are passed then no new connection handle is created.... This can be great abstraction as PHP does the job for you.. but some inflexibility as well that it does not allowing me to have multiple connection to back end.... but i guess my knowledge is incomplete so will update this space regarding flexibility issue...

2. JSON object parsing...
we can use many inbuilt functions... My understanding of this is still vague... I was sending text/plain data from server and calling JSON.parse($data) thingy to convert it to JSON object but in some cases i saw that data was received in JSON format.. means it was converted into JSON on server side itself...
basically read the data from server and store it in {"" : [{"":"","":""},{"":"","":""}] } form....

3. Third problem was related to DOJo charts...
there is no way in dojo charts to create custom labels.. which is bad... because my RA guys would be mad about it...

4. Ajax.. PHP... MYSQL.. JSON...AJAX handling... this is the sequence of getting this done...

For dojo charting quickcet source is ...
http://www.sitepen.com/blog/2008/06/16/a-beginners-guide-to-dojo-charting-part-2-of-2/
first and second blog here... best

SJ

Saturday, December 12, 2009

C pointers notes

http://www.ibiblio.org/pub/languages/fortran/append-c.html

This is also good... read it whenever u are confused

Thursday, December 10, 2009

Post about unix file system working

http://people.csail.mit.edu/rinard/osnotes/h13.html

Read this some time in detail...

Monday, December 7, 2009

i18n support for images and variable size text

http://www.alistapart.com/articles/slidingdoors/

I am struggling with i18n support thingy... so here it goes....

This page explains different ways of sending data between forms or pages...
1. URL
2. Form submit
3. Cookie transfer
http://www.plus2net.com/php_tutorial/variables2.php
SJ

Sunday, December 6, 2009

transfering data from host to guest machine on virtual box

I am stuck with this problem. I have Windows7 as host and Ubuntu as guest operating system. My wireless does not work on virtual box, neither the USB is detected. I tried to use the shared folder approach but that also throws error so i am basically handicapped due to this problem.
I tried to follows instruction given on this site but encountered error that "nautilus can not handle this kind of location". Totally stuck with no clue what to do...
Will update on how to fix this issue....

http://www.mydigitallife.info/2009/07/29/workaround-to-access-shared-folders-on-sun-xvm-virtualbox-from-windows-7-guest/

Friday, December 4, 2009

Comparison of RIP vs OSPF

I thought of reading the in depth comparison of RIP and OSPF protocol.
RIP : Count to infinity problem, slow convergence, O(M*N) complexity where M is edges and N is number of nodes
To solve count to infinity approaches are hold down, split horizon but still there are other issues like no sub net masking support. All nodes in the network should use the same sub net mask, some frame related issues... Network size should be small .. Hope count is just 15 ... moreover packets between neighbors are exchanged every 30 seconds...

OSPF: Intelligent routing with improved alternative to RIP. Link state, Main problem is flooding in the network for sending updates but by using proper sub net masking support and carefully fine tuning the parameter, this can be bettered.

Full comparison is present on this site so please look here....
http://www.networkcomputing.com/unixworld/feature/002.html?cid=ref-true

SJ