{"revision": {"id": "f2971a38-2f95-11f1-969e-e86a64d24d78", "node_id": "f295ca8d-2f95-11f1-8107-e86a64d24d78", "user_id": "edc3f576-2f95-11f1-900f-e86a64d24d78", "author": "foxhop", "data": "This is another sandbox for new users to test functionality\r\n======================================================================\r\n\r\n\"That dress looks wonderful on you,\" I said as she looked at herself in the mirror, turning prettily. She was wearing a slinky form-fitting black dress. It was one piece, coming down only to mid-thigh, with an elaborate sleeve and collar arrangement that showed off intriguing glimpses of shoulder. It just vaguely suggested that her neck was bound. The one-piece little black dress was a new look for her, and it made her nervous.\r\n\r\n.. pull-quote:: \r\n\r\n \"I could never wear this,\" she pouted. \"I'm still too self-conscious about my tummy.\" \r\n\r\nShe kept turning sideways and checking to see if she had sprouted an extra stomach recently.\r\n\r\n\"You don't have a tummy. You look wonderful.\" She did look wonderful. She has a hot body that you can break bricks on, and everyone thinks so except her. She still sees herself forty pounds ago.\r\n\r\n\"I have a belt that would look great with that, back in a sec,\" the sales girl said, dashing off to the accessories rack. She came back with an elegant chrome belt made of large metal rings strung together with short lengths of chain. She couldn't possibly have known how appropriate that choice was.\r\n\r\n\r\nbreadcrumb algorithm\r\n==========================================\r\n\r\n.. code-block:: python\r\n\r\n class Bread( object ):\r\n    \"\"\"\r\n    Create a list of URL parts or crumbs\r\n    ----------------------------------------\r\n    >>> from bread import Bread\r\n    >>> bread = Bread(\"http://foxhop.net/os/linux/ubuntu\")\r\n    >>> print bread.crumbs\r\n    >>> print bread.links()\r\n    \r\n    \"\"\"\r\n    def __init__( self, url ):\r\n        self.url = url.strip('http://') \r\n        self.crumbs = self.url.split('/')\r\n        \r\n    def links( self ):\r\n        self.list = []\r\n        count = 0\r\n        for crumb in self.crumbs:\r\n            string = \"\"\r\n            for c in range( count + 1 ):\r\n                string = string + self.crumbs[c] + '/'\r\n            count += 1\r\n            self.list.append('<a href=\"http://' + string + '\">' + crumb + '</a>')\r\n            \r\n        return self.list\r\n\r\n**EXAMPLE OUTPUT**\r\n\r\n.. code-block:: python\r\n\r\n ['foxhop.net', 'os', 'linux', 'ubuntu']\r\n ['<a href=\"http://foxhop.net/\">foxhop.net</a>', '<a href=\"http://foxhop.net/os/\">os</a>', '<a href=\"http://foxhop.net/os/linux/\">linux</a>', '<a href=\"http://foxhop.net/os/linux/ubuntu/\">ubuntu</a>']\r\n\r\n \r\n\r\nGame DB Schema\r\n================\r\n\r\n.. code-block:: sql\r\n\r\n CREATE TABLE game (\r\n\tid VARCHAR(16) NOT NULL, \r\n\tuser1_id VARCHAR(16), \r\n\tuser2_id VARCHAR(16), \r\n\ttoken CHAR(1), \r\n\tturn_id VARCHAR(16), \r\n\twinner_id VARCHAR(16), \r\n\tcreatedate DATETIME, \r\n\tmodifydate DATETIME, \r\n\tboard BLOB NOT NULL, \r\n\tPRIMARY KEY (id), \r\n\tFOREIGN KEY(user1_id) REFERENCES user (id), \r\n\tFOREIGN KEY(user2_id) REFERENCES user (id), \r\n\tFOREIGN KEY(turn_id) REFERENCES user (id), \r\n\tFOREIGN KEY(winner_id) REFERENCES user (id)\r\n )\r\n\r\n CREATE TABLE user (\r\n\tid VARCHAR(16) NOT NULL, \r\n\tname VARCHAR(32), \r\n\temail VARCHAR(32), \r\n\tPRIMARY KEY (id)\r\n )\r\n\r\n\r\n\r\nGame DB Schema2\r\n================\r\n\r\n.. code-block:: sql\r\n\r\n CREATE TABLE game (\r\n\tid VARCHAR(16) NOT NULL, \r\n\ttoken CHAR(1), \r\n\tturn_id VARCHAR(16), \r\n\twinner_id VARCHAR(16), \r\n\tcreatedate DATETIME, \r\n\tmodifydate DATETIME, \r\n\tboard BLOB NOT NULL, \r\n\tPRIMARY KEY (id), \r\n\tFOREIGN KEY(turn_id) REFERENCES user (id), \r\n\tFOREIGN KEY(winner_id) REFERENCES user (id)\r\n )\r\n\r\n CREATE TABLE user (\r\n\tid VARCHAR(16) NOT NULL, \r\n\tname VARCHAR(32), \r\n\temail VARCHAR(32), \r\n\tPRIMARY KEY (id)\r\n )\r\n\r\n CREATE TABLE usergame(\r\n\tid VARCHAR(16) NOT NULL, \r\n\tuser_id VARCHAR(16), \r\n\tgame_id VARCHAR(16), \r\n\tPRIMARY KEY (id)\r\n\tFOREIGN KEY(user_id) REFERENCES user (id), \r\n\tFOREIGN KEY(game_id) REFERENCES game (id), \r\n )\r\n\r\n\r\n\r\n\r\n", "source_format": "rst", "revision_number": 12, "created": 1290262631000}}