Connect MySQL database on Stackato with Toad

Assume you have connected to Stackato:

PS C:\> stackato target api.<hostname>
Successfully targeted to [https://api.<hostname>]
PS C:\> stackato login
Attempting login to [https://api.<hostname>]
Email: <your email>
Password: ******************
Successfully logged into [https://api.<hostname>]
Reset current group: OK
PS C:\> stackato group <your group>
Successfully set current group to [<your group>]

Run these commands to get access information to MySQL database:

PS C:\> stackato tunnel
1. f5qa-mysql
2. f5qa-push-mysql
Which service to tunnel to: 1
Getting tunnel url: OK, at https://tunnel-f6667.<hostname>
Getting tunnel connection info: OK

Service connection info:
| Key      | Value                             |
| username | usIUyNnvRnrCN                     |
| password | pKRr7Iz9n03dH                     |
| name     | d15ffa8be6e6c4e189bed3a0cf06a08be |

1. none
2. mysql
3. mysqldump
Which client would you like to start? 1
Starting tunnel to -mysql on port 10000.
Open another shell to run command-line clients or
use a UI tool to connect using the displayed information.
Press Ctrl-C to exit...

Now open Toad for MySQL.
Go to Menu/File/New/Connection and provide the information:

Connection Type: TCP
Host: localhost
User: usIUyNnvRnrCN
Password: •••••••••••••
Database: <leave it blank>
Port: 10000

Name: d15ffa8be6e6c4e189bed3a0cf06a08be

Then click Connect button.


RBC takes heat for Ottawa’s flawed outsourcing policy: CD Howe expert

Financial Post | Business

Royal Bank of Canada has landed in the middle of a public relations fiasco following reports over the weekend that it is in the process of contracting out jobs of Canadian staffers to lower paid foreign workers.

In this case we’re talking about just 45 positions at RBC Investor Services in Toronto that according to the CBC will be transferred abroad through a deal with iGate Corp., a leading global provider of outsourcing services with significant operations in India.

[related_links /]

But it’s not simply the fact that jobs are being lost that’s causing the ruckus — after all, outsourcing is a trend that’s has been going on for years — but rather the way it’s happening.

iGate is reportedly bringing foreign workers into the country to be trained by the RBC workers whose jobs they’ll ultimately be taking. At the end of the process the iGate employees will return…

View original post 223 more words

Install Android 2.3.7 on Kyros MID7015A

shot_000004 shot_000007 shot_000006

I just flashed and installed another Gingerbread image Android 2.3.7 on my Kyros MID7015A. I believe the mod was done mainly by fun_ who posted on xda-developers. The performance is even better than last Android 2.3.1 mod. More importantly, it solved the rooting issue of last mod. Thank you fun_!

The mod includes ClockworkMod Recovery 5, CyanogenMod 7 and FWDN image. Then install gapps using CWM.

However this mod has problems as well.

  • SD card can’t mount to PC, I have to unmount SD card from the tablet and take it out then plug into PC to access SD card files. It is not the way I like it but I can live with that.
    I found a solution by searching the thread of the xda-developers forum. Install an app USD Mass Storage Watcher, check option Mount USB Mas Storage Automatically. That did the trick. Oulala!
  • After calibration, touch screen won’t work. This issue is more serious. Have to restore backup if it’s accidentally calibrated.
  • There are no volume up and down buttons on the status bar. Have to go to settings to adjust volume.
    Since MID7015A has no hard volume buttons, without soft volume buttons makes it worse when you want to adjust the sound volume. The solution is to install an app named Button Savior. So the soft volume buttons are back. Problem solved.
  • Stock Gallery is not able to load or play any videos. I like the stock Gallery of the last mod as it plays HD videos smoothly while other video players laggy. I think it is hardware acceleration problem.

The calibration problem remains unsolved. But I am happy that this tablet is able to run more apps and faster.

You can go to the following link where I followed step by step and downloaded all the files.

unofficial CyanogenMod 7/ClockworkMod Recovery 5 for TCC8902/TCC8803 tablets
CyanogenMod for Telechips

Look for the latest images for TCC8902 (2011/10/29) on “CyanogenMod for Telechips” page.
ClockworkMod Recovery 5, CyanogenMod 7, FWDN image

After flashing, the tablet will not have Market. To solve that, download here and install it using CWM.

How to rename Unicode Chinese files to Pinyin?

I googled and found no existing tools. That’s very rare and even weird. The only useful piece of information I got was a mapping file that contains a Unicode Pinyin table. So I have to do it myself… to write a script to convert the Unicode Chinese file names to Pinyin using the mapping file.
Since I was doing Python Challenge at the time, natually I just scripted something in Python to get the job done.

The reason I did that was this. I have a HDTV that has a feature to play music from an USB drive. When I wanted to play the songs I downloaded from the Voice of China. I had a problem. The file name of the songs had many Unicode Chinese characters. The TV obviously doesn’t support Unicode. It just doesn’t display those Chinese characters at all. For example:

01 04张玮 – High歌.mp3
05 09吉克隽逸 – I Fell Good.mp3

I can only see:
01 04 – High.mp3
05 09 – I Fell Good.mp3

If those above are okay, then the following ones are ridiculous:
11 11 – .mp3
11 12 – .mp3
11 13 – .mp3
11 14 – .mp3

I have no idea what was what when I tried to choose the songs. Actually their filenames are as the following:
11 11大山 – 王妃.mp3
11 12王韵壹 – 你快乐所以我快乐.mp3
11 13金池 – 后知后觉.mp3
11 14吴莫愁 – 痒.mp3

Putting the mapping file and the script in one folder, all renaming Unicode files under a sub folder “VoC”, then just run the script. Finally I got all the file names like this, not perfect but I am able to tell what songs they are:
11 11 DaShan – WangFei.mp3
11 12 WangYunYi – NiKuaiLeSuoYiWoKuaiLe.mp3
11 13 JinChi – HouZhiHouJue.mp3
11 14 WuMoChou – Yang.mp3

I hope you find my solution helpful. Here is my Python script.

# Rename filename from Chinese characters to capitalized pinyin using the
# mapping file and taking out the tone numbers

import os
import re

# File uni2pinyin is a mapping from hex to Pinyin with a tone number
f = open('uni2pinyin')
wf = # read the whole mapping file

os.chdir('voc') # to rename all files in sub folder 'voc'
myulist = os.listdir(u'.') # read all file names in unicode mode
for x in myulist: # each file name
    filenamePY = ''
    for y in x: # each character
        if 0x4e00 <= ord(y) <= 0x9fff: # Chinese Character Unicode range
            hexCH = (hex(ord(y))[2:]).upper() # strip leading '0x' and change
                                              # to uppercase
            p = re.compile(hexCH+'\t([a-z]+)[\d]*') # define the match pattern
            mp =
   # get the pinyin without the tone
                                            # number and capitalize it
    print x
    filename = filenamePY
    print filename
    os.rename(x, filename)
os.chdir('..') # go back to the parent folder

This is the link where I got the mapping file:

Python Challenge – level 12 solution

The picture file name is evil1.jpg.
It led me to try evil2.jpg.
The URL evil2.jpg exists and it says “not jpg but .gfx”
The URL exists. And we got the binary evil2.gfx
evil2.gfx is a mixed file from 5 picture files. This is solved by looking at the binary files with a hex editor.
The following code separated the file into their original format:

# file evil2.gfx is a combined file from 5
f = open('evil2.gfx','rb')
g =
f1 = open('evil2-1.jpg','ab')
f2 = open('evil2-2.jpg','ab')
f3 = open('evil2-3.jpg','ab')
f4 = open('evil2-4.jpg','ab')
f5 = open('evil2-5.jpg','ab')

for x in range(len(g)):
    if x % 5 == 0:
    elif x % 5 == 1:
    elif x % 5 == 2:
    elif x % 5 == 3:

Each of the created file gives a piece of the answer:
dis – pro – port – ional – ity

Python Challenge – level 11 solution

The image is mixed 2 pictures. The darker one has the answer.
The following code is for the one which has answer. The other picture was produced by the code just switching the arguments of the 2 getpixel sentences.

import Image, ImageDraw

im ='cave.jpg')
draw = ImageDraw.Draw(im)
for j in range(im.size[1] / 2):
    for i in range(im.size[0] - 2):
        if i % 2 == 0:
            im.putpixel((i, j), im.getpixel((i, j*2)))
            im.putpixel((i, j), im.getpixel(i, j*2 + 1))'cave3.jpg')