18 December 2013

NTU Course Vacancy Checker

#!/usr/local/bin/python3 '''NTU Course Vacancy Checker, written by @yuan3y (Twitter/Instagram) You will need a Python 3 interpreter to run this code: Such as http://www.python.org/download/releases/3.3.3/ Type in your subject codes each on a line, ends off with a single @ sign on a separate line. Merry Christmas and happy STARS games! God bless, @yuan3y 18 DEC 2013''' courseList=[] while True: a=input('course, @ to end:') courseList.extend(a.split()) if '@' in a: break import urllib.parse import urllib.request def check(subj): url = 'http://wish.wis.ntu.edu.sg/webexe/owa/aus_vacancy.check_vacancy2' values = {'subj' : subj} headers = {'Referer' : 'http://wish.wis.ntu.edu.sg/webexe/owa/aus_vacancy.check_vacancy'} data = urllib.parse.urlencode(values) data = data.encode('utf-8') req = urllib.request.Request(url, data, headers) response = urllib.request.urlopen(req) the_page = response.read() lines=the_page.decode().split('\n') for i, a in enumerate(lines): if '</TR>' in a: break try: print('\n',subj,end='') while True: if '<td>&NBSP;</td>' in lines[i+2]: print('',lines[i+6],lines[i+9],lines[i+12],lines[i+15],lines[i+18],sep=',',end='') i+=20 else: print() print(lines[i+3],lines[i+6],lines[i+9],lines[i+12],lines[i+15],lines[i+18],lines[i+21],lines[i+24],sep=',',end='') i+=26 if '</TABLE>' in lines[i+1]: break except: pass finally: print() for courseCode in courseList: check(courseCode)
# code can be downloaded from: http://snipt.org/BCgh2

# interpreter can be downloaded from: http://www.python.org/download/releases/3.3.3/

17 November 2013

12 Principles for How To Date As A Christian from Pastor Mark Driscoll

1.Maximize your singleness for God.
2.Do not pursue a relationship until you’re in a season of life when you’re ready to marry.
3.Be reasonable with your expectations.
4.A date is not dating. A date is when you have coffee, or go out to dinner. 1 Timothy 5 says to treat younger women like sisters. It doesn't need to be all sexually charged and confusing. He initiates, she responds.
5.Have a plan.
6.Accept the fact that you may be rejected.
7.Do not date or go on a date with anyone who’s not a Christian. 2 Corinthians 6:4, “Do not be unequally yoked.” A man needs to love Jesus, and then a woman needs to love Jesus, and then that man and woman can love Jesus together. And this includes marrying someone who has equal theological convictions. What kind of church do you want to go to?
8.Only date one person at a time.
9.Look at who God puts in front of you. Eg. Boaz & Ruth.
10.Only invest in a relationship with someone that you are attracted to. physical, mental, and spiritual connection. Are you totally attracted to this person?
11.Only marry someone who agrees with you on issues of gender and family.
12.Guard your heart. Proverbs 4:23. Don’t give your heart away too quick.
Full video of the sermon can be accessed  here, with time-stamp at the same place.
Sermon Transcript
A more elaborate e-book (pdf)

PS. Thankful to have listened to this sermon. Important lesson to many single Christians including me.

10 November 2013

中保 Mediator by Ghost Ship

中保 Mediator by Ghost Ship
Chinese Translation by @yuan3y.
You are welcomed to improve on the translation. 欢迎提供翻译改进意见。
原文地址(original URL): http://goo.gl/UllgJ3


Verse 1
祂代替我们站在上帝的面前
He takes our place and stands in front of God on high
祂为我们代言因我们没权力
He speaks on our behalf since we don’t have the right
祂为我们代求审判人的上帝
He pleads before the God who judges hearts of men
我们的中保为我们罪受刑罚
Our mediator served the sentence for our sin

Chorus 1
只有这一位神
There is only one God
只有这一位神人中保
There is only one mediator
站在神与人之间
Standing between God and man
祂是救恩的唯一道路
He’s the only way to salvation

Verse 2
祂寻回囚徒,打断束缚的锁链
He found the captives, broke the bondage of our chains
我们得救赎,因祂付上了代价
We have redemption through the price that He has paid
祂献上生命,使我们得到自由
He gave His life to purchase freedom from the fall
我们的中保是我众人的赎价
Our mediator was the ransom for us all

Bridge
人子主耶稣
The man Jesus Christ
为我献生命
Who gave us His life
人子主耶稣
The man Jesus Christ
永远赎罪祭
Our last sacrifice
永生的圣子
The Eternal Son
弥赛亚已来
Messiah has come
真实的人子
The true Son Of Man
代罪的羔羊
The Atonement Lamb


22 October 2013

Toshiba Satellite M840 unable to adjust screen brightness on Windows 8.1

Screen brightness becomes unavailable
after Toshiba Satellite M840 upgrading to Windows 8.1
Here is a warning for Toshiba Satellite M840 users. Do NOT upgrade to Windows 8.1 yet! Toshiba has not yet have proper drivers for the upgraded system. You will be unable to adjust the screen brightness after upgrade. All other functions (Fn+F1, F4-F12) have no problems; Fn-F2 and Fn-F3 for screen brightness adjusts fail.

I have yet to found a solution to it. Calling to Toshiba Support tells me I have to downgrade to Windows 8 (8.0) for now.

29 April 2013

Toshiba Satellite M840 Review


After using my Toshiba Satellite M840 for one full week, I'd like to share my review on this laptop.

The spec is identical to Satellite M840-1001XG on toshiba-asia.com except I’m running Windows 8, though I’m not sure if this is exactly the model. Firstly I'll list my specs below.
PROCESSOR: Intel® Core™ i7-3612QM processor (6M Cache, up to 3.1GHz) with Intel® Turbo Boost Technology
MEMORY: 4096MB DDR3 1600MHz SDRAM
DISPLAY SIZE: 14.0" WXGA HD Clear SuperView LED Backlight TFT display (16:9)
RESOLUTION: 1,366 x 768
GRAPHICS: AMD Radeon™ HD 7670M
HARD DISK DRIVE: 640GB (SATA) with shock absorbers
OPTICAL DRIVE: DVD SuperMulti Double Layer Drive (DVD±RW/RAM)
INTERFACES: 2xUSB 3.0 (Sleep&Charge), 1xUSB 2.0
SOUND SYSTEM: Stereo Speakers, 16-bit Stereo with SRS® Premium Sound HD™
CAMERA: Built-in HD Web Camera
BATTERY: 6-Cell Lithium Ion (47.5 Wh as said by Windows)
WEIGHT: Starting from 1.99kg

Things I like:
- comfortable typing, including the way Home, PgUp, PgDn, End arranged at the right of the keyboard: convenient and I can memorize where they are.
- Quad-core i7 third gen processor & dedicated videocard: I'm able to play a number of games even though I'm not a typical gamer.
- USB ports on both sides of the laptop.
- Temperature is alright for normal usage.

Things I don't appreciate:
- by default, important F-number keys such as F4, F2 especially are used for functions like switch screen and dim. I've switched it in BIOS thus I don't have to press "Fn" key to use them. Later on I may find a way to hack and remap the funtion keys to those I'll never use, such as the idiotic Fn-F1(Help).
- The Fn-Space to switch resolution is an annoying function also as I sometimes hit Fn key wrongly when I want to switch language inputs (Windows+Space).
- The DVD tray at the left side of the laptop is too easily hit to pop out.
- Battery life is only about 3 hours under wifi&office usage.
- 1366x768 HD display may not be enough for programmer's tight IDE layout.

*Battery life is obtained using Windows command: powercfg /batteryreport ,
Battery Life Estimates given by Windows: 2:50:00 hours at design capacity.
On my own calculation, it's about 3:10:00 hours at design capacity.
This 3&1/2-months old laptop has its battery capacity shrunk from 47,520 mWh to 42,120 mWh.

28 April 2013

T-Clock 2010: Tweak your Windows Clock on Taskbar

T-Clock 2010 with my custom format for time display

T-Clock 2010 Official Website: http://www.stoicjoker.com/tclock/
Current Version installed: T-Clock 2010 (build 95)

22 April 2013

Toshiba Satellite M840

Toshiba Satellite M840, i7-3620QM, AMD Radeon HD 7670M, 4GB RAM, 640GB HDD, 2.0kg.
3 month old, bought at S$700.

Thanks God for keeping everything in His time.