RSS Feed

PHP frameworks (SugarCRM, Silverstripe) – session installation error

Apr 09 2011

During installation of these frameworks apache crashes and an error like below is shown in error.log.
Continue Reading »

No responses yet

Jquery : toggle dialog box

Mar 08 2011

Two ways to make the jquery dialog box toggle on click. One i found while googling and another i used jquery api make it work.
Continue Reading »

One response so far

Javascript – Key events with libraries

Feb 24 2011

Key press event is very useful in javascript. it is sometimes required to identify the key press. This can be done by getting the keycode of the key pressed.

To get the key code we use onkeyup, onkeydown and onkeypress events of javascript. These events can be bind to listen all the key events on certain elements or the document itself.
Continue Reading »

No responses yet

Javascript title case

Jan 18 2011

A little script to change the case of text to Title Case.
Continue Reading »

One response so far

Jquery – Wildcard selectors – complete

Dec 24 2010

While working to find out way to select the elements i though about wildcard selection. There can be a traditional way with running loops but is not very effective and do not work in all conditions. I have found some wild card selections on the official jquery site. These have helped me out a lot.

The selectors are as below

[name^="value"]  // attribute value having common prefix (prefix match)
[name$="value"]  // attribute value having common suffix (suffix match)
[name*="value"]  // attribute value contains the string (find)
[attribute~="value"] // attribute value contains the string as a word (find word, single or space delimited)
[name|="value"] // attribute value contains prefix followed by a hyphen (-).
("*") // select everything!! i mean EVERYTHING.

Continue Reading »

One response so far

Java – printStackTrace to String

Dec 07 2010

A very common thing we encounter while exception handeling is to write the output of printStackTrace() to a string. It can easily be redirected through a stream to a StringWriter and inturn to a String.
Continue Reading »

No responses yet

WordPress get image src

Nov 16 2010

While creating wordpress blog i was in a situation to find the src of an image element. I googled for it and found these three solutions. All of them did work for me.
Continue Reading »

One response so far

Stellent – idoc script- replace newline character.

Nov 16 2010

There was a requirement to remove the new line character from the contribution data. I tried everything but was not able to find a proper solution. Google, idoc script document, i tried all of them but no help. Finally i was able to find the solution myself using regular expression.
Continue Reading »

No responses yet

mod_jk is not redirecting pages correctly without www.

Oct 25 2010

We had a strange problem recently where the pages with www working properly and not behaving correctly without www. The setup contains VirtualHost entries for various domains. Each domain has corresponding java application hosted at tomcat6.0. Each virtual host entry has server alias defined as
Continue Reading »

No responses yet

Shell script to switch between different configurations.

Oct 20 2010

A small shell script to switch between configurations quickly. Here you can run the script and change the desired configuration on the fly. In the example below we are switching between the Listen port from 80 and 808. For this we need the httpd.conf file and for the first time we also need to create entries for both the ports manually.
Continue Reading »

No responses yet

« Newer posts Older posts »