This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\usepackage{tgpagella} % text only | |
\usepackage{mathpazo} % math & text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bottle import get, run, request, post, Bottle, abort, error, response, debug, redirect | |
# This is a dictionary endpoint. It retrieves definitions for words. | |
# You can also add words to the dictionary. | |
# this allows our bottle application to be accessible outside this file | |
app = Bottle() | |
dictionary = { | |
"lugubrious": "extremely sad", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Please review the class below and suggest improvements. How would | |
* you refactor this class if it would be in a real-life project? | |
* There are many problems here, both high-level design mistakes, | |
* and low-level implementation bugs. We're interested to see high-level | |
* problems first, since they are most critical. The more mistakes | |
* you can spot, the better programmer you are. | |
*/ | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s = "Tomás Augusto Müller" | |
# Hex Array | |
# | |
s.unpack('U' * s.length).collect { |x| x.to_s(16) } | |
# Hex String | |
# | |
s.unpack('U' * s.length).collect { |x| x.to_s(16) }.join |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:key name="product" match="/items/item/products/product/text()" use="." /> | |
<xsl:template match="/"> | |
<xsl:for-each select="/items/item/products/product/text()[generate-id() | |
= generate-id(key('product',.)[1])]"> | |
<li> | |
<xsl:value-of select="."/> | |
</li> | |
</xsl:for-each> |