My brother's cover of " The Christmas Song" which I think is pretty good. (considering that he doesn't have much time to play the piano)
Sunday, December 27, 2015
Sunday, December 20, 2015
How to tighten the USB on a computer, laptop or anything with USB
My old mouse and tablet pen seems to be working better after trying this out.
Sunday, December 13, 2015
Python on the go - Application in calculating resistances
Here is a program that calculates resistances in series or in parallel.
def resistor(l):
a=raw_input("series or parallel? (s or p)")
if a== 's':
sum1 = 0
for v in l:
sum1 = sum1 + float(v)
return sum1
elif a =='p':
sum1 = 0
for v in l:
sum1 = sum1 + (1/float(v))
return 1/sum1
So, how does it work? Firstly, def means that this is a functional program with a list called 'l' so when you run it, you should type 'resistor ([2,3,5])' for example to calculate three resistances of values 2, 3 and 5 ohms.
In the second line of the program , you will need to accept variable 'a' as a raw input which may be s or p. If a='s' to signify that resistances are in series, then the variable suml is first set to 0. In a way you can think of the variable suml as some kind of container or box where values (or variables) v can be added to it. Next, there is a for loop for each variable v in list 'l' and this for loop will add each variable in 'l' until the end of the list. Once it has reached the end of the list , 'return sum1' displays the value of sum1 and the program exits.
If a=' p', to signify that resistances are in parallel, the process is almost the same, only that the formula for parallel resistances is different so some changes need to be made near the end.
def resistor(l):
a=raw_input("series or parallel? (s or p)")
if a== 's':
sum1 = 0
for v in l:
sum1 = sum1 + float(v)
return sum1
elif a =='p':
sum1 = 0
for v in l:
sum1 = sum1 + (1/float(v))
return 1/sum1
So, how does it work? Firstly, def means that this is a functional program with a list called 'l' so when you run it, you should type 'resistor ([2,3,5])' for example to calculate three resistances of values 2, 3 and 5 ohms.
In the second line of the program , you will need to accept variable 'a' as a raw input which may be s or p. If a='s' to signify that resistances are in series, then the variable suml is first set to 0. In a way you can think of the variable suml as some kind of container or box where values (or variables) v can be added to it. Next, there is a for loop for each variable v in list 'l' and this for loop will add each variable in 'l' until the end of the list. Once it has reached the end of the list , 'return sum1' displays the value of sum1 and the program exits.
If a=' p', to signify that resistances are in parallel, the process is almost the same, only that the formula for parallel resistances is different so some changes need to be made near the end.
Monday, December 7, 2015
Adele - "When We Were Young"
I am no Adele fan but I do like this song. I felt 'Hello ' was a little bit hyped up but this song seems to be timeless.
Sunday, December 6, 2015
FutureLearn - Electrify from University of Liverpool
I have been trying this course out recently. It seems to be the simplest one for Electronics so far but it does help me to remember some of the basics of Electronics so I suppose it is worth checking out. There is no free cert for this but for knowledge sake, the course seems okay. The videos are mostly about 2 minutes long which appears to work quite well for the course.
For those starting Electronics or who just want a break from those tough edX courses, this could be one of the better ones to take - just don't expect anything too deep from it.
Having said that, the lecturer does make things interesting and fun enough to keep me watching the videos for the last few days so I think that is the main thing that is good about it.
For those starting Electronics or who just want a break from those tough edX courses, this could be one of the better ones to take - just don't expect anything too deep from it.
Having said that, the lecturer does make things interesting and fun enough to keep me watching the videos for the last few days so I think that is the main thing that is good about it.
Sunday, November 29, 2015
Armband /Wristband for smartphone for less than RM4 at Tesco Ipoh
This armband is actually very good for light running exercise. When I first bought it, I thought it did not look good as an armband near my shoulders and thought it would be junk but lately I have used it as a wristband and it works great.
I downloaded the Accupedo pedometer app for Android and also a Screen off app but I think the fact that my Winds Mobile smartphone has intelligent awaken also helps.
It was selling at an offer price for less than RM4 at Tesco on Saturday which I think is a very low price for it. Its original price is around RM15.
It seems it can also be used as an additional support for knee braces so it is very handy.
It can cause issues if you use it for a long time as a wristband so for longer distances it is probably better to use it as an armband near the shoulders. So far it looks better as a wristband than an armband - I don't know maybe blue just isn't the right colour for an armband.
It appears as an armband, it looks better with sleeveless shirts. It's a strange thing but it seems to be the case.
I downloaded the Accupedo pedometer app for Android and also a Screen off app but I think the fact that my Winds Mobile smartphone has intelligent awaken also helps.
It was selling at an offer price for less than RM4 at Tesco on Saturday which I think is a very low price for it. Its original price is around RM15.
It seems it can also be used as an additional support for knee braces so it is very handy.
It can cause issues if you use it for a long time as a wristband so for longer distances it is probably better to use it as an armband near the shoulders. So far it looks better as a wristband than an armband - I don't know maybe blue just isn't the right colour for an armband.
It appears as an armband, it looks better with sleeveless shirts. It's a strange thing but it seems to be the case.
Sunday, November 22, 2015
Smartphone battery dropped very quickly from around 50% to close to 0%
My smartphone battery level seems to have dropped very quickly from around 50% to close to 0% quite a few times so I went back to the sales vendor. He told me to charge the phone for 8 hours. I am not really sure if this applies to Li batteries but I remembered that for the older handphone batteries, I needed to charge them for 8 hours. Anyway I charged mine for around 5 hours. I also installed Avira antivirus. It detected and removed a malware. After that it seems like the issue has not occurred - at least not as dramatically as before.
Subscribe to:
Posts (Atom)