My favorite TED talk
Watch all of it ![]()
Archived under Fun, General, Space, Technology Comments
Try this:
class stdoutflip: def __init__(self, sys): self.stdout = sys.stdout sys.stdout = self def write(self, txt): txt = list(txt) txt.reverse() self.stdout.write(''.join(txt)) class stdoutupper: def __init__(self, sys): self.stdout = sys.stdout sys.stdout = self def write(self, txt): self.stdout.write(txt.upper())
To test it do this:
out = stdoutupper(stdoutflip(sys))
Now try printing stuff:
print "Hello Python!"
![]()
Archived under Fun, Programming, Python Comments
They are going to be just a monitor, a touch screen monitor, there will be a keyboard on the screen if you want to type anything, there will be no keyboard, mouse or touch pad.
Probably in the next 5 years they will be everywhere, you might not be able to buy one of these either
Archived under Fun, General, Operating Systems Comments
Happy Halloween, I still have to go get some treats
I have so much work too but I decided to work on Saturday too, it’s great to be a freelancer!
OK, here is the competition:
Write the shortest piece of PHP code to convert:
Lorem_ipsum_dolor_sit amet,_consectetur_adipisicing_elit
Into this:
Lorem_Ipsum_Dolor_Sit amet,_Consectetur_Adipisicing_Elit
There is no prize other than I will write a post about you ![]()
Leave a comment.
Update:
Chris wrote a perfectly working line of code for the first string I posted, but you will have to write one that will still work if there is a space in one of the words. I fixed the example.
Archived under Fun, PHP, Programming Comments (9)
I just found this great tool and I thought I’d share it, it compares performance and memory usage in any two programming languages, it has a good list of languages too.
For example, this is the comparison between PHP and C:
http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=gcc&lang2=php
PHP vs Python:
http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=python&lang2=php
Python vs Ruby:
http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=python&lang2=ruby
C vs Java:
http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=gcc&lang2=java
And finally C vs C++:
http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=gcc&lang2=gpp
Archived under C Programming, Fun, General, Programming Comments (2)
We humans, with all our egos, arrogance, ideas and hopes; are this small:
I know many of you probably know about this but here is the video for those who don’t:
http://en.wikipedia.org/wiki/Doom_(video_game)#Release_and_later_history
Archived under Fun Comments (4)
If you haven’t seen Google Earth yet, go ahead and download and install it here:
http://earth.google.com/
After you are done, put these coordinates in the search box (on top left):
1-
50° 0′38.20″N 110° 6′48.32″W

This one is really cool but it looks like it’s random.
2-
19°56′58.08″S 69°38′2.25″W
(Zoom in a little bit)

Now, this one is not random, it was made by someone, some say Mayans but remember, they couldn’t fly so I think making something like this that only someone in the air can see would be their last thought… Correct me if I’m wrong, I can’t find anything about this on the internet.
Honestly, it looks like an alien to me
3-
45° 7′25.87″N 123° 6′48.97″W
(Zoom in a little bit)

The Firefox logo!
4-
38°31′43.91″N 76°34′0.80″W
(Zoom back and forth a little)

5-
31°39′40.82″N 106°35′26.02″W

It’s only available inside US.
Go to: http://www.pandora.com/
Create an account and then click on “Create a new station” then enter a name of a song or an artist that you like and Pandora will start playing similar songs!
You can also give songs thumbs up and thumbs down which will help Pandora fine tune your station more to match your taste.
It will probably be all you listen to everyday and also helps you find new music!
Enjoy ![]()