Friday, January 30, 2009

Tshirt design competition at talentica



designed tshirt for team with swati. I think it was not the best but I say, was good try..

Monday, January 19, 2009

mysql - copying data to other db using sqlyog

Sqlyog is pretty good client to access mysql and doing various operation on MySQL. I wanted to make copy of full DB for backup purpose. I took dump using sqlyog (structure+ data). then I was going to create new DB by running this script but noticed
functionality of copying db to other DB in sqlyog. I thought that would be safe. but it turned out that it was taking lots of time. so I suggest its better to copy data using taking dump of db and run those script to create fresh db. wat do you think?

Tuesday, January 13, 2009

Google Chart api issues

While working out graphs with Google chart api, We couldnt find ways render some of things properly, we used workaround in some cases.

1) Legends positioning
We couldnt find a parameter using which we can specify distance between legend and x-axis.



workarounds we used:
rendering legends using html


2) Legends ordering

Google is not rendering the legends as per order we give in url. looks like it orders
them alphabetically.



workaround we used:
rendering legends using html

3) Labeling issues
2 issues here
a) when bar is of full lenth, label overlaps bar
b) how to specify space between label and bar.




No workaround

4) length of Y axis
y-axis in not inheriting length of graph.



workaround we used:
use different margins as per number of bars. chbh=25,10,30
using 300 instead of 30 works.

Sunday, January 11, 2009

Configuring virtual host on windows in Apache 2

I am running two different apps on my localhost. one is in python and other in php.
I also want to learn how to configure virtual host so that 2 different domain names can point to same ip. it turned out to be quite simple. at first it was not working
because I was writing extra slash at end of documentroot, instead of "C:\work\SandipProject1\trunk\Website", I was "C:\work\SandipProject1\trunk\Website\" and getting permission denied.


in your httpd conf,

#
# Use name-based virtual hosting.
#
NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot C:\work\SandipProject1
ServerName sandipProject1.com
</VirtualHost>


<VirtualHost *:80>
DocumentRoot C:\work\sandipProject2
ServerName sandipProject2.com
</VirtualHost>

<Directory C:\work\SandipProject1\>
Order Deny,Allow
Allow from all
SetHandler mod_python
PythonHandler index
OPTIONS -Indexes
</Directory>

<Directory C:\work\sandipProject2\>
Order Deny,Allow
Allow from all
DirectoryIndex index.php
</Directory>

Tuesday, January 06, 2009

New year change

changed punch line of my blog which I wrote on last new year. which was
Journey
till I cease the walk of life.

Monday, January 05, 2009

excellent and simlpe way to format html email

and it works beautifully across ms outlook, outlook express and gmail.

actually I was having problem in formatting email correct way. original code used inline css styles which was not working, so I changed styles but didnt work so I changed content-transfer-encoding from quoted-printable to 7bit and as always in programmers life, this hack worked for my outlook express. but failed to work on gmail. so on the way to give up, i found following page and tried the way they have asked to format email and it worked!!! woohoo..

see examples inside it

http://www.w3.org/TR/1998/NOTE-HTMLThreading-0105#Appendix%20B


one example for reference

From: Yogi Beera
To: Boo Booz
Message-ID: FD1D3K3KASDDFD17C00805FD459C86BB2BF@POPDOG
Subject: Joke
MIME-Version: 1.0
Content-Type: text/html;

<HTML>
<HEAD>
<STYLE TYPE="text/css">
<!--
.yogi--picnic-com {
color: black;
font-weight: bold;
font-style: normal;
text-decoration: none;
}
-->
</STYLE>
</head>
<BODY bgcolor="#FFFFFF">
<P CLASS=yogi--picnic-com>Konck Knock</p>
</body>
</html>

enjoy!!

jquery tooltip bug - IE7 bigger fonts - hack

if you are using jquery tooltip plugin to show pop up. you will notice that on IE7, its showing much bigger font size. reason for this internally its using h3 tag which is not changed if you set font-size of overall div on IE7. so you need to explicitly overwrite the h3 style and set the smaller font-size, it works beautifully for both firefox and ie7.
actually this solution is given on following page but its at bottom. one might miss this so trying to give it more focus through my blog.

http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/
by
Monkeytail
31. January 2008 |23:37 @ Jorn

following is the code.

#tooltip {
font-size:10px;
}

add this in your css
#tooltip.pretty h3 {
font-size:8pt;
}

btw above mentioned code didnt worked for me. i took out pretty and it worked well.

#tooltip h3 {
font-size:8pt;
}

I added font-weight:normal to make it look better. so it becomes

#tooltip h3 {
font-size:8pt;
font-weight:normal;
}

Thanks