learned/learning/to learn RSS 2.0
# Monday, 21 December 2009
I have seen people always getting confused with the loan calculation method, especially auto loan (including me, when I bought my first car), just to help you all ... I have created this calculator. Try this and find out how it differs from the other calculators on the internet. 

What my calculator is capable of?
1. Calculates monthly payment or apr or term or loan amount based on your input. (any calculator online does this ... not a big deal)
2. Gives you the total amount that a person will pay if he takes a loan i.e., principal (loan amount) + total interest amount. 
3. Gives you the amortization table i.e., monthly splits. The amount that goes towards your principal and interest from your monthly payment.
4. Allows you to edit your monthly payment and gives you the amount that you will gain with the change. Many pay their monthly payments exactly, without knowing that even few dollars (or rupees or whatever) increase will change their total interest.
5. Tells you whether refinance will be profitable or not, by changing interest rate or loan term. Gives you the amount that you will save/lose by refinancing. 

Formula used for this calculator:
Monthly Payment = (P * R) / (1 - (1 + R)^(-n)) where

P = Loan amount
n = loan term i.e., number of months 
R = Annual Percentage Rate/ (12 * 100)  
12:number of months/year 
100: As rates are in percentage

Feel free to send your comments.

Monday, 21 December 2009 13:02:42 (GMT Standard Time, UTC+00:00)  #    Comments [0] -
# Wednesday, 09 December 2009
Can anybody find the difference between the first and the second ‘testing abc’ in this file test.txt (.02 KB). Open the file and search for ‘testing’ (there should be 2 matches), ‘abc’ (2 matches) and then ‘testing abc’ (1 match). It is because the ‘space’ between the two words varies, one is a regular space and the other is a html space (not nbsp), their ascii values are 32 and 160 respectively. I figured this after converting the spaces to ascii values! (spent almost an hour)

Wednesday, 09 December 2009 20:44:20 (GMT Standard Time, UTC+00:00)  #    Comments [0] -
.NET | Solutions
We can take an ASP.NET 2.0 application offline temporarily by uploading a file called app_offline.htm to the root directory.  It will shut-down the application, unload the application domain from the server, and stop processing any new incoming requests for that application.

To know more about this - http://weblogs.asp.net/scottgu/archive/2005/10/06/426755.aspx

Working around the "IE Friendly Errors" feature - http://weblogs.asp.net/scottgu/archive/2006/04/09/442332.aspx

I came to know this only today when I was listening to Hansel minutes, this will definitely help me in taking my website down easily.

Wednesday, 09 December 2009 20:36:59 (GMT Standard Time, UTC+00:00)  #    Comments [0] -
.NET | Solutions
This is for my future reference.

If you are using sitemap as the data source for the menu control, then you can set the property ShowStartingNode = "false" of sitemapdatasource.  Inorder to hide the arrow image, set the properties DynamicEnableDefaultPopOutImage = "False" and StaticEnableDefaultPopoutImage = "False" of the menu control.
Wednesday, 09 December 2009 16:28:18 (GMT Standard Time, UTC+00:00)  #    Comments [0] -
.NET | For Future Reference | Solutions
Setting up shoutcast server is just like installing any other software.  Installation and configurations should not take you enough time, whereas opening your firewall/router ports might take some time, it depends on your networking knowledge. If you are aware of setting up a router or any other network device, this should not take you enough time.

Here you go:

1. Download Winamp. Install it.
2. Download DSP plug-in. Install it.
3. Download appropriate DNAS Shoutcast Server for your server and OS. Install GUI version.
4. Run DNAS server. This will open your GUI.

5. Start Winamp and open Preferences (CTRL-P) and click on the DSP/effects subcategory under the Plug-ins tree.
6. Select Nullsoft SHOUTCast Source DSP v x.x. This will open a pop-up like this

7. Play some song in winamp, this will change the dB on Input Meters (Main Tab).
8. Go to the 'Encoder' tab. Change the Encoder Type to MP3 Encoder, if you are playing mp3 song. This will automatically choose Encoder Settings to 24 Kbps, 22.050kHz, Mono. You can change this based on your needs.
9. Go to the 'Output' tab. Click the Connect button, this will start streaming the song current being played i.e., the status will change from 'Not Connected' and it will look like the window below. Click Yellowpages to add information about your radio.

10. If the status has changed, you can jump to step . If the status has not changed, check whether the shoutcast server has been added to your Windows Firewall exceptions list. Open your control panel, double-click windows firewall and go to Exceptions tab. Check whether 'sc_serv' is in the exception list, if not, click add program and add your shoutcast server exe (programfiles\shoutcast).

11. To check whether the shoutcast server is streaming properly, open windows media player. Go to File menu and click Open Url (ALT + F, U), and type http://localhost:8000. You should be able to listen to the song being played in winamp.
12. Open ports 8000 and 8001 in your windows firewall (see step 10 to know about opening firewall ports), and then open the same ports in your router (look for port forwarding in your router config page). This will allow you to stream your radio on the internet.
13. You can change the Shoutcast server's settings based on your needs (open DNAS GUI and click Edit Config). This site explains clearly about the settings - http://www.gentoo.org/doc/en/shoutcast-config.xml#doc_chap1

Fetching Shoutcast statistics from .NET application

WebClient webClient = new WebClient();
String xmlDoc;
DataSet shoutCastStatistics = new DataSet();

webClient.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");
xmlDoc= webClient.DownloadString("http://yourradiourlORwanip:8000/admin.cgi?pass=PASSWORD&mode=viewxml");
shoutCastStatistics.ReadXml(new StringReader(
xmlDoc), XmlReadMode.Auto);

Dataset shoutCastStatistics should have 5 tables: shoutcastserver, webdata, listeners, listener, songhistory and song. You can use them based on your needs.

Feel free to contact me if you have any questions.

Wednesday, 09 December 2009 04:08:22 (GMT Standard Time, UTC+00:00)  #    Comments [0] -
.NET | Miscellaneous
# Thursday, 19 November 2009

If we want to get control over finally rendered output of ASP.NET controls like Menu, TreeView, DataList etc, we can use CSS Control Adapter. This adapter emits CSS friendly html output and can significantly help when using CSS on the website. To know more about this adapter, follow this link - http://www.codeplex.com/cssfriendly. To see the difference between the html generated with and without using this adapter, follow this link - http://www.asp.net/CSSAdapters/Menu.aspx

Thursday, 19 November 2009 15:39:14 (GMT Standard Time, UTC+00:00)  #    Comments [0] -
# Monday, 16 November 2009

 I was trying to add AJAX Control Toolkit to my Toolbox, for some reason Visual Studio was crashing. I found a solution for it, see this works out for you – start Visual Studio in safe mode (go to Visual Studio’s command prompt and execute ‘devenv /safemode’) and then try to add items to your toolbox, I was able to do it! There might be a better solution for this, please let me know if there is one.

Monday, 16 November 2009 15:04:38 (GMT Standard Time, UTC+00:00)  #    Comments [0] -
.NET | Solutions
# Saturday, 14 November 2009

Initially, I developed this deals alert service for my personal use and later on thought it might be useful for others too, so I extended it accordingly and added it here. This service basically grabs RSS feeds from deals sites (listed on the deals alert page of my site) and checks for the keyword(s) that are added, and if it finds a match, sends email at the time mentioned on the page. This service performs properly only if the keyword(s) are specific, because it is  just using some ‘exact’ and ‘like’ string searches. I might be improvising this by using dictionary or thesaurus in the future.  You can enter multiple keywords (separated by spaces) related to a single product, and only if all the words are present on the deal title, alert email will be sent. As I’m just using simple search here, the deal may not be related to the product you are looking. For eg., say suppose you add an alert for ‘card reader’ and if there is any deal for a laptop with ‘card reader’, my service is going to grab this deal too, because this service is not as intelligent as you are :). So, in this case it is better to add price limit too.


I have added this service without any commercial intention, so do not worry about your emailids, I won’t trade them to advertisers, and moreover you can unsubscribe from this service or modify the added keywords at any time by clicking ‘Unsubscribe’ link on the email that will be sent to you after adding an alert.


After writing this service I understood how difficult it is come up with search algorithms, hats off to Google and other search engines. Implementing ‘exact’ keyword search was easy whereas ‘like’ search was very difficult.  For eg., I added ‘backpack’ as keyword, the service was bringing all the deals having ‘pack’ on the title, like ‘cd pack’, ‘dvd pack’ etc. I told about this service to couple of my friends, and one of my friends added ‘mens watches’ as keyword, and found out that most of the deals had “men’s” on the title. I recoded to accommodate this scenario, but still it is going to bring deals related to women's watch even if you add men's watch. One last example, keyword ‘all in one printer’, there was a deal with title ‘Calls to any phone in India’, if you see here ‘all’ is in ‘calls’, ‘in’ is in ‘India’ and ‘one’ is in ‘phone’. I can keep listing out examples on this service's ability/disability. As a developer, I have done my testing part (developer's test cases are always subset of testers' test cases) to an extent, it is yours now...you are my testers!


If you have any idea or thoughts to improvise this service, please send your comments. Here is the link.

Saturday, 14 November 2009 15:01:34 (GMT Standard Time, UTC+00:00)  #    Comments [1] -
# Thursday, 12 November 2009

This program prevents your system from getting locked even if it is left idle for time greater than your screen saver time. It basically presses ‘down’ arrow key every minute.


Create a Windows Forms Application and add a timer to the form.


public Form1()






private void StartAction()


    // the timer is started and the form is minimized

    // set the timer interval as per your needs. I have set it to be 60000 milliseconds = 1 min

    timer_keypress.Enabled = true;

    this.WindowState = FormWindowState.Minimized;

    this.ShowInTaskbar = false;




To add the application to your system tray when minimized, add a notify icon from your toolbox to the forms and set properties appropriately. I chose an icon and changed the text property. By default this form will be in minimized state, as I have added code to do so in my StartAction function.


Add context menu from your toolbox to show menu when the system tray icon is right clicked. Right click contextMenuStrip and choose Edit items to add your menu items. Double click on the menu item to add a handler. I’ve added ‘Exit’ menu. Set your notify icon’s contextmenustrip property.


private void exitToolStripMenuItem_Click(object sender, EventArgs e)





private void StopAction()


    // the timer is stopped and the form is closed  

    timer_keypress.Enabled = false;




// this event will be triggered every minute

private void timer_keypress_Tick(object sender, EventArgs e)





There are many ways to do this, I found this one to be easy.

Here is the fileKeyPress.exe (889 KB)
Thursday, 12 November 2009 22:52:51 (GMT Standard Time, UTC+00:00)  #    Comments [0] -
# Friday, 06 November 2009

With <authentication mode="Windows"/> in your application and Anonymous access enabled in IIS, you will see the following results:


System.Environment.UserName: Computer Name

Page.User.Identity.Name: Blank

System.Security.Principal.WindowsIdentity.GetCurrent().Name: Computer Name


With <authentication mode="Windows"/> in your application, and ‘Anonymous access’ disabled and only ‘Integrated Windows Authentication’ in IIS, you will see the following results:


System.Environment.UserName: ASPNET (user account used to run ASP.NET service)

Page.User.Identity.Name: Domain\ Windows Account Name

System.Security.Principal.WindowsIdentity.GetCurrent().Name: Computer Name\ASPNET


With <authentication mode="Windows"/> and <identity impersonate ="true"/> in your application, and ‘Anonymous access’ disabled and only ‘Integrated Windows Authentication’ in IIS, you will see the following results:


System.Environment.UserName: Windows Account Name

Page.User.Identity.Name: Domain\ Windows Account Name

System.Security.Principal.WindowsIdentity.GetCurrent().Name: Domain\ Windows Account Name

With <authentication mode="Forms"/>:

Request.ServerVariables["LOGON_USER"]: Domain\ Windows Account Name

Friday, 06 November 2009 15:04:37 (GMT Standard Time, UTC+00:00)  #    Comments [0] -
<2009 December>
About the author/Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2017
Sign In
Total Posts: 41
This Year: 0
This Month: 0
This Week: 0
Comments: 47
Pick a theme:
All Content © 2017, Gokulnath
DasBlog theme 'Business' created by Christoph De Baene (delarou)

The bulk of humans who will end up affairs Artya's expensive, bound assembly articles are small. These are mostly flush collectors who accept omega replica an aberrant yield on activity and are annihilation but amateur watch lovers. After a lifetime of affairs or seeing bourgeois timepieces, for abounding it can be abundantly auspicious to rolex replica don something weird, wild, or just apparent controversial. We feel that it is our role as a watch media destination not alone to acquaint with those alcove buyers who abide our breitling replica admired readership forth with anybody else, but aswell to bell ross replica accumulate humans abreast of what is new and potentially discussion-worthy in the archival world.