Woke up at near 5 pm today, nothing to do x.x
Went out to buy a new nokia phone (C1), of course black color phone
Also bought a memory card for it, price seems reasonable.
4 GB memory for $10
Ate plain Double Cheese Burger Meal upsized
Wonder what to do next x.x
Got Shaolin Soccer English Subbed, just in case Muffin wanna watch it.
Installed Wanko to Kurasou for fun, maybe next time replay x.x
Saturday, June 9, 2012
Friday, June 8, 2012
Friday, 08th June 2012
Slept at 5 am last night, I also forgot what I did.
Woke at 11 am cause pei Muffin go RP today
She gonna study for her science while I do nothing & slack
Slacked at school until 4 pm, then went to my aunt house
Think I too blur today, forgot teach her the buffet question of programming lolz
Ate together at my aunt house
- Egg
- Salmon
- Random vegetables with prawns in it
Sent Muffin to Admiralty MRT then I went back to Yishun
Bought 10 lolipops for $1, & also an emergency charger just in case my PSP or handphone runs out of battery when I'm outside.
The charger needs 2 AA batteries, that's okay with me o.o
School gonna reopen soon x.x
Just managed to get John Carter HD & Jurassic Park Trilogy ~.~
Woke at 11 am cause pei Muffin go RP today
She gonna study for her science while I do nothing & slack
Slacked at school until 4 pm, then went to my aunt house
Think I too blur today, forgot teach her the buffet question of programming lolz
Ate together at my aunt house
- Egg
- Salmon
- Random vegetables with prawns in it
Sent Muffin to Admiralty MRT then I went back to Yishun
Bought 10 lolipops for $1, & also an emergency charger just in case my PSP or handphone runs out of battery when I'm outside.
The charger needs 2 AA batteries, that's okay with me o.o
School gonna reopen soon x.x
Just managed to get John Carter HD & Jurassic Park Trilogy ~.~
Thursday, June 7, 2012
Zoo Fare.py
Went to check my Zoo Fare.py file, realized got some flaws in my way of coding
Old Code :
adult = int(raw_input("Please key in the amount of adults : "))
children = int(raw_input("Please key in the amount of children : "))
eldery = int(raw_input("Please key in the amount of senior citizens : "))
location = raw_input("Choose Zoo or Zoo and Night Safari (ZOO/ZNS): ")
upgrade = raw_input("Upgrade to Zoo-per Saver Pass (Y/N): ")
def TotalCost(adult_ticket, child_ticket, eldery_ticket) :
totalfare = (adult * adult_ticket) + (children * child_ticket) + (eldery * eldery_ticket)
if (upgrade == "y" or upgrade == "yes") :
totalprice = (adult * 7) + (children * 4) + (eldery * 7) + totalfare
print "The total cost would be $" + str(totalprice)
print "Would you like some fries with that?"
elif (upgrade == "n" or upgrade == "no") :
print "The total cost would be $" + str(totalfare)
print "Would you like some fries with that?"
if (location == "zoo") :
TotalCost(20,13,10)
elif (location == "zns") :
TotalCost(42,28,26)
New Code :
adult = raw_input("Please key in the amount of adults : ")
children = raw_input("Please key in the amount of children : ")
eldery = raw_input("Please key in the amount of senior citizens : ")
location = raw_input("Choose Zoo or Zoo and Night Safari (ZOO/ZNS): ")
upgrade = raw_input("Upgrade to Zoo-per Saver Pass (Y/N): ")
try:
adult = int(adult)
if adult < 0:
print "Please enter value equal or more than 0 for adults"
exit()
children = int(children)
if children < 0:
print "Please enter value equal or more than 0 for children"
exit()
eldery = int(eldery)
if eldery < 0:
print "Please enter value equal or more than 0 for eldery"
exit()
except ValueError:
print "Please key in the amount of people in numbers"
exit()
upgrade = upgrade.lower()
location = location.lower()
def TotalCost(adult_ticket, child_ticket, eldery_ticket) :
totalfare = (adult * adult_ticket) + (children * child_ticket) + (eldery * eldery_ticket)
if (upgrade == "y" or upgrade == "yes") :
totalprice = (adult * 7) + (children * 4) + (eldery * 7) + totalfare
print "The total cost would be $" + `totalprice`
elif (upgrade == "n" or upgrade == "no") :
print "The total cost would be $" + `totalfare`
else :
print 'Please key in either Yes(Y) or No(N) for the Upgrade'
if (location == "zoo") :
TotalCost(20,13,10)
elif (location == "zns") :
TotalCost(42,28,26)
else :
print 'Please key in either Zoo or Zns'
What changes has been made :
- Able to determine whether the number of people keyed in are integers, instead of strings or other weird variables
- Able to accept strings for condition upgrade == 'n' or upgrade == 'no' regardless of upper or lower case, example would be like 'nO', 'NO'.
- Display error message if the user keyed in wrong answer in any string statement.
- Found alternative to cast interger into string by typing `x` instead of the standard casting str(x)
- Fixed logical error of negative values input, resulting lesser money count or even negative results
Conclusion :
Although I'm able to detect errors & prevent my program from crashing due to unknown values being entered, my codes will become longer.
No choice but to learn this as teacher will expect our codes have no errors at all in future, just face it lol
Amount of code lines jumped from 21 to 50 lol
Old Code :
adult = int(raw_input("Please key in the amount of adults : "))
children = int(raw_input("Please key in the amount of children : "))
eldery = int(raw_input("Please key in the amount of senior citizens : "))
location = raw_input("Choose Zoo or Zoo and Night Safari (ZOO/ZNS): ")
upgrade = raw_input("Upgrade to Zoo-per Saver Pass (Y/N): ")
def TotalCost(adult_ticket, child_ticket, eldery_ticket) :
totalfare = (adult * adult_ticket) + (children * child_ticket) + (eldery * eldery_ticket)
if (upgrade == "y" or upgrade == "yes") :
totalprice = (adult * 7) + (children * 4) + (eldery * 7) + totalfare
print "The total cost would be $" + str(totalprice)
print "Would you like some fries with that?"
elif (upgrade == "n" or upgrade == "no") :
print "The total cost would be $" + str(totalfare)
print "Would you like some fries with that?"
if (location == "zoo") :
TotalCost(20,13,10)
elif (location == "zns") :
TotalCost(42,28,26)
New Code :
adult = raw_input("Please key in the amount of adults : ")
children = raw_input("Please key in the amount of children : ")
eldery = raw_input("Please key in the amount of senior citizens : ")
location = raw_input("Choose Zoo or Zoo and Night Safari (ZOO/ZNS): ")
upgrade = raw_input("Upgrade to Zoo-per Saver Pass (Y/N): ")
try:
adult = int(adult)
if adult < 0:
print "Please enter value equal or more than 0 for adults"
exit()
children = int(children)
if children < 0:
print "Please enter value equal or more than 0 for children"
exit()
eldery = int(eldery)
if eldery < 0:
print "Please enter value equal or more than 0 for eldery"
exit()
except ValueError:
print "Please key in the amount of people in numbers"
exit()
upgrade = upgrade.lower()
location = location.lower()
def TotalCost(adult_ticket, child_ticket, eldery_ticket) :
totalfare = (adult * adult_ticket) + (children * child_ticket) + (eldery * eldery_ticket)
if (upgrade == "y" or upgrade == "yes") :
totalprice = (adult * 7) + (children * 4) + (eldery * 7) + totalfare
print "The total cost would be $" + `totalprice`
elif (upgrade == "n" or upgrade == "no") :
print "The total cost would be $" + `totalfare`
else :
print 'Please key in either Yes(Y) or No(N) for the Upgrade'
if (location == "zoo") :
TotalCost(20,13,10)
elif (location == "zns") :
TotalCost(42,28,26)
else :
print 'Please key in either Zoo or Zns'
What changes has been made :
- Able to determine whether the number of people keyed in are integers, instead of strings or other weird variables
- Able to accept strings for condition upgrade == 'n' or upgrade == 'no' regardless of upper or lower case, example would be like 'nO', 'NO'.
- Display error message if the user keyed in wrong answer in any string statement.
- Found alternative to cast interger into string by typing `x` instead of the standard casting str(x)
- Fixed logical error of negative values input, resulting lesser money count or even negative results
Conclusion :
Although I'm able to detect errors & prevent my program from crashing due to unknown values being entered, my codes will become longer.
No choice but to learn this as teacher will expect our codes have no errors at all in future, just face it lol
Amount of code lines jumped from 21 to 50 lol
Thursday, 07th June 2012
Woke up around 1+ pm today
Slacked around by browsing 9gag, play counter strike & etc until 6 pm
Went to buy plain Double Cheese Burger meal, upsized for lunch, & also Froot Loops cornflakes for dinner.
The cereal had a Madagascar whistle, lion 1.
Think will give Miss Maguro that whistle ~.~
Slacked around by browsing 9gag, play counter strike & etc until 6 pm
Went to buy plain Double Cheese Burger meal, upsized for lunch, & also Froot Loops cornflakes for dinner.
The cereal had a Madagascar whistle, lion 1.
Think will give Miss Maguro that whistle ~.~
Wednesday, 06th June 2012 (Late post)
Slept at 6 am, woke at 11.30 am x.x
Only few hours of sleep & went for pizza lol
Ordered the cheesy 7 double bliss meal, kinda worth it for $26.90
Since got the cheesy pizza & also a hawaiian regular pan.
Also redeemed a personal pan hawaiian.
Muffin ate half of the cheesy pizza & gave the other half to Maguro, while I ate the regular hawaiian as brunch & personal hawaiian as dinner.
Watched Shanghai Knights with Muffin, Jackie Chan still funny lolz
Showed Muffin my old photos when I still looked nerd.
Also showed her how to play a cat with laser.
Quite a funny day o.o
Guess tomorrow will just slack, nothing to do lol
I'm not the type to do revision
Only few hours of sleep & went for pizza lol
Ordered the cheesy 7 double bliss meal, kinda worth it for $26.90
Since got the cheesy pizza & also a hawaiian regular pan.
Also redeemed a personal pan hawaiian.
Muffin ate half of the cheesy pizza & gave the other half to Maguro, while I ate the regular hawaiian as brunch & personal hawaiian as dinner.
Watched Shanghai Knights with Muffin, Jackie Chan still funny lolz
Showed Muffin my old photos when I still looked nerd.
Also showed her how to play a cat with laser.
Quite a funny day o.o
Guess tomorrow will just slack, nothing to do lol
I'm not the type to do revision
Tuesday, June 5, 2012
Tuesday, 05th June 2012 [Holidays de Programming Homework]
Almost forgot to do my programming homework lol
Slacked too much during this 2 weeks holidays x.x
Lazy study for UT, think will just briefly go through what I learnt so far when I got the mood.
Managed to complete my programming homework within 30 minutes, but also spent 15 minutes finding my printer's driver.
I lazy write out my codes on paper, might as well just print them out.
=====================================================================
Q1 - Writing function
def handlebars (X1,X2):
return "--" + X1 + "--" + X2 + "--"
print handlebars('me','you')
print handlebars('love','hate')
Q2 - Printing Area of Rectangle
def area (width, height):
area = width * height
return area
print area(5,6)
Q3 - Returning Area of Rectangle
def area (width, height):
area = width * height
return area
print area(5,6)
Q4 - More about areas
def cube(x):
area = x * x
return area
def rect(x,y):
area = x * y
return area
print rect(35,50) - cube(10)
I should use return value when calculating and print value when obtained result
Q5 - Function : Bigger number
def big(x,y):
if (x > y) :
return x
elif (y > x):
return y
else :
return "Both values are equal"
print big(10,30)
print big(-10,-30)
Q6 - Buffet Price
def getPrice(x,y):
if(x == 'male' and y >= 12):
return 20
elif (x == 'male' and y < 12):
return 12
elif (x == 'female'and y >= 12):
return 18
elif (x == 'female' and y < 12):
return 10
print getPrice("male", 15)
print getPrice("male", 10)
Q7 - Total Buffet Price
def getPrice(x,y):
if(x == 'male' and y >= 12):
return 20
elif (x == 'male' and y < 12):
return 12
elif (x == 'female'and y >= 12):
return 18
elif (x == 'female' and y < 12):
return 10
def totalPrice():
peter = getPrice("male", 42)
mary = getPrice("female", 42)
alan = getPrice("male", 11)
john = getPrice("male", 10)
totalprice = peter + mary + alan + john
return totalprice
print "The total price for a family outing is $" + `totalPrice()`
=====================================================================
Easy to type la, but I really hate writing everything out on my paper.
My handwriting sucks, why bother writing something that I can't recognize lol
Gonna use this blog to record what I learnt so far too, maybe summarize or make notes.
Pizza~
# Update : Edited on Thursday, 21th June 2012
Slacked too much during this 2 weeks holidays x.x
Lazy study for UT, think will just briefly go through what I learnt so far when I got the mood.
Managed to complete my programming homework within 30 minutes, but also spent 15 minutes finding my printer's driver.
I lazy write out my codes on paper, might as well just print them out.
=====================================================================
Q1 - Writing function
def handlebars (X1,X2):
return "--" + X1 + "--" + X2 + "--"
print handlebars('me','you')
print handlebars('love','hate')
Q2 - Printing Area of Rectangle
def area (width, height):
area = width * height
return area
print area(5,6)
Q3 - Returning Area of Rectangle
def area (width, height):
area = width * height
return area
print area(5,6)
Q4 - More about areas
def cube(x):
area = x * x
return area
def rect(x,y):
area = x * y
return area
print rect(35,50) - cube(10)
I should use return value when calculating and print value when obtained result
Q5 - Function : Bigger number
def big(x,y):
if (x > y) :
return x
elif (y > x):
return y
else :
return "Both values are equal"
print big(10,30)
print big(-10,-30)
Q6 - Buffet Price
def getPrice(x,y):
if(x == 'male' and y >= 12):
return 20
elif (x == 'male' and y < 12):
return 12
elif (x == 'female'and y >= 12):
return 18
elif (x == 'female' and y < 12):
return 10
print getPrice("male", 15)
print getPrice("male", 10)
Q7 - Total Buffet Price
def getPrice(x,y):
if(x == 'male' and y >= 12):
return 20
elif (x == 'male' and y < 12):
return 12
elif (x == 'female'and y >= 12):
return 18
elif (x == 'female' and y < 12):
return 10
def totalPrice():
peter = getPrice("male", 42)
mary = getPrice("female", 42)
alan = getPrice("male", 11)
john = getPrice("male", 10)
totalprice = peter + mary + alan + john
return totalprice
print "The total price for a family outing is $" + `totalPrice()`
=====================================================================
Easy to type la, but I really hate writing everything out on my paper.
My handwriting sucks, why bother writing something that I can't recognize lol
Gonna use this blog to record what I learnt so far too, maybe summarize or make notes.
Pizza~
# Update : Edited on Thursday, 21th June 2012
Tuesday, 05th June 2012 (3 am, early morning post)
After some consideration, I think I'll resume my blogging.
I know my blog kept on pause & resume, but this is how I blog.
If you ask me why?
This is my blog, I do it my way.
There're also things that I can't blog out, or else other people will die lol
I think I will just blog about daily life stuffs, example things I need to remember or take notes of. I know I have a bad memory.
I know my blog kept on pause & resume, but this is how I blog.
If you ask me why?
This is my blog, I do it my way.
There're also things that I can't blog out, or else other people will die lol
I think I will just blog about daily life stuffs, example things I need to remember or take notes of. I know I have a bad memory.
Sunday, February 26, 2012
Sunday, 26th Feb 2012
Phew, just upgraded my PSP CFW from 5.50 Prome 4 to 6.xx pro CFW
Just wanna post the instructions I found online at here before I lose them
Upgrading from 5.50 GEN or 5.50 Prometheus 4 to OFW 6.60
1. Open VSH menu by clicking on the Select button from xmb(main psp menu)
2. Change USB device to Flash0
3. Connect your psp to pc
4. Navigate to \vsh\etc\
5. Open version.txt using notepad or wordpad
6. In the first line change the 9.90 to 5.50 and save.
7. Disconnect your psp from the pc and change the USB device back to Memory stick in vsh menu
8. Download OFW 6.60
9. Extract the file
10. Copy EBOOT.PBP to PSP/GAME/UPDATE/
11. From the xmb (main psp menu) run the update from Game ? Memory Stick
12. Now you are on OFW 6.60
13. Download 6.60 PRO B-9
14. Extract the file
15. Copy PROUPDATE and CIPL Flasher folders to PSP/GAME/
16. From the xmb (main psp menu) run the PROUPDATE from Game - Memory stick.
17. Press X to install CFW
18. From the xmb (main psp menu) run the CIPL Flasher from Game - Memory stick.
(For permanent patch)
19. You have successfully installed 6.60 PRO B-9
Just wanna post the instructions I found online at here before I lose them
Upgrading from 5.50 GEN or 5.50 Prometheus 4 to OFW 6.60
1. Open VSH menu by clicking on the Select button from xmb(main psp menu)
2. Change USB device to Flash0
3. Connect your psp to pc
4. Navigate to \vsh\etc\
5. Open version.txt using notepad or wordpad
6. In the first line change the 9.90 to 5.50 and save.
7. Disconnect your psp from the pc and change the USB device back to Memory stick in vsh menu
8. Download OFW 6.60
9. Extract the file
10. Copy EBOOT.PBP to PSP/GAME/UPDATE/
11. From the xmb (main psp menu) run the update from Game ? Memory Stick
12. Now you are on OFW 6.60
13. Download 6.60 PRO B-9
14. Extract the file
15. Copy PROUPDATE and CIPL Flasher folders to PSP/GAME/
16. From the xmb (main psp menu) run the PROUPDATE from Game - Memory stick.
17. Press X to install CFW
18. From the xmb (main psp menu) run the CIPL Flasher from Game - Memory stick.
(For permanent patch)
19. You have successfully installed 6.60 PRO B-9
Monday, February 6, 2012
only my railgun
hanate kokoro ni kizanda yume o mirai sae okizari ni shite
genkai nado shiranai imi nai
kono chikara ga hikari chirasu sono saki ni haruka na omoi o
aruite kita kono michi o furikaeru koto shika
dekinai nara ima koko de subete o kowaseru
kurayami ni ochiru machinami hito wa doko made tachimukaeru no
kasoku suru sono itami kara dareka o kitto mamoreru yo
Looking!
The blitz loop this planet to search way.
Only my RAILGUN can shoot it. ima sugu
karadajuu o hikari no hayasa de
kakemegutta tashika na yokan
tsukame nozomu mono nara nokosazu kagayakeru jibun rashisa de
shinjiteru yo ano hi no chikai o
kono hitomi ni hikaru namida sore sae mo tsuyosa ni naru kara
tachidomaru to sukoshi dake kanjiru setsunasa ni
tomadou koto nai nante uso wa tsukanai yo
sora ni mau KOIN ga egaku houbutsusen ga kimeru unmei
uchidashita kotae ga kyou mo watashi no mune o kakemeguru
Sparkling!
The shiny lights awake true desire.
Only my RAILGUN can shoot it. kanarazu
tsuranuiteku tomadou koto naku
kizutsuite mo hashiritsuzukeru
nerae rin to kirameku shisen wa kuruinaku yami o kirisaku
mayoi nante fukitobaseba ii
kono kokoro ga sakebu kagiri dare hitori jama nado sasenai
hakanaku mau musuu no negai wa
kono ryoute ni tsumotte yuku
kirisaku yami ni miete kuru no wa
omoku fukaku setsunai kioku
iroaseteku genjitsu ni yureru
zetsubou ni wa maketaku nai
watashi ga ima watashi de aru koto
mune o hatte subete hokoreru
Looking!
The blitz loop this planet to search way.
Only my RAILGUN can shoot it. ima sugu
karadajuu o hikari no hayasa de
kakemegutta tashika na yokan
hanate kokoro ni kizanda yume o mirai sae okizari ni shite
genkai nado shiranai imi nai
kono chikara ga hikari chirasu sono saki ni haruka na omoi o
genkai nado shiranai imi nai
kono chikara ga hikari chirasu sono saki ni haruka na omoi o
aruite kita kono michi o furikaeru koto shika
dekinai nara ima koko de subete o kowaseru
kurayami ni ochiru machinami hito wa doko made tachimukaeru no
kasoku suru sono itami kara dareka o kitto mamoreru yo
Looking!
The blitz loop this planet to search way.
Only my RAILGUN can shoot it. ima sugu
karadajuu o hikari no hayasa de
kakemegutta tashika na yokan
tsukame nozomu mono nara nokosazu kagayakeru jibun rashisa de
shinjiteru yo ano hi no chikai o
kono hitomi ni hikaru namida sore sae mo tsuyosa ni naru kara
tachidomaru to sukoshi dake kanjiru setsunasa ni
tomadou koto nai nante uso wa tsukanai yo
sora ni mau KOIN ga egaku houbutsusen ga kimeru unmei
uchidashita kotae ga kyou mo watashi no mune o kakemeguru
Sparkling!
The shiny lights awake true desire.
Only my RAILGUN can shoot it. kanarazu
tsuranuiteku tomadou koto naku
kizutsuite mo hashiritsuzukeru
nerae rin to kirameku shisen wa kuruinaku yami o kirisaku
mayoi nante fukitobaseba ii
kono kokoro ga sakebu kagiri dare hitori jama nado sasenai
hakanaku mau musuu no negai wa
kono ryoute ni tsumotte yuku
kirisaku yami ni miete kuru no wa
omoku fukaku setsunai kioku
iroaseteku genjitsu ni yureru
zetsubou ni wa maketaku nai
watashi ga ima watashi de aru koto
mune o hatte subete hokoreru
Looking!
The blitz loop this planet to search way.
Only my RAILGUN can shoot it. ima sugu
karadajuu o hikari no hayasa de
kakemegutta tashika na yokan
hanate kokoro ni kizanda yume o mirai sae okizari ni shite
genkai nado shiranai imi nai
kono chikara ga hikari chirasu sono saki ni haruka na omoi o
Tuesday, January 24, 2012
Tuesday, 24th Jan 2012 (Progress of English File Servers)
- MegaUpload - Closed.
- FileServe - Closing does not sell premium.
- FileJungle - Deleting files. Locked in the U.S.
- UploadStation - Locked in the U.S.
- FileSonic - The news is arbitrary (under FBI investigation).
- VideoBB - Closed! would disappear soon.
- Uploaded - Banned U.S. and the FBI went after the owners who are gone.
- FilePost - Deleting all material (so will leave executables, pdfs, txts)
- Videoz - closed and locked in the countries affiliated with the USA.
- 4shared - Deleting files with copyright and waits in line at the FBI.
- MediaFire - Called to testify in the next 90 days and it will open doors pro FBI
- Org torrent - could vanish with everything within 30 days “he is under criminal investigation”
- Network Share mIRC - awaiting the decision of the case to continue or terminate Torrent everything.
- Koshiki - operating 100% Japan will not join the SOPA / PIPA.
- Shienko Box - 100% working china / korea will not join the SOPA / PIPA
- ShareX BR - group UOL / BOL / iG say they will join the SOPA / PIPA Japan, China and Korea have a say NO to the FBI and that even if laws are passed in the USA will not have any value within the sovereignty of their countries!
P/S: mediafire has start deleting copyright protected files. Only left is the personal files."
- FileServe - Closing does not sell premium.
- FileJungle - Deleting files. Locked in the U.S.
- UploadStation - Locked in the U.S.
- FileSonic - The news is arbitrary (under FBI investigation).
- VideoBB - Closed! would disappear soon.
- Uploaded - Banned U.S. and the FBI went after the owners who are gone.
- FilePost - Deleting all material (so will leave executables, pdfs, txts)
- Videoz - closed and locked in the countries affiliated with the USA.
- 4shared - Deleting files with copyright and waits in line at the FBI.
- MediaFire - Called to testify in the next 90 days and it will open doors pro FBI
- Org torrent - could vanish with everything within 30 days “he is under criminal investigation”
- Network Share mIRC - awaiting the decision of the case to continue or terminate Torrent everything.
- Koshiki - operating 100% Japan will not join the SOPA / PIPA.
- Shienko Box - 100% working china / korea will not join the SOPA / PIPA
- ShareX BR - group UOL / BOL / iG say they will join the SOPA / PIPA Japan, China and Korea have a say NO to the FBI and that even if laws are passed in the USA will not have any value within the sovereignty of their countries!
P/S: mediafire has start deleting copyright protected files. Only left is the personal files."
Subscribe to:
Posts (Atom)
