Tuesday, September 15, 2009

Missing Attachment in Outlook but present in Web Gmail

While coding send mail functionality, found that the attachment functionality is not working properly. The attachment is displayed in the Web browser Gmail / Mozilla Thunderbird but when tested with Microsoft Outlook, Apple Mail for a strange it didn't showed any attachment. After a long debug we found that instead of

Content-Type : multipart/related;

it should be

Content-Type : multipart/mixed;

I am not sure what exactly the difference but it worked out to be a wonder for us. So Please make sure that whenever Attachment is attached thru coding we should use only

Content-Type : multipart/mixed;

Hope this might help you whenever you face this kind of problem.

Monday, September 14, 2009

Useful ISERR function - Microsoft Excel

I feel most of the non-IT people & few of the IT people use the Microsoft Excel. Have you any time tried to use the formula to find a value in some cell, have used ? SEARCH or FIND function. Ok if you have used you might have found that it returns 1 if it has found an #VALUE! if it returns false.

i hope you have used something like this right ?
=SEARCH("Party",C9)

returns <1

where C9 contains "Party in Melbourne"

Now if C9 contains "Dance in Melbourne"

then it returns

#VALUE!

Here is a quick and fast solution to fix this and return TRUE or FALSE instead of 1 or #VALUE! which is not useful for further purpose.

=NOT(ISERR(SEARCH("Party",C9)))

Hope this might have solved your purpose, by the way I was using the below line to check whether the Finding string is present then return the cell content else return some other cell content.

=IF(NOT(ISERR(SEARCH("Party",C9))),C9,B9)

hey, I am here to help you...

Thursday, September 10, 2009

Best 1 line command to rename extenstions for multiple files.

One of the best command to rename all the files having same extensions. This is one line command. Say you have 100 files with same extension jpg and you want to convert all the jpg files to gif files so here is the below command to do it.


ls -d *.jpg | sed -e 's/.*/mv & &/' -e 's/jpg$/gif/' | sh


you just need to replace jpg instead of the extension you have and replace gif value with what extension you want to replace.

Hope this might be definitely helpful for you.

Monday, September 7, 2009

svn: Can't copy 'models/.svn/tmp/text-base/comments.php.svn-base' to 'models/.svn/tmp/comments.php.tmp.tmp': No such file or directory

While doing checkout of a project from the repository I got some errors which has been solved very easily.


[mnto]$ svn delete comments.php
D comments.php
[mnto]$ svn commit -m "No Need for comments.php will commit back sometime later" .


I did this and solved the issue and it worked out easily.