setInterval scope problem in Object Oriented Javascript

28.12.10
I've gone through a problem while trying to use a setInterval integrated with a object oriented framework I was working on, I will briefly explain the case and solution I applied in case anyone finds it useful.
The problem was while trying to do a trigger animation function in my frame work, the function is supposed to trigger animation or stop animation depending on the parameter passed the function is setAnimation(boolean)
setAnimation(true) starts animation and triggers some action that keeps repeated in some interval (please check setInterval() function somewhere if you are not sure how it works)
The code for the above scenario in object oriented way may be summarised as below.

In this case as setInterval is using an anonymous  function it is able to call obj.changerFunction from inside it. Keep in mind that the following won't work:

15     obj.animationID=setInterval(obj.changerFunction()); 

Also taking the return ID to obj.animationID enables us to stop the animation from from any function in the object.

CBI website hacked - Central Bureau of Investigation by 'Pakisthan Cyber Army'

4.12.10
Central Bureau of Investigation website is found to be cracked by a self proclaimed group called 'Pakisthan Cyber Army'. The group is said to have made a redirection of cbi.gov.in into some other page, nothing much is known as of now. The redirected page says this is a response to many attacks on pakisthas websites by some self proclaimed group called 'Indian Cyber Army'. Anyways this is a chance to understand the existence of security flaws and the importance of making security measures. CBI site is presently taken down it seems.


The message on redirected page reads as follows
Oooopssss! WTF? CBI? Cyber Crime? Hacked? hahaha funny aint it! :P
This attempt is in response to the pakistani websites hacked by ‘Indian Cyber Army’. We told you before too ..we are sleeping but not dead..remember PCA(pakistan cyber army)!..back off kids or we will smoke your d00rs off like we did before..lets see what you investigating agency so called CBI can do for you or for us! haha…one more attempt from your side..we got your every website lying around here like its our local server! buahahaha..so we would like to say to your 31337 hackers and your 31337 NIC team..go and read some more books ..you guys are seriously bunch of script_kiddies! ..you know nothing rite now..got r00t access to NTC server? wtf..mass defacements..how about something like this..a planned attack! haha..btw we got r00t to your NIC too :P ..your filtering sucks..have fun! and DO NOT DISTURB..we got better things to do.. :D ..stop complaining about pakistani websites security..secure your own ass first..thats what intelligent people do!..lol…tata :D
A message by Pakistan Cyber Army
Pakistan Zindabad!

here is a link of more sites hacked by same group http://onlinehacking-news.blogspot.com/2010/11/pakistani-hackers-retaliate-to-2611.html

Here is a list of websites said to be hacked by indian cyber army, i am not sure of the information at this link http://www.zone-h.com/archive/notifier=indiancyberarmy/page=1

How to sit at work :)

30.11.10

Aguirre, Wrath of God

24.11.10

A breathtaking journey into the heart of darkness.

The film is about a Spanish group of  expediters going in search of El dorado, the city of gold.

Dynamic imagemap with javascript/jquery

I had some difficulty in finding a cross browser method for creating image map dynamically, somehow managed to do with following code, I am not sure if a better cross-browser solution exists.

if ($.browser.msie){
map=$('<map name="somename_map"></map>');}
else{
map=document.createElement('map');
$(map).attr({'name':'somename_map'});
}

Later we can catch this element using following code.

How to become fat in a month?

7.10.10
Just found this interesting article on a site. You can try googling 'become fat' to get to this article. I my self is not fat and was trying to become fat without eating much :) So as a habit i auto matically typed 'become fat' in Google with a mind of asking "Alladin's Jin" for a wish. The first result was surprising. Here is the first question from some one.

How to become fat in a month?
Asked by dmiseall On Feb 27, 2008

I am an Indian(Keralite). I have tried to become fat but I couldnt. What should I eat in particular so that I become fat in a short time. I usually dont eat anything in the mornings due to early college hrs. I am mostly hungry in the afternoon and in the evenings. Please help.

I am a 21 year old south indian girl. my height is 154cm and my weight is 40kg. As far as i know i feel hungry in the mornings, afternoons and evenings. I donot have time to eat in the mornings. So please tell me some ways to become fat in a short time. I am really worried and disappointed in this matter. please help

After reading this I was surprised on the fact that local people think alike, but unfortunately there was no way to contact this girl, also the post dated back to 2008 so no way to contact her, there is no quetion like why I should contact her!!

While scrolling and thinking about her I saw this second interesting reply, it really made me laugh for a while.

coolguytvm 1 Reputation
Dear dmiseall,
Sister i am also a person from trivandrum,21 years of age,studying at a college.I too face similar problems.I also have similar specifications like you.As a guy i face challenges in my height also..i am just about 160 cm.Friend let me firstly tell you that this height or weight mostly depends on your parents.That can never be changed easily.I am telling this because i am a non veg and in most of the days i eat chicken(almost all)and drink milk..Yet i am not getting fat.Then these days for more body developement the guys use protein powder and such things.I dont know whether it is good for the body.Well dear friend reply to me if you have any suggesions in increasing fat.Then dear dont be afraid becoz ..as the generation is proceeding the children are getting more taller than their parents and all na..?So this might just be a natural happening.Slim girls are also attractive ..ok?So dont be afraid friend reply..

Cusat dsp question paper combined pdf

28.9.10
This is a combined version pdf of a collection of dsp cusat question papers, please see full post for PDF.


Operations on signals -Time Scaling, Down Sampling, Up Sampling, Decimation

27.9.10
Time Scaling
In the sequence x(n) if we replace n with lambda n or say Kn we get a time scaled version of x(n).
Consider K=2 in x(n) = {-4,-3,-2,-1,0,1,2,3,4}
y(0)=x(2*0)=x(0)=0
y(1)=x(2*1)=x(2)=2
y(2)=x(2*2)=x(4)=4
like that we get y(n)={-4,-2,0,2,4}

This efect can be obtained by reducing the sampling rate while sampling from continuous signal x(t). This process of reducing sampling rate is called downsampling.

The other case up-sampling you can think on your own, up-sampling above x(n) with k=1/2 will produce a signal y(n)={-4,0,-3,0,-2,0,-1,0,0,0,1,0,2,0,3,0,4}

Operations on signals -Time reversal

Time Reversal

The time reversal of a signal x(n) is obtained by folding the sequence about n=0. It is denoted as x(-n).
if x(n)={2,1,2,1} (first one is n=0 if not arrow marked(bold) explicitly)
x(-n)={1,2,1,2}

Now let us see some combination of time reversal and shifting
x(-n-2) is x(n) time reversed and advanced 2 units of time. ie. {1,2,1,2,0,0}
x(-n+2) is x(n) time reversed and delayed 2 units of time. ie {1,2,1,2}

It is good to draw graphical representation of these signals yourselves.

Operations on signals -Shifting

Shifting
The shift operation shifts the input signal by an integer increment of the independent variable.
ie. y(n)=x(n-k) where k is the independent variable.
If k is positive shifting delays the sequence, if k is negative shifting advances the sequence
x(n)={2,1,2,1} bold marked is n=0
x(n-3)={0,0,0,2,1,2,1}
x(n-2)={0,0,2,1,2,1}
x(n+2)={2,1,2,1}

you can draw the graphical representation of these operations to better understand the operation.

Operations on signals

In signals processing we apply a group of operations on input signal to produce an output signal, this is what a discrete time system does. Generally there are the following basic operations that we can apply on a signal, ususally we will need a combination of these basic operations.
The basic operations on discrete time signals are
1.Shifting
2.Time reversal
3.Time scaling
4.Scalar multiplication
5.Signal Multiplier
6.Signal Addition

Some types of signals

We will go through some general concepts before going to operations on signals,
Periodic and aperiodic signals
A signal is periodic if x(n) is periodic if
x(n+N)=x(n) for all n
else signal is aperiodic


Symmertric and antisymmetric signals
Signal is symmetric or even signal if
x(-n)=x(n) for all n
Signal is antisymmetric if
x(-n)=-x(n) for all n

Causal and non-causal signals
x(n) is causal if x(n) is zero or doent exist for values less than zero. In other words for causal sequence x(n) exist for only values of n greater than or equal to zero.
Other wise non-causal ie x(n) exist for negative values of n also.
x(n) is anti-causal if x(n) exist for n>=0 ie. x(n)=0 for n>=0

Rest after sometime i am taking a break buddy.

Energy signals and power signals

Before going to the next topic ie.Properties of discrete time signals we will just skim through the concept of power and energy signals.
Energy of a signal
Energy of a signal x(n) is given by
E= sigma n=-infinity to infinty |x(n)|square
A signal is said to be energy signal if the energy of signal is finite, in that case power of the signal will be zero.

Power of a signal
Power of a signal is given by
limit N tends to infinity 1/2N+1 sigma n=-N to N |x(n)|square
A signal is power signal if power is finite, in that case the energy of signal will be infinity.

Discrete time systems

A system is an inter connection of  components. It is a physical device that performs an operation on an input signal and produces another signal as output.
A discrete time system is one that takes discrete time signal as input and produces a discrete time signal as output. The input is denoted by x(n) and out put signal is denoted by y(n).
The system may be denoted by.
y(n)=T[x(n)] ie. output is a transformation of input.
The transformation can be shifting,scaling,etc or a mixture of these, we will come to these operations on signals later :).

Discrete time signals

The signals that are defined at discrete instants of time are called discrete time signals. The discrete time signals are discrete in time and continuous in amplitude. It is denoted by x(n).

The meaning of discrete in time is that the signal will be defined only in some specific intervals of time, on rest of the time values signal will be undefined. For example consider a continuous signal x(t) ,it will be defined for every value of 't'. To make it discrete time we take only values at a fixed interval T.
ie. x(nT)=x(t)|t=nT
We but simply denote it as x(n) instead of x(nT). where n=...-1,0,1,...

Digital Signal Processing Syllabus Module 1

Introduction to discrete time signals and systems
 Discrete time signals and systems
 properties of discrete time systems
  linearilty
  time invariance
  causality
  stability
  convolution
 difference equation representation of discrete systems
The Z-transform
Properties of Z-transform
Inverse Z-transform
System Function

Organize tabs with tab Candy, new firefox 4 feature to organize your tabs

22.9.10
Firefox 4 comes with the new feature that lets you organize your tabs in an innovative way. Have a look at the new feature video here or download and test it in Firefox 4 Beta release.
:)

An Introduction to Firefox's Tab Candy from Aza Raskin on Vimeo.
You can have a look at aza raskin blog and see his post on this feature at http://www.azarask.in/blog/post/tabcandy/

Firefox sync now a part of firefox starting from Firefox 4

Access your history, passwords, bookmarks and even open tabs across all your devices. Use same account on your devices and the firefox server will synchronize your browser usage across your devices. The earlier add-on for firefox is now a feature in firefox starting from firefox 4, and you can see the preview in firefox 4 beta release.
The design of the firefox beta4 has also evolved into something that looks a hybrid of many competing browsers like opera chrome etc. They have also added a feedback button on the browser itself :)

Etc - Et Cetera

15.9.10
Et cetera is a Latin expression that means "and other things", or "and so forth". It is taken directly from the Latin expression which literally means "and the rest (of such things)" . Et means "and"; cētera means "the rest".

Raphaël—JavaScript Library

Raphaël is a small JavaScript library that should simplify your work with vector graphics on the web. If you want to create your own specific chart or image crop and rotate widget, for example, you can achieve it simply and easily with this library.

Raphaël [ˈrafēəl] uses the SVG W3C Recommendation and VML as a base for creating graphics. This means every graphical object you create is also a DOM object, so you can attach JavaScript event handlers or modify them later. Raphaël’s goal is to provide an adapter that will make drawing vector art compatible cross-browser and easy.

Raphaël currently supports Firefox 3.0+, Safari 3.0+, Chrome 5.0+, Opera 9.5+ and Internet Explorer 6.0+.

Ayisha - Malayalam Kavitha(poem) by Vayalar.

8.9.10
'Ayisha' is an extraordinary Malayalam poem by Vayalar reflecting the social situation that existed during 1950s .But when we go deep into the basic problems contained in the plot, we will understand that the problem is still existent.


The plot start with the narrator admiring the cuteness and innocence of Ayisha. There also happens some conversations between them that makes us understand her innocence and childishness. The narrator has the habit of making her angry and usually ends up in Ayisha crying for silly matters.

After one such incident Ayisha won't come at morning to narrators house to deliver milk, instead her father Andruman comes and tell the narrator that Ayisha got married. Narrator will be shocked as hears the marriage of the kid. It is a fact that such marriages where common at that time in Kerala especially in Muslim communities.

The picture of Innocence and Ayisha slowly fades away from narrators life. He after long time, four years visits town along with his friend. They will see a mob looking at something seriously, they follows them to see the scene of the corpse of newborn torn into pieces by street dogs. Narrator later finds that Ayisha got arrested for killing her new born child.

The rich fellow who married Ayisha leaves her after enjoying her to the maximum. Ayisha will be already pregnant when she joins the street community. Her streets friends tells her to deliver the child as soon as possible so that she can start earning some real money with prostitution.

Ayisha gives birth to her child in street under the shades of the tent she made with her own clothes.As soon as the child is born her friends throws it away to the bushes. She will be helpless and cries silently.

Ayisha will be released from jail later on, and she will be carrying the child of some police man this time. She grows more strong as her society plays games with her, she decides to bring the child and says that the child will take revenge on the society that almost killed Ayisha. The boy will be born and names him 'Raheem'.

'Raheem' groes up as a street singer and sings a song starting with, 'Im the son of my loving mother Ayisha' and people gave them money to avoid his mere presence. Ayisha ran her own whore house as she understood it was the only way she could bring up her child. They went on living this way and they gets accustomed to the life style.

One day some one unexpected visits Ayisha's whore house, her earlier husband who if fully drunken. Ayisha's whole hatred to the society comes up to the brim and overflows and ends up killing him. She again gets arrested and goes to Jail.

'Raheem' grows up in the street silently decalring ' I will live, and will not die whatever condition comes'. He still have his song starting with Ayisha and keeps singing it. One day as he sings the song along with his street friends, one old man comes andasks who is Ayishas child. It will be Andruman who came back from jail after kililng someone in communal hatred. He grabs the child and they together fades away to the streets.


The poets story telling is exellent that we gets the correct feeling at every situation. Also Vayalar has the habit of taking themes from real. The following lines from this poem are especially famous in Kerala and ususally used in 'Kathaprasangam'.



"Vedana vingum samoohathil ninnu njan
verode cheethipparichathanikkatha'

photo:http://www.weblokam.com/literature/profiles/2002/10/vayalar1.htm

Using Viewfield Arguments in Views 2

5.9.10
Think of a situation where you have Place nodes,each node representing a Place.

Now you have company nodes, which represent companies.

In company node you have a Node Reference field referring to 'Place' where company resides.

Now I will explain How you can use viewfield module along with cck + view to automatically list "Companies at this location" on each 'Place' Node with out user entering them.

I am no good at explaining so I can give only a rough idea.

1. In the 'Places' Node Type, create a new field of type viewfield name it "Companies at this location".

2.You can see options to select the view to be used and a field for arguments. Set Argument as "%nid" and view as the view you want to use.(In our case view will be one that filters nodeType=Company).

3.Now in arguments of view(not viewfield) set argumentto content-> name of Node Reference field referring to 'Place' in Company node.

4. current nid of open page is passed by viewfield, the view defined by viewfield grabs this nid and checks with argument set in view definintion.

ie.

SELECT node.nid AS nid,
node.title AS node_title
FROM node node
LEFT JOIN content_type_company node_data_field_place ON node.vid = node_data_field_place.vid
WHERE (node.type in ('company')) AND (node_data_field_place.field_place_nid = 2)



This can be done in reverse way by creating a multiple field for 'companies' in 'Place' nodes. That can be filtered by using views for nodes that can be referenced.

But this is 1:M relation place:companies. I feel it hard to enter data.

I feel it easier to enter place as we create a Company.

Quotes after long time :)

4.9.10
Because of a great love, one is courageous.

Being deeply loved by someone gives you strength, while loving someone deeply gives you courage.

Fill your bowl to the brim and it will spill. Keep sharpening your knife and it will blunt.

From caring comes courage.

If you do not change direction, you may end up where you are heading.

Nature does not hurry, yet everything is accomplished.

Lao Tzu

Eg i.e what? If you still don't know.....

Eg comes from 'exempli gratia'(Latin) meaning 'for the sake of example'.

i.e comes from 'id est'(Latin) meaning 'that is'

Blogger doesn'nt allow me to set birthday as Feb 29 :(

I recently updated my blogger profile to include my website as www.sabithpocker.com. But after I updated I am now not able to save my profile with old birthday Feb 29, at last I ended up saving with Feb 28 :(

Blogger Profile Showing Feb 29 as invalid birthday date :(

Apple iPod nano- Amazing finger print design

3.9.10
As always they stand out in design and usability, thistime I am impressed by the fingerprint design in iPod nano launch page. Here is the image, its copyrighted by apple of-course.

Find amount of mousemove with jQuery, track big or long mouse moves.

1.9.10
I wanted to trigger an action with mouse move, but I didn't want the event to trigger if the mouse move is very small, here is the code I ended up with.

var iniX=0,iniY=0,triggerLength=150;
$(document).mousemove(function(e){
if(iniX==0&&iniY==0){
  iniX=e.pageX;
  iniY=e.pageY;
}
movementlength=Math.sqrt( Math.pow(Math.abs(iniX-e.pageX),2) + Math.pow(Math.abs(iniY-e.pageY),2) );
if(movementlength > triggerLength){
  //code goes here
}
});


Can be done without jquery using

var iniX=0,iniY=0,triggerLength=150;
document.onmousemove = function(e){
if(iniX==0&&iniY==0){
  iniX=e.pageX;
  iniY=e.pageY;
}
movementlength=Math.sqrt( Math.pow(Math.abs(iniX-e.pageX),2) + Math.pow(Math.abs(iniY-e.pageY),2) );
if(movementlength > triggerLength){
  //code goes here
}
}

Cross Domain Communication. How to byepass XSS browser blocks?

31.8.10
Just read an interesting article on Cross Domain Communication between iframe windows belonging to different domains.

Cross-Domain Communication with IFrames

Blogger Recent Posts using jQuery Ajax and atom feed

I just tried to parse the rss feed using jquery and ajax, but had some parse error doing so, but anyway I did the job using atom feed instead of rss2. Here is the javascript  code I used to inject the code  into My site.

Oggling women? Interesting article, after all men are innocent !!

30.8.10

You're at a café with the woman in your life when your eyes move inexorably toward another woman walking by.

In one-fifth of a second, before the conscious mind has had a chance to react, the male brain has rendered judgment on whether the oncoming stranger is sexually hot.

If the ruling is favorable, physical manifestations are immediate.

Learning Advanced Javascript

Learning Advanced Javascript

This tutorial contains code and discussion from the upcoming book Secrets of the JavaScript Ninja by John Resig.

Wild Animals Photostream : Ucumari

28.8.10
pCheck Out the whole Ucumari Photo-stream on flickr here.

Drinking Water?

This is an award-winning painting by Abdul Saleem. What grabbed my attention while viewing his album on flickr was a comment by a foreigner.

"Sadly, I realize that I know so little of the world. I had to look up Kerala and where in the world it is. Incredible history and current state "The state has a 91 percent literacy rate,[1] the highest in India. A survey conducted in 2005 by Transparency International ranked Kerala as the least corrupt state in the country." Curious, with 120–140 rainy days per year was this during a drought? Congrats on the award/"
(This image is copyrighted by the artist)

10 mistakes on inception.

Almost all the mistakes in Inception and other films can be found at goofs section in imdb(internet movie database) IMDB.

Follow this link to read the mistakes in Inception at imdb -> http://www.imdb.com/title/tt1375666/goofs

And here is the 10 in facebook

1. When the cab gets hit the first time the front grille with the Hyundai logo gets smashed in and disappears. In the second scene the grille reappears and the car has less damage than the scene before. And in the warehouse scene the grille disappears one final time.

2. In the scene with the falling van you see Arthur asleep without the headphones originally placed on his head. Before the van falls in the water they show Arthur again wearing the headphones.

3. In the scene where Yusuf is introduced, a gray cat is seen investigating a large jar behind him. In subsequent shots the cat both disappears and reappears.

4. One car explosion shown twice. First is the shot of the car exploding in a fireball, filling the frame. Minutes later the same car is shown exploding in the same fireball, but as part of a bigger shot from further away, in the bottom half of the frame.

5. Once Saito has been shot during the first level of Robert Fischer JR’s dream, he is placed on a surface whilst Cobb talks to him, Saito has a gape in his shirt which reveals the sticky tape and part of his blood pack on his chest, for his bullet wound.

6. When the white van leaves the warehouse, the door is so narrow that the right mirror on the passenger side of the van hits the door and is pushed back. In the next scene, it is out again.

7. When the helicopter lands after picking up Cobb and Arthur, it is still in Japan. The backdrop where Saito tempts Cobb though, is the Terminal Building at Farnborough Airfield, England, UK.

8. The immigration form Cobb is given in the plane towards the end of the movie is the white I-94 form given to those coming to the US on a visa. US citizens need only fill out a smaller blue customs declaration form.

9. When Cobb and Robert are in the hotel bathroom (2nd level) Cobb kills two men. The very next scene that shows Cobb and Robert in the bathroom the dead men’s bodies have disappeared.

10. When Fischer’s cab is being hijacked, numerous production markings are visible on the street.


This is a response to  DID YOU SEE THE 10 STUPID MISTAKES ON INCEPTION?

Back from the klondike - Puzzle by Sam Lyod

21.8.10

Start from that heart in the center and go three steps in a straight line in any one of the eight directions, north, south, east or west, or on the bias, as the ladies say, northeast, northwest, southeast or southwest. When you have gone three steps in a straight line, you will reach a square with a number on it, which indicates the second day's journey, as many steps as it tells, in a straight line in any of the eight directions. From this new point when reached, march on again according to the number indicated, and continue on, following the requirements of the numbers reached, until you come upon a square with a number which will carry you just one step beyond the border, when you are supposed to be out of the woods and can holler all you want, as you will have solved the puzzle.

Here is a collection of other puzzles from him http://www.samloyd.com/

Gestat Psychology

Are our brains hunting down shapes?Check if your brains are looking for hidden forms and shapes from these pics.
Interested in the way brain perceives signals? http://en.wikipedia.org/wiki/Gestalt_psychology

Design?

Design plays a primary role in the interpretation of a message. It creates a crucial, lasting impression. It encourages examination and generates interest. Accessible, understandable information and beauty of form can engage observers and arrest their attention.

A confusing, poorly designed message will miss its target almost every time. In a world where data bits flow abundantly, our minds have developed filters to sift through the overflow of useless and badly designed information. While design must appeal to our sense of aesthetic, it must not stand in the way of delivery, cause complications, or introduce stumbling blocks. Rather, the presence of design should simplify and facilitate our everyday life, enable us to accomplish our tasks more effectively, and help us enjoy them along the way.

Dogulas Bowman
http://stopdesign.com/

3-Iron Korean film by Kim Ki-duk

9.8.10
Some films makes us think after its over, some film makes us emotional at the end, some films makes us laugh a lot and forget it after watching. 3-Iron is a different experience.

Match Stick Cube

7.8.10

Lets play....

30.7.10

"We're finding that the younger people coming into the teams who have had experience playing online games are the highest-level performers because they are constantly motivated to seek out the next challenge and grab on to performance metrics."

    John Hagel III, co-chair of a tech-oriented strategy center at consulting firm Deloitte that's been studying how playing videogames can affect the performance of young professionals in the workplace. (Forbes)

Friendship day 2010 | August 1 | Friendship day SMS from Famous Quotes

"Thy friendship oft has made my heart to ache: do be my enemy for friendship's sake."
- William Blake, sent in by Lauren

"Tell me what company thou keepst, and I'll tell thee what thou art."
- Miguel de Cervantes (1547 - 1616) Spanish novelist.

"Have no friends not equal to yourself."
- Confucious (551 - 497 BC) Chinese philosopher.

"Fate chooses your relations, you choose your friends."
- Jacques Delille (1738 - 1813) French poet.

Javascript Page loading message with jquery / javascript for web pages.

27.7.10
Avoid broken site being shown to users while site is loading. Show a loading message while images, backgrounds etc are loading and show the site when everything is ready to be displayed.

This can be done in easy steps
First we have to inject some loading html into page using javscript. This has to be done just after title tag

<title>Smart Page</title>

<script type="text/javascript">

document.write('<div id="loading"><p>Hi,welcome to Smart Page.Please wait while contents are <b>LOADING</b>...</p></div><style type="text/css">#wrapper960{visibility:hidden}#loading{margin:100px auto;width:480px;border:5px solid #777;padding:20px;text-align:left;}</style>');

</script>


Now the page shows loading div only and hides wrapper960, which should be name of the div that contains whole site. Once page and graphics are loaded we can hide loading and show the page again, this can be done using script


<script type="text/javascript">

$(window).load(function() {

$('#loading').fadeOut(500);

$('#wrapper960').hide();

        $('#wrapper960').css('visibility','visible');

$('#wrapper960').fadeIn(2000);

});

</script>


This example uses jQuery so you have to include jQuery using

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js">script>



You can see a demo at www.sabithpocker.com there i have done a bit more by counting and monitoring the loading of images and css files. Its like a debug console there, but you can make meaningful loading message by just showing logo and short description, just don't make it too large.

Veruthe oru poem

6.7.10
this country ain't nothin but a company's dream
a couple hundred million workers that's all that they see
our hands on our tools, money writing the rules
from the sweatshop prisons to the cops in the schools
got the middle class livin like it's gonna last
workin longer, harder hours for less & less cash
got the media spins, republi-crat twins
got the war profiteering for good executive friends
got the heroin runnin through the veins of the poor
got the ghettos locked down paying blood for the war
got the city's decay, the dealers to pay..
and the death squads working for the cia

you got a million new jobs inside a thousand new jails
outsourcing the unions, profit dipin in the scales
you got a brainwashed youth, a trumped up truth
and snipers aiming rifles on the factory roof
you got a 30 min speech full of ooo's and ahh's
got the cops armed tough out there breakin the laws
you got the front row seat to your own defeat
you got the tear gas canisters fillin the street

you got the laws all written for the rich and the white
trick the rest of those fools into the army to fight
in a dead end game, each war the same
you got a land and a people and a market to claim
you got a woman beaten down everywhere that you look
in the courts, in the jails, in the schools and the books
got the the tv set, sexisms on it
you got a country full of men taught to fall for that shit
yeah and i do too, i'm not blaming you
but i'm trying to unlearn what they said was true
yeah and i need help, i'm not afraid to say it
it's a subliminal tool sometimes it's hard to see it..

you got a job in an office, you got your own room
got the pen and the paper and a drive to consume
got the suit pressed in, got to insist you win
and the raise to replace true ambition
you're gonna move up the ladder at the company's speed
gotta learn to dance quick for the company's greed
gotta justify every step that you can
with your eyes closed tight and your head in the sand
you gotta fight the desire to fight the police
you gotta fight your heart and your every belief
you gotta trust the leader, whatever he says
with the flag held high, yeah.. you're already dead
you already gave up if you took their advice
if you played their game, you payed their price
you're gone gone gone, yeah there's no comin back
unless you realize your potential, raise your fist and react

if we look to each other and to ourselves
& ignore the phoney remedies they stock on the shelves
we can undermind the greed on which the system depends
in hopes to build a new world based on lovers & friends
we gotta build at the bottom what we want at the top
we gotta work together if we want this to stop
from the thick grass roots to the top of the tree
i aim for peace and justice and anarchy
i want peace and justice an anarchy

Ginou Choueiri

Coprophagia

Coprophagia is the consumption of feces, from the Greek κόπρος copros ("feces") and φαγεῖν phagein ("to eat"). Many animal species practice coprophagia as a matter of course; other species do not normally consume feces but may do so under unusual conditions. Coprophagy refers to many kind of feces eating including eating feces of other species (heterospecifics), other individuals (allocoprophagy), or its own (autocoprophagy), those once deposited or taken directly from the anus


PS: Googling unknown words can give you surprises.

Artist?

3.7.10

David Berkowitz - Son of Sam - .44 Caliber Killer

25.6.10
This guy is a serial killer from america who is considered as one of the most dangerous criminals ever seen. But after reading about the guys childhood and some letters written by him, i see a mentally disturbed fellow rather than a criminal. Just think of what the fellow claim is the reason for some killings "Berkowitz said that the "Sam" mentioned in the first letter was Sam Carr, his former neighbor. Berkowitz claimed that Carr's black labrador retriever, Harvey, was possessed by an ancient demon, and that it issued irresistible commands that Berkowitz must kill people. Berkowitz said he once tried to kill the dog, but was unsuccessful due to supernatural interference."

Also these two letters by the fellow is interesting too

I am deeply hurt by your calling me a wemon [sic] hater! I am not. But I am a monster. I am the "Son of Sam." I am a little brat. When father Sam gets drunk he gets mean. He beats his family. Sometimes he ties me up to the back of the house. Other times he locks me in the garage. Sam loves to drink blood. "Go out and kill," commands father Sam.

hreflang - Say what language the linked document is in.

24.6.10
You have an English HTML document with link,
<a href="http://www.blogger.com/foo.html">foo</a>
..where foo.html is a french document. To make the browser understand that linked document is french you can use the attribute 'hreflang'. So the html will be

<a href="http://www.blogger.com/foo.html" hreflang="fr">foo</a>


Why use this attribute? w3c says like this

"Armed with this additional knowledge, user agents should be able to avoid presenting "garbage" to the user. Instead, they may either locate resources necessary for the correct presentation of the document or, if they cannot locate the resources, they should at least warn the user that the document will be unreadable and explain the cause."

Maradona and Messi in a local malayalam film poster

23.6.10
The dialouge says " Me and my players are strong, Double strong......never mess with us...."
The film name is "Pokkiriraja" somewhat translated to "Gangster King"

Install windows xp on modern laptops ported with windows 7 or windows vista

17.6.10
I just got one Acer aspire 5740 pre installed with windows 7. My job was to install windows xp and remove windows 7, simple task ..but took some time to fix it :P the problem was simple direct booting from cd ended up in a blue screen. And when i try to install from windows 7 it just blocked all 'downgrading' of windows. Alas at last i found the problem after skimming through a lot of forums, actually new laptops have SATA hard drive in AHCP mode which is not supported by Windows Xp installation CD. Luckily the SATA drives have made their provisions for backward compatibility. So i just got into the boot menu and chaged SATA mode to ATA instead of AHCP. Now XP works fine, but now i want to find some drivers for Aspire 5740 for XP, they provide only drivers for Windows 7. :(

Robot presiding over marriage in Japan

10.6.10

Street art crossing imagination.....

Original art at deviant art : link

Firefox 4 is on the way | Early Screenshots looks great

19.5.10
Firefox lovers......Check this blog post by Erica on the upcoming Firefox 4.
http://blog.mozilla.com/blog/2010/05/10/firefox-4-vision-fast-powerful-and-empowering/
mashable got some early screenshots of Firefox 4 here
http://mashable.com/2009/07/27/firefox-40/

Cross Browser CSS Gradient

This article by webdesignerwall looks great. Also don't forget to check their CSS gradient menu which is just CSS.
http://www.webdesignerwall.com/tutorials/cross-browser-css-gradient/

Cherai Beach : Boredom Fortress

16.4.10

Time magazine's Quote on Sachin


When Sachin Tendulkar travelled to Pakistan to face one

of the finest bowling attacks ever assembled in cricket,

Michael Schumacher was yet to race a F1 car,

Lance Armstrong had never been to the Tour de France,

Diego Maradona was still the captain of a world champion

Argentina team, Pete Sampras had never won a Grand Slam.

When Tendulkar embarked on a glorious career taming

Imran and company, Roger Federer was a name unheard of;

Lionel Messi was in his nappies, Usain Bolt was an unknown

kid in the Jamaican backwaters. The Berlin Wall was still intact,

USSR was one big, big country, Dr Manmohan Singh was yet to

"open" the Nehruvian economy.

It seems while Time was having his toll on every individual on

the face of this planet, he excused one man. Time stands frozen

in front of Sachin Tendulkar.



We have had champions, we have had legends, but we have never

had another Sachin Tendulkar and we never will.

HTML 5 Video Embed

10.4.10
See how simple it is to embed video with HTML 5, Read on to see the customization options available as attributes of video elements. You can also put the old flash/java code inside video element so that old browsers will display video using flash/java.
<video src="http://v2v.cc/~j/theora_testsuite/320x240.ogg" controls> 
  Your browser does not support the <code>video> element.

</video>

Cufon Font Replacement

9.4.10
I was always looking for an efficient way to use custom fonts in websites, with normal functionality as text. Flash replacement came as a good option but i never felt it good to depend on flash for font replacement. Lately i saw this wonderful library Cufon which uses canvas and VML for the replacement using javascript. Thanks to sorccu
and his http://cufon.shoqolate.com.

.Less automating style sheets - A ruby parser for leaner css

4.3.10
CSS or cascading style sheets are basically developed as a format or style specifier. It helps to specify the`lok and feel of elements in  HTML documents. One insufficiency in CSS is the lack of programming language constructs like Nesting, Looping, Variables etc that could have made development easier. Obviously CSS working Group is aimed at developing CSS as it is now and they have no reason to worry about these. HTML also have the same problems which invoked the necessity to use scripting languages like PHP, RUBY, PERL etc.
LESS is a RUBY based parser developed by Alexis Sellier supporting the use of variables, mixins, nesting etc while keeping the basic CSS syntax intact. Such styles are stored in .less files and can be parsed to CSS on the fly or you can manually parse and use the generated CSS file. LESS also minifies the CSS which makes page loading faster.
You can get it from their web-site  LESS - Leaner CSS

Operation Aurora - Attacking the giants

3.3.10
When will the internet become secure? once i ask this question most of my colleagues often respond by asking , 'Dude, but is there a problem with security now?'. If the windows users still have doubts on where their security lies they can have a look at this article explaining 'Operation aurora' a successful attack against Google by the Chinese crackers. Read the article here
While attacks are happening at Intel Google and similar software giants, how can you say you are secure? What you think if someone can access your G mail data intentionally and pinpointing your account from millions?
See this sentence quoted from itmanagement.earthweb.com
"Kurtz said the intruders, which Google and independent researchers said were based in China, gained access to Google's Gmail and other networks by sending a tailored attack to one or a few targeted individuals."

PS: As long as you are not worried about what the government is doing to your nation, you don't need to worry about internet security.
Ref:
Intel Confirms Details of Cyber Attack - InternetNews.com
McAfee: Explorer Flaw Led to Attacks on Google — Datamation.com
Advanced Persistent Threat

A Brighter Summer Day - Taiwaneese Movie

A fantastic realistic film by Edward Yang. He is one of the best Chinese film makers who changed to film making after starting his career as an computer engineer. The movie is around 4 hours. I never felt it boring, may be because I am watching long movies for a while. Also after watching many long movies i feel that actually movies should be around 4 hours 2:30 hours is not enough to make ourselves a part of the story. After watching the 'long' movies i always feel myself a part of the story or as i am actually walking, eating and sleeping with them. Das boot is an fantastic example for this.
 The film starts with a quote
"Millions of Mainland Chinese fled to Taiwan with the National Government after its civil war defeat by the Chinese Communists in 1949. Their children were brought up in an uneasy atmosphere created by the parents' own uncertainty about the future. Many formed street gangs to search for identity and to strengthen their sense of security."
The quote helps to get the exact background where the story is happening. The story is centered on a teenager and his family. How his life moves on in a uneasy political situation including being compelled for night classes. The story later narrates the changes in his character in a good way.
The film has many other interesting facts like the teenager boy and his father are actually father and son in real life also. Also there is an unusual excess of actors in the movie, once you finish the movie its like you are back after a long journey. You wont remember everything that happened on the way, and also you won't remember all the faces you encountered.

PS: The girl is pretty and cute too..

Gespenster by Christian Petzold | German Movie

22.2.10
One of those movies in which we, the audience have got a big part in filling in the blanks. The film narrates a story with some abnormal characters in limelight. The film can possibly evoke different feelings in viewers. The story of an orphan girl who is trying to get some place somewhere.
Spoiler alert:
But in general the story is about an orphan, Nina. She meets Toni, another possibly orphan girl who have made theft a part of her daily life, an experienced shoplifter. Nina who feels attracted to Toni joins her in her pursuits.
Francoise is another lady who is under mental depression after she lost her baby, Marie. She mistakes Nina for Marie. At that moment Nina is confused whether to support Francoise or Toni. Toni however tries to ignore Francoise, calling her 'Crazy'. Later Toni betrays Nina.
Nina finds Francoise in a street and she suggests that she is Marie herself. Francoise agrees and takes Nina to her Apartment.
Pierre makes it clear to Nina that Marie is actually dead while Nina desperately tries to make him convince that she is Marie.Francoise leaves with her husband Pierre. Nina is again left orphan.

List of best Javascript Libraries for Web Developers.

20.2.10

This is a good list of JavaScript libraries that will be useful for web developers. The main use of this directory is that you need not stick on to a single framework always. You can decide on which one will suit the most for your project. If you are using JavaScript for lot many things a full framework is useful, else you can better do with a specialized framework.

Archive of Google Holiday Logos

15.2.10
All of us have seen the Holiday logos Google puts on its main site occasionally. Here is an archive of such Holiday and Fan Logos Google have used in the past. Google Holiday Logos

Actually there are 29 Buddhas, not just Gautama.

Its nice to know that there are 28 more Buddhas. Here is a list of all 29 Buddhas at Wikipedia. List of the 28 Buddhas. Our "Narada Muni" is also in the list.
PS: Wikipedia Page heading is "list of 28 Buddhas". But they have listed 29!! Yet another mystery to solve??

Basho's Old Pond Haiku

古池や 蛙飛込む 水の音


"old pond . . .a frog leaps in water’s sound"

:)
 

A Backward Glance O’er Travel’d Roads - Whitman

"I round and finish little, if anything;
and could not, consistently with my scheme.
The reader will always have his or her part to do,
just as much as I have had mine. I seek less to state
or display any theme or thought, and more to bring
you, reader, into the atmosphere of the theme or
thought — there to pursue your own flight."

Blogger Buzz: Create Pages in Blogger

7.2.10
Blogger Buzz: Create Pages in Blogger
Now you can create some custom pages in Google blogger. Hope to see some 'About' pages and Galleries along with many blogs.

Hide dotted lines around links on focus or active

6.2.10
First thing you should be aware of is that, it is never recommended to remove outline on active or focused links. The reason is that it will decrease accessibility which in fact is a big thing.

Let people who prefer keyboards, or having no mouse not blame you for reducing default accessibility settings. But if you are aware of what you are doing here is how.

JQuery Prototype window / DOM Window / Pop-up window

5.2.10

If you just need a pop-up and not an exact windows/mac-like window.

Need to integrate those DOM windows that pop out over a translucent black layer over your web page? Here is a nice and good j-query plug-in by 'swip' . The plug-ins are also highly customizable. You can control the size position,border etc of the window, you can add your close button if you like, you can change the opacity of black overlay layer. Here is a snap shot of how it looks.

Das Boot (1981) - Wolfgang Petersen

3.1.10
An excellent West German (at that time) film portraying the life of a captain and his crew inside their U-boat during WWII.