Skip to main content

Posts

Get distinct

If you want to user LINQ distinct have to override IEquatable .Equals method. Rather using this it can be easily achieved like this ; var distinctItems = items .GroupBy(x => x.PropertyToCompare) .Select(x => x.First());

Update

If you want to update a field of one table from another table it can be done as follows: Example: Table A field 2 has foreign key relationship with table B .Need to update table A field 3 with the value from table B. Table : A Field1 Field2 Field3 1 ------1------ Null 2 ------2------ Null Table : B Field1 Field2 1------- 3 2 -------4 Query 1: UPDATE A SET A.Field3 = B.Field2 FROM A a INNER JOIN B b ON A.Field2 = B.Field1 WHERE A.Field3 is null Query 2: update A set A.Field3 = (select B.Field2 from B where B.Field1=A.Field2) where A.Field3 is null Query 1 is faster than Query 2

Who's got the monkey ?

Today i found a interesting article on how manger should delegate his work. According to my understanding, this theory is highly applicable for software industry because most of the targets are accomplishing using teams.When we work in a team we should know what are the things need to be delegate.And those work must have to delegate.According to this theory problems are considered as monkeys. So everybody wants to know about how to deal with monkeys.

Writing Tips

When we are writing emails some time we may not care much about small things.But it will create difficulties to recipient. As well as it reflects sender. This is a good post on it . It highlights necessity of the good writing.It mention simple example as follows; Compare the following two job applications. The content of the emails are identical – but who would you give the job to? i’ve attached my resume i would be grateful if you could read it and get back to me at your earliest convenience. i have all the experience you are looking for – i’ve worked in a customer-facing environment for three years, i am competent with ms office and i enjoy working as part of a team. thanks for your time Or Dear Sir/Madam, I’ve attached my resume. I would be grateful if you could read it and get back to me at your earliest convenience. I have all the experience you are looking for: * I’ve worked in a customer-facing environment for three years * I am competent with MS office * I...

Silly mistake

Actually i underwent a problem which was very painful. But finally i found the problem. I could able to learn lot from that even thought its a Silly mistake . Basically scenario is as follows; There is a asp page and it pop up another page. Once i click on the parent page and it pop up a child window but it get minimized within a second. Finally got to now there is a text box focus method calling from parent page.:-)

DB4o & .Net

Its new to me..Today i started to work on DB4o and up to now feel better. Learning curve is short and also easy to learn. As a beginner it is better to use DB40 reference as well as http://www.codeproject.com/KB/database/OOP_with_db4o.aspx