Friday, September 9, 2011

Encoding Conversion in Ruby Programming Language

require 'iconv'

Iconv.conv("utf-16be", "utf-8", content)

Thursday, September 8, 2011

Russian jet crash kills 43, many top hockey stars


A private Russian jet carrying a top ice hockey team slammed into a riverbank moments after takeoff Wednesday, killing at least 43 people in one of the worst plane crashes ever involving a sports team.
Both Russia and the world of hockey were left stunned by the deaths of so many international stars in one catastrophic event. Two other people on board were critically injured.
The Russian Emergency Situations Ministry said the Yak-42 plane crashed into the shores of the Volga River immediately after leaving the airport near the western city of Yaroslavl, 150 miles (240 kilometers) northeast of Moscow. The weather was sunny and clear at the time. Russian media said the plane struggled to gain altitude and then crashed into a signal tower, shattering into pieces.
Russian television showed a flaming fragment of the plane in the river as divers worked feverishly to recover bodies.
The plane was carrying the Lokomotiv ice hockey team from Yaroslavl to Minsk, the capital of Belarus, where the team was to play Thursday against Dinamo Minsk in the opening game of the season for the Kontinental Hockey League. The ministry said it had 45 people on board, including 37 passengers and eight crew.
The Emergency Ministry said Czech players Josef Vasicek, Karel Rachunek and Jan Marek, Swedish goalie Stefan Liv, Canadian coach Brad McCrimmon, Latvian defenseman Karlis Skrastins and defenseman Ruslan Salehi of Belarus were among those killed. Slovakian national team captain Pavol Demitra, who played in the NHL for the St. Louis Blues and the Vancouver Canucks, was also among the dead, officials said.
"Though it occurred thousands of miles away from our home arenas, this tragedy represents a catastrophic loss to the hockey world -- including the NHL family, which lost so many fathers, sons, teammates and friends who at one time excelled in our League," NHL Commissioner Gary Bettman said in a statement.
Russian NHL star Alex Ovechkin tweeted: "I'm in shock!!!!!R.I.P ..."
Officials said Russian player Alexander Galimov survived the crash along with a crewmember.
"Their state of health is very grave. But there is still some hope," said Alexander Degyatryov, chief doctor at Yaroslavl's Solovyov Hospital.
The crash comes on top of an already mournful year for the NHL in which three of the league's enforcers were found dead: Derek Boogaard, Rick Rypien and recently retired Wade Belak.

A Simple socket client in ruby Programming Language


require 'socket'      # Sockets are in standard library

hostname = 'localhost'
port = 2000

s = TCPSocket.open(host, port)

while line = s.gets   # Read lines from the socket
  puts line.chop      # And print with platform line terminator
end
s.close               # Close the socket when done

Sending XML over TCP/IP

Dim client As New TcpClient("127.0.0.1", 10000)
Dim ns As NetworkStream = client.GetStream

Dim xDoc As XmlDocument
xDoc = New XmlDocument
xDoc.Load("C:\Inetpub\wwwroot\Sockets\Request01.xm l")

If ns.CanRead And ns.CanWrite Then
Dim sendBytes As Byte() = Encoding.UTF8.GetBytes(xDoc.OuterXml)
ns.Write(sendBytes, 0, sendBytes.Length)

Dim responseBytes(client.ReceiveBufferSize) As Byte
ns.Read(responseBytes, 0, CInt(client.ReceiveBufferSize))

Dim xResponse As XmlDocument
xResponse = New XmlDocument
xResponse.LoadXml(Encoding.UTF8.GetString(response Bytes))

Monday, September 5, 2011

What is Dropbox

Dropbox is a free service that lets you bring all your photos, docs, and videos anywhere. This means that any file you save to your Dropbox will automatically save to all your computersphonesand even the Dropbox website. Dropbox also makes it super easy to share with others, whether you're a student or professional, parent or grandparent. Even if you accidentally spill a latte on your laptop, have no fear! You can relax knowing that Dropbox always has you covered, and none of your stuff will ever be lost.


Dropbox website

Pakistan GIS

Pakistan GIS

Sunday, September 4, 2011

The doosra - The delivery that gave oomph to offspin


The doosra did for offspin what the googly did for legspin more than a century ago: it invested a humble art with a touch of mystery and intrigue. Over the years offspinners had bowled many variations - the floater, the drifter, the under-cutter - but the trick was either confined to not spinning the ball, or at most swinging it away with the arm.
But the doosra - meaning "second" or "other one", in Hindi and Urdu - first mastered by Saqlain Mushtaq and then used to great effect by Muttiah Muralitharan and Harbhajan Singh, was the first instance of a ball that turned away off the pitch with an offbreak action, thanks to a cheeky tweak of the thumb and forefinger.
Saqlain explains it simply as "God's gift", but whether god-given, or as some suggest, a result of a kink in the elbow, the doosra has changed the well-established notion of offpsin as primarily a restrictive form of slow bowling.