Hi there… :P i am back with a new application again. This time I have a desktop client for sending SMS through way2sms.com. All I wanted is a fast and tiny desktop application which can send SMS on the fly.

I was fed up with the load of ads that are thrown at us by sites such as way2sms. Now you can avoid all those unwanted ads and slow loading time with this small desktop application.

The application is coded in C# 2.0 and hence you will need to install .Net Framework 2.0 on your computer for this application to work.

You will need a way2sms account which you can get by registering at www.way2sms.com and of course an internet connection.  Enter your userid/phone number and password, type in the mobile number to which you want to send the message along with the message body and hit “Send”…. That’s all it takes…!

way2sms

Alternatively, you can maintain your contacts in the list and import them to the “send to” list.

This tool does not come with any warranty as such and use it at your discretion.

Download Now.

And enjoy SMSing directly form your desktop in a super fast pace :P

This is your chance to win an online invoicing software. Just point your browser to this link. Just follow the simple instructions and three lucky winners will get licence to this software.

What is Invoicera?

Invoicera is an online billing software which fortifies every individual and helps you to channelize your revenue without commencing any invoicing errors. The software comes with many features, many of them are listed below and many more are yet to come, which every freelancer or an entrepreneur will crave for.

Features:

  • Report Generation
  • Automatic Invoicing for Recurring/Regular Billing
  • Export and Import your Documents
  • Multiple Payment Gateways
  • Staff Management
  • Create Professional Quotes and Estimates
  • Data Back-up
  • Multiple Currency Support
  • Alerts and Reminders
  • Invoice Scheduling
  • Late Fees Payment
  • Invoice/Estimate As Attachment

Go try your luck befre someone else grabs it….!

Click Here to participate

Here is a small application that can feed realtime BSE data to AmiBroker. I was looking for a tool that can download RT data from net and feed to AmiBroker. But none could satisfy my need. So I built one for myself. I am giving away the first Beta Version of FeedAB which downloads BSE data from www.money.rediff.com and feeds to Amibroker for further analysis.

fedAB

There are few known bugs as of now, which I couldn’t fix due to time constraints. But the application works fine for normal use.

Download FeedAB 1.0 Beta (48 KB)

Requires .Net Framework 2.0 which can be downloaded from this link.

For Real Time NSE data please check my earlier post.

Happy Trading :)

Regular Expressions are a always tricky and sometimes they stir the mind. I was constructing a regular expression for following conditions:

- String should min of 3 characters and max of 6 characters

- First three characters can be [a-zA-Z]

- Either of 4,5 or 6th character should be [0-9]

- Remaining characters can be [a-zA-Z] but not [0-9]

This query troubled me like anything. I tried so many combinations but could not make it. The main problem was making sure that there is one number in the 4,5 or 6th position and limiting it to a max of 6 and min of 4 characters in length.

I came across a guy who has dveloped an online RegEx Tester and he solved the problem in no time. You can use the online RegEx Tester thru this link.

So finally the RegEx is as follows:

^(?=.*[0-9])(?!.*[0-9].*[0-9])(?!.*[0-9].*[0-9].*[0-9])[a-zA-Z]{3}[a-zA-Z0-9]{1,3}$

The above regex works for the specified condions and mes sure that there is only one digit in the string.

Following is an analysis of the same:

The RegEx two blocks: first block checks whether a certain pattern exists in the whole string and second block checks for [a-zA-Z] three times and [a-zA-Z0-9] one to three times.

^ and $ make sure that the pattern is verified from beginning to the end of the given string.

The first block:

(?=.*[0-9])(?!.*[0-9].*[0-9])(?!.*[0-9].*[0-9].*[0-9])

The ?= looks ahead in the whole string whether there exists any character of [0-9]. The ?! looks ahead in the whole string whether there is not two or three [0-9]. That means this block makes sure that the whole string contains only one digit [0-9] and not more than that. But it will not verify where exactly the [0-9] should come. It will be taken care by the second block.

The second block:

[a-zA-Z]{3}[a-zA-Z0-9]{1,3}

In the second block, first part verifies whether the first three characters are [a-zA-Z] once it is satisfied, second part checks the next 1-3 characters contain [a-zA-Z0-9].

Isn’t that a wonderful RegEx.. :)

You can visit this link for a quick reference on Regular Expressions.

If you have any regular expression that is eating your head then probably this forum can solve it.. give it a try.

As we work on Visual Studio day in and day out, knowing keyboard shortcuts will always save time. I was wondering is there any way Visual Studio Can display the list of keyboard short cuts it supports. Well there is a way..!

Go to Tools>Options dialog box. On the left pan select Environment>Keyboard.

On the right pan you can see List of commands Visual Studio supports and Shortcuts for Selected command. You can filter the list by entering filter string such as “debug.quickwatch” in the “Show commands Containing” box.

You can also download a poster containing all VS shortcuts from this link.

I found a better a way to modify the HTML in ASP.Net just before it is sent to the client. Here is the code:

public partial class CustomRender : System.Web.UI.Page
{
 HtmlTextWriter textWriter = null;
 StringWriter stringWriter = new StringWriter();

 protected override HtmlTextWriter CreateHtmlTextWriter(TextWriter tw)
 {
 textWriter = base.CreateHtmlTextWriter(tw);
 return base.CreateHtmlTextWriter(stringWriter);
 }
protected override void Render(HtmlTextWriter writer)
 {
base.Render(writer);
 string htmlCode = stringWriter.ToString().Replace("[CurDateTime]", DateTime.Now.ToString());;

 textWriter.Write(textWriter);

 }
}

I used the same .aspx file we used in the last example.

There can be scenarios in which you will have to make some modifications to the HTML code generated by ASP.Net engine just before it is sent to the browser.

Here is how you can do it.

Create a new ASP.Net WebForm. Add a label control and set the Text as [CurDateTime]. Following is the code.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CustomRender.aspx.cs" Inherits="CustomRender" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
 <title>Untitled Page</title>
</head>
<body>
 <form id="form1" runat="server">
 <div>
 <asp:Label ID="lblTest" runat="server" Text="[CurDateTime]"></asp:Label>
 </div>
 </form>
</body>
</html>

In the Code-behind file, override the Render() event and make the changes to the Html as required. Following is the code for the same.

protected override void Render(HtmlTextWriter writer)
 {
MemoryStream mStream = new MemoryStream();
 HtmlTextWriter htmlWriter = new HtmlTextWriter(new StreamWriter(mStream));

 base.Render(htmlWriter);
 htmlWriter.Flush();
 mStream.Position = 0;

 StreamReader reader = new StreamReader(mStream);
 string htmlDump = reader.ReadToEnd();
 reader.Close();
 htmlDump = htmlDump.Replace("[CurDateTime]", DateTime.Now.ToString());
 Response.Write(htmlDump);

 }

The code replaces the Text [CurDateTime] with the current date and time in the HTML and renders it in the browser.

This is just an example you can go ahead and do as many tweaks as you want..!

Long back I had written an article on typing text in indian languages. Check this link.

Now with Bookmarklets Google has made it much simpler. Just follow the tutorial provided by google and you will be able to type in Indian language on any web site without hassles.  You will have to add a Javascript to your browser favorites and enable the bookmarket for the website. Once it is enabled you will get a message saying the same. Once done you can happily type in your language on the website…!

As of now google is provididng bookmarklets for Hindi, Kannada, Malayalam, Tamil, Telugu and Arabic.

Check this link to enable it for your browser.

Debugging Javascript has always been a pain in the neck. The only way to debug Javascript was to use alert boxes everywhere anticipating an error. Or rather let’s put it in this way… it’s just a binary search for an error…!

With new IDEs and plugins coming up it has become very easy. In this article let’s see some the best and easiest methods to debug Javascript.

Debugging Javascript with Visual Studio 2008

With Visual Studio 2008, Microsoft made debugging Javascript very similar to debugging your C# (or VB) code. Here is the process to debug Javascript in VS 2008.

  • Open IE (I tried with IE 6), go to Tools>Internet Options>Advanced
  • Uncheck “Disable Script Debugging (Internet Explorer)” and “Disable Script Debugging (Other)”.

IE Options

  • Open up your page/site which has to be debugged in IE.
  • Go to View>Script Debugger>Open

Select Debugger

  • Select Either New Instance of visual Studio 2008 or an existing instance (Optionally you can select Microsoft Script Editor) and say “Yes”
  • Now Code opens up in VS 2008; set breakpoints on Javascript code as you would do for your C# code.
  • Refresh the page in IE. As soon as the control moves to your breakpoint for Javascript, it breaks to that line.

Now you can debug it as you do for C# code. Best part is you can also verify the local variables with Locals window (Debug>Windows>Locals in VS 2008)

Check ScottGu’s Blog for more

Debugging Javascript with Firefox

I firmly believe that Firefox is a boon for a web developer. It has loads of Ad-ons which make the life of a developer to be as easy as possible. There are many debuggers available for Firefox; of which I found Firebug to be really effective.

Download firebug here.

Once you have firebug up and running, open up the page you want to debug. Click on the firbug icon on the status bar and select the “Script” tab. Initially you will have to enable script debugging so select “Script” check box and click on “Apply Settings for localhost”.

enable script debugging

Now you will be able to see the cod in the Script tab with line numbers. All the lines with valid Javascript will have the line number in bold face and green color. Click on the gray area just behind the line number and that is your break point.

Now you are all set for the debugging session…! So start…!

You can see local variables in the right pane. You can also check the call stack on the right pane by selecting the “Stack” tab.

debug in process

You can use following keyboard shortcuts for debugging:

F8 – Continue

F11 – Step Into

F10 – Step Over

This is the source article which helped me to debug javascript with firebug.

I came across this strange error toady. I had my web application hosted on local iis (web application developed in .Net Framework 2.0) and whenever I tried to access it with the URL” http://localhost/MyApp” browser used to throw an error saying “Server Appplication Unavailable”

I tried googleing for the error and tried various methods described in various forums and blogs. But nothing helped :-(

Event Viewer (Go to Start>Run and type eventvwr, select Application in the left panel.) had twofollowing two errors logged

Error 1:

aspnet_wp.exe could not be started. The error code for the failure is 80004005. This error can be caused when the worker process account has insufficient rights to read the .NET Framework files. Please ensure that the .NET Framework is correctly installed and that the ACLs on the installation directory allow access to the configured account.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Error 2:

aspnet_wp.exe could not be launched because the username and/or password supplied in the processModel section of the config file are invalid.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

I treid almost everything that was discussed on the internet not none of them could solve my propblem. Ultimately here is something which solved the problem. But I have no clue whether this method will solve the problem all the time or not. You can try this as it has solved my problem :-)

Open Visual Studio Command Prompt by going to” Start>Programs>Visual Studio 2005/2008>Visual Studio Tools” and type in the following command at the command prompt

aspnet_regiis -u

It uninstalls the version of ASP.NET that is associated with the ASP.NET IIS Registration tool from the computer. It will take some time to complte the uninstallation. Once done, enter the following command at the command prompt

aspnet_regiis -i

which installs the version of ASP.NET that is associated with Aspnet_regiis.exe and updates the script maps at the IIS metabase root and below.

Once done, go to Srtart>Run and type in the command “iisreset” and hit enter.

This should solve the problem.

Now if you try your web application hosted in localhost, it loads up.

For more info on aspnet_regiis check this link.

Next Page »