Techno WeBlog

blogging about tech, the tech, and everything tech, for techno addicts!

Join Techno Google group

Some Useful Windows Run Commands


To access the RUN command prompt click START menu then click RUN


Accessibility Controls - access.cpl Add Hardware Wizard - hdwwiz.cpl
Add/Remove Programs - appwiz.cpl
Administrative Tools - control admintools Automatic Updates - wuaucpl.cpl
Bluetooth Transfer Wizard - fsquirt
Calculator - calc
Certificate Manager - certmgr.msc
Character Map - charmap Check
Disk Utility - chkdsk Clipboard
Viewer - clipbrd Command Prompt - cmd
Component Services - dcomcnfg
Computer Management - compmgmt.msc
Date and Time Properties - timedate.cpl
DDE Shares - ddeshare
Device Manager - devmgmt.msc
Direct X Control Panel (If Installed)* - directx.cpl
Direct X Troubleshooter - dxdiag Disk
Cleanup Utility - cleanmgr
Disk Defragment - dfrg.msc
Disk Management - diskmgmt.msc
Disk Partition Manager - diskpart Display Properties
- control desktop
Display Properties - desk.cpl
Display Properties (w/Appearance Tab Preselected) - control color
Dr. Watson System Troubleshooting Utility - drwtsn32
Driver Verifier Utility - verifier
Event Viewer - eventvwr.msc
File Signature Verification Tool - sigverif
Findfast - findfast.cpl
Folders Properties - control folders
Fonts - control fonts Fonts Folder - fonts
Free Cell Card Game - freecell Game Controllers
- joy.cpl
Group Policy Editor (XP Prof) - gpedit.msc
Hearts Card Game - mshearts
Iexpress Wizard - iexpress
Indexing Service - ciadv.msc I
nternet Properties - inetcpl.cpl
IP Configuration (Display Connection Configuration) - ipconfig /all
IP Configuration (Display DNS Cache Contents) - ipconfig /displaydns
IP Configuration (Delete DNS Cache Contents) - ipconfig /flushdns
IP Configuration (Release All Connections) - ipconfig /release
IP Configuration (Renew All Connections) - ipconfig /renew IP Configuration
(Refreshes DHCP & Re - Registers DNS) - ipconfig /registerdns
IP Configuration (Display DHCP Class ID) - ipconfig /showclassid
IP Configuration (Modifies DHCP Class ID) - ipconfig /setclassid
Java Control Panel (If Installed) - jpicpl32.cpl
Java Control Panel (If Installed) - javaws
Keyboard Properties - control keyboard Local Security Settings - secpol.msc
Local Users and Groups - lusrmgr.msc
Logs You Out Of Windows - logoff
Microsoft Chat - winchat
Minesweeper Game - winmine
Mouse Properties - control mouse
Mouse Properties - main.cpl
Network Connections - control
netconnections Network Connections - ncpa.cpl
Network Setup Wizard - netsetup.cpl
Notepad - notepad Nview
Desktop Manager (If Installed) - nvtuicpl.cpl
Object Packager - packager
ODBC Data Source Administrator - odbccp32.cpl
On Screen Keyboard - osk Opens AC3 Filter
(If Installed) - ac3filter.cpl
Password Properties - password.cpl
Performance Monitor - perfmon.msc
Performance Monitor - perfmon Phone and Modem Options - telephon.cpl
Power Configuration - powercfg.cpl
Regional Settings - intl.cpl
Registry Editor - regedit
Registry Editor - regedit32 Remote Desktop - mstsc
Removable Storage - ntmsmgr.msc
Removable Storage Operator Requests - ntmsoprq.msc
Resultant Set of Policy (XP Prof) - rsop.msc
Scanners and Cameras - sticpl.cpl
Scheduled Tasks - control schedtasks Security Center - wscui.cpl
Services - services.msc
Shared Folders - fsmgmt.msc
Shuts Down Windows - shutdown Sounds and Audio - mmsys.cpl
Spider Solitare Card Game - spider SQL Client Configuration - cliconfg
System Configuration Editor - sysedit
System Configuration Utility - msconfig
System File Checker Utility (Scan Immediately) - sfc /scannow
System File Checker Utility (Scan Once At Next Boot) - sfc /scanonce
System File Checker Utility (Scan On Every Boot) - sfc /scanboot
System File Checker Utility (Return to Default Setting) - sfc /revert
System File Checker Utility (Purge File Cache) - sfc /purgecache
System File Checker Utility (Set Cache Size to size x) - sfc /cachesize=x
System Properties - sysdm.cpl
Task Manager - taskmgr
Telnet Client - telnet
User Account Management - nusrmgr.cpl
Utility Manager - utilman
Windows Firewall - firewall.cpl
Windows Magnifier - magnify
Windows Management Infrastructure - wmimgmt.msc
Windows System Security Tool - syskey
Windows Update Launches - wupdmgr
Windows XP Tour Wizard - tourstart
Wordpad - write


Labels : DiggIt!  |   Del.icio.us


Number Validation Using JavaScript

Usig javascript, the simplest way to check whether the details entered in a text field are numeric is to to loop through the string and compare each character to a pre-defined list of acceptable characters.

we can also achive tthis functionality by using the regular expressions.

in this case also, we have allowed decimal points and numbers zero through 9. using the ‘match’ function we can search the string for the regular expression pattern provided. if any mismatch occured in the patters the “match” function will return a null value.

for more details and functions please visit
http://blog.codlib.com/2007/06/22/number-validation-using-javascript/



Labels : DiggIt!  |   Del.icio.us


Receiving SMS Messages Using a Computer ?

In general, there are three ways to receive SMS messages using your computer:

1. Connect a mobile phone or GSM/GPRS modem to a computer. Then use the computer and AT commands to get the received SMS messages from the mobile phone or GSM/GPRS modem.

Receiving SMS messages through a mobile phone or GSM/GPRS modem has a major advantage over the other two ways — wireless carriers usually do not charge any fee for receiving incoming SMS messages with their SIM cards. The disadvantage of receiving SMS messages this way is that a mobile phone or GSM/GPRS modem cannot handle a large amount of SMS traffic. One way to overcome this is to load balance the SMS traffic with a pool of mobile phones or GSM/GPRS modems. Each mobile phone or GSM/GPRS modem will have its own SIM card and mobile phone number.

In terms of programming, sending and receiving SMS messages through a mobile phone or GSM/GPRS modem are similar. What you need to do is to send instructions (in the form of AT commands) to the mobile phone or GSM/GPRS modem.

2. Get access to the SMS center (SMSC) or SMS gateway of a wireless carrier. Any SMS message received will be forwarded to your computer / PC using a protocol / interface supported by the SMSC or SMS gateway.

If you need a high SMS transmission rate, one way is to obtain a direct connection to the SMS center (SMSC) or SMS gateway of a wireless carrier. The connection may be made through the Internet, X.25 or dial-up.

To receive SMS messages through a direct connection to the SMSC or SMS gateway of a wireless carrier, usually you need to contact the wireless carrier provider to discuss the details. A wireless carrier may only provide such service to those who have huge SMS traffic and the total fee can be very high. The service may involve a one-time setup fee, a monthly subscription fee and/or a per-message fee. To know the exact cost of the service, protocols supported, network coverage and other information, usually you have to contact the wireless carrier provider.

3. Get access to the SMS gateway of an SMS service provider. Any SMS message received will be forwarded to your computer / PC using a protocol / interface supported by the SMS gateway.

Another way to receive SMS messages using a computer is through a connection to the SMS gateway of an SMS service provider. SMS service providers generally support two kinds of solution:

1. SIM hosting – The SMS service provider hosts a SIM card for you. All SMS messages sent to the mobile phone number of the SIM card will be forwarded to your system using a protocol / interface supported by the SMS gateway of the SMS service provider.
2. Shared phone number — The SMS service provider provides you a phone number that is shared by its customers for receiving SMS messages. You have to specify one or more keywords to associate with your SMS application. If an SMS message is received and its content begins with a keyword specified by you, it will be forwarded to your system using a protocol / interface supported by the SMS gateway of the SMS service provider.

Some SMS service providers also provide SMS messaging solutions that are customized to your needs. For example, if you need to receive SMS messages from users in a few countries, an SMS service provider may help you open dedicated phone numbers in those countries and forward the received SMS messages to you in a unified way. To use such SMS messaging services, you have to contact the SMS service provider to discuss the details.

SIM Hosting
In this approach, an SMS service provider hosts a SIM card for you. The SIM card’s mobile phone number will serve as a dedicated phone number of your SMS application. To use the service, you mail your SIM card to the SMS service provider. Later if you end the service, the SMS service provider will mail the SIM card back to you. The SIM card will be put into a GSM/GPRS modem, which is connected to an SMS gateway. The SMS gateway will forward all received SMS messages to your computer using a certain protocol / interface. For example, HTTP, HTTPS, XML over HTTP/HTTPS, SMTP (SMS to email), SMPP, etc.

Like receiving SMS messages using your own mobile phone or GSM/GPRS modem, SIM hosting has a major weakness — it cannot handle a large amount of SMS traffic. The advantage of SIM hosting is that you do not need to buy, set up and manage the necessary equipment. Also, you do not need to write any code to control the receiving of SMS messages from a GSM/GPRS modem via low-level AT commands, which means you can concentrate on the business logic of your SMS application. The SMS service provider may provide you a detail log of the incoming SMS messages.

Shared Phone Number
In this approach, the SMS service provider rents dedicated phone numbers from wireless carriers. Each phone number will then be shared by a number of the SMS service provider’s customers for receiving SMS messages. Since the phone number is provided by a wireless carrier directly (not through a SIM card) and the SMS service provider has a high speed connection to the SMSC or SMS gateway of the wireless carrier, the SMS service provider is capable of handling a large amount of SMS messages with the phone number. As a result, the users of such shared phone number service can enjoy a higher SMS transmission rate than using SIM hosting services or using their own wireless modem. The cost of shared phone number service is less expensive than renting your own dedicated phone number from a wireless carrier. A detail log of the received SMS messages is sometimes provided by SMS service providers.

Like using SIM hosting service, using shared phone number service has the advantage that you do not need to buy, set up and manage any equipment (e.g. GSM / GPRS modems) and write any low-level code for receiving SMS messages. Hence, an SMS application developer can concentrate on the business logic of his/her SMS messaging application.

The weakness of shared phone number service is that the bandwidth is shared, i.e. the performance drops if the number of users sharing the phone number increases, or if the amount of incoming SMS traffic required by other users increases.

Registering Keywords
Since multiple users share a single phone number, when the SMS gateway of the SMS service provider receives an SMS message, it needs a way to determine which user to forward the SMS message to. SMS service providers’ engineers come up with a solution like this: First, a user registers one or more keywords to associate with his/her SMS messaging application. Later when the SMS gateway receives an SMS message that begins with one of the keywords, it will forward the SMS message to that SMS messaging application.

Here is an example for illustration. Suppose you want to develop an SMS messaging application that provides free ring tone download service. A user will be able to perform two functions: listing the free ring tones that are available and requesting a ring tone to be sent to a mobile phone.

To receive SMS messages from users, you can subscribe to the shared phone number service of an SMS service provider and register two keywords, list and download, to be associated with your SMS messaging application.

To request the list of free ring tones that are available on your server, the user can send the following SMS text message to the shared phone number:

list

When the SMS gateway of the SMS service provider receives the above SMS text message, it parses its content and extracts the keyword list . It then searches a database to find out which SMS messaging application is associated with the keyword list. As your SMS messaging application is associated with the keyword list, the SMS text message will be forwarded to your SMS messaging application.

The keyword list indicates that the user wants the list of free ring tones that are available on your server. Hence, your SMS messaging application should return an SMS text message that contains something like this:

Free ring tones available:

1. Ringtone ABC
2. Ringtone CDEF
3. Ringtone X
4. Ringtone Y

To download the second ring tone, the user can send an SMS text message that looks like this to the shared phone number:

Download 2

Since the keyword download is also associated with your SMS messaging application, the SMS gateway will forward the above SMS text message to your SMS messaging application. This time the keyword download indicates that the user wants to download a ring tone. Your SMS messaging application should encode the second ring tone in an SMS message and send it to the user.

Labels : DiggIt!  |   Del.icio.us


How to Send SMS Messages from a Computer?

In general, there are two ways to send SMS messages from a computer / PC to a mobile phone:

1. Connect a mobile phone or GSM/GPRS modem to a computer Then use the computer / PC and AT commands to instruct the mobile phone or GSM/GPRS modem to send SMS messages.

The SMS specification has defined a way for a computer to send SMS messages through a mobile phone or GSM/GPRS modem. A GSM/GPRS modem is a wireless modem that works with GSM/GPRS wireless networks.

To send SMS messages, first place a valid SIM card from a wireless carrier into a mobile phone or GSM/GPRS modem, which is then connected to a computer. There are several ways to connect a mobile phone or GSM/GPRS modem to a computer. For example, they can be connected through a serial cable, a USB cable, a Bluetooth link or an infrared link. The actual way to use depends on the capability of the mobile phone or GSM/GPRS modem. For example, if a mobile phone does not support Bluetooth, it cannot connect to the computer through a Bluetooth link.

After connecting a mobile phone or GSM/GPRS modem to a computer, you can control the mobile phone or GSM/GPRS modem by sending instructions to it. The instructions used for controlling the mobile phone or GSM/GPRS modem are called AT commands. (AT commands are also used to control dial-up modems for wired telephone system.) Dial-up modems, mobile phones and GSM/GPRS modems support a common set of standard AT commands. In addition to this common set of standard AT commands, mobile phones and GSM/GPRS modems support an extended set of AT commands. One use of the extended AT commands is to control the sending and receiving of SMS messages.

Drawback
Using a mobile phone or GSM/GPRS modem to send SMS messages has a major drawback that is the SMS sending rate is too low. Only 6-10 SMS messages can be sent per minute (when the “SMS over GSM” mode is used).

2. Connect the computer / PC to the SMS center (SMSC) or SMS gateway of a wireless carrier or SMS service provider. Then send SMS messages using a protocol / interface supported by the SMSC or SMS gateway.

If you need a high SMS sending rate, obtaining a direct connection to the SMS center (SMSC) or SMS gateway of a wireless carrier is necessary. The connection may be made through the Internet, X.25 or dial-up. If you cannot get a direct connection to the SMSC or SMS gateway of a wireless carrier, another choice is to get a connection to the SMS gateway of an SMS service provider, which will forward SMS messages towards a suitable SMSC.

It can be difficult for small businesses or individual application developers to obtain a direct connection to the SMSC or SMS gateway of a wireless carrier since a wireless carrier may only provide such service to those who have huge SMS traffic. Buying SMS messages in bulk means the total fee will be very high (although the fee per SMS message will be low).

A more convenient way to send SMS messages is to use the SMS connectivity service of an SMS service provider. SMS service providers are also known as SMS gateway providers, SMS resellers and SMS brokers because of the following reasons:

SMS gateway providers – An SMS service provider provides an SMS gateway for its users to send SMS messages to. This SMS gateway will then route the SMS messages to another SMS gateway or SMSC.

SMS resellers and SMS brokers — SMS service providers buy a large amount of SMS messages from a lot of wireless carriers at a low price per SMS message. They then sell the SMS messages at a price higher than the cost.

It is easy to send SMS messages with an SMS service provider. Here are the typical steps:

1. Register for an account on the SMS service provider’s web site. (An SMS service provider may allow newly registered users to send a few free SMS messages for testing its service quality.)

2. Log into the account.
3. Buy a number of credits or SMS text messages online. Many SMS service providers support credit card payment and some also support PayPal.
4. Send SMS messages using a protocol / interface (e.g. HTTP, email, FTP) supported by the SMS service provider.

SMS service providers can be divided into two categories depending on how they require you to pay for their SMS messaging service:

* Credit-based — You purchase a number of credits from the SMS service provider’s web site. Sending one SMS message will cost you one or more credits, depending on the country you send the SMS message to. For example, sending an SMS text message to India may cost you one credit while sending an SMS text message to the US may cost you two credits.
* SMS-based — You purchase a number of SMS messages from the SMS service provider’s web site. The cost per SMS message is the same for all destinations. For example, if you purchase ten SMS messages, you can send at most ten SMS messages no matter the destination is India or the US.

The cost per SMS message sent depends on which SMS service provider you choose and how many SMS messages you purchase.

SMS gateways of SMS service providers and wireless carriers very often support one or more of the following protocols / interfaces: HTTP, HTTPS (HTTP + SSL encryption), XML over HTTP / HTTPS, SMTP (email to SMS), FTP. Some also support the SMPP protocol, which is usually used by advanced users. SMSC protocols other than SMPP are not commonly supported.

After receiving your HTTP request, the SMS gateway will forward your SMS text message towards the recipient. The SMS gateway will then send back an HTTP response that contains a return value. The return value indicates whether there is any error. For example, a certain SMS gateway may use the return value 0 to indicate that there is no error, the return value 1 to indicate the error “The account does not have enough credits”, the return value 2 to indicate the error “The SMS message is too long”, etc.

Labels : DiggIt!  |   Del.icio.us


PHP Custom Error Messages

This is a continuation to my post PHP Magic Constants.
Here I would like to demonstrate a real time example of magic constants.

I am going to write a user function for generating a user-level error/warning/notice message.

function myErrorFunction($error_message,$line,$file)
{
if($error_message!='')
{
$error_string = "User Error : {$error_message} in
{$file} on line number {$line}";
echo $error_string;
die();
}

}

myErrorFunction('test error message',__LINE__,__FILE__);


Now, you can call this function any where in your
script. It should print the error message as follows.

User Error : test error message in H:\test\ccodlib\test.php on line number 12


In the above function,
• die() is a portable way of causing the program to crash.
• __FILE__ is replaced (during compilation) with the name of the file containing the code (as a string).
• __LINE__ is replaced (during compilation) with the current line number (as an integer constant).

------------------

you can also achieve the above functionality by using the built in function “Trigger_error()” provided by PHP.

Labels : DiggIt!  |   Del.icio.us


Google

Archives

Previous Posts

Links