Friday, January 15, 2010

Sending SMS using ASP.NET

What are the ways in which one can send SMS?


•Using a GSM modem: Better when one wants to implement offline applications and a very small number of SMS go every minute, usually few 10s.

•Using web service: Better when it is an online application and a very few number of SMS go every minute, usually few 10s.

•Using endpoints given by service the provider: Better when the number of SMS exceeds a few 100s per minute. Service provider demands a commitment of at least 100,000 SMS per month.

Sending SMS via a webservice or endpoints is simplest. In contrast, sending SMS via GSM modem has a few additional steps to take care of.
You can send SMS text messages using the following code snippet. The code uses a web service that can send an SMS text message to 90% of all mobile phones.


Private Sub SendMessage(ByVal p_sPhoneNumber As String, ByVal p_sMessage

As String, ByVal p_sUsername As String, ByVal p_sPasskey As String)

Dim smsService As New SMSService.SMSMessagingprocessService()

Dim sCountryCodes As String
Try

If smsService.ValidPhoneNumber(p_sPhoneNumber) Then

Dim result As Boolean = smsService.SendMessage(p_sPhoneNumber,

p_sMessage, p_sUsername, p_sPasskey)

If result = True Then

MsgBox("The message was sent",

MsgBoxStyle.Information, "SMS Messaging")

Else

MsgBox("The message could not be sent",

MsgBoxStyle.Information, "SMS Messaging")

End If

End If

Catch ex As SoapException

MsgBox("An exception occured. " & ex.Detail.InnerText,

MsgBoxStyle.Critical, "SMS Messaging")

End Try

End Sub

Tuesday, January 12, 2010

Scientists Employ Quantum Computer

In a groundbreaking feat of computation, a team of international scientists—including Harvard researchers—have calculated the precise energy of a hydrogen molecule using a quantum computer.

While scientists have been able to determine the energy of hydrogen using paper and pencil since the 1930s, they now know they can use a quantum computer to perform this—and hopefully more complex calculations—with precision. Using classical computers, calculating the energies of larger molecules was virtually unimaginable because "the numbers get literally astronomical," according to University of Queensland Physics Professor Andrew G. White, one of the authors of the study published in Nature Chemistry on Jan. 10.

"A classical computer trying to do an exact simulation of a complex process would just blow up," White said.