Friday, 19 December 2014

Hide Drives with CMD

How to Hide Drives with CMD?

Step.1: First Click on Start then Run. If you are using window 8 then first click on start ad search for Run or and then hold down the windows key and press “R”.
Step.2: The Run box will appear. Type cmd in the Run box and press enter.
Step.3: Now command promt window is open and type “Diskpart” and then press Enter.
Step.4: To see the list of all drives details just type “list volume” and Hit Enter.
Step.5: If you have some personal data in drive E and you want to hide it then type “Select volume E” and press Enter.
Now, the selected drive hides successfully. But the last part is still remaining which is to hide.
hide-any-drive-1
Step.6: To hide the drive you must have to type “Remove Letter E” and then press Enter.
drive-hidden.2
Now your drive is successfully hidden.
 
 

How do i get the Drive Back?

Step.1: Back up the scroll and do the steps 1,2,3,4 and 5 again.
Step.2: Now complete the step 5. Just make sure that you have to complete it till “Select volume E”.
Step.3: To hide the drive enter in the article we typed “Remove letter E”. Now type “Assign letter E” to unhide it and then press the enter.
Step.4: Check it if you have successfully got the drive back and restart your computer.
hide-any-drive-with-cmd.3
 
 

How to Enable Copy Paste in CMD – Windows ?

By default, windows not allowed user to Copy or Paste a text in command prompt. But to enable CMD for copy and paste there is an option.
By using the following steps you can easily copy and paste:
Step.1: Go to the Run and Type cmd and then press enter or to select the command prompt using X key.
Step.2: On the Title of the cmd window do the Right Click and select the properties like shows below in the picture.
CMD-properties-copy-paste
Step.3: On the Right Hand side under the Edit Option you will see a Pop window and check Quick Edit Mode and then click Ok.
Step.4: By using CTRL + C keys just copy and Text from here or anywhere and on cmd do the right click by using mouse. Now you will see, in cmd the text has been pasted automatically.  To copy a text CTRL + C is important.
 
For more details visit www.techiego.com 

Thursday, 11 December 2014

Develop Android Application

The tutorial of “How to Develop Android Application” is based on API Level 17 and Android 4.2 (Jelly Bean).

Develop Android Application:

  1. What do you Need:
  • Knowledge of Basic XML
  • Knowledge of Basic Java
  • Knowledge of Basic Eclipse
  1. Prerequisites:
  • First you need the Android SDK and IDE. (Android offers a special bundle for that: Android SDK Bundle)
  • Download the Android SDK Bundle then unzip it and run as “SDK Manager.exe”.
  • Start the Eclipse
  1. Create a Android Virtual Machine (dalvik):
On your computer you can create and run a virtual android machine to run, test and debug your application. Later to this virtual machine you can deploy your application.
  • At the navigation toolbar click on “Windows”.
  • Open “Android Virtual Device Manager”.
list-of-existing-android.1
Create a “New” Virtual Device:
Edit-virtual-device.2
Be sure that “Use Host GPU” is enabled. To use the Host GPU this allows the AVD and this helps you to render the AVD as much faster.
After that you can start the AVD:
start-AVD.3
  1. Create a New Project:
  • First open a “File”.
  • Then select “New”
  • New Android Application Project window is open.
For your project chose a new and click to the next:
new-android-application.4
Now Configure a Project and click to the next:
configure-project.5
Now Configure Launcher Icon window is open:
Here, you can choose a launcher Icon that will be displayed on your mobile phone and click to the next.
configure-launcher-Ikon.6
Create a New Activity window is open and click to the next.
create-activity.7
New window is open to configure your Activity and then click to the Finish.
new-android-app.8
Eclipse looks similar to that after finishing it.
tutorial-aplication.9
 
  1. Implement the Look and Feel:
To “/res/layout/” navigate in the package explorer and open “activity_main.xml”
Right click on the “Hello World” and then delete it.
5.1 Create an static Attributes:
Select “/res/values/strings.xml”
 Android-resource.10
“Add” a new entry
Select the color entry and then press ok and after that set the following attributes:
attributes-for-color.11
Add a few more String (!) attributes:
Name/value:”miles” /”to Miles”
Name/value:”kmh” /”to km/h”
Name/value:”calc” / “Calculate”
Switch from “Resource” to “string.xml” and make sure that your code is look similar to that snippet:
view plaincopy to clipboardprint?
<resources> 
<string name="app_name">TutorialApplication</string> 
<string name="action_settings">Settings</string> 
<string name="hello_world">Hello world!</string> 
<color name="myColor">#eeeeee</color> 
<string name="miles">to Miles</string> 
<string name="kmh">to km/h</string> 
<string name="calc">Calculate</string> 
</resources> 
 5.2 Add Views
Select “/res/layout/activity_main.xml”
Via double-click, open Android editor.
There are two possibilities. Via drag & drop you can create a new view or edit the XML source code. In this tutorial via drag & drop we can add the views.
Now, let’s start building our app. At first for the output, we have to add a “Text Field”.
text-fields.12
To your application drag this field.
Select the section of “Form Widget” and to your App drag a Radio Group and make sure that the Radio Group has two Radio Buttons. Finally you can add a normal button.
tutrial-application.13
 
Switch from “Graphical Layout” to “activity_main.xml” and make sure that your code looks similar to that:
view plaincopy to clipboardprint?
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:tools="http://schemas.android.com/tools" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:paddingBottom="@dimen/activity_vertical_margin" 
android:paddingLeft="@dimen/activity_horizontal_margin" 
android:paddingRight="@dimen/activity_horizontal_margin" 
android:paddingTop="@dimen/activity_vertical_margin" 
tools:context=".MainActivity" > 

<EditText 
android:id="@+id/editText1" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:layout_alignParentLeft="true" 
android:layout_alignParentTop="true" 
android:layout_marginLeft="24dp" 
android:layout_marginTop="31dp" 
android:ems="10" 
android:inputType="numberDecimal|numberSigned" > 

<requestFocus /> 
</EditText> 

<RadioGroup 
android:id="@+id/radioGroup1" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:layout_alignLeft="@+id/editText1" 
android:layout_below="@+id/editText1" 
android:layout_marginTop="28dp" > 

<RadioButton 
android:id="@+id/radio0" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:checked="true" 
android:text="RadioButton" /> 

<RadioButton 
android:id="@+id/radio1" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:text="RadioButton" /> 
</RadioGroup> 

<Button 
android:id="@+id/button1" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:layout_alignLeft="@+id/radioGroup1" 
android:layout_centerVertical="true" 
android:text="Button" /> 

</RelativeLayout> 
 5.3 Edit the view properties
Via right-click on the view or via XML, you can edit the properties of Views.
Navigate to “res/layout/” and open the Graphical Layout of your “activity_main.xml”
Right-click on the first Radio Button and open the “Edit Text”
resource-chooser.14
To the second Radio Button, assign the miles property
For the first Radio Button set the “Checked” property (Other Properties -> inherited from compound button -> checked -> true)  
For the Text Field to “number Signed” and number Decimal” set the “Input type” property.
To the Button assign “calc” and for the “on Click” property set “calculate” (Other Properties -> inherited from view -> on Click)
Set Background-Color (Right-click on an empty space on your Application -> Edit Background)
type-text-field.15
After that change the Background should be #eeeeee! To see the difference it can be difficult.
  1. Implement the Logic
After we implement the Frontend-View we have to implement the logical part with Java!
Switch to “src/com.example.tutorialapplication/” and open “MainActivity.java”
view plaincopy to clipboardprint?
package com.example.tutorialapplication; 

import android.os.Bundle; 
import android.app.Activity; 
import android.view.Menu; 
import android.view.View; 
import android.widget.EditText; 
import android.widget.RadioButton; 
import android.widget.Toast; 

public class MainActivity extends Activity { 

    // public var 
    private EditText text; 

    // default func 
    @Override 
    protected void onCreate(Bundle savedInstanceState) { 
        super.onCreate(savedInstanceState); 
        setContentView(R.layout.activity_main); 
        // findViewById = Finds a view that was identified by the id attribute 
        // from the XML that was processed in onCreate(Bundle). 
        // (EditText) = typecast 
        text = (EditText) findViewById(R.id.editText1); 
    } 

    // default func 
    @Override 
    public boolean onCreateOptionsMenu(Menu menu) { 
        // Inflate the menu; this adds items to the action bar if it is present. 
        getMenuInflater().inflate(R.menu.main, menu); 
        return true; 
    } 

    /*
     * Will be executed by clicking on the calculate button because we assigned
     * "calculate" to the "onClick" Property!
     */ 
    public void calculate(View view) { 

        RadioButton mileButton = (RadioButton) findViewById(R.id.radio0); 
        RadioButton kmhButton = (RadioButton) findViewById(R.id.radio1); 
        // if the text field is empty show the message "enter a valid number" 
        if (text.getText().length() == 0) { 
            // Toast = focused floating view that will be shown over the main 
            // application 
            Toast.makeText(this, "enter a valid number", Toast.LENGTH_LONG) 
                    .show(); 
        } else { 
            //parse input Value from Text Field 
            double inputValue = Double.parseDouble(text.getText().toString()); 
            // convert to... 
            if (mileButton.isChecked()) { 
                text.setText(String.valueOf(convertToMiles(inputValue))); 
                // uncheck "to miles" Button 
                mileButton.setChecked(false); 
                // check "to km/h" Button 
                kmhButton.setChecked(true); 
            } else { /* if kmhButton isChecked() */ 
                text.setText(String.valueOf(convertToKmh(inputValue))); 
                // uncheck "to km/h" Button 
                kmhButton.setChecked(false); 
                // check "to miles" Button 
                mileButton.setChecked(true); 
            } 
        } 
    } 

    private double convertToMiles(double inputValue) { 
        // convert km/h to miles 
        return (inputValue * 1.609344); 
    } 

    private double convertToKmh(double inputValue) { 
        // convert miles to km/h 
        return (inputValue * 0.621372); 
    } 
 
 
That’s was the short overview of “How to Develop Android Application”!!!!