Ankh hai bhari bhari – Tum se acha kaun hai – Translation

(Aankh hai bhari bhari aur tum

My eyes are filled, and you

Muskuraane ki baat karte ho) – 2

Are speaking of smiling

Zindagi khafa khafa aur tum

Life is angry, and you

Dil lagaane ki baat karte ho

Are speaking of falling in love

Aankh hai bhari bhari aur tum

My eyes are filled, and you

Muskuraane ki baat karte ho

Are speaking of smiling

(Mere haalaat aise hai

My condition is such

Ke main kuch kar nahin sakti) – 2

That I cannot do anything

Tadapta hai yeh dil lekin

This heart is suffering, but

Main aahein bhar nahin sakti

I cannot take sighs

Zakhm hai hara hara aur tum

Wounds are opening up, and you

Chot khaane ki baat karte ho

Are speaking of taking abuse

Zindagi khafa khafa aur tum

Life is angry, and you

Dil lagaane ki baat karte ho

Are speaking of falling in love

Aankh hai bhari bhari aur tum

My eyes are filled, and you

Muskuraane ki baat karte ho

Are speaking of smiling

(Zamaane mein bhala kaise

In the world, after all

Mohabbat log karte hain) – 2

How do people love?

Vafa ke naam ki ab to

Of the name of commitment now

Shikaayat log karte hain

People are making complaints

Aag hai bujhi bujhi aur tum

Fire has extinguished, and you

Lau jalaane ki baat karte ho

Are speaking of lighting a candle flame

Zindagi khafa khafa aur tum

Life is angry, and you

Dil lagaane ki baat karte ho

Are speaking of falling in love

Aankh hai bhari bhari aur tum

My eyes are filled, and you

Muskuraane ki baat karte ho

Are speaking of smiling

(Kabhi jo khwaab dekha to

Whenever I saw dreams

Mili parchhaaiyaan mujhko) – 2

I got mirages

Mujhe mehfil ki khwaahish thi

I had the desire for a crowd

Mili tanhaaiyaan mujhko

I got loneliness

Har taraf dhuaan dhuaan aur tum

In every direction there’s smoke, and you

Aashiyaane ki baat karte ho

Are speaking of homes

Zindagi khafa khafa aur tum

Life is angry, and you

Dil lagaane ki baat karte ho

Are speaking of falling in love

Aankh hai bhari bhari aur tum

My eyes are filled, and you

Muskuraane ki baat karte ho

Are speaking of smiling

Meri kahani bhoolne vali – Deedar – Translation

Meri Kahani Bhoolne Wale

Here is the song ‘Meri Kahani Bhoolne Wale’ from movie ‘Deedar’.

Meri Kahani Bhoolne Wale

the one forgot my story

Tera Jahan Aabaad Rahe

let ur world stay in happiness

Meri Kahani…

my story…

Mere Geet Sune Duniyane Magar,

my song’s been heard by this world but

Mera Dard Koyi Na Jaan Saka, Na Jaan Saka,

my pain could not be understood by anyone, could not understand

Ek Tera Sahaara Tha Dil Ko, Ek Tera Sahaara Tha,

ur support was always there for my heart, ur suppot

Tu Bhi Na Mujeh Pehechan Saka,

even u could not recognise me

Bachpan Ke Voh Geet Puraane,

the songs of childhood

Aaj Tujeh Na Yaad Rahe,

today u dont even remember

Meri Kahani..

my story

Mein Apna Fasana Kehna Saka,

i could not tell my sad tale

Mere Dil Ki Tamanna Dil Mein Rahi, Lo Aaj Kinare Par,

my desires were left in my heart, and today in the banks

seashore

Lo Aaj Kinare Par Aake, Armaanon Ki Kashti Doob Gayi,

today after reaching the seashore, the ship of expectations hve sunk

Armaanon Ki Kashti Doob Gayi,

the ship of expectations sunk

Kismat Ko Manzur Yahi Tha, Lab Pe Mere Fariyaad Rahe,

this was my destination, in my lips complains stay

Meri Kahani…

my story

Meri Kahani Bhoolne Wale
Tera Jahan Aabaad Rahe
Meri Kahani…

Configuring log4net

Tried Enterprise Library Logging Application Block but i’ll have to say that log4net is easier and faster to use. So here’s how to configure it. With the log4net.dll in your bin, you will need to open your web.config file and add the following line to your configSections node:

<section name=”log4net” type=”log4net.Config.Log4NetConfigurationSectionHandler, log4net” />

The after the </configSections> or anywhere else within <configuration>,

<log4net configSource=”Config\log4net.config” />

Note: I store my log4net configuration as a separate xml file in a Config folder!

Your log4net.config file should look like this:


<!-- Logging related config options below this point -->
<log4net>
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
<file type="log4net.Util.PatternString" value="%property{logpath}"/>
<param name="Threshold" value="DEBUG"/>
<appendToFile value="true"/>
<rollingStyle value="Size"/>
<maxSizeRollBackups value="10"/>
<maximumFileSize value="10MB"/>
<staticLogFileName value="true"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline"/>
</layout>
</appender>

<root>
<appender-ref ref="RollingFileAppender"/>
</root>
</log4net>

Note 2 : I use only rolling file appender.

In my global.asax, i have this:


private static log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

static MyApplication()
{
log4net.GlobalContext.Properties["logpath"] = AppDomain.CurrentDomain.BaseDirectory + "Log\\Log.txt.not"; ;
log4net.Config.XmlConfigurator.Configure();
}

And in the classes i want to use log4net, i have:

private static log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

protected void Page_Load(object sender, EventArgs e)
{
log.Debug("I am logging, yeh!");
}

What to do is log4net is not logging

Add the following key to your web.config or app.config file under appSettings:

<add key=”log4net.Internal.Debug” value=”true”/>

This will log debug messages to the Console Window and you can see what the problem is.

Notes

1. The log4net dll needs to have Copy Local to true so that it always gets put in the bin

2. The directory where the log is to be created needs to have write permissions. So check the app pool has the right access rights. IIS Express runs under the logged in user account, so this shouldn’t be a problem.

3. In global.asax file, there needs to be a call to log4net.Config.XmlConfigurator.Configure(); otherwise log4net won’t be configured properly. If this call is put in the AssemblyInfo.cs instead, this may not work for class libraries (app.config instead of web.config)

Turning identity off for a column in SQL Server

I’m currently moving my MySql database to SQL Server and for that reason i need to preserve the identity columns which i already have in the tables. Here’s how it’s done:

SET IDENTITY_INSERT tablename ON
SET IDENTITY_INSERT tablename OFF

So to insert the row ID=12, Name=Alfred, Age=23 in tblUsers, i would use the syntax below:

SET IDENTITY_INSERT tablename ON
INSERT INTO tblUsers (ID, Name, Age) VALUES (12, ‘Alfred’, 23)
SET IDENTITY_INSERT tablename OFF

You will need to turn the identity insert off so that SQL Server automatically generates the unique id for you afterwards.

Calculating x and y coordinates of an element in JavaScript

I was trying to get the Swazz calendar to work on Firefox but it would get displayed at the top on the webpage instead of showing up just under the textbox element which required the calendar values. So while debugging it i noticed that i had the the Transitional DocType on and it was messing around with it. I googled the problem and found that the solution was to ‘px’ to the value otherwise Firefox would ignore it.

getObj(‘fc’).style.left=Left(ielem) + ‘px’;
getObj(‘fc’).style.top=Top(ielem)+ielem.offsetHeight + ‘px’;

And this is how you get the coordinates with JavaScript:

function Left(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 Top(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;
}

Best iPhone 3G case

I wanted a case to protect my iPhone 3G so I was looking around on the Internet to see what others have recommended. However I was a bit hasty to buy a case so I ended up buying the first one I thought was worth it which is the Silicone case.

iPhone 3G Silicone Case Review

The iPhone 3G silicone case is like a glove and will offer some kind of protection to your iPhone if it falls down but it does not have any protection for the screen. It is really dull and for £9.99 that i paid from CarphoneWarehouse, it is really not worth it. It is bulky and makes the iPhone ugly! I have actually out off at least 3 people from buying the silicone case from O2 shops and CarephoneWarehouse when I was in these stores!

The second case that i bought was the InvisibleShield for the iPhone 3G. I had to go for this one because similar products like BodyGuardz and BestSkinsEver are not available in the UK and you have to order them online while i wanted something i could grab from London stores.

iPhone 3G InvisibleShield review

I paid £14.99 for the iPhone 3G InvisibleShield case and although i knew it was going to be a tough job installing this case, i had really no other choice. Like everybody said, it is really difficult to put on this case. I managed to put the front piece on the screen quite easily but I struggled for over an hour to put the back piece. In the end i had to cut the rounded edges of the InvisibleShield so that it would stick to my iPhone 3G. I’m quite disappointed with that because I’ve watched online videos on how to put it prior to installing it as well as read instructions from the vendor site and on different forums.

I have to say though that the InvisibleShield is not noticeable on the iPhone 3G and it does retain the phone’s beauty while providing extra protection against scratches and the like.

Access to bin path denied in ASP.NET Web Application

Just downloaded a solution from Visual Source Safe and I was getting lots of errors due to references not being found. So I went through each project and removed the old references and replaced them with the new references. However when I finally came down to the web app, it would not compile because it was unable to copy dll to the bin because access to it was denied. I checked the properties for the bin folder and noticed that it was readonly. So I unchecked the readonly property and applied it to all sub-folders and voila, the compiler is happy now and so I am 🙂

Problem with SCOPE_IDENTITY() in ADO.NET

I’m using .NET 3.5, Visual Studio Team System 2008 and SQL Server 2005 and i’m trying to return the new id that is created after an INSERT statement. When i call ExecuteScalar, it returns zero. I’ve googled the problem and it seems that you need to cast the scope_identity to int before returning it.

Here are 3 solotions for the problem:

1. SELECT CAST(SCOPE_IDENTITY() AS INT) instead of just SELECT SCOPE_IDENTITY()

2. Declare a variable to hold the scope identity as follows:

DECLARE @NewID INT

SET @NewID =  SELECT SCOPE_IDENTITY()

3. Have an output parameter in your stored procedure