Thursday, May 24, 2007

新增HiNet ADSL網路連線方法 (WinXP)

在 WinXP 下設定 HiNet 撥接的方法

##CONTINUE##

Step 1 : 從 「開始」 -> 「設定」-> 「控制台」



Step 2 : 選擇網路連線



Step 3 : 選擇建立一個新連線



Step 4 : 選擇下ㄧ步



Step 5 : 選擇連線到網際網路



Step 6 : 選擇手動設定我的連線



Step 7 : 選擇需要使用者名稱何密碼的寬頻連線來連線



Step 8 : 設定你想要的名稱



Step 9 : 輸入你HiNet 的帳號與密碼



Step 10 : 按下完成就設定完成了



Step 11 : 網路連線就會出現你剛設定的撥號連線



Step 12 : 按下右鍵就可以選擇建立捷進, 此捷進會直接新增到桌面



大功告成啦~~~~~~~~~

Tuesday, May 08, 2007

GRE 模擬器網路版 - 新增字母分類功能

[更新] 目前已經開發出單機版本,請到 GRE Simulator 網站查看最新資訊!

網友提出一個好想法, 就是CAT的字母分類選項 ,
這樣每次背完一個部份就可以馬上練習,不用等到整本CAT都要看完才能開始做題目.

這個主意實在是很不錯, 所以花5分鐘把這個選項加上去, 希望能幫助各位記憶

操作說明:
1. 在選擇題目類型最下面新增一個字母 A~Z 的選項


2. 如勾選 CAT 與 選擇字母 B, 就代表選擇 CAT中所有題目字母開頭為 B 的題目


3. 接下來所有題目都是B開頭的題目, 就可以背完B系列後趕緊複習.


在個人紀錄也多一個功能, 將你所有做錯的題目列出來, 你可以列印下來背

操作說明:
1. 在 Menu 選擇個人紀錄


2. 選擇 Antonym 或是 Analogy

3. 印下來快背吧!!!!

Thursday, May 03, 2007

GRE 考題模擬器 - 新增個人紀錄功能

[更新] 目前已經開發出單機版本,請到 GRE Simulator 網站查看最新資訊!

新增個人記錄功能

可刪除 類比/反義 做對做錯記錄.

或一次將所有做題記錄刪除

Wednesday, May 02, 2007

GRE 考題模擬器出爐囉~~~

[更新] 目前已經開發出單機版本,請到 GRE Simulator 網站查看最新資訊!

這是我在準備GRE時自己寫的GRE考題模擬器,
主要訓練 "類比" 與 "反義" , 考題內容包含
  • CAT NO1
  • CAT 全部
  • BB 全考題
  • 其他考題
並提供搜尋功能, 做題記錄, 做錯次數, 可以重複不斷練習.

網址: http://ghoster.blogdns.org/

如有任何意見或是問題, 請回覆此則文章, 我會進行修改或新增功能.
我並有題目匯入工具, 如有新的機經想要匯入題庫可以mail跟我聯絡. ^Q^

操作說明
  1. 首先在登入頁進行註冊
註冊完後會發認證信, 根據信件連結啟動帳號

2. 登入後就可選擇要練習哪一種, 反義 or 類比

3. 接著選擇題庫, 可複選, 但是太機車的複選可能會選不到題目. XD~
如 BB + NO1.

4. 接下來就可進行訓練了.會顯示你每題答題時間, 正確率, 答對答錯題數

5. 除了顯示答案外還會將該字相關的題目搜尋出來

6. 也可直接利用搜尋功能來尋找題目

Sunday, April 22, 2007

JAVA 認證心得 -- SCMAD (12)

Other

##CONTINUE##

  • Timer class is Thread-safe
  • AlertType.playSound(Display display) -> boolean
  • Display.callserially(Runnable r)
  • readUTF() to read a UTF string from the associated stream
  • StringBuffer method

    Ø char charAt (int index)

    Ø string toString()

  • MIDLet code and description

JAVA 認證心得 -- SCMAD (11)

Wireless Messaging API 1.1 (WMA)

##CONTINUE##

  • CBS (Cell Broadcast Service) can only be received by an application and cannot be sent. If the send() method is called with a CBS address, IOException will be thrown.
  • WMA provides separate permissions for SMS and CBS protocol.
  • Messages can be received asynchronously by creating a class implementing the MessageListener interface and registering an instance of the class to the connection using the MessageConnection.setMessageListener()
  • TextMessage.setPayloadText(String msg)
  • BinaryMesage.setPayloadData(byte[] byte)
  • Messages are delivered to the application in the same order as the device received them.
  • When a large message is spilt into multiple SMS messages, ordering is handled correctly when they are automatically concatenated back into a single Message object.
  • MessageConnection.numberOfSegments(Message msg)
  • An application can have several MessageConnection instances open simultaneously and these connections can be both in client and server mode.
  • Message.getTimeStamp method always returns null for received cell broadcast.
  • A text message can be sent by passing either the constant MessageConnection.TEXT_MESSAGE or the value “text” in the MessageConnection.newMessage(String Type) method. Same as MessageConnection.BINARY_MESSAGE / “binary”
  • The Message length of an SMS depends on two factors
    • Encoding used, such as GSM 7-bit alphabet, and UCS-2 16 bit
    • Presence/absence of port number


  • An IllegalArgumentException would be thrown if the message is sent using a MessageConnection that is different from the MessageConnection which was used to create the message using the newMessage() method. If a timeout occurs an InterruptedIOException is thrown.
  • A message can be received either

    Ø Synchronously: Using MessageConnection.receive() blocking method

    Ø Asynchronously: By creating a class implementing the MessageListener interface and registering an instance of the class to the connection using the MessageConnection.setMessageListener() method.

  • The MessageListener interface has a notifyIncomingMessage() method, which would be called when a message arrives. The listener mechanism allows applications to receive incoming messages without needing to have a thread blocked in the receive() method call. If multiple messages arrive very closely together in time, the implementation has the option of calling this listener from multiple threads in parallel. Applications MUST be prepared to handle this and implement any necessary synchronization as part of the application code, while obeying the requirements set for the listener method.
  • The GSM standard specifies two mechanisms for SMS message concatenation.
  • The system property wireless.messaging.sms.smsc contains the SMSC address.

JAVA 認證心得 -- SCMAD (10)

MMAPI (Media using MIDP 2.0 and Mobile Media API)

##CONTINUE##

  • DataSource is available. DataSource.getStreams() be used to Get the collection of streams that this source manages. The collection of streams is entirely content dependent. The MIME type of this DataSource provides the only indication of what streams may be available on this connection.
  • Player’s Lifecycle
  • Controllable Interface is the base interface.

    Ø Player implements the interface and plays media data.

    Ø SourceStream implements the interface and provides custom protocol support. Not in MIDP 2.0.

    Ø DataSource is a class used to provide custom media protocols. Not in MIDP 2.0.

           javax.microedition.media.protocol.DataSource

  • Control interface is the super-interface for all controls that can be implemented by a Player. Only the identified controls are supported in MIDP 2.0.

    Ø Audio Controls

    - ToneControl controls the Tone Seqeuence format. Supported in MIDP 2.0.(setSequence(byte[] seq) can be called in UNREALIZED and REALIZED)

    - VolumeControl controls the Player’s volume. Supported in MIDP 2.0.

    - MIDIControl controls MIDI playback.

    - PitchControl controls the pitch of a MIDI note.

    - TempoControl controls the tempo of a MIDI note.

    Ø Video Controls

    - VideoControl controls video media playback.

    - FramePositioningControl controls the framing of video.

    Ø General Controls

    - StopTimeControl allows you to set a preset stop time. This is like a sleep-time.

    - RateControl is used in conjunction with TimeBase to calibrate time used by Player. It controls the playback rate of a Player. Rates are specified in “milli-percetage”

    - GUIControl is used to display a user interface for the associated Player.

    - RecordControl is used to record the media played by the Player.

    - MetaDataControl can be used to get some general meta-data information about the media content.

  • PitchControl raises or lowers the playback pitch of audio without changing the playback speed. PitchControl does not influence playback volume in any way.
  • PitchControl can be implemented in Players for MIDI media or sampled audio. It is not possible to set audible output to an absolute pitch value. This control raises or lowers pitch relative to the original.
  • The pitch change is specified in number of "milli- semitones" to raise the pitch. A Player which supports only 0 pitch change must not implement PitchControl.
  • MetaDataControl is used to retrieve metadata information included within the media streams. A MetaDataControl object recognizes and stores metadata and provides XML-like accessor methods to retrieve this information. Predefined keys are provided to refer to commonly used metadata fields (title, copyright, data, author).
  • The USE_GUI_PRIMITIVE constant defines a mode on how the GUI is displayed.
Manager
  • Manager class is a factory to get Player implementations.

Ø Default constants provided for Tone Sequence (TONE_DEVICE_LOCATOR) and MIDI playback (MIDI_DEVICE_LOCATOR). MIDI is not supported in MIDP 2.0.

  • Manager.playTone(int note, int duration, int volume) can be used to generate simple monotones.
  • Class Manager

    static Player createPlayer(InputStream stream, String type)

    static Player createPlayer(String locator)

Player
  • Player class is used to play media data. An implementation is obtained from the Manager factory.

Ø TimeBase is used by the Player to track time.

  • MIDP media API supports only InputStream where data is streamed sequentially.
  • Random seeking capabilities are provided in the DataSource and SourceStream classes, which are provided in the MMAPI.
  • Convenience constants MIDI_DEVICE_LOCATOR and TONE_DEVICE_LOCATOR can be used to get a MIDI (audio/midi) or Tone Sequence (audio/x-tone-seq) Player.
  • A TimeBase is a constantly ticking source of time. It measures the progress of time and provides the basic means of synchronizing media playback for Players.
  • In STARTED The following methods will throw an IllegalStateException if invoked .

    Ø setTimeBase()

    Ø setLoopCount()

  • PlayerListener is a listener interface that can be implemented and registered to a Player to listen to the Player’s events.
  • PlayerListener can have more than one associated listener. Only one method called playerUpdate()

JAVA 認證心得 -- SCMAD (9)

MIDP Game API

##CONTINUE##

  • Canvas

- protected void keyPressed(int keyCode)

- protected void keyReleased(int keyCode)

- protected void keyPepeated(int keyCode)

- int getGameAction(int keyCode)

- Boolean hasPointerEvents()

- int getKeyCode(int gameAction)

- protected abstract void paint(Graphic g)

  • Canvas class can have a Ticker, cannot hold item and show list.Only Form class or its sub-classes can hold Item objects.
  • GameCanvas

    - int getKeyStates()

    - void flushGraphics({int x,int y,int width,int height})

    Does’t return until the flush has been completed. The contents of the off-screen buffer remain unmodified after the flushing operation.

    - protected Graphics getGraphics()

    - void paint(Graphic g)

  • A dedicated buffer is created for each GameCanvas instance. The buffer is initially filled with white pixels. The developer can assume that the contents of this buffer are modified only by calls to the Graphics object(s) obtained from the GameCanvas instance; the contents are not modified by external sources such as other MIDlets or system-level notifications.
  • When the GameCanvas becomes invisible, getKeyStates() returns 0. The visibility of the GameCanvas can be verfied by calling Displayable.isShown(), which would return false if the GameCanvas is invisible and vice versa. Once the GameCanvas becomes visible, it will initially indicate that all the keys are unpressed(0).
  • The GameCanvas class provides methods for immediate painting and for examining the state of the device keys. These new methods make it possible to enclose the entire functionality of a game in a single loop, under the control of a single thread.
Sprite
  • TRANS_MIRROR Causes the Sprite to appear reflected about its vertical center
  • Transforms are applied to the original Sprite images; they are not cumulative, nor can they be combined.
  • The Sprite.defineCollisionRectangle(int x, int y, int w, int h) defines the Sprite’s bounding rectangle that is used for collision detection purposes.
  • A Sprite object has 7 transformations.
  • Calling the setImage(Image image, int frameWidth, int frameHeight) will cause a new frame set to be loaded into the Sprite.

    Ø If the new Image contains more frames than the current Image

    - The current frame remains unchanged.

    - If the defined frame sequence is a custom sequence, it remains unchanged. If it is default, the frame sequence will be reset to the default sequence of the NEW Image.

    Ø If the new Image contains less frames than the current Image

    - The current frame will be set to the 0th frame.

    - The frame sequence will be set to the default frame sequence of the new Image, regardless of whether the current frame seqeuence is default or not.

    Ø The reference pixel is unchanged in its definition as well as its location.

    - If the frame size is different, the top-left co-ordinate will be shifted such that the reference pixel will remain stationary.

    - If the frame size is different, the collision rectangle will be reset to the new size of the Sprite (which would be the size of the frame).

  • Sprite is been added in MIDP 2.0, Frame sequence of sprite class starts from 0, The developer must programatically switch the current frame in the frame sequence of Sprite in order to get animation affect.
  • When a transform is applied, the Sprite is automatically repositioned such that the reference pixel appears stationary in the painter's coordinate system. Thus, the reference pixel effectively becomes the center of the transform operation. Since the reference pixel does not move, the values returned by getRefPixelX() and getRefPixelY() remain the same; however, the values returned by getX() and getY() may change to reflect the movement of the Sprite's upper-left corner.
  • In Sprite class the frames have to be switched manually using the nextFrame() and prevFrame() methods. This switching is circular and so calling preFrame() on the first frame will give the last frame in the sequence and vice versa. The frame located in the upper-left corner of the Image is first assigned an index of 0. The remaining frames are then numbered consecutively in row-major order.
LayerManager

Ø The Layer appended will have the highest index (farthest from user).

Ø If the Layer is previously present, it will be removed.

Ø Start at 0

JAVA 認證心得 -- SCMAD (8)

MIDP UI API

##CONTINUE##


  • StringItem(String label, String text)

StringItem(String label, String text, int appearanceMode)

appearanceMode - Item.PLAIN,

Item.HYPERLINK,

Item.BUTTON

  • Public final boolean

- collidesWith(Sprite s, boolean pixelLevel)

- collidesWith(Image image, int x, int y, boolean pixelLevel)

- collidesWith(TiledLayer t, boolean pixelLevel)

pixelLevel : true to test for collision on a pixel-by-pixel basis, false to test using simple bounds checking

Any transforms applied to the Sprites are automatically accounted for.

  • The newly created Item default state

Ø The Item is not contained within ("owned by") any container.

Ø There are no Commands present.

Ø The default Command is null.

Ø The ItemCommandListener is null.

Ø the layout directive value is LAYOUT_DEFAULT;

Ø both the preferred width and preferred height are unlocked.

  • Same Ticker could be added to two different Displayable. Displayable.setTicker (Ticker t) is used to add Ticker to a Displayable. Displayable.AddCommand(Command c)
  • The label of a Spacer is restricted to always be null, and the application is not allowed to change it.
  • The primary purpose of a Spacer object is to position other items and is hence, non-interactive. And the application is not allowed to add Commands to a Spacer. The setDefaultCommand(Command cmd) method of the Spacer object will always throw an IllegalStateException.
  • Each MIDlet sub-class will be provided an instance of the Display object to control its display.
  • The maximum number of characters allowed in a TextBox is implementation dependent.

TiledLayer

  • A TiledLayer can be rendered in two ways:

Ø By manually calling its paint(graphicsObject) method

Ø By using a LayerManager object

  • TiledLayer.fillCells(int col, int row, int numCols, int numRows, int titleIndex) throws IndexOutOfBoundsException, IllegalArgumentException
  • It is recommended that the contents of a Screen object be done when the Screen is not visible.
  • An application cannot set more than one Listener to a Displayable.
  • The index of TileLayer must start from 1, a tile index of 0 indicates that the cell is empty

ImageItem

  • ImageItem(String label, Image img, int layout, String altText, {int appearanceMode})

altText - the text that may be used in place of the image if the image exceeds the capacity of the display. It maybe null.

  • ImageItem.setImage(Image img)

img - the Image for this ImageItem, or null if none

CustomItem

  • The CustomItem subclass are responsible for calling Item.notifyStateChanged() to trigger notification of listeners that the CustomItem’s value has changed. And defining its dimensions.

Choice

  • The EXCLUSIVE constant in the Choice interface is used to define having exactly one element selected at time. (radio button)
  • The Choice.IMPLICIT type is valid only for the List implementation. The Choice.POPUP type is valid only for ChoiceGroup implementation.

Gauge

  • Gauge update types have special meaning for non-interactive gauges with indefinite range.
  • Gauge(String label, boolean interactive, int maxValue, int initialValue)
  • Font.SIZE_LARGE, SIZE_MEDIUM, SIZE_SMALL.

    FACE_MONOSPACE,FACE_PROPORTIONAL, FACE_SYSTEM.

    STYLE_BOLD,STYLE_ITALIC,STYLE_PLAIN,

    STYLE_UNDERLINED.

  • High-Level-API : form, screen, item

    Low-Level-API : Canvas, Sprite, TiledLayer

  • The setLayout() method cannot be called on an item if it is within an Alert object.
  • Alert constants -> INFO, WARNING, ERROR, ALARM, CONFIRMATION

JAVA 認證心得 -- SCMAD (7)

Push Registry

##CONTINUE##

  • SMS and CBS are the valid protocols that support by Push Registry.
  • Push Registry supports CBS protocol but filtering is not performed.
  • The Push entries in the JAD file should have contiguous numbers and any break in the numbering will result in the entries after the break being ignored by the application.
  • When an application is registered for the message via Push Registry but is not running, when the message is received by the device the AMS will receive the message, start the application, and then deliver the message to the application.
  • MIDP 2.0 defines socket and datagram connection types for PushRegistry.
  • A Push Registered application can be actived using a TCP/IP Socket connection(stream-based connections), UDP Datagram Connection, CBS(packet-based connections), or an SMS Connection(Message-based connections). è IN WMA spec
  • The ConnectionNotFoundException exception is thrown when a protocol specified in the connection string for a Push Registry entry is not supported by the device.
  • The PushRegistry.getFilter(String connection) retrieves the registered filter for a requested connection as specified in the AllowedSender attribute of a MIDlet-Push-n attribute in DD.
  • The following attributes MUST be present in the Application Descriptor (JAD) or the manifest file of the JAR of the application.

If error, not be installed!!
  • An application can register itself for an alarm using the registerAlarm(String class, long time).

    Ø The class should be a MIDlet in the currently running MIDlet suite which is to be notified.

    Ø Upon receipt of an event, the class will be notified after the time expires.

    Ø At most, only one alarm can be registered per registry entry.

    Ø The MIDlet must be registered in the descriptor or the manifest file.

    Ø the time parameter is obtained using the Date.getTime() method

  • Datagram and Socket support for Push Registry is optional.
  • For SMS messages, the push address is the phone’s number(and port)
  • Class PushRegistry
  • public static String[] listConnections(boolean available)

    Return a list of registered connections for the current MIDlet suite.

    Parameters:

    available - if true, only return the list of connections with input available, otherwise return the complete list of registered connections for the current MIDlet suite

    Returns:

    array of registered connection strings, where each connection is represented by the generic connection protocol, host and port number identification

  • public static long registerAlarm(String midlet, long time) throws ClassNotFoundException, ConnectionNotFoundException
  • public static void registerConnection(String connection, String midlet, String filter) throws ClassNotFoundException, IOException, ConnectionNotFoundException, IllegalArgumentException, SecurityException