3G vs 4G Speed Test

While 3G estimated max speed is 3Mbit/s, 4G can go up to 100 Mbit/s Here are some speed tests.



Get Adobe Flash player

A detailed comparision

ASUS Padfone

Phone in tablet. An awesome design from ASUS after Taichi, laptop-tablet hybrid with two screens.




Padfone - official site

Microsoft Visual Studio / Tips 1

These will make your life easier :)
 
Line Numbers
Go to Tools - Options - Text Editor. Select your language.















Immediate Window
Debug - Windows - Immediate Window
You can execute commands, define variables, classes and call your methods. You dont need to run your application. Detail Information - MSDN
















Todo List
Start your comments with "Todo:"  These comments will be showed at Task List window. The comments with start these special words in all over your solution are showed. There is also Hack and Undone markers.
To open Task List window go to View - Task List. Choose "Comments" from dropdown menu. If you choose "User Tasks", you can create tasks, assign priority and mark them as completed.
Detail information - MSDN













Refactor
Go to Refactor menu or right click and choose Refactor.
For example you can easily create properties from fields.

Custom Keyboard Shortcuts
Tools - Options  - Environment - Keyboard - Assign your favorite keys















Customize Your Toolbars and Menu Items
Tools - Customize
Here you can arrange toolbars and menu items.



















Code Snippets
You can easily insert pre-defined code blocks. You can design your own code snippets
Detail information - MSDN
Snippet Designer
Code Project - Create Your Own Snippets

Right click and choose Insert Snippet
Edit - IntelliSense  - Insert Snippet
Right shortcut of snippet and ENTER
 
















Open Complete Word Window ShortCut
ALT GR + Left Arrow or CTRL + Space

Complete Word Window Transparent

Press CTRL or ALT GR and hold for a while.
Its very annoying when you cant see the code behind it.

 













To be continued...

Happy coding

Connect MySql Database with C#

First go to MySQL site and download MySQL Connector.
After you installed it, you are ready to go. Its that simple and easy.
Here is an example

Add Mysql.Data assembly reference

  1. using System.Data;
  2. using MySql.Data.MySqlClient;
  3.  
  4. public DataTable GetDataFromMySql()
  5. {          
  6.     DataSet ds = new DataSet();
  7.     MySqlDataAdapter da;
  8.     MySqlConnection con = new MySqlConnection("Server=your_server;Database=your_db;Uid=your_username;Password=your_password");
  9.  
  10.     try
  11.     {
  12.         MySqlCommand cmd = new MySqlCommand("select * from your_table", con);
  13.         con.Open();
  14.         da = new MySqlDataAdapter(cmd);
  15.         da.Fill(ds);                
  16.     }
  17.     catch
  18.     {
  19.         throw;
  20.     }
  21.     finally
  22.     {
  23.         if (con.State == ConnectionState.Open)
  24.             con.Close();
  25.     }
  26.  
  27.     return ds.Tables[0];
  28. }


Happy Coding

C# Call Constructor From Constructor

  1. public class A
  2. {
  3.     public A() { }
  4.  
  5.     public A(int i) : this() { }
  6.  
  7.     public A(int i, string s) : this(i) { }
  8. }
  9.  
  10. public class B : A
  11. {
  12.     public B() { }
  13.  
  14.     public B(int i) : base() { }
  15.  
  16.     public B(int i, string s) : base(i, s) { }
  17. }

Class A constructors call itself constructor by using this keyword. B is derived from A. Constructors of B call base constructors using base keyword.

Happy coding
m ant / Mechanical Ant