Wednesday, November 1, 2017

Foundation books

    1. Prelude to Foundation
    2. Forward the Foundation
    1. Foundation
      1. The Psychohistorians
        • Trantor (a planet)
        • Hari Seldon
      2. The Encyclopedists
        • First crisis, The Vault is opened
      3. The Mayors
        • Terminus (a planet)
        • Salvor Hardin
        • Second crisis
      4. The Traders
        • Askone (a planet)
        • Limmar Ponyets
        • Eskel Gorov
      5. The Merchant Princes
        • Hober Mallow
    2. Foundation and Empire
      1. Part I: The General
        1. Search for Magicians
        2. The Magicians
        3. The Dead Hand
        4. The Emperor
        5. The War Begins
        6. The Favorite
        7. Bribery
        8. To Trantor
        9. On Trantor
        10. The War Ends
      2. Part II The Mule
        1. Bride and Groom
          • Bayta and Turan
        2. Captain and Mayor
          • Mayor Indbur
        3. Lieutenant and Clown
        4. The Mutant
        5. The Psychologist
        6. Conference
        7. The Visi-Sonor
        8. Fall of the Foundation
        9. Start of the Search
        10. Conspirator
        11. Interlude in Space
        12. Death on Neotrantor
        13. The Ruins of Trantor
        14. Convert
        15. Death of a Psychologist
        16. End of the Search
    3. Second Foundation
    1. Foundation's Edge
    2. Foundation and Earth

Friday, February 3, 2017

Centering an image horizontally and vertically in HTML5

<!DOCTYPE html>
    <meta charset="UTF-8">
img {
   position: absolute;
   top: 50%;
   left: 50%;
   width: 800px;
   height: 800px;
   margin-top: -400px; /* Half the height */
   margin-left: -400px; /* Half the width */
    <img src="Logo.png" />

Wednesday, January 11, 2017

2017 Federal Holidays

2017 Holiday Schedule
Monday, January 2New Year’s Day
Monday, January 16Birthday of Martin Luther King, Jr.
Monday, February 20Washington’s Birthday
Monday, May 29Memorial Day
Tuesday, July 4Independence Day
Monday, September 4Labor Day
Monday, October 9Columbus Day
Friday, November 10Veterans Day
Thursday, November 23Thanksgiving Day
Monday, December 25Christmas Day

Taken from:

Python BeautifulSoup Example


from urllib import urlopen
from bs4 import BeautifulSoup

url = ''

html = urlopen(url)

bsObj = BeautifulSoup(

# The markers are in a table, there are several tables on the page
# The Afternoon markers are in the table that follows a paragraph with

# Find all the tables in the document
tables = bsObj.findAll('table', {'class':'table table-responsive table-data table-align-left'})

table_body = None

# Iterate over the tables looking at the previous paragraph
for table in tables:

   p = table.find_previous('p')

   # Check for the afternoon markers text
   if p.get_text() == 'ICE BRENT AFTERNOON MARKERS':


      # Extract that table  
      table_body = table.find('tbody')


if table_body <> None:

   # Get all the rows
   rows = table_body.find_all('tr')

   # Print each row
   for row in rows:

      cols = row.find_all('td')

      print('%s %s %s' % (cols[0].text.strip(), cols[1].text.strip(), cols[2].text.strip()))


   print('No markers!')

raw_input('Press Enter to continue ...')


Monday, August 22, 2016

Wednesday, June 29, 2016

The Enigma Machine

Yesterday, June 28, 2016 I finally understood the Enigma Machine!

Thursday, June 16, 2016

Web scraping with Java

Another one from the same author, Ryan Mitchell. This time the language is Java.