GETTING STARTED WITH PYGAME ON THE RASPBERRY PI

Size: px
Start display at page:

Download "GETTING STARTED WITH PYGAME ON THE RASPBERRY PI"

Transcription

1 GETTING STARTED WITH PYGAME ON THE RASPBERRY PI Worksheet And Cheat Sheet.technoisaledcation.co.k This resorce is copyright TechnoVisal Limited 2017 bt permission is gien to freely copy for edcational prposes.

2 1. SETTING UP YOUR GAME LOOP First open the Python 3 editor (IDLE) and make a ne python fle. Add import instrctions to yor fle to load in the pygame and sys modles. Import the locals from pygame. import pygame, sys from pygame.locals import * Initialise the pygame modle and create a ne pygame indo, setting the display mode of the indo. Then gie it a caption. pygame.init() DISPLAYSURF = pygame.display.set_mode((400, 300)) pygame.display.set_caption('pygame Nmber 1!') Create a game loop that ill contine rnning throghot the game and check for eents. hile Tre: # main game loop for eent in pygame.eent.get(): x Check the eent type for exit eents like the close icon being clicked on the pygame indo. if eent.type == QUIT: pygame.qit() sys.exit() y No to test yor code. Sae yor code and then select 'Rn' from the men bar or press F5. Yo shold see a indo appear. If yo click the close icon of the indo, it shold close and the programme exits. Next: Defning Game Elements With Data

3 2. DEFINING GAME ELEMENTS WITH DATA To store the position of an alien ship defne x and y coordinates by setting them to a starting ale. Write this code near the top of yor programme. # Data alienx = 200 alieny = 20 Defne some constants that e can se for setting colors. BLACK = ( 0, 0, 0) WHITE = (255, 255, 255) RED = (255, 0, 0) GREEN = ( 0, 255, 0) BLUE = ( 0, 0, 255) No e can dra the alien ship onto the screen at the coordinates e hae defned. Make a fnction called drascreen and add a call to it in the game loop. # This goes in the game loop # Dra the screen drascreen() # This goes aboe the game loop def drascreen(): DISPLAYSURF.fill(BLACK) draalien() pygame.display.pdate() # This goes aboe the drascreen fnction def draalien(): x = alienx y = alieny points = [(x,y+10),(x-10,y-10),(x+10,y-10)] pygame.dra.lines(displaysurf,red,tre,points,1) Next: Animating the Alien Ship

4 3. ANIMATING THE ALIEN SHIP Create a fnction to moe the alien ship left and right. def moealien(): global aliendir, alienx, alieny if aliendir == 0: alienx = alienx - 1 if alienx == 0: aliendir = 1 if aliendir == 1: alienx = alienx + 1 if alienx == 400: aliendir = 0 We are sing a ne global ariable called aliendir so e need to defne that at the top of the code ith or other data. aliendir = 0 We also need to call the ne moealien fnction from or game loop. # Moe the alien moealien() x If yo try rnning the code, the alien ship ill probably moe too fast so e can slo don the animation like this: # Pt this before the game loop gameclock = pygame.time.clock() # Pt this jst inside the game loop gameclock.tick(20) Next: Adding A Player Ship

5 4. ADDING A PLAYER SHIP Add some global ariables at the top of yor code to hold the x and y co-ordinates of the player ship. shipx = 200 shipy = 280 Defne a fnction aboe yor game loop to dra the player ship. def draship(): x = shipx y = shipy points = [(x,y-10),(x-10,y+10),(x+10,y+10)] pygame.dra.lines(displaysurf,green,tre,points,1) Then add a call to the draship fnction in the drascreen fnction. def drascreen(): DISPLAYSURF.fill(BLACK) draalien() draship() pygame.display.pdate() x To listen for key presses e need to defne a fnction called checkkeys and add a call to it from the game loop. def checkkeys(): global shipx, shipy if pygame.key.get_pressed()[pygame.k_left]!=0 : shipx = shipx - 3 if pygame.key.get_pressed()[pygame.k_right]!=0 : shipx = shipx + 3 if pygame.key.get_pressed()[pygame.k_space]!=0 : firelaser() # Check keyboard inpt inside the game loop checkkeys() Next: Make a Laser Element

6 5. MAKE A LASER ELEMENT Defne a fnction called frelaser that e called in the checkkeys fnction. Pt this aboe the checkkeys fnction. def firelaser(): global lasery,laserx if lasery <= 0 : lasery = shipy laserx = shipx We hae sed some ne global ariables so e need to make sre they are inclded in the data section at the beginning of the code. laserx = 0 lasery = 0 No defne a fnction to dra the laser and add a call to the fnction in the drascreen fnction. def dralaser(): global laserx, lasery if lasery >= 1 : points = [(laserx,lasery+10),(laserx,lasery)] pygame.dra.lines(displaysurf,white,false,points,1) # This goes in the drascreen fnction dralaser() x We ill also need to defne a fnction to moe the laser p the screen hen it has been fred and then add a call to it in the game loop. def moelaser(): global lasery if lasery >=1 : lasery = lasery - 5 # This goes in the game loop moelaser() Next: Check if The Laser Hit the Alien Ship

7 6. CHECK IF THE LASER HIT THE ALIEN SHIP Defne a fnction to check if the laser co-ordinates are inside the bonding box of the alien ship and add a call to the fnction in the game loop. def checklaser(): global laserx,lasery,alienx,alieny if (laserx > alienx-10 and laserx < alienx+10 and lasery > alieny-10 and lasery < alieny+10) : alieny = -20 # This goes in the game loop checklaser() No test yor programme. Yo shold see a moing red triangle and a green triangle at the bottom of the screen. If yo se the arro keys left and right the green (player) ship shold moe. If yo hit the space bar yo shold see a laser fre from the player ship and moe p the screen. If the laser hits the red ship it shold disappear. Next Steps : Hae a go at coding the folloing items Mltiple alien ships Alien ships shoot back Mltiple lasers Score Alien ships moe diferently Use bitmap graphics for the ships Make explosion graphic hen a ship is hit Make sonds hen a laser is fred or a ship is hit Extra resorces for this project can be fond at:.technoisaledcation.co.k/pygame_orkshop Next: Python Cheat Sheet

8 PYTHON CHEAT SHEET Python Keyords def for in from global if import hile Defne a fnction ith optional ariables. Example: def frelaser(lasernmber): Make a loop to read an array. Example: for ale in array: Import a section of a modle for se in the programme. Example: from pygame.locals import * Enable changing the ale of ariables that hae been defned otside a fnction. Example: global x,y A condition statement. Rn the folloing code if the eqation is tre. Example: if lasery < 0: Import a modle so that its fnctions can be sed. Example: import sys Retrn control of the programme back to here the fnction as called from. Example: Perform a loop ntil an eqation is tre. Example: hile (cont < 10): Usefl PyGame Fnctions pygame.display.pdate() - refresh the indo to display changes. pygame.display.set_caption(title) - set the title of the indo. DISPLAYSURFACE = pygame.display.set_mode((idth,height)) - create a pygame indo. pygame.dra.lines(displaysurface,color,closed,points,idth) - dra lines beteen a point list. pygame.eent.get() - get a list of eents that hae happened. pygame.init() - Initialise the pygame modle. DISPLAYSURFACE.fll(color) - fll the indo ith a color. pygame.key.get_pressed()[key] - see if a named key is being pressed. pygame.time.clock() and tick(framespersecond) - set the frame rate for a game loop. pygame.qit() - close the pygame session. For an introdction to Python on the Raspberry Pi, Mark Vanstone has prodced a 'Getting Started' series of ideos that can be ieed at: This resorce prodced by TechnoVisal Edcation 2017 technoisaledcation.co.k

Worksheet And Programme Listing

Worksheet And Programme Listing GETTING STARTED WITH PYGAME ZERO ON THE RASPBERRY PI Worksheet And Programme Listing.technoisaledcation.co.k This resorce is copyright TechnoVisal Limited 2017 bt permission is gien to freely copy for

More information

PYTHON NOTES (drawing.py and drawstuff.py)

PYTHON NOTES (drawing.py and drawstuff.py) PYTHON NOTES (drawing.py and drawstuff.py) INTRODUCTION TO PROGRAMMING USING PYGAME STEP 1: Importing Modules and Initialization All the Pygame functions that are required to implement features like graphics

More information

CS 153 Design of Operating Systems Spring 18

CS 153 Design of Operating Systems Spring 18 CS 153 Design of Operating Systems Spring 18 Lectre 11: Semaphores Instrctor: Chengy Song Slide contribtions from Nael Ab-Ghazaleh, Harsha Madhyvasta and Zhiyn Qian Last time Worked throgh software implementation

More information

EMC ViPR. User Guide. Version

EMC ViPR. User Guide. Version EMC ViPR Version 1.1.0 User Gide 302-000-481 01 Copyright 2013-2014 EMC Corporation. All rights reserved. Pblished in USA. Pblished Febrary, 2014 EMC believes the information in this pblication is accrate

More information

pygame Lecture #5 (Examples: fruitgame)

pygame Lecture #5 (Examples: fruitgame) pygame Lecture #5 (Examples: fruitgame) MOUSE INPUT IN PYGAME I. Detecting Mouse Input in pygame In addition to waiting for a keyboard event to precipitate some action, pygame allows us to wait for a mouse

More information

There s already a ton of code written called libraries that we can use by importing. One that we use often is random

There s already a ton of code written called libraries that we can use by importing. One that we use often is random There s already a ton of code written called libraries that we can use by importing. One that we use often is random import random print random.randint(2, 22) Random frequently used methods Name Use random.randint(a,

More information

CAPL Scripting Quickstart

CAPL Scripting Quickstart CAPL Scripting Qickstart CAPL (Commnication Access Programming Langage) For CANalyzer and CANoe V1.01 2015-12-03 Agenda Important information before getting started 3 Visal Seqencer (GUI based programming

More information

USER GUIDE eshop GUARDIAN AUTOMOTIVE

USER GUIDE eshop GUARDIAN AUTOMOTIVE USER GUIDE eshop GUARDIAN AUTOMOTIVE HOW TO REGISTER FIND PRODUCTS ADDITIONAL FUNCTIONALITIES PLACE ORDER YOUR ACCOUNT Ne cstomers If yo are a ne cstomer, yo ill first need to reqest login permission by

More information

Queries. Inf 2B: Ranking Queries on the WWW. Suppose we have an Inverted Index for a set of webpages. Disclaimer. Kyriakos Kalorkoti

Queries. Inf 2B: Ranking Queries on the WWW. Suppose we have an Inverted Index for a set of webpages. Disclaimer. Kyriakos Kalorkoti Qeries Inf B: Ranking Qeries on the WWW Kyriakos Kalorkoti School of Informatics Uniersity of Edinbrgh Sppose e hae an Inerted Index for a set of ebpages. Disclaimer I Not really the scenario of Lectre.

More information

Computer User s Guide 4.0

Computer User s Guide 4.0 Compter User s Gide 4.0 2001 Glenn A. Miller, All rights reserved 2 The SASSI Compter User s Gide 4.0 Table of Contents Chapter 1 Introdction...3 Chapter 2 Installation and Start Up...5 System Reqirements

More information

EXAMINATIONS 2010 END OF YEAR NWEN 242 COMPUTER ORGANIZATION

EXAMINATIONS 2010 END OF YEAR NWEN 242 COMPUTER ORGANIZATION EXAINATIONS 2010 END OF YEAR COPUTER ORGANIZATION Time Allowed: 3 Hors (180 mintes) Instrctions: Answer all qestions. ake sre yor answers are clear and to the point. Calclators and paper foreign langage

More information

Hardware Design Tips. Outline

Hardware Design Tips. Outline Hardware Design Tips EE 36 University of Hawaii EE 36 Fall 23 University of Hawaii Otline Verilog: some sbleties Simlators Test Benching Implementing the IPS Actally a simplified 6 bit version EE 36 Fall

More information

Chapter 4: Network Layer. TDTS06 Computer networks. Chapter 4: Network Layer. Network layer. Two Key Network-Layer Functions

Chapter 4: Network Layer. TDTS06 Computer networks. Chapter 4: Network Layer. Network layer. Two Key Network-Layer Functions Chapter : Netork Laer TDTS06 Compter s Lectre : Netork laer II Roting algorithms Jose M. Peña, jospe@ida.li.se ID/DIT, LiU 009-09- Chapter goals: nderstand principles behind laer serices: laer serice models

More information

PyGame Unit ?

PyGame Unit ? PyGame Unit 1 1.1 1.? 1.1 Introduction to PyGame Text Book for Python Module Making Games With Python and PyGame By Al Swiegert Easily found on the Internet: http://inventwithpython.com/pygame/chapters

More information

[1] Hopcroft, J., D. Joseph and S. Whitesides, Movement problems for twodimensional

[1] Hopcroft, J., D. Joseph and S. Whitesides, Movement problems for twodimensional Acknoledgement. The athors thank Bill Lenhart for interesting discssions on the recongration of rlers. References [1] Hopcroft, J., D. Joseph and S. Whitesides, Moement problems for todimensional linkages,

More information

Content Safety Precaution... 4 Getting started... 7 Input method... 9 Using the Menus Use of USB Maintenance & Safety...

Content Safety Precaution... 4 Getting started... 7 Input method... 9 Using the Menus Use of USB Maintenance & Safety... STAR -1- Content 1. Safety Precation... 4 2. Getting started... 7 Installing the cards and the Battery... 7 Charging the Battery... 8 3. Inpt method... 9 To Shift Entry Methods... 9 Nmeric and English

More information

CS 153 Design of Operating Systems Spring 18

CS 153 Design of Operating Systems Spring 18 CS 153 Design of Operating Systems Spring 18 Lectre 15: Virtal Address Space Instrctor: Chengy Song Slide contribtions from Nael Ab-Ghazaleh, Harsha Madhyvasta and Zhiyn Qian OS Abstractions Applications

More information

Illumina LIMS. Software Guide. For Research Use Only. Not for use in diagnostic procedures. Document # June 2017 ILLUMINA PROPRIETARY

Illumina LIMS. Software Guide. For Research Use Only. Not for use in diagnostic procedures. Document # June 2017 ILLUMINA PROPRIETARY Illmina LIMS Software Gide Jne 2017 ILLUMINA PROPRIETARY This docment and its contents are proprietary to Illmina, Inc. and its affiliates ("Illmina"), and are intended solely for the contractal se of

More information

Local Run Manager. Software Reference Guide for MiSeqDx

Local Run Manager. Software Reference Guide for MiSeqDx Local Rn Manager Software Reference Gide for MiSeqDx Local Rn Manager Overview 3 Dashboard Overview 4 Administrative Settings and Tasks 7 Workflow Overview 12 Technical Assistance 17 Docment # 1000000011880

More information

KINEMATICS OF FLUID MOTION

KINEMATICS OF FLUID MOTION KINEMATICS OF FLUID MOTION The Velocity Field The representation of properties of flid parameters as fnction of the spatial coordinates is termed a field representation of the flo. One of the most important

More information

Review Multicycle: What is Happening. Controlling The Multicycle Design

Review Multicycle: What is Happening. Controlling The Multicycle Design Review lticycle: What is Happening Reslt Zero Op SrcA SrcB Registers Reg Address emory em Data Sign etend Shift left Sorce A B Ot [-6] [5-] [-6] [5-] [5-] Instrction emory IR RegDst emtoreg IorD em em

More information

Lab 8 (All Sections) Prelab: ALU and ALU Control

Lab 8 (All Sections) Prelab: ALU and ALU Control Lab 8 (All Sections) Prelab: and Control Name: Sign the following statement: On my honor, as an Aggie, I have neither given nor received nathorized aid on this academic work Objective In this lab yo will

More information

The extra single-cycle adders

The extra single-cycle adders lticycle Datapath As an added bons, we can eliminate some of the etra hardware from the single-cycle path. We will restrict orselves to sing each fnctional nit once per cycle, jst like before. Bt since

More information

An Introduction to GPU Computing. Aaron Coutino MFCF

An Introduction to GPU Computing. Aaron Coutino MFCF An Introdction to GPU Compting Aaron Cotino acotino@waterloo.ca MFCF What is a GPU? A GPU (Graphical Processing Unit) is a special type of processor that was designed to render and maniplate textres. They

More information

CS 153 Design of Operating Systems

CS 153 Design of Operating Systems CS 153 Design of Operating Systems Spring 18 Lectre 26: Dynamic Memory (2) Instrctor: Chengy Song Slide contribtions from Nael Ab-Ghazaleh, Harsha Madhyvasta and Zhiyn Qian Some slides modified from originals

More information

1-2 Geometric vectors

1-2 Geometric vectors 1-2 Geometric ectors We are going to start simple, by defining 2-dimensional ectors, the simplest ectors there are. Are these the ectors that can be defined by to numbers only? Yes, and here is a formal

More information

DSCS6020: SQLite and RSQLite

DSCS6020: SQLite and RSQLite DSCS6020: SQLite and RSQLite SQLite History SQlite is an open sorce embedded database, meaning that it doesn t have a separate server process. Reads and writes to ordinary disk files. The original implementation

More information

Requirements Engineering. Objectives. System requirements. Types of requirements. FAQS about requirements. Requirements problems

Requirements Engineering. Objectives. System requirements. Types of requirements. FAQS about requirements. Requirements problems Reqirements Engineering Objectives An introdction to reqirements Gerald Kotonya and Ian Sommerville To introdce the notion of system reqirements and the reqirements process. To explain how reqirements

More information

OPTI-502 Optical Design and Instrumentation I John E. Greivenkamp Homework Set 9 Fall, 2018

OPTI-502 Optical Design and Instrumentation I John E. Greivenkamp Homework Set 9 Fall, 2018 OPTI-502 Optical Design and Instrmentation I John E. Greivenkamp Assigned: 10/31/18 Lectre 21 De: 11/7/18 Lectre 23 Note that in man 502 homework and exam problems (as in the real world!!), onl the magnitde

More information

Lecture 7. Building A Simple Processor

Lecture 7. Building A Simple Processor Lectre 7 Bilding A Simple Processor Christos Kozyrakis Stanford University http://eeclass.stanford.ed/ee8b C. Kozyrakis EE8b Lectre 7 Annoncements Upcoming deadlines Lab is de today Demo by 5pm, report

More information

Multimedia-Programmierung Übung 7

Multimedia-Programmierung Übung 7 Multimedia-Programmierung Übung 7 Ludwig-Maximilians-Universität München Sommersemester 2013 Ludwig-Maximilians-Universität München Multimedia-Programmierung 7-1 Today Sprite animations in Advanced collision

More information

http://creativecommons.org/licenses/by/4.0/ A worksheet by Andrew Hague Flappy Wormy is based on work in Al Sweigart s Invent with Python: a free e-book. Al has written a really great series on creating

More information

USER S GUIDE: SPRINT RELAY CUSTOMER PROFILE

USER S GUIDE: SPRINT RELAY CUSTOMER PROFILE USER S GUIDE: SPRINT RELAY CUSTOMER PROFILE www.mysprintrelay.com/login n Log-in Go to www.mysprintrelay.com/login. If yo don t have a sername or password, click the gray men btton Cstomer New Profile/Call

More information

On Plane Constrained Bounded-Degree Spanners

On Plane Constrained Bounded-Degree Spanners Algorithmica manscript No. (ill be inserted by the editor) 1 On Plane Constrained Bonded-Degree Spanners 2 3 Prosenjit Bose Rolf Fagerberg André an Renssen Sander Verdonschot 4 5 Receied: date / Accepted:

More information

Multimedia-Programmierung Übung 5

Multimedia-Programmierung Übung 5 Multimedia-Programmierung Übung 5 Ludwig-Maximilians-Universität München Sommersemester 2009 Ludwig-Maximilians-Universität München Multimedia-Programmierung 5-1 Today Sprite animations in Advanced collision

More information

On Bichromatic Triangle Game

On Bichromatic Triangle Game On Bichromatic Triangle Game Gordana Manić Daniel M. Martin Miloš Stojakoić Agst 16, 2012 Abstract We stdy a combinatorial game called Bichromatic Triangle Game, defined as follows. Two players R and B

More information

EMC VNX Series. Problem Resolution Roadmap for VNX with ESRS for VNX and Connect Home. Version VNX1, VNX2 P/N REV. 03

EMC VNX Series. Problem Resolution Roadmap for VNX with ESRS for VNX and Connect Home. Version VNX1, VNX2 P/N REV. 03 EMC VNX Series Version VNX1, VNX2 Problem Resoltion Roadmap for VNX with ESRS for VNX and Connect Home P/N 300-014-335 REV. 03 Copyright 2012-2014 EMC Corporation. All rights reserved. Pblished in USA.

More information

Network layer. Two Key Network-Layer Functions. Datagram Forwarding table. IP datagram format. IP Addressing: introduction

Network layer. Two Key Network-Layer Functions. Datagram Forwarding table. IP datagram format. IP Addressing: introduction Netork laer transport segment sending to receiing host on sending side encapslates segments into grams on rcing side, deliers segments to transport laer laer protocols in eer host, roter roter eamines

More information

LDAP Configuration Guide

LDAP Configuration Guide LDAP Configration Gide Content Content LDAP directories on Gigaset phones............................................... 3 Configration.....................................................................

More information

Local Run Manager Generate FASTQ Analysis Module

Local Run Manager Generate FASTQ Analysis Module Local Rn Manager Generate FASTQ Analysis Modle Workflow Gide For Research Use Only. Not for se in diagnostic procedres. Overview 3 Set Parameters 3 Analysis Methods 5 View Analysis Reslts 5 Analysis Report

More information

L EGAL NOTICES. ScanSoft, Inc. 9 Centennial Drive Peabody, MA 01960, United States of America

L EGAL NOTICES. ScanSoft, Inc. 9 Centennial Drive Peabody, MA 01960, United States of America L EGAL NOTICES Copyright 2002 by ScanSoft, Inc. All rights reserved. No part of this pblication may be transmitted, transcribed, reprodced, stored in any retrieval system or translated into any langage

More information

COPYRIGHTED MATERIAL. Recording Macros and Getting Started with VBA. Part 1

COPYRIGHTED MATERIAL. Recording Macros and Getting Started with VBA. Part 1 Part 1 Recording Macros and Getting Started with VBA Chapter 1: Recording and Rnning Macros in the Office Applications Chapter 2: Getting Started with the Visal Basic Editor Chapter 3: Editing Recorded

More information

Winter 2013 MIDTERM TEST #2 Wednesday, March 20 7:00pm to 8:15pm. Please do not write your U of C ID number on this cover page.

Winter 2013 MIDTERM TEST #2 Wednesday, March 20 7:00pm to 8:15pm. Please do not write your U of C ID number on this cover page. page of 7 University of Calgary Departent of Electrical and Copter Engineering ENCM 369: Copter Organization Lectre Instrctors: Steve Noran and Nor Bartley Winter 23 MIDTERM TEST #2 Wednesday, March 2

More information

The multicycle datapath. Lecture 10 (Wed 10/15/2008) Finite-state machine for the control unit. Implementing the FSM

The multicycle datapath. Lecture 10 (Wed 10/15/2008) Finite-state machine for the control unit. Implementing the FSM Lectre (Wed /5/28) Lab # Hardware De Fri Oct 7 HW #2 IPS programming, de Wed Oct 22 idterm Fri Oct 2 IorD The mlticycle path SrcA Today s objectives: icroprogramming Etending the mlti-cycle path lti-cycle

More information

Rectangle-of-influence triangulations

Rectangle-of-influence triangulations CCCG 2016, Vancoer, British Colmbia, Ag 3 5, 2016 Rectangle-of-inflence trianglations Therese Biedl Anna Lbi Saeed Mehrabi Sander Verdonschot 1 Backgrond The concept of rectangle-of-inflence (RI) draings

More information

Stereopsis Raul Queiroz Feitosa

Stereopsis Raul Queiroz Feitosa Stereopsis Ral Qeiroz Feitosa 5/24/2017 Stereopsis 1 Objetie This chapter introdces the basic techniqes for a 3 dimensional scene reconstrction based on a set of projections of indiidal points on two calibrated

More information

The final datapath. M u x. Add. 4 Add. Shift left 2. PCSrc. RegWrite. MemToR. MemWrite. Read data 1 I [25-21] Instruction. Read. register 1 Read.

The final datapath. M u x. Add. 4 Add. Shift left 2. PCSrc. RegWrite. MemToR. MemWrite. Read data 1 I [25-21] Instruction. Read. register 1 Read. The final path PC 4 Add Reg Shift left 2 Add PCSrc Instrction [3-] Instrction I [25-2] I [2-6] I [5 - ] register register 2 register 2 Registers ALU Zero Reslt ALUOp em Data emtor RegDst ALUSrc em I [5

More information

Assignments. Computer Networks LECTURE 7 Network Layer: Routing and Addressing. Network Layer Function. Internet Architecture

Assignments. Computer Networks LECTURE 7 Network Layer: Routing and Addressing. Network Layer Function. Internet Architecture ompter Netorks LETURE Netork Laer: Roting and ddressing ssignments Project : Web Pro Serer DUE OT Sandha Darkadas Department of ompter Science Uniersit of Rochester Internet rchitectre Bottom-p: phsical:

More information

This chapter is based on the following sources, which are all recommended reading:

This chapter is based on the following sources, which are all recommended reading: Bioinformatics I, WS 09-10, D. Hson, December 7, 2009 105 6 Fast String Matching This chapter is based on the following sorces, which are all recommended reading: 1. An earlier version of this chapter

More information

CS 153 Design of Operating Systems Spring 18

CS 153 Design of Operating Systems Spring 18 CS 153 Design of Operating Systems Spring 18 Lectre 9: Synchronization (1) Instrctor: Chengy Song Slide contribtions from Nael Ab-Ghazaleh, Harsha Madhyvasta and Zhiyn Qian Cooperation between Threads

More information

GETTING STARTED WITH RASPBERRY PI

GETTING STARTED WITH RASPBERRY PI GETTING STARTED WITH RASPBERRY PI Workshop Handout Created by Furtherfield Commissioned by Southend Education Trust GETTING STARTED WITH RASPBERRY PI INTRODUCTION Introduce Raspberry Pi and answer some

More information

Planarity-Preserving Clustering and Embedding for Large Planar Graphs

Planarity-Preserving Clustering and Embedding for Large Planar Graphs Planarity-Presering Clstering and Embedding for Large Planar Graphs Christian A. Dncan, Michael T. Goodrich, and Stephen G. Koboro Center for Geometric Compting The Johns Hopkins Uniersity Baltimore, MD

More information

What s New in AppSense Management Suite Version 7.0?

What s New in AppSense Management Suite Version 7.0? What s New in AMS V7.0 What s New in AppSense Management Site Version 7.0? AppSense Management Site Version 7.0 is the latest version of the AppSense prodct range and comprises three prodct components,

More information

Doctor Web. All rights reserved

Doctor Web. All rights reserved Enterprise Site 2004-2009 Doctor Web. All rights reserved This docment is the property of Doctor Web. No part of this docment may be reprodced, pblished or transmitted in any form or by any means for any

More information

On Plane Constrained Bounded-Degree Spanners

On Plane Constrained Bounded-Degree Spanners On Plane Constrained Bonded-Degree Spanners Prosenjit Bose 1, Rolf Fagerberg 2, André an Renssen 1, Sander Verdonschot 1 1 School of Compter Science, Carleton Uniersity, Ottaa, Canada. Email: jit@scs.carleton.ca,

More information

Adaptive Influence Maximization in Microblog under the Competitive Independent Cascade Model

Adaptive Influence Maximization in Microblog under the Competitive Independent Cascade Model International Jornal of Knowledge Engineering, Vol. 1, No. 2, September 215 Adaptie Inflence Maximization in Microblog nder the Competitie Independent Cascade Model Zheng Ding, Kai Ni, and Zhiqiang He

More information

Picking and Curves Week 6

Picking and Curves Week 6 CS 48/68 INTERACTIVE COMPUTER GRAPHICS Picking and Crves Week 6 David Breen Department of Compter Science Drexel University Based on material from Ed Angel, University of New Mexico Objectives Picking

More information

An Extended Fault-Tolerant Link-State Routing Protocol in the Internet

An Extended Fault-Tolerant Link-State Routing Protocol in the Internet An Extended Falt-Tolerant Link-State Roting Protocol in the Internet Jie W, Xiaola Lin, Jiannong Cao z, and Weijia Jia x Department of Compter Science and Engineering Florida Atlantic Uniersit Boca Raton,

More information

CS 153 Design of Operating Systems Spring 18

CS 153 Design of Operating Systems Spring 18 CS 153 Design of Operating Systems Spring 18 Midterm Review Midterm in class on Friday (May 4) Covers material from arch spport to deadlock Based pon lectre material and modles of the book indicated on

More information

DI-80. When Accuracy Counts

DI-80. When Accuracy Counts DI-80 Indi cator When Accracy Conts Operation Manal 73357 CONTENTS 1. INTRODUCTION...3 1.1. Display...3 1.2. A/D Section...3 1.3. Item Memory...3 1.4. Environment...4 1.5. Interface...4 1.6. Option...4

More information

4.13 Advanced Topic: An Introduction to Digital Design Using a Hardware Design Language 345.e1

4.13 Advanced Topic: An Introduction to Digital Design Using a Hardware Design Language 345.e1 .3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage 35.e.3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage to Describe and odel a Pipeline

More information

Basics of Digital Logic Design

Basics of Digital Logic Design ignals, Logic Operations and Gates E 675.2: Introdction to ompter rchitectre asics of igital Logic esign Rather than referring to voltage levels of signals, we shall consider signals that are logically

More information

Ellucian ODS9.0 Upgrade Migrating from OWB to ODI. Amir Saleem Centennial College May 17, 2017

Ellucian ODS9.0 Upgrade Migrating from OWB to ODI. Amir Saleem Centennial College May 17, 2017 Ellcian ODS9.0 Upgrade Migrating from OWB to ODI Amir Saleem Centennial College May 17, 2017 Topics OWB Spport Oracle Data Integrator (ODI) ODI Architectre Upgrade paths General Gideline for ODS infrastrctre

More information

Analog Telephones. User Guide. BusinessPhone Communication Platform

Analog Telephones. User Guide. BusinessPhone Communication Platform Analog Telephones BsinessPhone Commnication Platform User Gide Cover Page Graphic Place the graphic directly on the page, do not care abot ptting it in the text flow. Select Graphics > Properties and make

More information

CS 251, Winter 2018, Assignment % of course mark

CS 251, Winter 2018, Assignment % of course mark CS 25, Winter 28, Assignment 3.. 3% of corse mark De onday, Febrary 26th, 4:3 P Lates accepted ntil : A, Febrary 27th with a 5% penalty. IEEE 754 Floating Point ( points): (a) (4 points) Complete the following

More information

TDT4255 Friday the 21st of October. Real world examples of pipelining? How does pipelining influence instruction

TDT4255 Friday the 21st of October. Real world examples of pipelining? How does pipelining influence instruction Review Friday the 2st of October Real world eamples of pipelining? How does pipelining pp inflence instrction latency? How does pipelining inflence instrction throghpt? What are the three types of hazard

More information

CS 153 Design of Operating Systems Spring 18

CS 153 Design of Operating Systems Spring 18 CS 153 Design of Operating Systems Spring 18 Lectre 12: Deadlock Instrctor: Chengy Song Slide contribtions from Nael Ab-Ghazaleh, Harsha Madhyvasta and Zhiyn Qian Deadlock the deadly embrace! Synchronization

More information

Garnet2.0: A Detailed On-Chip Network Model Inside a Full-System Simulator

Garnet2.0: A Detailed On-Chip Network Model Inside a Full-System Simulator Garnet2.0: A Detailed On-Chip Network Model Inside a Fll-System Simlator Tshar Krishna gem5 workshop ARM Research Smmit September 11, 2017 Assistant Professor School of ECE and CS Georgia Institte of Technology

More information

CSE 141 Computer Architecture Summer Session I, Lectures 10 Advanced Topics, Memory Hierarchy and Cache. Pramod V. Argade

CSE 141 Computer Architecture Summer Session I, Lectures 10 Advanced Topics, Memory Hierarchy and Cache. Pramod V. Argade CSE 141 Compter Architectre Smmer Session I, 2004 Lectres 10 Advanced Topics, emory Hierarchy and Cache Pramod V. Argade CSE141: Introdction to Compter Architectre Instrctor: TA: Pramod V. Argade (p2argade@cs.csd.ed)

More information

The single-cycle design from last time

The single-cycle design from last time lticycle path Last time we saw a single-cycle path and control nit for or simple IPS-based instrction set. A mlticycle processor fies some shortcomings in the single-cycle CPU. Faster instrctions are not

More information

GETTING STARTED WITH THE MINIMED 640G INSULIN PUMP

GETTING STARTED WITH THE MINIMED 640G INSULIN PUMP GETTING STARTED WITH THE MINIMED 640G INSULIN PUMP TABLE OF CONTENTS Section 1: Getting Started...3 Getting Started with the MiniMed 640G Inslin Pmp... 3 1.1 Pmp Mechanics and the Delivery of Inslin...

More information

Partha Sarathi Mandal

Partha Sarathi Mandal MA 5: Data Strctres and Algorithms Lectre http://www.iitg.ernet.in/psm/indexing_ma5/y1/index.html Partha Sarathi Mandal Dept. of Mathematics, IIT Gwahati Idea of Prim s Algorithm Instead of growing the

More information

Chapter 4: Network Layer

Chapter 4: Network Layer Chapter 4: Introdction (forarding and roting) Reie of qeeing theor Roting algorithms Link state, Distance Vector Roter design and operation IP: Internet Protocol IP4 (datagram format, addressing, ICMP,

More information

Image Restoration Image Degradation and Restoration

Image Restoration Image Degradation and Restoration Image Degradation and Restoration hxy Image Degradation Model: Spatial domain representation can be modeled by: g x y h x y f x y x y Freqency domain representation can be modeled by: G F N Prepared By:

More information

dss-ip Manual digitalstrom Server-IP Operation & Settings

dss-ip Manual digitalstrom Server-IP Operation & Settings dss-ip digitalstrom Server-IP Manal Operation & Settings Table of Contents digitalstrom Table of Contents 1 Fnction and Intended Use... 3 1.1 Setting p, Calling p and Operating... 3 1.2 Reqirements...

More information

Networks An introduction to microcomputer networking concepts

Networks An introduction to microcomputer networking concepts Behavior Research Methods& Instrmentation 1978, Vol 10 (4),522-526 Networks An introdction to microcompter networking concepts RALPH WALLACE and RICHARD N. JOHNSON GA TX, Chicago, Illinois60648 and JAMES

More information

CS 251, Winter 2019, Assignment % of course mark

CS 251, Winter 2019, Assignment % of course mark CS 25, Winter 29, Assignment.. 3% of corse mark De Wednesday, arch 3th, 5:3P Lates accepted ntil Thrsday arch th, pm with a 5% penalty. (7 points) In the diagram below, the mlticycle compter from the corse

More information

Web Calendar Training. Using 25Live to create a web calendar event

Web Calendar Training. Using 25Live to create a web calendar event Web Calendar Training Using 25Live to create a web calendar event The Basics A one-time event with or withot a room reservation Examples: Center for Interfaith Engagement event, stdent life event, offices

More information

POWER-OF-2 BOUNDARIES

POWER-OF-2 BOUNDARIES Warren.3.fm Page 5 Monday, Jne 17, 5:6 PM CHAPTER 3 POWER-OF- BOUNDARIES 3 1 Ronding Up/Down to a Mltiple of a Known Power of Ronding an nsigned integer down to, for eample, the net smaller mltiple of

More information

Object Pose from a Single Image

Object Pose from a Single Image Object Pose from a Single Image How Do We See Objects in Depth? Stereo Use differences between images in or left and right eye How mch is this difference for a car at 00 m? Moe or head sideways Or, the

More information

Solutions by Artem Gritsenko, Ahmedul Kabir, Yun Lu, and Prof. Ruiz Problem I. By Artem Gritsenko, Yun Lu, and Prof. Ruiz

Solutions by Artem Gritsenko, Ahmedul Kabir, Yun Lu, and Prof. Ruiz Problem I. By Artem Gritsenko, Yun Lu, and Prof. Ruiz CS3 Algorithm. B Term 3. Homework 5 Soltion Soltion b Artem Gritenko, Ahmedl Kabir, Yn L, and Prof. Riz Problem I. B Artem Gritenko, Yn L, and Prof. Riz a. Algorithm. KNAPSACK (,,,,,,, ) # i the knapack

More information

Review. A single-cycle MIPS processor

Review. A single-cycle MIPS processor Review If three instrctions have opcodes, 7 and 5 are they all of the same type? If we were to add an instrction to IPS of the form OD $t, $t2, $t3, which performs $t = $t2 OD $t3, what wold be its opcode?

More information

Gigaset M34 USB Ya-LBA / englisch / A31008-M403-R / cover_front.fm / User Manual

Gigaset M34 USB Ya-LBA / englisch / A31008-M403-R / cover_front.fm / User Manual User Manal Contents Contents For yor safety.............................. 4 Notes on the operating instrctions....................................... 4 Safety precations.....................................................

More information

Triangle Contact Representations

Triangle Contact Representations Triangle Contact Representations Stean Felsner elsner@math.t-berlin.de Technische Uniersität Berlin, Institt ür Mathematik Strasse des 7. Jni 36, 0623 Berlin, Germany Abstract. It is conjectred that eery

More information

CS 153 Design of Operating Systems

CS 153 Design of Operating Systems CS 153 Design of Operating Systems Spring 18 Lectre 3: OS model and Architectral Spport Instrctor: Chengy Song Slide contribtions from Nael Ab-Ghazaleh, Harsha Madhyvasta and Zhiyn Qian Last time/today

More information

pygame Lecture #2 (Examples: movingellipse, bouncingball, planets, bouncingballgravity)

pygame Lecture #2 (Examples: movingellipse, bouncingball, planets, bouncingballgravity) pygame Lecture #2 (Examples: movingellipse, bouncingball, planets, bouncingballgravity) MOVEMENT IN PYGAME I. Realizing the screen is getting redrawn many times. Let's take a look at the key portion of

More information

CS 251, Spring 2018, Assignment 3.0 3% of course mark

CS 251, Spring 2018, Assignment 3.0 3% of course mark CS 25, Spring 28, Assignment 3. 3% of corse mark De onday, Jne 25th, 5:3 P. (5 points) Consider the single-cycle compter shown on page 6 of this assignment. Sppose the circit elements take the following

More information

CS 153 Design of Operating Systems Spring 18

CS 153 Design of Operating Systems Spring 18 CS 53 Design of Operating Systems Spring 8 Lectre 2: Virtal Memory Instrctor: Chengy Song Slide contribtions from Nael Ab-Ghazaleh, Harsha Madhyvasta and Zhiyn Qian Recap: cache Well-written programs exhibit

More information

Access Professional Edition 2.1

Access Professional Edition 2.1 Engineered Soltions Access Professional Edition 2.1 Access Professional Edition 2.1 www.boschsecrity.com Compact access control based on Bosch s innovative AMC controller family Integrated Video Verification

More information

CS 153 Design of Operating Systems Spring 18

CS 153 Design of Operating Systems Spring 18 CS 153 Design of Operating Systems Spring 18 Lectre 8: Threads Instrctor: Chengy Song Slide contribtions from Nael Ab-Ghazaleh, Harsha Madhyvasta and Zhiyn Qian Processes P1 P2 Recall that Bt OS A process

More information

Mechanical Design Technology

Mechanical Design Technology Mechanical Design Technology rof. Tamots Mrakami Assignment #2: Tool ath and NC Code Generation Make a program that generates a tool path for milling a ezier srface sing a ball end mill shos the tool path

More information

EMC M&R (Watch4net ) Installation and Configuration Guide. Version 6.4 P/N REV 02

EMC M&R (Watch4net ) Installation and Configuration Guide. Version 6.4 P/N REV 02 EMC M&R (Watch4net ) Version 6.4 Installation and Configration Gide P/N 302-001-045 REV 02 Copyright 2012-2014 EMC Corporation. All rights reserved. Pblished in USA. Pblished September, 2014 EMC believes

More information

Multi-Way Search Tree ( ) (2,4) Trees. Multi-Way Inorder Traversal. Multi-Way Search Tree ( ) Multi-Way Searching. Multi-Way Searching

Multi-Way Search Tree ( ) (2,4) Trees. Multi-Way Inorder Traversal. Multi-Way Search Tree ( ) Multi-Way Searching. Multi-Way Searching Mlti-Way Search Tree ( 0..) (,) Trees 9 5 7 0 (,) Trees (,) Trees Mlti-Way Search Tree ( 0..) A mlti-ay search tree is an ordered tree sch that Each internal node has at least to children and stores d

More information

Introduction to Algorithms. Minimum Spanning Tree. Chapter 23: Minimum Spanning Trees

Introduction to Algorithms. Minimum Spanning Tree. Chapter 23: Minimum Spanning Trees Introdction to lgorithms oncrete example Imagine: Yo wish to connect all the compters in an office bilding sing the least amont of cable - ach vertex in a graph G represents a compter - ach edge represents

More information

10.2 Solving Quadratic Equations by Completing the Square

10.2 Solving Quadratic Equations by Completing the Square . Solving Qadratic Eqations b Completing the Sqare Consider the eqation We can see clearl that the soltions are However, What if the eqation was given to s in standard form, that is 6 How wold we go abot

More information

Dialog 3185 and 3185MW

Dialog 3185 and 3185MW Analog Telephones for MD110 Commnication System User Gide Cover Page Graphic Place the graphic directly on the page, do not care abot ptting it in the text flow. Select Graphics > Properties and make the

More information

Accelerating Finite Difference Computations Using General Purpose GPU Computing

Accelerating Finite Difference Computations Using General Purpose GPU Computing OKLAHOMA CITY AIR LOGISTICS COMPLEX TEAM TINKER Accelerating Finite Difference Comptations Using General Prpose GPU Compting Date: 7 Noember 2012 POC: James D. Steens 559 th SMXS/MXDECC Phone: 405-736-4051

More information

Chapter 5 Network Layer

Chapter 5 Network Layer Chapter Network Layer Network layer Physical layer: moe bit seqence between two adjacent nodes Data link: reliable transmission between two adjacent nodes Network: gides packets from the sorce to destination,

More information

Tdb: A Source-level Debugger for Dynamically Translated Programs

Tdb: A Source-level Debugger for Dynamically Translated Programs Tdb: A Sorce-level Debgger for Dynamically Translated Programs Naveen Kmar, Brce R. Childers, and Mary Lo Soffa Department of Compter Science University of Pittsbrgh Pittsbrgh, Pennsylvania 15260 {naveen,

More information

Point Location. The Slab Method. Optimal Schemes. The Slab Method. Preprocess a planar, polygonal subdivision for point location queries.

Point Location. The Slab Method. Optimal Schemes. The Slab Method. Preprocess a planar, polygonal subdivision for point location queries. Point Location The Slab Method Prerocess a lanar, olygonal sbdiision for oint location qeries. = (18, 11) raw a ertical line throgh each ertex. This decomoses the lane into slabs. In each slab, the ertical

More information