Thursday, June 11, 2015

computer machinary of the 1940's 50's

Colossus:

What was Colossus?

Colossus was one of the first major movements of Computer Technology recorded in history, this machine helped in WW2 to decrypt codes that prevented ally forces from getting communications and knowledge of enemy whereabouts.

This Computer was the first large scale device that could actually function difficult mathematical functions and symbols. 

A eager beginning most bypass the Colossus on their way to understanding today's technology and look towards the first PC, Lisa, and other computational devices of the 80's and 90's.

Although the Colossus was huge, it isn't even close to the data-transfer rates of today and could only transfer data in specific "counts" which were documented and then translated. It ran on a thin paper-tape and didn't have an assorted memory module like today's devices.



Who was involved?

 Tommy Flowers assisted by Sidney Broadhurst, William Chandler / Post Office Research Station / British Military 

Check it out!


The Colossus Computer (1943-1996): And How it Helped to Break the German Lorenz Cipher in WWII

 

As well as:

 

Colossus the secrets of Bletchley Park 

 




Monday, May 11, 2015

Turtle Time


import turtle
def draw_triangle(side_length, depth): if depth == 0: return counter = 0 while counter < 3: counter += 1 brad.forward(side_length/2) if depth > 1: brad.left(120) draw_triangle(side_length/2, depth-1) brad.forward(side_length/2) brad.right(120) brad.left(240) if __name__ == "__main__": window = turtle.Screen() window.bgcolor("white") brad = turtle.Turtle() brad.shape("turtle") brad.color("green", "green") brad.speed(5) brad.begin_fill() brad.right(120) brad.forward(128) brad.left(120) brad.forward(256) brad.left(120) brad.forward(256) brad.left(120) brad.forward(128) brad.left(120) brad.end_fill() brad.color("green", "white") brad.begin_fill() draw_triangle(128, 3) brad.end_fill()
window.exitonclick()
 
Question:
What does the last bit of Code do?
The last bit of Code which happens to be window.exitonclick() shuts down the window when you click. :)
The window variable is = to the turtle screen which displays the program itself. Python already knows what exitonclick means through built-in method retrievals.




Check this out and more PYTHONIC codes at http://love-python.blogspot.com/2014/07/turtle-triangle-fun.html

Wednesday, March 18, 2015

Gudio Van Rossum Main()

I've written a few main() functions in my time. They usually have a structure roughly like this:


"""Module docstring.

This serves as a long usage message.
"""
import sys
import getopt

def main(): # parse command line options try: opts, args = getopt.getopt(sys.argv[1:], "h", ["help"]) except getopt.error, msg: print msg print "for help use --help" sys.exit(2) # process options for o, a in opts: if o in ("-h", "--help"): print __doc__ sys.exit(0) # process arguments for arg in args: process(arg) # process() is defined elsewhere if __name__ == "__main__": main()


By:

Guido Van Rossum 

Monday, March 16, 2015

SQL

SQL Injection


 A SQL Injection is a type of virus that you type into a user input field that allows access to the database that the field is connected to. If done right a SQL Injection can leave devastation on a computer and site. SQL Injection's can be done in a variety of ways and forms, and they are becoming increasingly dangerous via the web.



Different SQL codes can be used to override SQL database code and gain information.


SELECT user from users where password = 'pass123' OR email = 'email@m.com'




Thursday, March 12, 2015

CSS help


You can make gradient color's and have them show up in different shapes and sizes throughout your website using this CSS style trick.



background-image: radiant-gradient(circle at top right, #ffa949 0%, firebrick, dodgerblue); placing this within your class, ID, or simply a h1 can change your entire website radically.