In case you forgot the root password for your MySQL database server running under Microsoft Windows, you can still access your database and even reset your password using the command prompt. However, first you should check your my.cnf file where your password is stored. If you are using a new version of MySQL Server, such […]
Understanding and Resolving ‘Exception Has Been Thrown by the Target of an Invocation’ in C#
If you’re a C# developer, chances are you might have come across this error message. It can be puzzling and sometimes frustrating. But don’t worry, we’re here to help you understand and solve it. In C#, exceptions are a way for the program to tell you that something unexpected happened. They are like warning signals. […]
Using showModalDialog() with an ASP.NET page that does PostBack opens another window
If you have an ASP.NET page (.aspx) opened with the JavaScript showModalDialog() function and inside that page there is a form doing PostBack, when the PostBack is being done the page loads in another (popup) window. The easiest way to prevent this is to add the following tag inside the <HEAD></HEAD> tags of the ASP.NET page: <base target=”_self”>
How to check if a number is odd or even?
Advertisement More C# Resources The best way to see if a given number is odd or even is to use the modulus operator (%). The modulus operator returns the remainder when dividing two numbers. So if you do a modulus of 6 % 2 you get 0 because 6 divided by 2 doesn’t have a […]
How to validate a phone number in JavaScript
You can easily validate a TextBox against a phone number format, in JavaScript, using Regular Expressions (RegEx): <script type=“text/javascript”> function FormValidate(){ if(document.Form1.PhoneNumber.value.search(/\d{3}\-\d{3}\-\d{4}/)==-1) { alert(“The phone number you entered is not valid.\r\nPlease enter a phone number with the format xxx-xxx-xxxx.”); return false; } } </script> And the HTML markup that works with this script, is: <form […]
Getting Started With Visual Basic 6.0
Comprehensive tutorial aimed at introducing you to the basics of programming in Visual Basic 6.0.
Using the printf() function
A guide to the famous printf() function in C. Shows you how to output data in several ways. The tutorial is not yet complete but will be continued soon.
Introduction to Object Oriented Programming
For those wishing to delve into the world of OOP using C++. You should have a little bit of programming experience to get the most from this tutorial.
Dealing with errors and tracing in ASP.NET
In this article we discuss dealing with errors. We’ll work with debugging issues, tracing, and custom error generation.
Programming a Paint Brush in Java
This program will help you enhance your mouse event concepts in Java. As the title indicates you will be playing with a brush after you go through the tutorial.