Sunday, October 21, 2007

Reverse string in VB.net

I was trying to find out how to reverse a string in VB.net and after about 45 minutes of trial and error I found out how :)

here it is

I created a form with 1 textbox and 1 button.
I wanted to reverse the text I entered in the textbox
The idea is you convert the text into an array and use the reverse array built in function in VB.net

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim reverse() As Char = Text.ToCharArray() 'identify the dim and convert it to a char array
reverse = TextBox1.Text
Array.Reverse(reverse) 'Reverse the array (our text)
TextBox1.Text = reverse 'Display the result in the same textbox
Clipboard.SetText(TextBox1.Text) 'Store the new text in the clipboard
End Sub

Have phun

Wednesday, September 19, 2007

All the partitions are gone !

Some people (and I was one them) got this problem that 'suddenly' they found all the partition in their HDD are gone and they have to repartition the HDD and lose all the data (which totally sucks).
The main cause of this problem is that the partition table either damaged or can't be red.
So we have to REwrite the partition table and I found a good utility to do this and I used it with my old HDD (before it got totally f***ed up due to thousands of bad sectors) and I rescued successfully many important data.

TestDisk
It is an open source utility which can fix the partition table and recover deleted partitions.
It has many other options we only gonna see how to recover our partitions.
I used "Hiren's Boot CD 8.9" which includes version 6.7-WIP of TestDisk.
Also I used M$ Virtual PC 6.

Let's get started.

I have a HDD and I deleted all the partitions, restarted the machine and opened TestDisk (Dos version).
I Chose "No Log" coz I don't need the log file though.
Choose the HDD you wanna recover.
Choose |Intel| (or your OS).Choose "Analyse".
Choose "Proceed".
Give the program sometime to detect the partitions (depends on the HDD status).
And BNAG :)
You have your partitions.
Press "Enter" to continue to rewrite the table.

Choose "Write" and press Enter.
The partition table will be rewritten and you'll have to restart the machine to get the new settings done.
Have phun and congrats.
Your data are back again.

By the way...
You can't get Hiren's Boot CD through their website. Google for it.

TestDisk can run under other operating systems (check this page):
http://www.cgsecurity.org/wiki/TestDisk_Download

Monday, September 3, 2007

:(

I got my HDD f***ed up and I lost some important data including the next 3 or 4 posts subjects and as I got my new PC :) I'll recollect the data and remember the subjects or make new ones (especially the posts about consoles).

See ya very soon

Saturday, August 11, 2007

Which console should I buy?

I managed to write this review in a table but Blogger sucks with tables :x (and many other things)
Anyways.
all gamers always worry about which console they should buy.
Capabilities vs Prices.
Today I'll write a review about XBOX 360 showing almost all the details which matter.
I'll also review PS3 and Wii and I'm working on them.


XBOX 360


Price
- Basic model: $299
- Loaded model: $399
- Elite model: $499

Microprocessor
- 3.2 GHx PowerPC with 3 dual threaded processor cores

Graphics Processor
- GPU type: ATI-based custom processor
- Clock speed: 500 MHz
- Video RAM: Up to 512 MB GDDR3 system RAM (700 MHz) plus 10 MB embedded DRAM (eDRAM) frame buffer.
- Video memory bandwidth-21.6 GBPS to system RAM.
- 256 GBPS to eDRAM

Video:
- Native video resolution: 16:9 wide screen 720p, 1080i, 1080p.
- Component HDTV output.
- No HDMI output.

System memory:
- Main system RAM: 512 MB GDDR3 RAM (700 MHz), shared with GPU.
- Memory bandwidth-22.4 GBPS

Storage:
- Optical drive: 12X dual-layer DVD, HD-DVD drive offered as an add-on.
- Supported optical format: XBOX DVD, DVD-Video, DVD-ROM, DVD-R/RW, CD-DA, CD-ROM, CD-R, CD-RW, WMA CD, MP3 CD and JPEG photo CD.
- HD-DVD supported with optional HD-DVD drive.
- Hard Drive: 20 or 120 GB removable hard drive (based on the model).
- Memory card ports: 2 XBOX 360 Memory Unit ports (64 or 256 MB each).
- USB 2.0 ports: 3 ports.

Networking:
-Ethernet: 1 port (100 Mbps).
-Wireless: WI-FI ready, 802-11-based controller communications.

Online services:
- Pervasive online experience through XBOX Live Silver (free), XBOX Live Gold; includes ability to download full movies and TV shows.

Multimedia features:
- Full Media Center Extender 2.0 experience
- Live and recorded TV support (including HDTV)
- Support Streaming video, audio and photo slideshows.
- Plays contents from portable media players including iPod and PSP.
- Plays protected WMA files.
- Displays contents from portable storage devices.

Controllers:
- 4 wireless (plus wired controllers via USB ), controllers will work with Windows PCs as well.
- Controllers feature removable batteries.

Reverse compatibility:
- Partial compatibility with original XBOX previous generations titles.

Other Info
- Improves legacy game experience as games are upscaled to HDTV resolutions.

Sales:
- USA 5.4 million consumer sales as of May, 18 2007.
- Japan 420,000 consumer sales as of July, 18 2007.
- Worldwide 11.6 million consumer sales as of July 2007.

A PDF version will be available soon :)
Have phun!
Sources
NextGen Console Helper


Thursday, August 9, 2007

Add "Life" to your blog, Emotionize it :D



Today I'll teach you how to add emotions automatically to your blog.

Emotions will make your blog looks cooler and more alive.

Just follow the steps:
I. Sign in to your blogger home page.
II. Click on "Layout" for the blog you wanna custome.
III. Click on "Edit HTML".
IV. Click on "Download Full Template" and save the .XML file in your hard drive. (This is important to backup your template in case you mess things up).
V. Edit the HTML code as follow:
Enter this code inside <head >, </head> tags (Get the code from this page)


VI. Replace the <body> tag in your template with:
<body id="body" onload="replaceText();">

VII. Congrats :), Post a topic and test it :D.

Note: If you messed things up just click on "Browse" and choose the backup file of your template then press "Upload"
And thanks for the guy who made this script.

Have Phun :)
Salam!

Wednesday, August 8, 2007

Thunderbird your Hotmail

Today I'll tell you how to install Thunderbird and use it with Hotmail, Yahoo, Gmail and many other email providers.
After the first time of using Thunderbird I feel like kicking M$ Outlook in the arse lots of times :D.
Using Thunderbird which is user friendly and very easy to use (and also works on Linux) will allow you to maintain your email account even when you're offline.
When Thunderbird had been released I couldn't log into my hotmail address with it I kept searching until I found that it needs an add-on called WebMail.

I- Download Thunderbird from here then install it.
II- Download WebMail add-on from here.
III- Download the extension you need (depending on your email account) from this page.
i.e. for Hotmail download hotmail extension here and so on with other extensions.
IV- Run Thunderbird and open Tools --> Add-ons --> Click "Install" and choose the WebMail add-on file you downloaded and restart Thunderbird.
V- Again Tools --> Add-ons --> install the Hotmail (or your choice) extension you downloaded and restart Thunderbird again.

Now we installed the program, let's create our account.:
I- Open File --> New --> Account
II- Select Email Account and press Next.
III- Write your Name and your email address and press next.
IV- In the Server Information Enter
Server Type : POP
Incoming Server : localhost.
Outgoing Server : localhost (You may not find this but don't worry).
Press Next.

V- Enter your email address in the "Incoming User Name" and "Outgoing User Name" fields.
VI- Choose an account name Click next, then finish.
VII- Enter the password in the popup text box and download your messages.
Congrats :)

Note: You can check other options of the extensions from Tools -> Add-ons -> choose the extension and press options.
For example you can specify whether your Hotmail account is Live or is the old version (from Mode tab).

and you can also tell the extension to download specific folders from your email and whether you want it to download the junk folder or not :)
I told you....Thunderbird RAWKS :)
have fun
Salam

Wednesday, August 1, 2007

Just testinِ

Hey, mates.
This is a test post to see the outlook of the template I chose.
This weblog will blow your head off :)

Salam