This file contains hidden or 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
| class Subscriber: | |
| def __init__(self): | |
| self._observers = [] | |
| def subscribe(self, observer): | |
| if not observer in self._observers: | |
| self._observers.append(observer) | |
| def unsubscribe(self, observer): | |
| try: |
This file contains hidden or 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 urllib.request import urlopen | |
| def pi(posicion, cantidad=None): | |
| if 0 < posicion < 100000: | |
| posicion -= 1 | |
| else: | |
| return None | |
| cantidad = posicion + 1 if cantidad is None else posicion + cantidad | |
| html = str(urlopen('http://www.geom.uiuc.edu/~huberty/math5337/groupe/digits.html').read()) |
This file contains hidden or 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
| def codificar(mensaje): | |
| letras = '--abc-def-ghi-jkl-mno-pqrs-tuv-wxyz' | |
| teclado = letras.split('-') | |
| respuesta = '' | |
| for letra in mensaje: | |
| for index, tecla in enumerate(teclado): | |
| if letra == ' ': | |
| respuesta += ' ' | |
| break |
This file contains hidden or 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
| // ########################################################### | |
| // Numero de pagina actual | |
| // ########################################################### | |
| var pageNumber = 1; | |
| // ########################################################### | |
| // Deteccion del borde inferior | |
| // ########################################################### | |
| $(function () { |