國語課本2上 第8課

I’m taking free “new immigrant” Chinese classes now at Taipei City Zhongshan District Community College and Taipei City Datong District Community College currently. The Zhongshan homework for this week for me was to type in lesson 8 from our textbook which is an elementary school level textbook.

演一課大樹

阿海的動作很慢,老師常常叫我照顧他。
前幾天,老師找了十二個同學,要表演”小紅帽”的故事。
老師對我說。。”你演一課大樹,好不好?”
我搖搖頭,阿海知道我不想演大樹,他慢慢的說。。”老師,我來演大樹。”
表演的那天,阿海穿著綠衣服,打扮成一課大樹,直直的站在臺上。
大樹只是一種布景,阿海卻演得那麽認真,我真是服了他。
表演結束了,大家用力的拍手,都說阿海演得真好。

New Subway Taiwan TV Ad

For January and February 2008 we are promoting the Chicken Teriyaki Sub in Taiwan with the following TV commercial:


http://tw.youtube.com/watch?v=a7VUs2_QL84

When you buy a Chicken Teriyaki Meal you can win one of four prizes: 1) Trip for two to Las Vegas, 2) Coca Cola duffel bag, 3) Buy one get one free 6″ sub 4) Free small soda.

Quick Script To Sort and Rename from EXIF Date

I wrote a quick bourne shell script to sort and rename the image files I recovered from my formatted memory stick. It requires the perl exifdump script that comes with the Image::Info module (not the python script by the same name). Since the last pre-format image I had was 8160, I started the recovered files at number 8161. The filenames will not be exactly right due to images that were deleted and retaken, but close enough.

The script was coded up quickly so there is no documentation or error checking.

#!/bin/sh
#

NUM=8161
PRE=DSC0
EXT=.JPG
TEMPLIST=`/usr/local/bin/mktemp /tmp/ds-rename.XXXXXX`
TEMPSORT=`/usr/local/bin/mktemp /tmp/ds-rename.XXXXXX`

for file in V*.[jJ][pP][gG]
do
echo "Processing ${file}..."
DATE=`/home/jlick/bin/exifdump ${file} 2> /dev/null | /bin/grep DateTimeOriginal | /bin/sed -e "s/.*DateTimeOriginal -> //"`
echo ${DATE} ${file} >> ${TEMPLIST}
done

echo "Sorting..."
/bin/sort ${TEMPLIST} > ${TEMPSORT}

for file in `/bin/sed -e "s/.* //" < ${TEMPSORT}`
do
echo "Renaming ${file} to ${PRE}${NUM}${EXT}..."
/bin/mv ${file} ${PRE}${NUM}${EXT}
NUM=`/bin/expr ${NUM} + 1`
done

/bin/rm -f ${TEMPLIST} ${TEMPSORT}

Recovering Digital Photos From A Formatted Memory Card

We won’t get into details. Let’s just say that somehow a memory stick in our camera got reformatted.

All the pictures are gone, right? Fortunately the answer is no. Most format processes only put a new filesystem on the memory card. The data for the photos is still there, there’s just no longer any information on where they are.

Fortunately image files are in standard, recognizable formats, so it is possible for a specialized program to search the raw data on the memory card and reconstruct most, if not all of the image files. The image files can then be copied onto your computer as good as new.

Things aren’t completely foolproof though. First and most important is to stop using the memory card immediately as soon as you realize you have mistakenly formatted the card or erased an important image. Since there is no longer any information on where the old pictures are stored, any new pictures taken will overwrite the old, deleted pictures. To be safe, take the memory card out of the camera, switch it to “read-only” if possible, then keep it in a safe place until you can use recovery software on it. If you have kept using the memory card, it’s still worth trying a recovery. You probably would get back less than if you stopped using it immediately though.

Second, in most cases you cannot get back the original filenames or creation dates if the card is formatted. (If on the other hand the file was deleted instead of formatted then you may be able to reconstruct the file names and creation dates too.) However image files usually have some embedded metadata in EXIF format in the file which contains further detail on the images. In my case I am able to see the date information, but the filename information is not there. So at least I will be able to name the files in order by the time the picture was taken.

Third, depending on how fragmented your memory card is, the recovery program may not be able to piece things together exactly, so it is possible you will not be able to get back 100% of your images automatically. Different software will have different results in how accurately they can reconstruct the files.

I tried a few different programs and found I had the most success with PhotoRescue. PhotoRescue comes in three different versions depending on if you need it to run completely automated, or whether you are more of an expert in reconstructing images. The automated method will usually work pretty well but it is not 100%.

I used PhotoRescue Advanced, which is their most sophisticated version, however it is also much more challenging to use. With this version you can get a few percent closer to 100% recovery of your images. When I tried a competing product, it found 530 images on my memory card. However after I looked closer I found that close to a hundred were recovered corrupt, truncated, or otherwise unusable.

In comparison, PhotoRescue Advanced found a more modest 482 images, however all but 8 of those were undamaged. If using an automated reconstruction, this is the extent of how much you could recover. However, using the advanced features of PhotoRescue Advanced, I was able to completely reconstruct all but one of the damaged images manually.

The next problem was that it recovered not only the images that were on the card when it was last formatted but also older images that I had already copied off onto the computer. I was able to use the thumbnails and EXIF date information to sort out the files I already had. At the end of it all I had 411 image files that otherwise would have been gone forever. This all had to be done manually though.

The remaining problem is that the files were recovered in the order they were found which is not exactly the same order as they were taken. As I mentioned previously, this information is stored in the EXIF data, however for 411 images it’s a bit too much to sort through by hand. Instead I will be writing a perl program to read in the EXIF data and sort the files by date and restore the file timestamps as well.

For now though, I at least have the satisfaction of having the 411 pictures back and safe.

UPDATE: Windows XP’s explorer has a column for ‘Date Picture Taken’ which can be added to the view when using ‘details’ view. This can help you sort if you want to do it manually.

UPDATE2: I wrote a quick script to sort and rename from EXIF date. PS: For those of you who don’t watch Law & Order SVU, this also means your naughty pictures are still there after being deleted or formatted.