Friday 1 January 2010

NetBeans Java converter



import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
*
* @author Mihai
*/
public class Main {

private final static double CENTIMETERRATE = 2.54;

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
String name = "";
double height = 0;
// TODO code application logic here

BufferedReader dataIn = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter your name: ");
try {
name = dataIn.readLine();
} catch (IOException ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
}
System.out.println("Enter your height, centimeters: ");
try {
height = Double.valueOf(dataIn.readLine());
} catch (IOException ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
}
System.out.println("Your name is " + name);
System.out.println("Your height is " + convertValue(height, CENTIMETERRATE) + " inches");
}

private static double convertValue(double number, double rate) {
double convertedNumber = 0;
convertedNumber = number / rate;
return convertedNumber;
}
}

OS


Saturday 26 December 2009

LG GW620

The GW620 is LG’s first Android-powered smartphone designed for messaging and all manner of social networking. It features a 3-inch touchscreen, a full slide out QWERTY keypad, and a 5 megapixel autofocus camera. It also support HSDPA 7.2Mbps, WiFi and GPS.
Specifications
General

Product Group 3G
Region Europe, North America
CPU Type ARM11
Network · Frequency Band: GSM 850/900/1800/1900 MHz, UMTS 900/2100 MHz
· Data Transmission: HSDPA
OS / SW Platform Linux - Android
Design

Form Factor Slide
Input Device · Type: QWERTY
· Navigation: Touch Type
Size · Dimension: 109 x 54.5 x 15.9 mm
· Weight: 139 g
Display

Main-LCD · LCD Size: 3.0 inch
· LCD Type: TFT LCD
· Colors: 262K colors
· Resolution: 320 x 480 pixels
Memory

Internal · Flash Memory Size: 512 MB
· Flash Memory Type: NAND Flash
· RAM Memory Size: 256 MB
· RAM Memory Type: SDRAM
External · Type: Micro SD
· Max Size: 32 GB
Java

Canvas Size · Normal: 320 X 240 pixels
· Full Screen: 320 X 480 pixels
Memory Size · RMS Size: 10 MB
· Heap Size: 10 MB
· Max. JAR Size: 10 MB
Configuration CLDC 1.1
Profile MIDP 2.1
Supported JSRs · JSR 75 PDA Optional Packages: File Connection
· JSR 120 WMA 1.0: SMS, CBS
· JSR 135 MMAPI 1.1 (Audio): AAC, EAAC, EAAC+, AMR-N/B, MIDI, MP3, WAV
· JSR 135 MMAPI 1.1 (Image): GIF, JPG, PNG
· JSR 135 MMAPI 1.1 (Video): H.263, H.264, MP4
· JSR 135 MMAPI 1.1 (Feature Set): Audio Capture, Audio Playback, Audio Streaming, Still Image Capture, Video Capture, Video Playback, Video Streaming, Video Resizing, Camera
· JSR 179 Location API
· JSR 184 Mobile 3D Graphics API
· JSR 185 Java Technology for the Wireless Industry (JTWI)
· JSR 205 WMA 2.0
· JSR 211 Content Handler API
· JSR 226 Scalable 2D Vector Graphics API
Features

Messaging · SMS
· MMS: MMS 1.2
· EMS
· Email: SMTP, POP3
· IM
· Predictive Text Input: T9
Browser · HTML
· XHTML
· XML
DRM · OMA DRM: OMA DRM 2.1
· OMA DRM (Delivery Method): Forward Lock, Separate Delivery, Combined Delivery
Flash Lite · Flash Lite: Flash Lite 3.0
Multimedia · Audio: AAC, AAC+, AMR, MP3, WAV, WMA
· Video: DivX, H.263, H.264, MP4, WMV
· Image: BMP, GIF, JPG, PNG
· Animation: GIF
Connectivity · Bluetooth: Bluetooth 2.1
· USB: USB 2.0
· Wi-Fi
Camera · Megapixels: 5.0
· Resolution: 2560 x 1920 Pixels
· Digital Zoom: 4x
· Video Capture
Media · FM Radio
· Music Player
· Video Player

Related Information
Technology Java, Flash Lite
Reference site Java Technology : http://java.sun.com/javame
JSRs : http://jcp.org/en/jsr
Flash Lite: http://www.adobe.com/products/flashlite

JSRs

Configuration CLDC 1.1
Profile MIDP 2.1
Supported JSRs · JSR 75 PDA Optional Packages: File Connection, PIM
· JSR 120 WMA 1.0: SMS
· JSR 135 MMAPI 1.1 (Audio): AAC, MIDI, MP3
· JSR 135 MMAPI 1.1 (Image): JPG, PNG
· JSR 135 MMAPI 1.1 (Video): 3GP
· JSR 135 MMAPI 1.1 (Feature Set): Audio Playback, Video Playback
· JSR 184 Mobile 3D Graphics API
· JSR 185 Java Technology for the Wireless Industry (JTWI)
· JSR 205 WMA 2.0
· JSR 211 Content Handler API

Hello there


// new MoSync project
// helloworld project
// Modlet project
// template

#include

using namespace MAUtil;

class MyMoblet : public Moblet {
public:
MyMoblet(){
// toDo initialisation
maSetColor(0xFFFFFFFF);
maDrawText(10,10,"hello there");
maUpdateScreen();
}

void keyPressEvent(int keyCode){
// toDo: handle key presses
if (keyCode == MAK_0)
maExit(0);
}

void keyPressRelease(int keyCode){
// toDo: handle key releases
}
}
// F11 - compile, build