How to’s

Pattern Programs in Java – Pattern 3

Pattern 3 :

1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
1 2 3 4
1 2 3
1 2
1

 

Java Code for above pattern :

[sourcecode lang=”java”]

import java.util.Scanner;

 

public class Pattern3

{

public static void main(String[] args)

{

Scanner sc = new Scanner(System.in);

//Taking rows value from the user

System.out.println("How many rows you want in this pattern?");

int rows = sc.nextInt();

System.out.println("Here is your pattern….!!!");

//Printing upper half of the pattern

for (int i = 1; i <= rows; i++)

{

for (int j = 1; j <= i; j++)

{

System.out.print(j+" ");

}

System.out.println();

}

//Printing lower half of the pattern

for (int i = rows-1; i >= 1; i–)

{

for (int j = 1; j <= i; j++)

{

System.out.print(j+" ");

}

System.out.println();

}

//Closing the resources

sc.close();

}

}

[/sourcecode]

Output :

1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
1 2 3 4
1 2 3
1 2
1

 

Pattern Programs in Java – Pattern 2

Pattern 2 :

1
2 2
3 3 3
4 4 4 4
5 5 5 5 5

Java Program for the above pattern:

[sourcecode language=”java”]

import java.util.Scanner;

public class MainClass

{

public static void main(String[] args)

{

Scanner sc = new Scanner(System.in);

//Taking rows value from the user
System.out.println("How many rows you want in this pattern?");

int rows = sc.nextInt();

System.out.println("Here is your pattern….!!!");

for (int i = 1; i <= rows; i++)

{

for (int j = 1; j <= i; j++)

{

System.out.print(i+" ");

}

System.out.println();

}

//Close the resources
sc.close();

}

}

[/sourcecode]

How to change editor full screen in NetBeans IDE?

Objectives :

  • How to change editor full screen in NetBeans IDE?

NetBeans IDE is having a new and great feature where we can full screen the code editor window.

This small video tutorial shows how to change editor full screen in NetBeans IDE?

[youtube=”https://www.youtube.com/watch?v=w49znamwczw&feature=youtu.be”]

Being a trainer, I need to share screen with code and sometime only code nothing else. This is one of the most useful feature for me while teaching Java technologies and UI technologies such as HTML5, CSS, JS, etc. This is why I love NetBeans IDE a lot.

Hope this tutorial is helpful for you as well.

How to create AVD (Android Virtual Device) or Emulator?

Objectives :

  • How to create AVD?
  • How to create Android Virtual Device?
  • How to create Emulator for Android?
  • What is AVD (Android Virtual Device)?

AVD (Android Virtual Device) / Emulator

AVD (Android Virtual Device) is an Emulator which helps in running Android applications onto your computer/laptop and you don’t need physical device every time you write/change code. Using an AVD you can run and test nearly every feature of your application right from simple text, GPS, Camera, Database, etc.

Creating AVD :

  • To create go to Window menu > Click on “Android Virtual Device Manager” or “AVD Manager” option.

  • In Android Virtual Device Manager or AVD Manager window, click New button.

  • In Create new Android Virtual Device (AVD) window, set credentials for new AVD you wish to create, press OK.

  • Select AVD you have created from the list and click Start > click Launch.

  • Here is an AVD you have created, now you are ready to run your Android application.

You can have a look at this tutorial so that you can Quickstart Android Application Development. So start writing your Android applications now.

APN Setting for USB Modem or Netsetter

Objectives :

  • What is APN Setting for Airtel USB Modem?
  • What is APN Setting for Idea USB Modem?
  • What is APN Setting for BSNL USB Modem?
  • What is APN Setting for Vodafone USB Modem?
  • What is APN Setting for Aircel USB Modem?
  • What is APN Setting for Tata Docomo USB Modem?
  • What is APN Setting for Reliance USB Modem?
  • What is APN Setting for Uninor USB Modem?

 

Airtel APN Setting :

Profile Name: Airtel
APN : airtelgprs.com
Access Number: *99#

Idea APN Setting :

Profile Name: Idea
APN : Internet
Access Number: *99#

BSNL APN Setting :

Profile Name: BSNL
APN : bsnlnet
Access Number: *99#

Vodafone APN Setting :

Profile Name: Vodafone
APN : www
Access Number: *99#

AirCel APN Setting :

Profile Name: Aircel
APN : aircelgprs
Access Number: *99***1#

Tata Docomo APN Setting :

Profile Name: Docomo
APN : tata.docomo.internet
Access Number: *99#

Reliance APN Setting :

Profile Name: Reliance
APN : rcomwap
Access Number: *99#

Uninor APN Setting :

Profile Name: Uninor
APN : Uninor
Access Number: *99#

Enjoy internet surfing now.

Android Emulator Keyboard Shortcuts

Objectives:

  • How to use Emulator for Android?
  • What are the Android Emulator Shortcuts?
  • What are the Android Emulator Keyboards Shortcuts?
  • What are the Keyboard Shortcuts for Android Emulator?
  • How to use Android Emulator from Keyboard?

Keyboard shortcuts for Android Emulator :

Emulator Key / Function

Keyboard Shortcut

Home Home
Menu F2 or Page-up
Star Shift + F2 or Page-down
Back Esc
Call / Dial F3
Hang-up / End Call / Lock Screen F4
Search F5
Power F7
Volume-up Keypad ‘+’ or Ctrl + 5
Volume-down Keypad ‘-’ or Ctrl + 6
Camera Ctrl + Keypad 5 or Ctrl + F3
Previous Layout Orientation Keypad 7 or Ctrl + F11
Next Layout Orientation Keypad 9 or Ctrl + F12
Toggle Cell Networking ON/OFF F8
Toggle Code Profiling F9 (only with -trace startup option)
Toggle Full screen Mode Alt + Enter or Alt + Return
Toggle Trackball Mode F6
Enter Trackball Mode Temporarily Delete
DPad Left Keypad 4
DPad Right Keypad 6
DPad Up Keypad 8
DPad Down Keypad 2
DPad Center Keypad 5
Increase Onion Alpha Keypad * (Multiply or Star)
Decrease Onion Alpha Keypad / (Divide)

Enjoy coding.

Source : Android

Android Secret Codes and Hacks

wpid-jb-new-logo.png

Objectives :

  • How to find IMEI Number of Android Phone?
  • How to get Complete Information about  your Phone and Battery of Android Phone?
  • How to Reset Android Phone?
  • How to Factory Reset Android Phone?
  • How to Format Android Phone?
  • How to monitor your GTalk Service of your Android Phone?
  • How to check camera settings of your Android Phone?
  • How to change settings of End Button of Android Phone?
  • How to change settings of Power Button of Android Phone?
  • How to switch off Android phone directly?
  • How to take backup of Android Phone?
  • How to backup your images, songs, videos, files, etc. from Android Phone?
  • How to enter into service mode of Android Phone?
  • How to test Bluetooth of Android Phone?
  • How to test GPS of Android Phone?
  • How to test WLAN of Android Phone?
  • How to test Wireless LAN of Android Phone?
  • How to check MAC address of Android Phone?

This is generally for the people who don’t know anything about the phones & they get cheated while buying new phones & resell phones as well as during repairs.

The information provided in here work for nearly all Android phones. Android users can unlock some hidden features of their cell phones. But user can use these codes at their own risk, anyone is not responsible of any damage or data loss or any problem occurred.

This article will answer all your How-to questions mentioned above and many more questions too which I forgot to list here.

IMEI Number

Code : *#06#

This code will display IMEI (International Mobile Equipment Identity) Number / code of your device.

Complete Information about  your Phone and Battery

Code : *#*#4636#*#*

This will list the complete information about your Android Phone & Battery.

Factory Data Reset

Code : *#*#7780#*#*

This will reset the complete data to factory state.

Full Factory Format

Code : *2767*3855#

This will format your phone, use this code at your own risk. We will not be responsible for anything that happens during or after format with your phone.

GTalk Service Monitor

Code : *#*#8255#*#*

This will monitor the services of GTalk.

Camera Firmware Settings

Code : *#*#34971539#*#*

This will list all the setting of your camera.

End Call / Power

Code : *#*#7594#*#*

This one is my favorite one. This code can be used to change the “End Call / Power” button action in your phone. Be default, if you long press the button, it shows a screen asking you to select any option from Silent mode, Mute mode, Data Network mode, Flight mode and Power off. You can change this action using this code. You can enable direct power off on this button so you don’t need to waste your time in selecting the option.

Backup Mode

Code : *#*#273283*255*663282*#*#*

This code can be used to take backup of your phone, here you will come across a screen where you can backup your images, songs, videos, etc.

Service Mode

Codes : *#*#197328640#*#*

This code can be used to enter into Service mode so that you can run various tests and change settings.

WLAN, GPS and Bluetooth Test

Codes : *#*#232339#*#* OR *#*#526#*#* OR *#*#528#*#*

WLAN test (Use “Menu” button to start various tests).

Code : *#*#232338#*#*

This code will show WiFi MAC address.

Codes : *#*#1472365#*#* OR *#*#1575#*#*

This code used for GPS test.

Code : *#*#232331#*#*

Use this code to test Bluetooth.

Code : *#*#232337#*#*

This code will show Bluetooth device address.

Firmware Version

Code : *#*#4986*2650468#*#*

Use this code to check version of PDA, Phone, H/W, RF Call Date.

Code : *#*#1234#*#*

Use this code to check version of PDA & Phone.

Code : *#*#2663#*#*

This code is used to check Touch Screen version.

Code : *#*#3264#*#*

This code is used to check RAM version.

Code : *#*#1111#*#*

Use this code to check version of FTA SW Version.

Code : *#*#2222#*#*

Use this code to check version of FTA HW Version.

Code : *#*#44336#*#*

Use this code to check version of PDA, Phone, CSC, Build Time, Changelist number.

Factory Tests

Code : *#*#0283#*#*

This code is used to send a Packet which Loops back.

Code : *#*#0*#*#*

This code is used to test your LCD.

Code : *#*#0673#*#* OR *#*#0289#*#*

This code can be used to test Melody of your Android Phone.

Code : *#*#0842#*#*

This code will test your Android device / phone for Vibration and Back light.

Code : *#*#2664#*#*

This code is used to check Touch Screen Test.

Code : *#*#0588#*#*

This code is useful to test Proximity Sensor.

Enjoy & have fun with your Android phone / device.

Windows 7 Shortcuts

Objectives :

  • What are the shortcuts of Windows 7?
  • What are the Windows 7 shortcuts?

 

Following are the shortcuts of Windows 7 :

Windows 7 Shortcuts

Shortcut

Purpose

Window + Home

Clear all but active window.

Window + Space

Make Windows transparent so that you can see through the desktop.

Window + Up Arrow

Maximize the active window.

Window + Down Arrow

Minimize the active window or Restore window is maximized.

Shift + Window + Up Arrow

Maximize the active window vertically.

Window + Left Arrow

Dock Window to the left side of the monitor.

Window + Right Arrow

Dock Window to the right side of the monitor.

Shift + Window + Left Arrow

Move window to the left side of the monitor.

Shift + Window + Right Arrow

Move window to the right side of the monitor.

Drag Window to Top

Maximize

Drag Window to Left

Dock Window to the left half of the monitor.

Drag Window to Right

Dock Window to the right half of the monitor.

Shake Window Back/Forth

Minimize everything but current window.

Double click Top Window Border (Edge)

Maximize the window vertically.

Window + Number (1-9)

Start the application pinned to the taskbar in respective position, switch to respective program.

Shift + Window + Number (1-9)

Start the new instance of an application pinned to the taskbar in respective position.

Ctrl + Window + Number (1-9)

Cycle through open window for application pinned to taskbar at respective position.

Alt + Window + Number (1-9)

Open the Jump List for application pinned to taskbar.

Window + T

Focus & Scroll through items on the Taskbar.

Window + B

Focus the System Tray items.

Window + D

Minimize All windows at a time.

Shift + Click on Taskbar Button

Open a program or quickly open new instance of currently running program.

Ctrl + Shift + Click on Taskbar Button

Open a program as an Administrator.

Shift + Right Click on Taskbar Button

Show the window menu for the program (just like XP).

Shift + Right Click on grouped Taskbar Button

Show the window menu for the group.

Ctrl + Click on grouped Taskbar Button

Cycle through the windows of the group.

Ctrl + Shift + N

Creates a New Folder in Windows Explorer.

Alt + Up

Go up a Folder Level in Windows Explorer.

Alt + P

Toggles the Preview Pane in Window Explorer.

Shift + Right Click on a File

Adds “Copy as Path” to Context Menu, which copies the path of a file to clipboard.

Shift + Right Click on a File

Adds extra hidden items to “Send to” in Context menu.

Shift + Right Click on a Folder

Adds “Open Command Window Here”, which lets you easily open the command prompt in that folder.

Shift + Right Click on a Folder

Adds “Open in New Process”, which lets you open the same folder in new process.

Shift + Right Click in empty space

Adds “Open Command Window Here”, which lets you easily open the command prompt in that folder.

Window + P

Adjust the presentation settings for your display.

Window + ‘+’ Button

Zoom in

Window + ‘-’ Button

Zoom out

Ctrl + Shift + Esc

Open The Task Manager

 

Change font size in Eclipse

Hey friends,

Many students & professionals were asking that how they can change the font size in Eclipse.

 

Here is the way to change the font size in Eclipse :

  • Go to Window Menu Preferences > General > Appearance > Colors and Fonts
  • Then to change the font size : Go to Java > Java Editor Text Font > Edit
  • Now set the font & font size you wish, done.

 

See Video Tutorial for above :

[gigya src=”http://player.videofy.me/player.swf?videoId=605346″ width=”480″ height=”256″ quality=”high” wmode=”transparent” allowFullScreen=”true”]

Enjoy Coding!