Saturday, 31 March, 2007

Justine Henin back on form

"What I'm trying to do now is live right now, without being concerned about what will happen in two days."

There's a Zen concept called "beginner's mind." As a beginner, you're receptive and see everything fresh. You're amenable to suggestion. You take things at face value. Conversely, the more you know, the more opinions and habits you form and the more you close yourself off. As Shunryu Suzuki puts it: In the beginner's mind there are many possibilities; in the expert's mind there are few.

Henin is certainly expert at what she does for a living, but now she's back at work while navigating a new reality. Perhaps she's taking a beginner's look around and seeing things she blocked out before. She seems more relaxed. She smiles more readily. She might still be too wary to reveal her mantra, but there's a lot less barbed wire around her. It must be interesting to compete without it.

"I don't know, 2007 is different for me," Henin said. "I just try to enjoy every moment of my life. Not try to project myself too far in the future, and forget a little bit of what happened in the past. Just, I feel lucky to do what I love so much. I feel lucky to take my decisions and try to move forward. I feel very happy about that now."

Can Henin retain this new serenity against the rampaging Serena Williams in Saturday's final? This is truly the battle of the back stories. (from ESPN.com)

Does Henin regrets that 2003 French Open semifinal match against Serena? Maybe, that will really tell us whether she is moving forward.

Tags: tennis, zen


Posted in Sports


Saturday, 31 March, 2007

First Open-Source Car

The world’s first open-source car! Cumbersomely dubbed “c,mm,n” (say “common”), was introduced at AutoRAI in Amsterdam. (from Winding Road)

Looks cool! :D

Tags: Photos, Car


Posted in Car , Open-Source


Thursday, 29 March, 2007

Zend Gdata PUT request

Reference at Zend_Gdata.

Currently, GData only allow POST as request method and not PUT, issue link

PUT is needed! We can just use the existing post method. :D Here is what I modify (for the time being)

public function post($xml, $uri = null)

{

return $this->request($xml, $uri, 'POST');

}

public function put($xml, $uri = null)

{

return $this->request($xml, $uri, 'PUT');

}

public function request($xml, $uri = null, $method = 'POST')

{

..

$response = $this->_httpClient->request($method);

The original post method is renamed to request with an additional argument $method and also replacing those 'POST' with $method.

Tags: Php


Posted in Php


Thursday, 29 March, 2007

Global variable in Drupal module

There is something different in a variable between a variable in a Drupal module and a variable in a normal php file.

normal php

$_User = "user";

function test() {

global $_User;

..

}

Drupal module

global $_User;

$_User = "user";

function test() {

global $_User;

..

}

In Drupal module, I need the additional global $_User; Why? :?

Tags: Php


Posted in Drupal , Php


Thursday, 29 March, 2007

Installing Drupal Module

Reference at Installing contributed modules.

I need to remember where to Enable the module. Version 5.x users go to administer > site building > modules.

Tags: installation


Posted in Drupal


Tuesday, 27 March, 2007

Php syntax check

There is an easy way to verify php syntax, which I really need! :)

php -l file

Tags: Php


Posted in Php


Sunday, 25 March, 2007

Do You Feel Disabled?

Original article at Seishindo by Charlie Badenhop. Charlie Badenhop is the originator of Seishindo, an Aikido instructor, NLP trainer, and Ericksonian Hypnotherapist.

"Life offers each person a unique set of challenges they must successfully face if they are to live a fulfilling life. We can spend our lives feeling sorry for ourselves because of our hardships, or we can vow to live a happy life regardless of our seeming disabilities. Each and every person faces this choice, and the decision you make in this regard determines the quality of your life."

Tags: Seishindo, mindset


Posted in Psychology


Wednesday, 21 March, 2007

Wordpress Permalink Hack

I don't know much about Wordpress internal working and only know a little and does a little PHP programming. (I don't like PHP, Python suits me better!)

What I want to achieve is to show my Sky Explorer user guide posts with a different template. When I type a number behind the permalink url, I notice it actually display the same permalink post without the number. (Somehow, the number is being consumed) After a bit of debugging, I find out this is captured in $wp_query->query_vars["page"] , so I made a hack to select a different template by also using this value by replacing the get_single_template function in theme.php .

Seems to be working OK! Browse Sky Explorer User Guide.

Tags: hacking, WordPress


Posted in WordPress


Sunday, 18 March, 2007

Why adopting a growth mind-set is critical?

This follows as a comment on an article about Carol Dweck (a psychologist) and her research, Mind-set Research.

Adopting a growth mind-set

  • means you believe in continuously learning and improving.

    It means if you fail in certain task, you won't be discouraged by the setbacks, that you would continuously try to learn from the setbacks and try alternative ways to achieve the task.

    If you possess a fixed mind-set, you would more likely give up when you have setbacks, attributing to the lack of talent or ability. (maybe)

  • Learning itself makes the activity fun! If you only strive for perfomance so as to enhance

    your own self-image, each setback becomes a personal threat.

  • means that you don't hold a concept of a person having a fixed identity or personality. And, this bodes well for your relationships, allowing it to be more constructive.

Diener puts it this way: “Failure is information—we label it failure, but it’s more like, ‘This didn’t work, I’m a problem solver, and I’ll try something else.’”

“Study skills and learning skills are inert until they’re powered by an active ingredient,” Dweck explains. Students may know how to study, but won’t want to if they believe their efforts are futile.

Dweck’s study showed that praising children for intelligence, rather than for effort, sapped their motivation (see sidebar). But more disturbingly, 40 percent of those whose intelligence was praised overstated their scores to peers. “We took ordinary children and made them into liars,” Dweck says.

Remember there is always a choice!!

Remember that your beliefs will turn into reality and your reality is just your beliefs!

Allow each moment to flow through you, as life is all about changes.

Tags: zen, mindset


Posted in Psychology


Saturday, 17 March, 2007

Sorry Google

As I am searching for something on Google, Google throws up this interesting We are Sorry page!

I wonder what algorithm are they using to interpret that my query looks like an automated request from a computer virus or spyware. I don't think they are using any timing checks since I am doing manual search! Hopefully, they don't start throwing more of these pages, otherwise, users may want to start using other alternative search engines! :)

Tags: Google-search


Posted in Search


Thursday, 15 March, 2007

Advanced navigation

The advanced navigation gives you a quick way to find the file you are looking for in a long list by entering the 1st character of the filename. The current selection is changed to the next item that starts with the character you have entered, If the search reaches the bottom of the list, it will continue the search from the top of the list until a match is found or the search hits the current selection. And, you can use the 2 keys input method to enter the character.

Tags: user-guide, Sky-Explorer


Posted in Python , Mobile , Sky-Explorer


Thursday, 15 March, 2007

2 keys input method

As its name implied, this is an input method that I devise for mobile phone using strictly 2 keys that combine to produce a character. I like my method more than the default phone input method, but the dictionary input method is obviously easier and faster than mine.

How is the method designed?

First, every possible character can be entered using a combination of 2 keys. After the 2nd key is entered, it will combine with the previous key to produce a character, so there is no waiting time needed. If it is an invalid combination, then it simply ignores both keys. And, if the time difference between the 2nd key and the 1st key is too long (>0.8s), it will ignore the 1st key and assume that you want to start with the 2nd key as if it is the 1st key.

Second, the method makes it easier for the more common or rather more frequently used alphabet characters to be entered. This means that the same key is pressed twice to produce the character. There are 8 characters in this frequently used group using the key from 2 to 9. There are 12 characters in the next less frequently used group that uses 2 different keys to enter with these 2 keys vertically next to each other. Lastly, there are 6 characters in the least frequently used group that uses 2 different keys, horizontally next to each other.

Keys

uses same key

The more frequently used group covering the 8 characters a,e,i,s,o,r,t,n.

Vertically 2 keys group

Vertically 2 keys group.

 

The 2nd key is either on top of or it is below the 1st key. Characters that are displayed at the bottom side of a number keypad square are entered using the 1st key it is displayed at, followed by using the key below it. Characters that are displayed at the top side of a number keypad square are entered using the 1st key it is displayed at, followed by using the key above it. Eg., 25=b , 52=l , 58=f

Horizontally 2 keys group.

Horizontally 2 keys group.

 

The 2nd key is either on the left or on the right of the 1st key. Characters that are displayed at the right side of a number keypad square are entered using the 1st key it is displayed at, followed by the key on its right. Characters that are displayed at the left side of a number keypad square are entered using the 1st key it is displayed at, followed by the key on its left. Eg., 21=z , 45=x , 54=j

All numbers keys can be entered using the number key itself followed by the # key. For entering a string of numbers, this is bad! So, we have a number mode that is invoked by the combination of *#

Once in number mode, a number key produces a number immediately. To switch back to normal mode, press the number mode combination of *# . There is also the uppercase mode for entering the same alphabets characters in uppercase. The uppercase mode is invoked by the combination of ## and thereafter only uppercase alphabets characters are produced. To switch back to normal mode, press the same mode combination of ## . In either of the 2 modes, you can press the other mode combination to enter the other mode.

The symbols are divided into 4 groups.

The group that starts with the 1st key using 1 are symbols that have a straight line shape. (most) The special case is the new line character displayed below as \n produced by a combination of 1*

1 symbols group

1 symbols group

The group that starts with the 1st key using 0 are symbols that have a curve shape. (most) The special cases are the tab character produced by a combination of 0* and the space character produced by a combination of 00 .

0 symbols group

0 symbols group

The group that starts with the 1st key using * are symbols that have a dot, quote or a short shape.

* symbols group

* symbols group

The last group starts with the 1st key using #. This group contains the remaining symbols and another 2 special cases, #6 is PageUp and #9 is PageDown.

# symbols group

# symbols group

And, this concludes the description of the 2 keys input method. If your phone has a qwerty keyboard, then there is really no need to learn this. Use this for fun and see whether you can memorize all of them easily. Last but not least, there is an usage of this method covered in the advanced navigation.

Tags: user-guide, Sky-Explorer, input-method


Posted in Mobile , Sky-Explorer , Python


Thursday, 15 March, 2007

Sky Explorer Settings

The following settings can be set:

  1. Email
  2. SmtpHost
  3. Timezone (eg. 8 )
  4. Text enter mode
  5. File exts-TextEditor(eg. py txt)
  6. Images directory

The Email setting is used as the email sender, the from email address. The SmtpHost is the mail server from which the email is sent through.

A timezone of GMT +08:00 is entered as 8. There is a problem here as this entry only accepts a number, so it cannot represents GMT +08:30. This setting is used when an email is sent.

Text enter mode setting has 2 choices: Normal, 2 keys. It defaults to Normal. The 2 keys input method allows me to test the input method in the programs's internal text editor. This simple text editor is used when sending SMS and opening files with certain file extensions being defined in the next setting. (*experimental*)

The File exts setting defines the file extensions that you want to open using the internal text editor. (*experimental*)

The Images directory setting defines where screenshot images are saved to. It defaults to E:\images

1st 3 settings

1st 3 settings

 

Last 3 settings

Last 3 settings

Tags: user-guide, Sky-Explorer


Posted in Sky-Explorer , Python , Mobile


Thursday, 15 March, 2007

Application menu and tagging

What is this? It is like the Nokia application menu, except that it is built within the program itself. The menus in the program is equivalent to the tags that you have tagged to an application.

Initially, none of the application is tagged, when you navigate to the Apps folder, you should see a list of applications. Now, you may not recognize them because what is shown is really the application filename. (The program doesn't know the name itself, it just gather from the file system all the available applications) You can launch the application either using the right arrow key or the selection key.

You will be able to find this program itself within the Apps list, it is listed as SkyExplorer. (Note: you won't be able to launch another instance of SkyExplorer) Let say, I tag SkyExplorer with Python,Utils (2 tags), each tag will now appear as a subfolder within the Apps folder, and if you navigate into each tag Python (or Utils), you will be able to see SkyExplorer listed within it and you can also see the other tag (as a subfolder). (Display is not refreshed immediately after tagging, you may need to navigate somewhere and then back again) Easier to understand with a diagram below, name with a * behind is displayed as a folder.

Basically, this gives you a way to organize your applications through tagging.

Apps*

|__Python*

| |___Utils*

| | |___SkyExplorer

| |___SkyExplorer

|__Utils*

| |___Python*

| | |___SkyExplorer

| |___SkyExplorer

|

..

|__SkyExplorer

Python apps

You can also search for application or tag name at any level in the application menu, the search is performed within the current tag (or folder). For eg. below, I search for Exp. It simply tries to search Exp within the application or tag names. (Yes, this is a bit different from the actual file searching and the display text is the same which is not right!)

Search for Exp

Search for Exp

 

Apps *Exp*

Apps *Exp*

And there is an Uninstall menu which will not immediately uninstall the selected applications. (The program doesn't know how, yet) But, it will just launch the Application manager. In fact, it is now hardcoded to run this \system\Apps\AppMngr\AppMngr.app if it exists in one of your phone's drive. You can inform me if your phone uses a different one or just don't use Uninstall at all.

For developers, the applications tags are saved into a python file named explorertag.py and is imported into the program when it starts. You can see my explorertag.py.

Tags: tagging, user-guide, Sky-Explorer


Posted in Sky-Explorer , Python , Mobile


Thursday, 15 March, 2007

Taking screenshot

There are 2 ways of taking screenshots: they are Screenshot [Dial], Own Screenshot.

On selecting either Screenshot menu, the program will prompt for the image filename to save to. There is an Images directory setting where you can change the folder the image is saved to. (This defaults to E:\images)

For Own Screenshot, after selecting OK, the screenshot is immediately taken and saved. For Screenshot, the program knows that you are taking a screenshot somewhere else. When you press the menu key and immediately after you select the application to switch to, the program will capture the screenshot of the selected application. So, to take a screenshot of another application, you first go to the intended screen of the application, switch to this program and select Screenshot menu to specify the image filename to save to and then switches back to the intended application for the screenshot to be taken!

And yes, I uses the same technique even for my own program screenshots for those prompts! :)

Eg.

Screenshot

Tags: user-guide, Sky-Explorer


Posted in Python , Mobile , Sky-Explorer


Thursday, 15 March, 2007

File sending and SMS

The Send menu contains the following functions: send files by Bluetooth, Email and MMS and also send SMS.

For all sending files operations, you select the files that you want to send (folders are ignored) and then select the menu corresponding to the method Bluetooth, Email or MMS.

For bluetooth, you will probably need to pair your receiving device first with the phone. I only manage to get it working after I use OBEX Commander on my PC to connect with my phone first.

For sending email, you are required to install a Python library pyemail.SIS first. Also, you are required to set the 2 settings Email and SmtpHost. The Email setting is used as the email sender, the from email address. The SmtpHost is the mail server from which the email is sent through.

Before sending the email, the program will ask for the emails to send to and the subject line. It may take some time before the email is sent message pops up. As shown below, sending MMS is quite similar, except that you can type both phone number and emails.

Send email

Send email

 

Send MMS

Send MMS

 

Receive my own MMS

Receive my own MMS

To send SMS, you can either select a text file that contains the message and select the SMS menu. The program will open the text file for editing. The menus will change as shown below to allow you to save the text. (or maybe to open another text file) You then use the send menu to send the current text which will then prompt for who to send to.

edit SMS

Edit SMS

 

Send SMS

Send SMS

Tags: user-guide, Sky-Explorer


Posted in Mobile , Sky-Explorer , Python


Thursday, 15 March, 2007

File manipulation

To move files (or folders), select the files to move, then select the Cut menu, navigate to the destination folder where the files will be placed, and then select the Paste menu to move the files over. Similarly for copying files, except that you use Copy first, followed by Paste. For deleting files, you can either use the Delete menu or just use the backspace key. You can also rename a single file or folder (The current selected item is renamed).

Below is an example where I select 2 zip files in E:\temp\App to move. After selecting the Cut menu, I navigate back to its parent folder E:\temp and then creates a new subfolder zip. Next, I navigate to subfolder zip and select Paste menu and the contents now show the 2 zip files.

Select zip files

select 2 zip files

 

New subfolder zip

New subfolder zip

 

Dir zip

Navigate to subfolder

 

Paste

Paste

The main Edit menu also contains the selection menus, they are Select All, Invert Selection and Select/Unselect [00]. Invert Selection will toggle the selected status for all items. Select/Unselect will toggle the selected status for the current selected item. You can also press 00 (press 0 key 2 times) to select/unselect. The shortcut key is labeled in the menu item enclosed in the square brackets.

Select/Unselect menu

Within the Tools menu, there are another 2 file operations: Add to Archive and Extract Archive files. (only zip file is supported) To create a zip archive, first, select the files (or folders) that you want to include in the zip file, then select Add to Archive menu and enter the archive filename. Currently, the archive operation is extremely slow and there is a known bug that will kill the program. (Since, the operation takes a long time, the power screensaver will start and when switching back to the program, the program will die! You can press some keys for some time to prevent this OR be patient and wait for some time for it to complete.)

Zip files

To extract zip file, select Extract Archive files menu and the program will unzip the files in the current folder.

Tags: Sky-Explorer, user-guide


Posted in Sky-Explorer , Python , Mobile


Thursday, 15 March, 2007

File searching

You can search for files using wildcards pattern matching for the filename. You can also search for specific text inside the files.

Searches will always search for all files within the current viewing folder and all of its subfolders recursively. So, please beware that it will take quite some time if you search from the whole drive or phone.

Pattern

Meaning

*

matches everything

?

matches any single character

[seq]

matches any character in seq (a sequence of characters)

[!seq]

matches any character not in seq (a sequence of characters)

Eg.

*.* - for all files.

*.txt - for all text files using txt extension.

[1-9]*.png - for all images files using png extension with filename starting with a digit.

[f-y]*.png - for all images files using png extension with filename starting with a char within the range from f to y.

Search for image

Search for [f-y]*.png

 

Search [f-y]*.png list

Search results

Below is an example of searching for python files containing the text appuifw.

Specify the filename pattern first, then after the comma, specify the text to search for.

Search for appuifw

 

Search appuifw results

Tags: user-guide, Sky-Explorer


Posted in Python , Mobile , Sky-Explorer


Thursday, 15 March, 2007

Navigation and file display

After launching the application, we will see the initial screen as shown here, with a list of drives and also the Application menu (Apps).

Initial screen

Navigation is performed by using the arrow keys:

Right key - navigate into sub folder

Left key - navigate back to parent folder

Up & Down keys - for selecting an item.

Pressing the up key when the current selection is on the first item will move the current selection to the last item on the List. Similarly, pressing the down key when the current selection is on the last item will move the current selection to the first item on the List.

You can also use sorting by Name, Type, Size and Date to aid navigation.

The sorting is always in ascending order, for eg. when viewing by date, the latest modified files will be at the bottom of the list.

(View by type is simply sorting based on the file extension.)

View by menu

View by menu

 

E:\images by date

View by date

 

Notes app

Notes app

The selection key (the key located at the center of the arrow keys) is used to open file. On my N70 phone, the selection key is harder to press, so as an alternative, the right arrow key is also used for opening file. Usage of the 2 keys are the same: it navigates to show folder contents for folder and it launch the application associated with the file for file.

Naturally, I prefer to use the right arrow key as it is softer.

For even faster navigation, see advanced guide.

Tags: Sky-Explorer, user-guide


Posted in Python , Mobile , Sky-Explorer


Thursday, 15 March, 2007

Sky Explorer

What is Sky Explorer?

It is a file manager for Symbian S60 phone, (only 2nd edition supported as I only have a N70 for testing)

similar to FExplorer, a freeware which I recommend.

It is written in Python using PythonS60 developed by Nokia, and is open source.

(In fact, this is my 1st open source project)

You can download and install. (Instructions provided)

I think open source is great!, it allows everyone to have a choice to access a great many excellent softwares. And with this, I contribute back a little to open source. :)

Tags: Sky-Explorer, user-guide


Posted in Mobile , Sky-Explorer , Python


Thursday, 15 March, 2007

Sky Explorer Installation

Requirements

As of now, the provided installation SIS is only for Symbian S60 2nd edition phone.

You can check whether your phone is supported at http://en.wikipedia.org/wiki/Nokia_S60_and_Symbian_OS

and also to know which Python runtime version to download.

  1. Download and install the latest Python runtime at Sourceforge

    There are 3 different Python runtime versions provided for 2nd edition phone.

    Install

    PythonForS60_1_3_19_2ndEdFP3.SIS for 2nd Edition Feature Pack 3 phone.

    OR Install

    PythonForS60_1_3_19_2ndEdFP2.SIS for 2nd Edition Feature Pack 2 phone.

    OR Install

    PythonForS60_1_3_19_2ndEd.SIS for others 2nd Edition phone.

  2. Download and install skyexplorer.sis

  3. Download and install pyemail.SIS (optional: for sending email)

  4. The project is hosted at Google Code.

Tags: installation, Sky-Explorer


Posted in Sky-Explorer , Python , Mobile