background preloader

The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)

The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)
by Joel Spolsky Wednesday, October 08, 2003 Ever wonder about that mysterious Content-Type tag? You know, the one you're supposed to put in HTML and you never quite know what it should be? Did you ever get an email from your friends in Bulgaria with the subject line "???? I've been dismayed to discover just how many software developers aren't really completely up to speed on the mysterious world of character sets, encodings, Unicode, all that stuff. But it won't. So I have an announcement to make: if you are a programmer working in 2003 and you don't know the basics of characters, character sets, encodings, and Unicode, and I catch you, I'm going to punish you by making you peel onions for 6 months in a submarine. And one more thing: In this article I'll fill you in on exactly what every working programmer should know. A Historical Perspective The easiest way to understand this stuff is to go chronologically. And all was good, assuming you were an English speaker. Unicode Hello Encodings Right?

HTML5: Edition for Web Authors W3C Working Group Note 28 May 2013 This Version: Latest Published Version: Latest Editor's Draft: Previous Versions: Editors: Robin Berjon, W3C Travis Leithead, Microsoft Silvia Pfeiffer Erika Doyle Navara, Microsoft Edward O'Connor, Apple Inc. Previous Editor: Ian Hickson, Google, Inc. Copyright © 2013 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. Abstract This document has been discontinued and is only made available for historical purposes. This document is a strict subset of the full HTML5 specification that omits user-agent (UA) implementation details. This document is an automated redaction of the full HTML5 specification. Status of This document Browsable version-control record of all changes:

Operator Overloading in Python Python is an interesting language. It’s meant to be very explicit and easy to work with. But what happens when how you want or need to work with Python isn’t just what the native types expose? But what if you could just add them together? Remember back in Object-Oriented Python when we overloaded __init__() to change how our classes initialized themselves? Book Club Many of us here at Treehouse like to read and I think it would be neat to have a way to measure the books we’ve read. class Book: title = '' pages = 0 def __init__(self, title='', pages=0): self.title = title self.pages = pages def __str__(self): return self.title Nothing here that we didn’t cover in Object-Oriented Python. What I want to be able to do, though, is something like: book1 = Book('Fluency', 381) book2 = Book('The Martian', 385) book3 = Book('Ready Player One', 386) sum([book1, book2, book3]) And get back 1152 (also, I had no idea I read so many books with similar page numbers). Reverse Adding OK, let’s try it. Adding

Best paper awards from 29 Computer Science conferences over the past 18 years : compsci Joel on Software - Le minimum absolu que tout développeur doit absolument, positivement savoir sur Unicode et les jeux de caractères (aucune excuse !) Par Joël Spolsky Traduit par Freddy Hardy Vérifié par Serge Wautier Mercredi 8 octobre 2003 Vous ne vous êtes jamais posé de questions sur cette mystérieuse balise Content-Type ? Vous savez, celle que vous êtes supposé mettre en HTML, et dont vous n'avez absolument jamais su ce qu'elle veut dire ? Vous n'avez jamais reçu un email de vos amis en Bulgarie avec pour objet "???? J'ai été atterré de découvrir combien de développeurs ne sont absolument pas au jus à propos du monde mystérieux des jeux de caractères, encodages, Unicode et tous ces trucs-là. Mais il ne disparaîtra pas. J'ai donc une annonce à vous faire : si vous êtes un programmeur qui travaille en 2003 et que vous ne possédez pas les bases des caractères, des jeux de caractères, de l'encodage et d'Unicode, et que je vous attrape, je vais vous punir en vous faisant éplucher des oignons pendant 6 mois dans un sous-marin. Et encore une chose : Un point de vue historique Et tout cela était bel et bon, tant que vous êtes anglophone.

HTML5 & CSS3 Fundamentals: Development for Absolute Beginners 10 minutes, 20 seconds 35 minutes, 14 seconds 29 minutes, 21 seconds 25 minutes, 25 seconds 48 minutes, 58 seconds 20 minutes, 18 seconds 6 minutes, 59 seconds 15 minutes, 30 seconds 13 minutes, 0 seconds 27 minutes, 27 seconds Common Gotchas For the most part, Python aims to be a clean and consistent language that avoids surprises. However, there are a few cases that can be confusing to newcomers. Some of these cases are intentional but can be potentially surprising. Some could arguably be considered language warts. In general though, what follows is a collection of potentially tricky behavior that might seem strange at first glance, but is generally sensible once you’re aware of the underlying cause for the surprise. Mutable Default Arguments Seemingly the most common surprise new Python programmers encounter is Python’s treatment of mutable default arguments in function definitions. What You Wrote def append_to(element, to=[]): to.append(element) return to What You Might Have Expected to Happen my_list = append_to(12)print my_list my_other_list = append_to(42)print my_other_list A new list is created each time the function is called if a second argument isn’t provided, so that the output is: What Does Happen Late Binding Closures

OverAPI.com | Collecting all the cheat sheets Émoji Un émoji[1],[2],[3] (, emoji?, prononcé [emodʑi] en japonais et [emod͡ʒi] ou [emoʒi] en français) est un pictogramme utilisé dans un message électronique ou une page web. Le mot emoji signifie littéralement « image » (e) + « lettre » (moji) ; la ressemblance avec « émotion » est un jeu de mots interculturel. Ces caractères sont utilisés de la même façon que les émoticônes ASCII, mais un plus grand nombre est défini. Bien qu'originaires du Japon, certains jeux de caractères émojis sont intégrés à Unicode, permettant leur utilisation partout dans le monde. Les émoticônes, différentes des émojis, sont supportées par la table des caractères Unicode/U1F600, les symboles divers l'étant par la table des caractères Unicode/U2600. L’utilisation des simulations d’expressions faciales s’est développée au cours des années 1960. Les premiers émojis sont créés en 1997 pour SoftBank[4]. En 2017, le terme « émoji » fait officiellement son entrée dans le dictionnaire Le Petit Robert[8].

Tables 17.1 Introduction to tables This chapter defines the processing model for tables in CSS. Part of this processing model is the layout. For the layout, this chapter introduces two algorithms; the first, the fixed table layout algorithm, is well-defined, but the second, the automatic table layout algorithm, is not fully defined by this specification. For the automatic table layout algorithm, some widely deployed implementations have achieved relatively close interoperability. Table layout can be used to represent tabular relationships between data. In a visual medium, CSS tables can also be used to achieve specific layouts. Authors may specify the visual formatting of a table as a rectangular grid of cells. Example(s): Here is a simple three-row, three-column table described in HTML 4: <TABLE><CAPTION>This is a simple 3x3 table</CAPTION><TR id="row1"><TH>Header 1 <TD>Cell 1 <TD>Cell 2 <TR id="row2"><TH>Header 2 <TD>Cell 3 <TD>Cell 4 <TR id="row3"><TH>Header 3 <TD>Cell 5 <TD>Cell 6 </TABLE> top

Improve Your Python: Decorators Explained I've previously written about "yield" and generators. In that article, I mention it's a topic that novices find confusing. The purpose and creation of decorators is another such topic (using them, however, is rather easy). A Brief Aside... Passing Functions Before we get started, recall that everything in Python is an object that can be treated like a value (e.g. functions, classes, modules). def is_even(value): """Return True if *value* is even.""" return (value % 2) == 0 def count_occurrences(target_list, predicate): """Return the number of times applying the callable *predicate* to a list element returns True.""" return sum([1 for e in target_list if predicate(e)]) my_predicate = is_evenmy_list = [2, 4, 6, 7, 9, 11]result = count_occurrences(my_list, my_predicate)print(result) The magic is in the lines my_predicate = is_even. Hopefully, this is all old hat to you. Returning Functions We just saw that functions can be passed as arguments to other functions. Putting it all together

Related: