Tuesday, January 06, 2009

Income tax (India) calculator


It is the income tax returns filing time in India. Are you looking for a tax calculator?
Here is the link.
Tax Calculator

Do add bugs and suggestions as comments. Check this blog for the latest version.



© Copyright 2009. Bipin C Nair. All rights reserved.

Labels: , , ,

Tuesday, January 16, 2007

How to debug a VB6 ActiveX control used in a VB6 application from .NET IDE?

How to debug a VB6 ActiveX control used in a VB6 application from .NET IDE?

Solution: Build the Activex control and the exe with the debug info (pdb).

1. Open the VB6 Activex control's project.
2. Go to project properties -> Compile
3. Check "Create Symbolic Debug Info" -> OK
4. File -> Make ocx.

5. Open the VB6 Application.
6. Do steps 2 and 3.
7. File -> Make exe.
8. Run the exe.

9. Open the .NET IDE.
10. Tools->Debug Processes->Select the exe ->Attach->Close
11. Open the .ctl file you want to debug and put breakpoints.
12. Note that the debugging will be in VC style.

Thursday, July 27, 2006

Argument not optional (Error 449)

Problem :
Argument not optional (Error 449) pops up in VB
Applies to: VB6 applications using VC6 Activex controls.

Solution:
The usual reasons for this error is documented in
http://msdn2.microsoft.com/en-us/library/102s19ky.aspx

Another reason this could occur suddenly is when you change the function definition in the ocx.
For eg. you had a function called BOOL MyFunc(String) and you decided to change it to BOOL MyFunc()
But in your VB code when you remove the argument you get the above error and if you don't remove you get an argument mismatch error.

Solution: Make sure that you have changed the follwing three.
1) The header file afx_msg BOOL MyFunc();
2) The cpp file BOOL CMyCtrl::MyFunc()
3) The odl file [id(2)] boolean MyFunc();
and
4) The DISPATCH MAP
DISP_FUNCTION(CMyCtrl, "MyFunc", MyFunc, VT_BOOL, VTS_NONE)

Even if you don't change 4 the intellisense of VB shows the correct form of the function and there won't be any compilation error but it will fail while running.


© Copyright 2006. Bipin C Nair. All rights reserved.

Tuesday, July 18, 2006

Read and Write Indic languages on WinXP

Setup to read Indic (Indian) Languages.
1. Go to control Panel -> Regional and Language Options.
2. In the Languages Tab check "Install files for complex script and right-to-left languages." Say OK.
3. Restart your comp.

Setup to write Indic Languages.
1. Make sure you have down the above steps.
2. Go to http://bhashaindia.com/downloadsV2/Category.aspx?ID=1
3. Download the required IME. (E.g. for Malayalam it is Malayalam Indic IME 1 Version 5.0)
4. Install the IME.
5. Go to control Panel -> Regional and Language Options -> Languages ->Details
6. In the "Text Services and Input Languages" click "Add..."
7. Select your desired language. (e.g. Malayalam(India))
8. Select Keyboard layout as "Malayalam Indic IME 1[V 5.0]
9. Say OK and restart your Comp.
10. Search for a better font if you are not happy with the default font.
(For Malayalam use Thoolika from http://www.supersoftweb.com/Unicode.htm)

Supported indic languages:
Hindi Tamil Kannada Gujarati Marathi Telugu Bengali Malayalam Punjabi Konkani Oriya Sanskrit Nepali


© Copyright 2006. Bipin C Nair. All rights reserved.

Monday, May 15, 2006

How to avoid sidebar of blogs dropping down in IE

Problem:
The sidebar of the blog is appearing down instead of right in the blogspot blog.

Solution:
Edit the template and adjust the following till you succeed.
Use percentage rather than pixels for the main content. Use pixels for the sidebar.

@media all {
#content {
/*width:660px;*/
width:90%;
margin:0 auto;
padding:0;
text-align:left;
}
#main {
/*width:500px;*/
width:70%;
float:left;
}
#sidebar {
width:220px;
/*width:30%;*/
float:right;
}
}

Workaround:
Use firefox, a better choice.



© Copyright 2006. Bipin C Nair. All rights reserved.

Wednesday, May 10, 2006

How to upgrade the firmware of a Linksys WRT54G v5 without using the webclient?

Problem:
I have a Linksys WRT54G v5. When I go to the web page via http://192.168.1.1 to configure it I'm seeing a sick web page with improper display. I can't navigate to the Advanced tab to upgrade the firmware either.
How can the firmware be upgraded without using the webclient.

Solution:

Another way of updating firware is to use TFTP.
But TFTP doesn't work on the v5. (or least for me it didn't)
There is a mode called Management Mode which allows to upgrade firmware.
The following info is from the linksys site.
1. Unplug the power cord from the back of the router.
2. Hold down the Reset button.
3. While holding down the Reset button, plug back in the power cord to the router.
4. Continue to hold the Reset button for five (5) seconds. After five (5) seconds, release the button.
5. Wait for about one (1) minute. Then, on a computer connected to the router, launch a web browser (for example, Internet Explorer or Mozilla Firefox).
6. Type in the router's IP address of http://192.168.1.1 into the Address field and press the [Enter] key.
7. The Management Mode - Firmware Upgrade interface should appear.



© Copyright 2006. Bipin C Nair. All rights reserved.

Wednesday, April 26, 2006

How to strip extra lines in a file?

Problem :
Need a script to remove all the blank lines from a file.

Solution:

Save the following as strip.pl and use perl to run the script.

#############################################################
###################### Bipin C Nair #########################
##################### http://www.bipin.co.nr ################
#################### Written on 2003-12-23 ##################

$linecount = 1;
if ( $ARGV[0] )

{
$filename = $ARGV[0];
}
else
{
print "Specify file to strip of extra lines"; exit;
}
open(INFILE,"<$filename") die "can't write to your output file";

@mapfile = ;
close ( INFILE);
open(OUTFILE,">$filename") die "can't write to your output file";
foreach $line (@mapfile)
{
if ( $line =~ m/^\n/)
{
$line =~ s/^\n//;
}
print OUTFILE "$line";
$line = "";
$linecount = $linecount + 1;
}
print "Converted $linecount lines";

close(OUTFILE);
print "The file is stripped of extra line breaks, enjoy!!\n";exit;


© Copyright 2006. Bipin C Nair. All rights reserved.