2009年10月30日 星期五

Mobile Tips Tricks Hacks Cracks Reviews: Get a Mobile Dictionary for Nokia Phones

Mobile Tips Tricks Hacks Cracks Reviews: Get a Mobile Dictionary for Nokia Phones
Yes!I install it on my Nokia 5800. It's cool and I will post an Chinese article about this software.

2009年10月29日 星期四

3 言 2 語: SmartCam and Nokia 5800

3 言 2 語: SmartCam and Nokia 5800
This is useful for my nokia 5800. I can put the video on my blog.
It will be very cool.

NetBeans Java ME CLDC/MIDP Development Quick Start Guide

This is from NetBeans Java ME CLDC/MIDP Development Quick Start Guide,but some is old. So I update it here.

his document guides you through the basic steps of using NetBeans IDE to create a Java™ Platform, Micro Edition (Java™ ME platform), Mobile Information Device Profile (MIDP) application and is designed to get you started with mobile application development as quickly as possible. The tutorial takes you through some of the basic steps of working with the project system. We show you two ways to create a Java ME MIDP project named "MyHello" that displays the text "Make my day" in a device emulator. This tutorial prepares you to use other IDE features for developing CLDC/MIDP applications.

Contents
Content on this page applies to NetBeans IDE 6.7

Requirements

To complete this tutorial, you need the following software and resources:

Software or Resource
Version Required

NetBeans IDE with Java ME
Version 6.7

Java Development Kit (JDK)
Version 6 or
version 5

For help getting your system set up, please see the installation instructions.

MacOS users should refer to the MIDP Development on Mac OS Set Up Guide.

Creating a MIDP Application Using the Visual Mobile Designer

The NetBeans IDE provides a wizard that enables you to quickly create a MIDP project. When creating the project, you can choose to develop your application in the Visual Mobile Designer (VMD) or in the Source Code Editor. Using the Visual Mobile Designer gives you the ability to graphically plan out the flow of the application and design the screens the application uses. The designer automatically creates the code for the application.

Creating a MIDP/CLDC Application
  1. Choose File > New Project (Ctrl+Shift+N). Under Categories, select Java ME. Under Projects, select Moblie Application and click Next.
  2. Enter MyHello in the Project Name field. Use the default Project Location, or change it to the directory you prefer on your system. In this tutorial we refer to this directory as D:\source\java.
  3. Check the Set as Main Project and Create Hello MIDlet check boxes (both are checked by default). Click Next.
  4. Select the Java(TM) Platform Micro Edition SDK 3.0 as the Emulator Platform and use the remaining defaults. Click Next. 2009-10-29_164922
  5. Click Finish. The IDE creates the D:\source\java\MyHello project folder. The project folder contains all of your sources and project metadata, such as the project Ant script. The application itself is displayed in the Flow Design window of the Visual Mobile Designer.

    Flow view of Hello Midlet in IDE

    Note: for a complete description of the available palette components, please refer to the Visual Mobile Designer Palette Reference.

Editing the Java Source Code

Now let's edit the text displayed by the MIDlet.

  1. Click on Screen. This opens the Screen Designer window, and displays the Device screen, which is the only screen available in the application.
  2. In the Palette window, click Text Field and replace the text “Hello, World!”into "Make my day".

    2009-10-29_170957 

  3. The Screen view displays a preview of the text you enter in the Text Field.

    The text 'Make my day' is visible in Device Screen preview in the VMD's Screen view.

Compiling and Running the Project
  1. Choose Run > Run Main Project (F6) from the Run menu. Follow the progress of the project compilation in the Output window. Note that the HelloMIDlet.java file is built before it is executed. A device emulator opens to display the results of the executed MIDlet. The default device emulator is ClamshellCldcPhone1.
  2. In the device emulator window, click on the button below the Launch command. The device emulator launches the MIDlet and displays the text you entered in the source code.

    2009-10-29_172052 

  3. Click on the button 2009-10-29_172721 to close the MIDlet. Then click on the button in the upper right corner of the device to close the emulator window.

Creating a MIDP Application Using the Source Editor

Using the Source Code Editor, you manually create the code for your MIDlets. Creating code in the Source Code Editor gives you more flexibility when editing the code, and enables you to insert preprocessor code blocks. Next we create the MyHello application using the New Project and New File wizards, and complete the code using the Source Editor.

Creating a New Java ME MIDP Project
  1. Choose File > New Project (Ctrl-Shift-N). Under Categories, select Java ME. Under Projects, select Moblie Application and click Next.
  2. Enter MyHelloMIDlet in the Project Name field (note that "MID" is in upper case letters). Use the default Project Location, or change it to the directory you prefer on your system. We refer to this directory as D:\source\java in this tutorial.
  3. Check the Set as Main Project checkbox and remove the check from the Create Hello MIDlet checkbox. Click Next.
  4. Select the Java(TM) Platform Micro Edition SDK 3.0 as the Emulator Platform and use the remaining defaults. Click Next.
  5. Expand "Configuration templates provided by installed CLDC platforms" and "Java(TM) Platform Micro Edition SDK 3.0" folders. Check the boxes next to each of the configurations. The IDE automatically creates a new project configuration for each template listed.
  6. Click Finish. The IDE creates the D:\source\java\MyHelloMIDlet project folder. The project folder contains all of your sources and project metadata, such as the project Ant script.
  7. Right-click the MyHelloMIDlet node in the Explorer window and choose New > MIDlet
  8. Enter HelloMIDlet as the MIDlet name (note that "MID" is in upper case letters by default). Click Finish. The HelloMIDlet.java file is created and the source code is displayed in the IDE's Editor window.
  9. Click in the Source Editor and change
    public class HelloMIDlet extends MIDlet

    to

    public class HelloMIDlet
    extends MIDlet implements javax.microedition.lcdui.CommandListener
    {



  10. Add the following text before the startApp() method:

        private void initialize() {
    javax.microedition.lcdui.Display.getDisplay(this).setCurrent(get_helloTextBox());
    }

    public void commandAction(javax.microedition.lcdui.Command command, javax.microedition.lcdui.Displayable displayable) {
    if (displayable == helloTextBox) {
    if (command == exitCommand) {
    javax.microedition.lcdui.Display.getDisplay(this).setCurrent(null);
    destroyApp(true);
    notifyDestroyed();
    }
    }
    }

    private javax.microedition.lcdui.TextBox get_helloTextBox() {
    if (helloTextBox == null) {
    helloTextBox = new javax.microedition.lcdui.TextBox(null, "Make My Day", 120, 0x0);
    helloTextBox.addCommand(get_exitCommand());
    helloTextBox.setCommandListener(this);
    }
    return helloTextBox;
    }

    private javax.microedition.lcdui.Command get_exitCommand() {
    if (exitCommand == null) {
    exitCommand = new javax.microedition.lcdui.Command("Exit", javax.microedition.lcdui.Command.EXIT,
    1);
    }
    return exitCommand;
    }
    javax.microedition.lcdui.TextBox helloTextBox;
    javax.microedition.lcdui.Command exitCommand;



  11. Add a line initialize(); to the startApp() method, so it looks like the following:

      public void startApp() {
    initialize();
    }




Editing the Java Source Code


Now let's add some text for our MIDlet to display.




  1. In the get_helloTextBox() method, replace the "test string" code with the text of your choice. For example, "Make my day."



Note: For a complete guide to using the Java Source Editor in NetBeans see Java Editing in NetBeans IDE.



Compiling and Running the Project



  1. Choose Run > Run Main Project (F6) from the Run menu. Follow the progress of the project compilation in the Output window. Note that the HelloMIDlet.java file is built before it is executed. A device emulator opens to display the results of the executed MIDlet. The default device emulator is ClamshellCldcPhone1.


  2. In the device emulator window, click on the button below the Launch command. The device emulator launches the HelloMIDlet and displays the text you entered in the source code.

    2009-10-29_174154



Night Walker: Change NetBeans IDE interface language

Night Walker: Change NetBeans IDE interface language: "--locale en:US."

This parameter is very useful for me.

2009年10月6日 星期二

Making A Million Dollar

I read JohnChow's article about "Making A Million Dollar On The Net". Alex Tew was smarter than I am. He has a good idea 『turn his home page into a billboard made up of a million dots, and sell them for a dollar a dot to anyone who wants to put up their logo. A 10 by 10 dot square, roughly the size of a letter of type, costs $100. He sold a few to his brothers and some friends, and when he had made $1,000, he issued a press release.』
I look the site million dollar home page and say "wa". It is very cool.

2009年10月1日 星期四

pyDanny: Feedparser does not work with Google App Engine

pyDanny: Feedparser does not work with Google App Engine
Now may be Goole App Engine do not offer feedparser api to fetch feed.
I always get the errors:
No module named feedparser