Funny Olympic games video

Found on dailymotion.com


Jeux Olympiques (Kasou Taishou) Olympic Games

Posted in amusement | Tagged | Leave a comment

HTML: how to insert HTML code in a verbatim tag <pre>

One issue with verbatim tag in HTML (<pre>) is that any HTML code included within the special characters < and > will be interpreted as HTML code despite the usage of a verbatim environment. So, if you include HTML code inside a verbatim, most of the time you just wont see it. To avoid that, the only solution I found right now is to use HTML names that are &gt; and &lt;.

The full list can be found easily on the web. For instance here

Interestingly, I had to use these codes for the title of the this post to render the tag <pre>.

Posted in Internet related | Tagged | 1 Comment

English Grammar: Apostrophes in Possessives

Here is a short summary of English grammar about apostrophes. It is based upon a video by a native english speaker, so I assume it is correct.

  • Use an ‘s for singular nouns even if it ends with an s:
    • people’s vote
    • James’s shoes
  • Use an apostrophe without s for possessives of most plural nouns except if the plural does not end in s
    • Children’s parents
    • waiters’ aprons (no s after the apostroph!)
    • the Joneses’ house
    • the Simpsons’ house (If their surname is Simpson without s)
  • Xerses’ shoes (no s for names related to mythology…)
  • Use an Apostrophe with -s When Two or More Nouns Possess the Same Thing but note the difference between:
    • Emma and Nicole’s school project (Emma and Nicole worked together on the same project)
    • Tim’s and Marty’s ice cream (Each boy has his own ice cream.)
Posted in Others | Tagged | Leave a comment

Python list: difference between append and extend

When manipulating lists, you have access to two methods called append() and extend(). The former appends an object to the end of the list (e.g., another list) while the latter appends each element of the iterable object (e.g., another list) to the end of the list.

For example, we can append an object (here the character ‘c’) to the end of a simple list as follows

>>> stack = ['a','b']
>>> stack.append('c')
>>> stack
['a', 'b', 'c']

If we append a list made of several items, the result as expected is (a list is an object):

>>> stack.append(['e','f'])
>>> stack
['a', 'b', 'c', ['e', 'f']]

However, sometimes what we want is to append all the elements contained in the list rather the list itself. You can do that manually of course, but a better solution is to use extend() as follows:


>>> stack.extend(['g','h'])
>>> stack
['a', 'b', 'c', ['e', 'f'], 'g', 'h']

Posted in Python | Tagged | 18 Comments

Firefox and Linux box slow

Under different version of Linux Fedora box, I’ve noticed that Firefox is far slower than under Windows box.
After some googling, a suggested solution is to disable the IPv6 option

Under firefox: type “about:config” in a new tab as a URL address.

Then, search for network.dns.disableIPv6 and set it to True. It was false on mine.

After that, the web page upload as much faster.

This was true under Fedora 8 and 9. Now, under Fedora 14, I got the same issue but this trick did not work.

Posted in Linux | Tagged , | Leave a comment