Author Archive for mahingupta


IE Shortcuts

I spend almost half of my time working on browsers. So it is always important for me to make sure I can operate it as fast as possible. The best way to do any activity faster on computer is simply use Keyboard as much as possible.

So here I am listing few of the shortcuts I use most while operating in IE.

IE and Google Toolbar shortcuts :

Some of which I use most are

If you have installed Google toolbar and want to reach its Search box, you can use shortcut below.

For more detailed entry of shortcuts you can visit

http://www.onecomputerguy.com/ie_tips.htm#keyboard_shortcuts

I have checked all above shortcuts with IE8 and IE 7 compatibility mode. All of them work very fine.

 

Thanks,

Mahin Gupta


BugTracker.Net : Add attachment gives you invlaid id

Hi, We are using BugTracker.net to Track Bugs ;)

It has fairly almost all features one need to track issues related to development and above all its free. Highly recommended after using it for almost 1 year.

We were facing a strange bug in it from quite a few time.

Whenever we try to add attachment to issue, it always failed with message “invalid id”.

After a bit of Google, we found following solution here :

In add_attachment.aspx. file remove attribute action=add_attachment.aspx from the form tag.

ie

Change :

<form class=frm runat="server" enctype="multipart/form-data" action=add_attachment.aspx  >

To :

<form class=frm runat="server" enctype="multipart/form-data" >

 

Happy Bug Tracking :)


C# : Difference between Hashtable and Dictionary


 

When we want a collection  data structure to hold data as key/value pairs, we have two obvious choices.

1. Dictionary

2. Hashtable

So basically what is the difference between both this and when to use which. Lets check it out. Point by Point.

1) Generics

Dictionary is a generic type, Hashtable is not. Now what that means. This is the most important aspect one should consider when taking decision. Dictionary is a generic type means

- You get type safety with Dictionary, because you can’t insert any random object into it, and you don’t have to cast the values you take out.

- And also generic collections are a lot faster as there’s no boxing/unboxing

- Hashtable uses Object to hold things internally (Only non-generic way to do it). So you have to take care of type safety and cast it to appropriate data type when you take it out, but it also means that you can add keys and values of any type ( It is good or bad, well it depends :) )

- Again Hashtable also have to box/unbox, which may have memory consumption as well as performance penalties.

2) Thread Safety :

In .Net Hashtable is thread safe for use by multiple reader threads and a single writing thread, while in Dictionary public static members are thread safe, but any instance members are not guaranteed to be thread safe.

One more thing that can make difference is,  we can not use dictionary (generics) with web services. The reason is no web service standard supports generics standard.

Technorati Tags: ,,,,,,,,

Windows Live Tags: C#,Hashtable,Dictionary,collection,Generics,instance,services,supports,collections

WordPress Tags: C#,Hashtable,Dictionary,collection,Generics,instance,services,supports,collections

Follow me on Twitter |


India : Search Private Limited Company Name

In India if you want to open a private limited company, you have to make sure that the name you are choosing for your company should be available for the services you want to provide.

You can check if your company name is available or not at Ministry of Commerce affair site.

If this link is not working ( Some times it says “session Expired” ),  than please visit this link, and then from Other Services menu select “Check Company or LLP Name”

image
This site is a bit crappy so be have patience and try if it is not working correctly.

image

Just select Relation : Contains any where or Starts with,  and enter name of your company in Company Name or LLP Name and hit enter ( At the time of writing the search button was not working :) ). It should come up with list of companies that have your company name in their name.



svn : Can not Parse lock / entries hashfile


Recently we moved our svn repositories from one URL to other. I don’t remember exactly what happened, but we started to get error

“svn : Can not Parse lock / entries hashfile “

whenever we try to take lock or release any lock from on any file in that repository. I have tried a hell lot to solve this problem, but I was not able to solve it in a clean manner.

So I have decided to take reset all the locks and asked on StackOverflow to help me. I received answer from Ben Blank and I followed his advise. I have manually release all locks from repository by Deleting <root>/db/locks folder. And all the locks were reset again.

Caution : Make sure you take backup of your repositories before doing such things.

Technorati Tags:

Asp.Net website : Exclude folder from compilation

Problem :

We used to have asp.net website projects, which does not come with project files like .csproj. We also have fckEditor folder in our project. So now every time when I build my project it unnecessarily also build fckEditor folder also which is really annoying to me ( I hate when something takes too long to build :) ).

If you are working on Asp.Net Web Application then the solution is very simple, you just have to “Exclude it” from the project. BUT we are working on WebSite project not web application project.

Solution :

In fact it is quiet simple. Just hide the folder, I mean, Make the folder ( the one that you don’t want to be included in compiling process) hidden and it will not be there in the build list.  So simple. :)


Outlook 2007 – Receive mails from particular accounts only

Problem :

As per my work requires, I manage lots of eMail accounts which includes My personal account, My work account. I have forwarded all emails from my personal account to my work account,  so that I just need to check one account only. I have created accounts in outlook for both my personal eMail and my Work eMail.

But it creates a big problem now. Whenever outlook performs Send/Receive it receives two copies of each mail from my personal account.

  1.   Originally from my personal account.
  2.   Forwarded copy from my Work account ( Since I have forwarded all mails from my personal  account to my work account.)

Solution :

What I actually want is

Follow the steps below to achieve above :

1. Go to Tools –> Options

image

2. Go to Mail Setup –> Send Receive

image

3. Click Edit

image

4. It will list all your accounts in left side pane.

image

5. Select the account. It will show you Account Options for send mail items and receive mail items. If you just want to send eMails using this account than check the Send Mail items and uncheck the Receive mail items.

image

6. Press Ok –> Cliose –> Ok.

And you are done. :)


Windows 7 – First bad experience

today morning when I switched on my machine, I just freaked off by not finding a whole 60 GB drive in My Computer. I have checked it in disk Management and it shows me 63 GB free space. Damn…

image

I am working on it to get my drive back. Lets see I am fortunate enough or not. :(


Windows 7 – Space Requirements

When you install Windows 7 Ultimate, make sure you have at least 16 Gigs of free HDD space. Basically I am creating a typical developer machine.

When I used to have Windows XP SP3, I used to have 20 gigs of C:\ ( OS partition ). I followed the same pattern with Windows 7 also and had to spend a half day at least to resize the partition. Windows 7 took whooping 9.5 Gigs in my OS partition without any application install.

I am sure Microsoft will come up with lots of Kb and SP updates for all the software  like Visual Studio, MS Office etc as people will start using Windows 7 in day to day life. So I wanted to make sure I have enough room on OS partition to accommodate all.

Again this is developer machine, so I need to install Visual Studio 2008 Team Suit ( Yes, I have one ), Management Studio, Office 2007, and other giants. I always want to make sure that the software I use most are present in my OS Partition. So according to my calculation now i need my OS partition to be at least 40 Gigs.

So now I started my search to find how to resize/extend OS partition. I gone through various options and succeeded at last.

1) Windows 7 built in Extend partition tool :

Start Menu –> Computer ( Right Click ) –> Manage –> Storage –> Disk Management –> Right click on the partition you want to extend, and you will get Menu as below :

image

I have tried a lot but was not able to get the Extend Volume enable. After a lot of research I understood why it is not enabled.

“You can add more space to existing primary partitions and logical drives by extending them into adjacent unallocated space on the same disk. To extend a basic volume, it must be raw or formatted with the NTFS file system. You can extend a logical drive within contiguous free space in the extended partition that contains it.”

It means that I need to have unallocated space adjacent to C:\ which I never had. So I took tough decision and backup my all data on drive D:\ and deleted it. But it shown me the reclaimed space as Free space and not Unallocated Space. I dont know whether it matters or not, but again I was not able to get Extend Volume enabled.

I have researched more and found this good article from Mark Ghazai.  He has given a work around for this. In his own words :

You can only extend a partition if the unallocated space is immediately at the end of that partition, in this case having the unallocated space between C: and D: volumes will let you extend the C: volume.

Now, here is a solution I can think of right away;

1- Temporarily move all the Data from D: volume to someplace else

2- Change the D: drive letter to a different drive letter that is available on the system (for instance Z:)

3- Shrink Z: to whatever size that you’d like to add to C: volume.

4- Create a new volume out of the unallocated space that was taken from Z: and assign D: as the drive letter.

5- Delete Z: volume that will make it an unallocated partition between C: and D:

6- Extend the C: partition.

I tried all this sincerely but no luck. :(

2) Partition Magic : After all above went failed, I decided to go with trusted companion Power Quest Partition Magic.  ( Power quest is now overtaken by Symentec, but that is a different story ). I went all surprised and disappointed when I came to know that Symentac do not provide any working free trial version to evaluate Partition magic. Yes, Partition magic does not have any free evaluation or trial version. So I have to again go to Google and try my options.

image

 

3)  Partition Wizard : A very good free tool. It gave me all the power I needed to perform partition resize on my C:\

image

It has two free editions

1. Home edition

2. Business edition ( Free to register )

I have downloaded Business edition and registered. It has lot of options and convenient GUI to perform all the operations I want to perform.

image image_thumb

I successfully used it to perform a partition resize. 10 out of 10 to save my day and 69$ :)