0

The Road Not Taken

Posted by admin on Apr 19, 2009 in blackberry, my life, photos

The Road Not Taken, originally uploaded by Prabhakar Doraisamy.

Sent via BlackBerry by AT&T

 
0

Purple Reminders :)

Posted by admin on Apr 8, 2009 in blackberry, my life, photos

Purple Reminders, originally uploaded by Prabhakar Doraisamy.

 
0

Flickr

Posted by admin on Apr 8, 2009 in my life, photos

This is a test post from flickr, a fancy photo sharing thing.

 
0

With and without jquery

Posted by admin on Feb 23, 2009 in downloads, javascript, jquery, technology

In this specific example, creating a simple tooltip, list of goodies gained out of jquery 1.3:

  • using inbuilt position() property of jquery to determine the element’s current location.
  • comfortably sitting on top of the API (jquery) which cares of cross-browser support (addEventListener, attachEvent, offsetParent, offsetTop)
  • chaining concept (eg: $(’#link1′).mouseover(showTooltip).mouseout(hideTooltip);)

I sat down to quickly put together a demo to show how easy and efficient it is to use the ajax libraries instead of making dom manipulation on our own.

Tooltip without JQuery:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!-- @author: prabhakar doraisamy. 2/3/09 version 1.0 -->
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
        <title>Untitled Document</title>
        <script type="text/javascript">
            function addEventSimple(obj, evt, fn){
                if (obj.addEventListener)
                    obj.addEventListener(evt, fn, false);
                else
                    if (obj.attachEvent)
                        obj.attachEvent('on' + evt, fn);
            }
           
            function removeEventSimple(obj, evt, fn){
                if (obj.removeEventListener)
                    obj.removeEventListener(evt, fn, false);
                else
                    if (obj.detachEvent)
                        obj.detachEvent('on' + evt, fn);
            }
           
            function init(){
                var tooltip = document.getElementById('tooltip');
                var link1 = document.getElementById('link1');
                var text = "text here";
                tooltip.style.display = 'none';
               
                function showTooltip(e){
                    tooltip.style.position = "absolute";
                    tooltip.style.display = "inline";
                    tooltip.style.left = findPosX(e) + 5 + "px";
                    tooltip.style.top = findPosY(e) + 20 + "px";
                }
                function hideTooltip(){
                    tooltip.style.display = "none";
                }
               
                addEventSimple(link1, 'mouseover', function(){
                    showTooltip(this)
                });
                addEventSimple(link1, 'mouseout', function(){
                    hideTooltip(this)
                });
            }
           
           
            function findPosX(obj){
                var curleft = 0;
                if (obj.offsetParent)
                    while (1) {
                        curleft += obj.offsetLeft;
                        if (!obj.offsetParent)
                            break;
                        obj = obj.offsetParent;
                    }
                else
                    if (obj.x)
                        curleft += obj.x;
                return curleft;
            }
           
            function findPosY(obj){
                var curtop = 0;
                if (obj.offsetParent)
                    while (1) {
                        curtop += obj.offsetTop;
                        if (!obj.offsetParent)
                            break;
                        obj = obj.offsetParent;
                    }
                else
                    if (obj.y)
                        curtop += obj.y;
                return curtop;
            }
           
            addEventSimple(window, 'load', init);
        </script>
        <link rel="stylesheet" href="tooltip.css" type="text/css"/>
    </head>
    <body>
        <a href="#" id="link1" class="link1">tooltip supported</a>
        <div id="tooltip" class="tooltip">
        </div>
    </body>
</html>

Here is the demo.

With JQuery 1.3:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
        <title>Untitled Document</title>
        <script type="text/javascript" src="lib/jquery/jquery-1.3.1.js">
        </script>
        <script type="text/javascript">
            $(document).ready(function(){
                $('#tooltip').hide();
                $('#link1').mouseover(showTooltip).mouseout(hideTooltip);
               
                function showTooltip(){
                    $('#tooltip').load("tooltip_content.html");
                    pos = $('#link1').position();
                    $('#tooltip').show('slow').css({left: pos.left + 10, top: pos.top + 20, position: 'absolute'});
                }
                function hideTooltip(){
                    $('#tooltip').fadeOut('slow');
                }
            });
        </script>
    <link rel="stylesheet" href="tooltip.css" type="text/css"/>
    </head>
    <body>
        <a href="#" id="link1" class="link1">tooltip supported</a>
        <div id="tooltip" class="tooltip">
        </div>
    </body>
</html>

Here is the jquery demo.
Download the source files of both the above examples in .zip.

Tags: , , ,

 
0

and so we danced!

Posted by admin on Aug 6, 2008 in my life, videos

We invited Matt Harding to do a video in our Yahoo! office. watch here:http://ycorpblog.com/2008/08/04/and-now-we-dance/

2116full_prab.jpg

and so we danced! Can you find me in the video? (it’s hard to, but try!)
This video was broadcasted at the end of the all-hands meeting which happened at the peak of 6-months take-over battle with Microsoft. Still bleeding purple, and stronger than ever!

Tags: , , , , , ,

 
0

Imagining the Tenth Dimension

Posted by admin on Jul 6, 2008 in videos

Tags: , ,

 
0

Intelligent Whiteboard

Posted by admin on Jun 30, 2008 in new releases, technology, videos

Bill Gates demonstrates Touch Wall (CEO Summit 2008, Redmond, Wash. May 14, 2008). The reason why it’s impressive is not because of that fancy hardware - touch-screen with some sensors like earlier Microsoft’s Surface technology (which is primarily a hardware gimmick). This demo is much more than hardware!

Look closely at the application he is interacting with! It’s a unified model of the data presentation softwares from Microsoft Office (powerpoint, word, visio, interactive multimedia - all office tools put together working seamlessly in a non-linear way). My guess is, this is running on a giant presentation platform (must be more powerful than silverlight or maybe silverlight’s next gen) - should have been built from scratch, made to be capable of aggregating all kinds of documents working with eachother (visio, ppt, doc, multimedia).

 
0

That’s the question, Mr. President!

Posted by admin on May 21, 2008 in speeches, videos

A beautiful speech by Ted Kennedy about republican’s reluctance in increasing the minimum wage from $5 to $7.50 over 10 yrs. At one point he goes off and asks, “What’s price?… When does the greed end?…” to Senate Republicans as they once again try to block the first minimum wage increase in 10 years.

Today, Ted was diagonized with brain tumor following suffering a seizure two days ago.

 
0

Forcing synchronization

Posted by admin on May 3, 2008 in technology, videos

This simple demo by a student from Lancaster University, stopped me to think.
It’s about forcing synchronization into periodic systems through coupling crossover.

Below is also the excerpt from Christiaan Huygen’s work who first observed this synchronization between loosely coupled pendula (on 1665).

loosely coupled pendula Christiaan Huygen

Tags: ,

 
0

And so it is…

Posted by admin on Mar 14, 2008 in my life

“I remember when I came to my (then) empty apartment to clean it and prepare it for moving in. I was feeling so nervous, … and was hoping that I had not made a big mistake in my choice… I was also experiencing a sense of separation of the support system that I had gained so suddenly, earlier. My angels and my paradise. And all I had with me (other than cleaning supplies) was a radio… and when I switched it on in this place of silence and emptiness… this song was playing. That song touched me then, so deeply. Somehow filling the emptiness with a sense of love and hope. I remember putting my head on the kitchen counter where the radio was, as I was listening, and experiencing a sense of connectedness.”

… for things gone and lost, for others that have not come yet.

This song is by Seu Jorge (I first knew him as an actor in the movie City of god) & Ana Carolina. This is the portugese version of english song Blower’s Daughter (with english lyrics) by Damien Rice based on the movie Closer. If you’ve read this far, here is the raw english translation these words go so much deeper than raw human emotions.

And when you feel it, air is scarce at these times, and lungs don’t cope, breaths are shortened and we wait until that part of us that belongs to them dies.

É isso aí (And So it is)
Lyrics:
É isso aí
Como a gente achou que ia ser
A vida tão simples é boa
Quase sempre
É isso aí
Os passos vão pelas ruas
Ninguém reparou na lua
A vida sempre continua

Eu não sei parar de te olhar
Eu não sei parar de te olhar
Não vou parar de te olhar
Eu não me canso de olhar
Não sei parar
De te olhar

É isso aí
Há quem acredite em milagres
Há quem cometa maldades
Há quem não saiba dizer a verdade

É isso aí
Um vendedor de flores
Ensinar seus filhos a escolher seus amores

Eu não sei parar de te olhar
Eu não sei parar de te olhar
Não vou parar de te olhar
Eu não me canso de olhar
Não vou parar de te olhar

Copyright © 2010 my presence… All rights reserved. Prabhakar Doraisamy.