COMS 6100 Class Notes

Size: px
Start display at page:

Download "COMS 6100 Class Notes"

Transcription

1 COMS 6100 Class Notes Wenbo Dong 20 October Perl There is more than one way to do it. 1.1 Array 1,item 2,item is the beginning of an array. array stores scaler (beginning with $) example: = (1, 1, 2, 3, 5, 8, 13); = ( apples, bananas, strawberries, jack fruit, star fruit, mangos ); = (100, A++, Great Job! ); class demo: index print fruits[1]: \$fruits[1]\n ; # bananas print ; # displays all of the contents, each one separated by a space note: the index of array starts from class demo: types of index print The last fruit in the list is $fruits[ $#fruits ]\n ; # mangos print The last fruit in the list is $fruits[ -1 ]\n ; # mangos print( There are. ($#fruits + 1). fruits\n ); # 6 1

2 1.1.3 class question can we combine number with string? yes, we can class demo: add element to array $fruits[ 6 ] = Spondias mombin ; # add Spondias mombin as the 6th element $fruits[ 3 ] = jaca ; note: if define an 100th element, Perl will work but will give many errors before the 100th element class demo: assign value to array 1. (value, value, value...) 2. qw operator = ew(blue white); print ; note: in qw, is needed for separated words 3... operator: it fills numbers in between the numbers = (2, 3, 4, 6..9); # 6..9 means use an array = things... ); memory management the memory for array will dynamically grow and shrink so there will not be array out of bounds error array can be = (); built-in functions for changing array shift: Remove the first element (and shift everything down one index) unshift: Adds a new first element (and shift everything up one index) pop: Remove the last element push: Adds a new last element 2

3 1.1.8 class demo: memory management and built-in = qw(banana orange); # banana = (); # = qw(guava apple watermelon); # guava apple watermelon print ; # guava apple watermelon tomato ; print (after unshift)\n ; # tomato guava apple watermelon my $veggie = print Is $veggie a fruit or not?\n ; # tomato print (after shift)\n ; # guava apple watermelon grape ; # adds grape to the end of the array print (after push)\n ; #guava apple watermelon grape my $juice = # grape array slicing You can slice an array for a sub-array. small note: $array[0] is a is an array with one elemtne class demo: array slicing = qw(guava apple watermelon mango grape strawberry cranberry blueberry); 1,3 ]; print ; # guava watermelon ]; print ; # strawberry cranberry blueberry class exercise 1. Initialize a local array named favorites with the colors that you like the most. = qw(orange grey); 2. Add your preferred breakfast to the front of favorites. oatmeal ; 3. Add your preferred dessert to the back of favorites. pumpkin pie ; 3

4 4. Remove the first element from favorites and store it in a local scalar named breakfast. my $breakfast = 5. Remove the last element from favorites and store it in a local scalar named treat. my $treat = 1.2 Loop As a beginning, the loop will actually be covered in depth in the future classes. foreach my $fruit (@fruits){ print Would like some $fruit juice\n ; } 1.3 Hashes Array stores multiple values (scalers), organized by index; Hash stores multiple values (scalers), organized by keys or key-value pairs. Hashes start with % We make hash local scope by initializing with my Syntax: Hash: %hashname Value: $hashname{$key} class demo: syntax my \%wheels = (unicycle => 1, bike => 2, tricycle => 3, car => 4, semi => 18); print A car has $wheels{car} wheels\n ; # 4 print A bike has $wheels{bike} wheels (before adding training wheels)\n ; # 2 $wheels{bike} = $wheels{bike} + 2; print A bike has $wheels{bike} wheels (after adding training wheels)\n ; # 4 my %desserts = ( pie, apple, cake, carrot, sorbet, orange ); my %ice cream = (bowl => chocolate, float => root beer ); my %choices = (%desserts, %ice cream, healthy, salad ); # flattens the hashes print I would like some $choices{healthy} for lunch\n ; # salad 4

5 1.3.2 class exercise 1. Initialize a local hash named favorites with everyone s preferred color (names are keys, colors are values). my %favorites = ( Dr. C => blue, Gabriel => green ); 2. Store your preferred color into a scalar named background. my $background = $favorites Dr. C ; 3. Update your preferred color. $favorites{ Dr. C } = MTSU blue ; 4. Store a copy of all of the people into an array named names. = keys %favorites; 5. Store a copy of all of the colors into an array named colors. = values %favorites; 6. Remove Dr. Carroll s entry from the hash. delete $favorites{ Dr. C }; 5

MHealthy Approved Menu Items

MHealthy Approved Menu Items Calories Fat Cereals and Bread Products MHealthy Approved s at least 2. 1 gram 48 mg Barry's Sunny Grain Bagel 4 ozw 29 3 n/a n/a 4 6 3 6 11 Quaker Oatmeal Medley- Summer Berry 1 each 2 3. 2 1 7 14 8 Chips,

More information

Donnewald Distributing NA Products Item # UPC Package Dr. Pepper-Snapple Group

Donnewald Distributing NA Products Item # UPC Package Dr. Pepper-Snapple Group Donnewald Distributing NA Products Item # UPC Package Dr. Pepper-Snapple Group A&W 57405 0-78000-00197-6 4 / 6PK 7.5 OZ CAN SUNKIST 57407 0-78000-00209-6 4 / 6PK 7.5 OZ CAN CANADA DRY GINGER ALE 57406

More information

Pathologically Eclectic Rubbish Lister

Pathologically Eclectic Rubbish Lister Pathologically Eclectic Rubbish Lister 1 Perl Design Philosophy Author: Reuben Francis Cornel perl is an acronym for Practical Extraction and Report Language. But I guess the title is a rough translation

More information

KASHRUTH CERTIFICATION This is to certify that the following products, produced by:

KASHRUTH CERTIFICATION This is to certify that the following products, produced by: , KASHRUTH CERTIFICATION This is to certify that the following products, produced by:, 13904 US-2, P.O. Box 129, Brule, WI 54820 are under the Kashruth certification of the crc (Chicago Rabbinical Council).

More information

INFORMATION VISUALIZATION

INFORMATION VISUALIZATION CSE 557A Sep 26, 2016 INFORMATION VISUALIZATION Alvitta Ottley Washington University in St. Louis Slide Credits: Mariah Meyer, University of Utah Remco Chang, Tufts University HEIDELBERG LAUREATE FORUM

More information

Topic A: Introduction to Prolog

Topic A: Introduction to Prolog Topic A: Introduction to Prolog Recommended Exercises and Readings From Programming in Prolog (5 th Ed.) Exercises: 1.2, 1.3, 1.4, Readings: Chapters 1 and 2 1 2 Prolog Prolog: Programming in Logic A logic

More information

Examples of Using the ARGV Array. Loop Control Operators. Next Operator. Last Operator. Perl has three loop control operators.

Examples of Using the ARGV Array. Loop Control Operators. Next Operator. Last Operator. Perl has three loop control operators. Examples of Using the ARGV Array # mimics the Unix echo utility foreach (@ARGV) { print $_ ; print \n ; # count the number of command line arguments $i = 0; foreach (@ARGV) { $i++; print The number of

More information

1. Introduction. 2. Scalar Data

1. Introduction. 2. Scalar Data 1. Introduction What Does Perl Stand For? Why Did Larry Create Perl? Why Didn t Larry Just Use Some Other Language? Is Perl Easy or Hard? How Did Perl Get to Be So Popular? What s Happening with Perl Now?

More information

More Perl. CS174 Chris Pollett Oct 25, 2006.

More Perl. CS174 Chris Pollett Oct 25, 2006. More Perl CS174 Chris Pollett Oct 25, 2006. Outline Loops Arrays Hashes Functions Selection Redux Last day we learned about how if-else works in Perl. Perl does not have a switch statement Like Javascript,

More information

UP TO $2.59 O CANDY & GUM CANDY & GUM Chocolate Bars & Extra Gum 657-188 3 Musketeers Share Size 24 Count $27.32 $2.59 $24.73 $1.03 $1.99 48% $47.76 $ 23.03 657-216 Milky Way Share Size 24 Count $27.32

More information

Understanding and using the Referential list

Understanding and using the Referential list Understanding and using the Referential list The Referential list may contain up to 49 ref columns. Referential list: Allows several fields to be linked to a list. During entry, when an item is selected

More information

Nutrition Facts dean&david

Nutrition Facts dean&david Dressings & Bread Dressings Fish & Co Salads (without dressing and without bread) Chicken & Beef Veggie Nutrition Facts dean&david Side Salad Express 88 44 21 11 0,3 0,1 0,1 0,0 3,4 1,7 3,2 1,6 1,1 0,6

More information

Arrays (Lists) # or, = ("first string", "2nd string", 123);

Arrays (Lists) # or, = (first string, 2nd string, 123); Arrays (Lists) An array is a sequence of scalars, indexed by position (0,1,2,...) The whole array is denoted by @array Individual array elements are denoted by $array[index] $#array gives the index of

More information

Photo, Graphic, and Illustration Credits

Photo, Graphic, and Illustration Credits Photo, Graphic, and Illustration Credits Cover: a. Salad bowl: Microsoft Clip Art Repeated in Each Lesson: a. Question mark (color modified): Creative Commons Zero, image via Wikimedia. b. Running figure

More information

PERL Scripting - Course Contents

PERL Scripting - Course Contents PERL Scripting - Course Contents Day - 1 Introduction to PERL Comments Reading from Standard Input Writing to Standard Output Scalar Variables Numbers and Strings Use of Single Quotes and Double Quotes

More information

Project activity sheet 3

Project activity sheet 3 1 Macmillan English Project activity sheet 3 Project: Food bar chart Units 13 18 Learning outcomes By the end of the project, children will have: practised language from Units 13 18 through a group project

More information

Instructions for Using the DAILY COOK'S SUBSTITUTE MENU

Instructions for Using the DAILY COOK'S SUBSTITUTE MENU Instructions for Using the DAILY COOK'S SUBSTITUTE MENU Revised September, 2006 Several additional menu items have been developed for the three meals. These Daily Cook's Substitute Menus allow you to quickly

More information

COMS 3101 Programming Languages: Perl. Lecture 2

COMS 3101 Programming Languages: Perl. Lecture 2 COMS 3101 Programming Languages: Perl Lecture 2 Fall 2013 Instructor: Ilia Vovsha http://www.cs.columbia.edu/~vovsha/coms3101/perl Lecture Outline Control Flow (continued) Input / Output Subroutines Concepts:

More information

Your Dessert Towels Promotional Products and Ideas

Your Dessert Towels Promotional Products and Ideas Your Dessert Towels Promotional Products and Ideas 800 960-9080 or 206 285-5359 donace@promotionalproductsandideas.com They look amazingly tasty, yet they are 0 calorie and made of 100 % cotton When you

More information

MASSACHUSETTS VOCATIONAL TECHNICAL TEACHER TESTING PROGRAM SCOPE OF TEST CODE #11 - CULINARY ARTS WRITTEN EXAM QUESTIONS TIME ALLOWED: 3 HOURS

MASSACHUSETTS VOCATIONAL TECHNICAL TEACHER TESTING PROGRAM SCOPE OF TEST CODE #11 - CULINARY ARTS WRITTEN EXAM QUESTIONS TIME ALLOWED: 3 HOURS MASSACHUSETTS VOCATIONAL TECHNICAL TEACHER TESTING PROGRAM SCOPE OF TEST CODE #11 - CULINARY ARTS WRITTEN EXAM - 100 QUESTIONS TIME ALLOWED: 3 HOURS PERCENT OF TEST: 15 % Health and Safety Sanitation Food

More information

Americana Acrylics 2-oz.

Americana Acrylics 2-oz. DAO1-3 Titanium White 016455101308 X X X X DAO2-3 White Wash 016455102305 X X DAO3-3 Buttermilk 016455103302 X X X DAO4-3 Sand 016455104309 X DAO8-3 Yellow Ochre 016455108307 X DAO9-3 Antique Gold 016455109304

More information

APPLICATION DATA FOODS

APPLICATION DATA FOODS BAKERY Chocolate Chips Report #5455 Corn Flour Report #537 Corn Starch Report #6321 Flour Report #6272 Salt Report #6135 Brown Sugar Report #8183 Granulated Sugar Report #8833 Tortillas, Flavored Report

More information

INFORMATION TECHNOLOGY 402 UNIT IV SPREADSHEET

INFORMATION TECHNOLOGY 402 UNIT IV SPREADSHEET INFORMATION TECHNOLOGY 402 UNIT IV SPREADSHEET AUTOSUM AutoSum is a function in Microsoft Excel and other spreadsheet programs that automatically enters the appropriate formula or function into your spreadsheet.

More information

Functions. Functions. nofill(); point(20, 30); float angle = map(i, 0, 10, -2, 2); parameters return values

Functions. Functions. nofill(); point(20, 30); float angle = map(i, 0, 10, -2, 2); parameters return values Functions parameters return values 06 Functions 1 Functions Code that is packaged so it can be run by name Often has parameters to change how the function works (but not always) Often performs some computation

More information

ProductCatalogue ph: (02) e:

ProductCatalogue ph: (02) e: ProductCatalogue ph: (02) 9457 0511 e: admin@universalcandy.com.au ZAPPO BUBBLEGUM 26G ZAPPO COLA 26G ZAPPO GRAPE 26G ZAPPO RASPBERRY 26G ZAPPO STRAWBERRY 26G ZAPPO TUTTI FRUTTI 26G ZAPPO MILLIONS 24 X

More information

R&H TOPPINGS, SYRUPS, & BASES

R&H TOPPINGS, SYRUPS, & BASES Premium R&H TOPPINGS, SYRUPS, & BASES READY-TO-USE Solutions For Your Operation R&H SAUCES & TOPPINGS DELICIOUS READY-TO-USE SAUCES & TOPPINGS THAT WILL SATISFY Create extraordinary desserts with rich

More information

Practice Midterm Exam. Start with the ones that you consider to be easiest, then move to those that may take more time.

Practice Midterm Exam. Start with the ones that you consider to be easiest, then move to those that may take more time. CS 102 Fall 2008 Instructor: Audrey St. John Practice Midterm Exam General description There are 4 problems, some subdivided into smaller questions. Do as many as you can, or as much of a bigger problem

More information

Chefs Choice Awards 2019 How to Guide - Entries

Chefs Choice Awards 2019 How to Guide - Entries Chefs Choice Awards 2019 How to Guide - Entries Setting up an account- If you are a new user Step 1: Go to https://wrbookings.chefschoiceawards.co.uk/. Step 2: Click the Register button under Create your

More information

Alphabet Headbands. (There are 2 templates for each hat. One without the words, and one with the words. Print up the template you desire).

Alphabet Headbands. (There are 2 templates for each hat. One without the words, and one with the words. Print up the template you desire). Alphabet Headbands One sheet per child Print up on white card stock. Have children color or paint. Cut out both strips. Connect both strips to make a band. Fit to child's head and staple together to form

More information

Locally produced & all-natural. No Preservatives

Locally produced & all-natural. No Preservatives made in bc Locally produced & all-natural. No Preservatives Nut-Free URBANI FOODS ARANCINI RISOTTOBALLS Origin: Port Moody, BC PK Size: 8/280g Mozzarella Item #: 11400 UPC: 8 51335 00030 8 Italian Fennel

More information

CS 105 Perl: File I/O, slices, and array manipulation

CS 105 Perl: File I/O, slices, and array manipulation CS 105 Perl: File I/O, slices, and array manipulation Nathan Clement January 27, 2013! Agenda Intermediate iteration last and next Intermediate I/O Special variables Array manipulation push, pop, shift,

More information

Classnote for COMS6100

Classnote for COMS6100 Classnote for COMS6100 Yiting Wang 3 November, 2016 Today we learn about subroutines, references, anonymous and file I/O in Perl. 1 Subroutines in Perl First of all, we review the subroutines that we had

More information

Chapter 6. More about Probability Chapter 2. Chapter 7. Chapter 8. Equations of Straight Lines Chapter 4. Chapter 9 Chapter 10 Chapter 11

Chapter 6. More about Probability Chapter 2. Chapter 7. Chapter 8. Equations of Straight Lines Chapter 4. Chapter 9 Chapter 10 Chapter 11 Chapter Development of Number Sstems Chapter 6 More about Probabilit Chapter Quadratic Equations in One Unknown Chapter 7 Locus Chapter Introduction to Functions Chapter 8 Equations of Straight Lines Chapter

More information

IT441. Network Services Administration. Data Structures: Arrays

IT441. Network Services Administration. Data Structures: Arrays IT441 Network Services Administration Data Structures: Arrays Data Types Remember there are three basic data types in Perl o Numeric o String o Boolean (Logical) I differentiate between data types and

More information

Real Python: Python 3 Cheat Sheet

Real Python: Python 3 Cheat Sheet Real Python: Python 3 Cheat Sheet Numbers....................................... 3 Strings........................................ 5 Booleans....................................... 7 Lists.........................................

More information

Excel QuickGuide 1 The AVERAGE Function

Excel QuickGuide 1 The AVERAGE Function 8 USING EXCEL FUNCTIONS: COMPUTING AVERAGES Excel QuickGuide 1 The AVERAGE Function What the AVERAGE Function Does The AVERAGE function takes a set of values and computes the arithmetic mean, which is

More information

Dictionaries, Text, Tuples

Dictionaries, Text, Tuples Dictionaries, Text, Tuples 4 We re Familiar with Lists [2, 3, 51, 0] [[ a, 151], [ z, 23], [ i, -42.3]] [2, BBC, KCRW, [ z, 23]] Lists enable us to store multiple values in one variable Lists are ordered,

More information

def order(food): food = food.upper() print( Could I have a big + food + please? ) return fresh + food

def order(food): food = food.upper() print( Could I have a big + food + please? ) return fresh + food CSCI 1101B Lists Warm-up Exercise def order(food): food = food.upper() print( Could I have a big + food + please? ) return fresh + food food = order( pasta ) After this program runs 1. What is the global

More information

Trees and Intro to Counting

Trees and Intro to Counting Trees and Intro to Counting CSE21 Winter 2017, Day 15 (B00), Day 10/11 (A00) February 15, 2017 http://vlsicad.ucsd.edu/courses/cse21-w17 Another Special Type of Graph: Trees (Rooted) Trees: definitions

More information

Grade 6 Math Circles Winter February 3/4 Sets. Some of These Things Are Not Like the Others

Grade 6 Math Circles Winter February 3/4 Sets. Some of These Things Are Not Like the Others Faculty of Mathematics Waterloo, Ontario N2L 3G1 Centre for Education in Mathematics and Computing Grade 6 Math Circles Winter 2015 - February 3/4 Sets Some of These Things Are Not Like the Others When

More information

Elementary, Dr. Bessie Rhodes and Dr. Martin Luther King Jr Arts Lunch Menu

Elementary, Dr. Bessie Rhodes and Dr. Martin Luther King Jr Arts Lunch Menu Carbohydrate Values for Menu Components Evanston Skokie School District 65 August, 2017 The items listed below are approximate values. Please consult your Dietitian and/or Certified Diabetes Educator.

More information

Lecture 2: Programming in Perl: Introduction 1

Lecture 2: Programming in Perl: Introduction 1 Lecture 2: Programming in Perl: Introduction 1 Torgeir R. Hvidsten Professor Norwegian University of Life Sciences Guest lecturer Umeå Plant Science Centre Computational Life Science Cluster (CLiC) 1 This

More information

Grade 6 Math Circles Winter February 3/4 Sets. Some of These Things Are Not Like the Others

Grade 6 Math Circles Winter February 3/4 Sets. Some of These Things Are Not Like the Others Faculty of Mathematics Waterloo, Ontario N2L 3G1 Centre for Education in Mathematics and Computing Grade 6 Math Circles Winter 2015 - February 3/4 Sets Some of These Things Are Not Like the Others When

More information

Scripting Languages Perl Basics. Course: Hebrew University

Scripting Languages Perl Basics. Course: Hebrew University Scripting Languages Perl Basics Course: 67557 Hebrew University אליוט יפה Jaffe Lecturer: Elliot FMTEYEWTK Far More Than Everything You've Ever Wanted to Know Perl Pathologically Eclectic Rubbish Lister

More information

CITS1231 Web Technologies. JavaScript Math, String, Array, Number, Debugging

CITS1231 Web Technologies. JavaScript Math, String, Array, Number, Debugging CITS1231 Web Technologies JavaScript Math, String, Array, Number, Debugging Last Lecture Introduction to JavaScript Variables Operators Conditional Statements Program Loops Popup Boxes Functions 3 This

More information

Perl Scripting. Students Will Learn. Course Description. Duration: 4 Days. Price: $2295

Perl Scripting. Students Will Learn. Course Description. Duration: 4 Days. Price: $2295 Perl Scripting Duration: 4 Days Price: $2295 Discounts: We offer multiple discount options. Click here for more info. Delivery Options: Attend face-to-face in the classroom, remote-live or on-demand streaming.

More information

Hands-On Perl Scripting and CGI Programming

Hands-On Perl Scripting and CGI Programming Hands-On Course Description This hands on Perl programming course provides a thorough introduction to the Perl programming language, teaching attendees how to develop and maintain portable scripts useful

More information

arcoroc Islande Tumbler 17 cl Tubo on 1/16 ltr. /-/ Longdrink glass 33 cl, 0,2 + 1/4 ltr. /-/ CE-Zeichen

arcoroc Islande Tumbler 17 cl Tubo on 1/16 ltr. /-/ Longdrink glass 33 cl, 0,2 + 1/4 ltr. /-/ CE-Zeichen Islande 250857 Tumbler 17 cl S 0,54 250862 Whisky tumbler 30 cl 0,60 250868 Schnapps glass 5,5 cl with handle S A12 0,75 250876 Tumbler 17 cl Tubo on 1/16 ltr. /-/ 0,70 250877 Longdrink glass 33 cl, 0,2

More information

T-( )-MALV, Natural Language Processing The programming language Perl

T-( )-MALV, Natural Language Processing The programming language Perl T-(538 725)-MALV, Natural Language Processing The programming language Perl Hrafn Loftsson 1 Hannes Högni Vilhjálmsson 1 1 School of Computer Science, Reykjavik University September 2010 Outline 1 Perl

More information

Fractions and Mixed Numbers

Fractions and Mixed Numbers 6 CHAPTER Fractions and Mixed Numbers Worksheet Adding Fractions Find the equivalent fraction. Shade the models. _? 6. _?.? Reteach A Find the equivalent fractions. To get the equivalent fraction, multiply

More information

ACCESSDATA SUPPLEMENTAL APPENDIX

ACCESSDATA SUPPLEMENTAL APPENDIX ACCESSDATA SUPPLEMENTAL APPENDIX dtsearch Search Requests Note: This following dtsearch information was developed by DT Software, Inc. Copyright 1991 1997 DT Software, Inc. www.dtsearch.com. This appendix

More information

Linux Tutorial #4. Redirection. Output redirection ( > )

Linux Tutorial #4. Redirection. Output redirection ( > ) Linux Tutorial #4 Redirection Most processes initiated by Linux commands write to the standard output (that is, they write to the terminal screen), and many take their input from the standard input (that

More information

cookies & wafers Plain Yogurt Covered Pretzels Item #: UPC: Peanut Butter Pretzels Item #: UPC:

cookies & wafers Plain Yogurt Covered Pretzels Item #: UPC: Peanut Butter Pretzels Item #: UPC: Plain Yogurt Covered Pretzels Item #: 22285 UPC: 8 16512 01041 9 Peanut Butter Pretzels Item #: 22288 UPC: 8 16512 01043 3 Dark Chocolate Pretzels Item #: 22289 UPC: 8 16512 01529 2 Milk Chocolate Pretzels

More information

They grow as needed, and may be made to shrink. Officially, a Perl array is a variable whose value is a list.

They grow as needed, and may be made to shrink. Officially, a Perl array is a variable whose value is a list. Arrays Perl arrays store lists of scalar values, which may be of different types. They grow as needed, and may be made to shrink. Officially, a Perl array is a variable whose value is a list. A list literal

More information

Mathematics 1 Final Review

Mathematics 1 Final Review Mathematics 1 Final Review 1. Graph y x 2. You have $47 to spend at the music store. Each cassette tape costs $5 and each CD costs $10. Write and graph a linear inequality that represents this situation.

More information

ClipArt and Image Files

ClipArt and Image Files ClipArt and Image Files Chapter 4 Adding pictures and graphics to our document not only breaks the monotony of text it can help convey the message quickly. Objectives In this section you will learn how

More information

How can you write a fraction as a sum of unit fractions with the same denominator?

How can you write a fraction as a sum of unit fractions with the same denominator? ? Name.5 Essential Question Write Fractions How can you write a fraction as a sum of unit fractions with the same denominator? Number and Operations.. lso..,..,..e MTHEMTIL PROESSES..,..F Unlock the Problem

More information

CSCI-GA Scripting Languages

CSCI-GA Scripting Languages CSCI-GA.3033.003 Scripting Languages 9/11/2013 Textual data processing (Perl) 1 Announcements If you did not get a PIN to enroll, contact Stephanie Meik 2 Outline Perl Basics (continued) Regular Expressions

More information

Similarly, example of memory address of array and hash are: ARRAY(0x1a31d44) and HASH(0x80f6c6c) respectively.

Similarly, example of memory address of array and hash are: ARRAY(0x1a31d44) and HASH(0x80f6c6c) respectively. Lecture #9 What is reference? Perl Reference A Perl reference is a scalar value that holds the location of another value which could be scalar, arrays, hashes, or even a subroutine. In other words, a reference

More information

Create Test Cases with Ease Using Combination Tools

Create Test Cases with Ease Using Combination Tools Create Test Cases with Ease Using Combination Tools Susan Carlson Mike Gibson Solving the Software Quality Puzzle Page 1 www.psqtconference.com So many tests, so little time Class exercise in finding defects

More information

Data Structures and Programming with C++

Data Structures and Programming with C++ Data Structures and Programming with C++ By Dr. Atul Kumar Dwivedi ETC, BIT, Durg UNIT-I B. E., V Semester Outline Basic concepts of Object oriented Programming (OOPs) 1. Objects 2. Classes 3. Data encapsulation

More information

Preview. A hash function is a function that:

Preview. A hash function is a function that: Hashing Preview A hash function is a function that: When applied to an Object, returns a number When applied to equal Objects, returns the same number for each When applied to unequal Objects, is very

More information

Costume Name: Barrel Costume #: COINBA2, COINBA3 Description/Notes: RAST; 2 AVAILABLE Components: Measurements:

Costume Name: Barrel Costume #: COINBA2, COINBA3 Description/Notes: RAST; 2 AVAILABLE Components: Measurements: Costume Name: Pickle Barrel Costume #: COINBA1 Costume Name: Barrel Costume #: COINBA2, COINBA3 RAST; 2 AVAILABLE Costume Name: Barrel of Monkeys Costume #: COINBA4 Costume Name: Milk Carton Costume #:

More information

CockroachDB on DC/OS. Ben Darnell, CTO, Cockroach Labs

CockroachDB on DC/OS. Ben Darnell, CTO, Cockroach Labs CockroachDB on DC/OS Ben Darnell, CTO, Cockroach Labs Agenda A cloud-native database CockroachDB on DC/OS Why CockroachDB Demo! Cloud-Native Database What is Cloud-Native? Horizontally scalable Individual

More information

Getting Ready. Preschool. for. Fun with Dinosaurs. and. Monsters

Getting Ready. Preschool. for. Fun with Dinosaurs. and. Monsters Getting Ready for Preschool Fun with Dinosaurs and Monsters AND MANY MORE! Thank you so much for downloading my product for your classroom or for at home. Below you can read about how you can use the download.

More information

I really thought this document could use a header so I m adding one. I think I ll make it 10-pt Arial font in red. I think I ll centre it too.

I really thought this document could use a header so I m adding one. I think I ll make it 10-pt Arial font in red. I think I ll centre it too. Table of contents I am creating this document for the purpose of testing format conversions. This line is formatted as Heading 1...2 This line is formatted as Heading 2...2 This line is formatted as Heading

More information

CS 105 Perl: Perl subroutines and Disciplined Perl

CS 105 Perl: Perl subroutines and Disciplined Perl CS 105 Perl: Perl subroutines and Disciplined Perl Nathan Clement! February 3, 2014 Agenda We will cover Perl scoping, subroutines (user- defined functions) and then we continue on to Perl s features for

More information

Marysville JUSD Jan 7, 2019 thru Jan 31, 2019

Marysville JUSD Jan 7, 2019 thru Jan 31, 2019 Marysville JUSD Jan 7, thru Jan 3, Base Menu Spreadsheet Page Generated on: //8 :43:36 PM Mon - /7/ Sand Beef Rib Hoagie oz. Veg Potato Rounds - Simplot Veg Cucumber Raw /c Fruit Mixed Fruit Cup Wawona

More information

Coordinate Grid: I have, who has?

Coordinate Grid: I have, who has? Coordinate Grid: I have, who has? Coordinate Grid I have, who has? Green set Page 1 of 3 I have the x-ray. Who has the object located at (-5,3)? I have the octopus. Who has the object located at (2,5)?

More information

Perl (5 Days Content)

Perl (5 Days Content) Perl (5 Days Content) Pre-requisites: Knowledge of any programming language ( C / C++ / Shell Scripting) Objective of the Course: The participants should be in a position to understand Perl Scripts written

More information

Creating accessible Word documents

Creating accessible Word documents Creating accessible Word documents An accessible source document is the first step to an accessible PDF. This guide covers a short tutorial on creating an accessible Word documents which can then be used

More information

Object Oriented Programming using C++

Object Oriented Programming using C++ Object Oriented Programming using C++ Programming Techniques Programming techniques evolved so far Modular programming Structured programming Top down programming Bottom up programming Procedure Oriented

More information

Object-Oriented Programming

Object-Oriented Programming Object-Oriented Programming 1. What is object-oriented programming (OOP)? OOP is a technique to develop logical modules, such as classes that contain properties, methods, fields, and events. An object

More information

COMP284 Scripting Languages Lecture 3: Perl (Part 2) Handouts

COMP284 Scripting Languages Lecture 3: Perl (Part 2) Handouts COMP284 Scripting Languages Lecture 3: Perl (Part 2) Handouts Ullrich Hustadt Department of Computer Science School of Electrical Engineering, Electronics, and Computer Science University of Liverpool

More information

CSG 100 Data Structures Fall 2004

CSG 100 Data Structures Fall 2004 CSG 100 Data Structures Fall 2004 Problem Set #2: Objects inside Objects inside Objects... Due Date: 21 st of October Goal: In this exercise you are to play the role of a developer who is given a specification

More information

THE BUFFET CONCEPT. INNOVATIVE. FLEXIBLE. UNIQUE.

THE BUFFET CONCEPT. INNOVATIVE. FLEXIBLE. UNIQUE. THE BUFFET CONCEPT. INNOVATIVE. FLEXIBLE. UNIQUE. THE ART OF service SEQUENCE boundless creativity for your buffet concept. The perfect symbiosis of design, variety and certainty of investment. As an attractive

More information

An Introduction to Microsoft Excel For Adult Learners. A Project-Based Approach

An Introduction to Microsoft Excel For Adult Learners. A Project-Based Approach An Introduction to Microsoft Excel For Adult Learners A Project-Based Approach Introduction Why should you use Microsoft Excel? Microsoft Excel is one of the most common tools in any business. It may be

More information

Objectives/Outcomes. Introduction: If we have a set "collection" of fruits : Banana, Apple and Grapes.

Objectives/Outcomes. Introduction: If we have a set collection of fruits : Banana, Apple and Grapes. 1 September 26 September One: Sets Introduction to Sets Define a set Introduction: If we have a set "collection" of fruits : Banana, Apple Grapes. 4 F={,, } Banana is member "an element" of the set F.

More information

MNU 3-08a - Proportion

MNU 3-08a - Proportion MNU 3-08a - Proportion I can write proportion as a fraction, decimal fraction or percentage. 1) A fruit drink is made by mixing 20ml of orange juice with 60ml of pineapple juice. What is the proportion

More information

allergen Main menu Starters & Salads HOUSE PICKLES TEAR & SHARE PRETZEL BREAD POPCORN SQUID GLAZED SPARE RIBS CORN CHIPS & SPIN DIP

allergen Main menu Starters & Salads HOUSE PICKLES TEAR & SHARE PRETZEL BREAD POPCORN SQUID GLAZED SPARE RIBS CORN CHIPS & SPIN DIP Starters & Salads OUSE PICKLES TEAR & SARE PRETZEL BREAD POPCORN SQUID GLAZED SPARE RIBS E Mus SO2 Alc in Gar Oni Glt Milk Egg Mus Alc Gar Milk Egg Mol SO2 in Gar Glt Fish Soy SO2 Alc in Gar Oni CORN CIPS

More information

22c:31 Algorithms. Kruskal s Algorithm for MST Union-Find for Disjoint Sets

22c:31 Algorithms. Kruskal s Algorithm for MST Union-Find for Disjoint Sets 22c:1 Algorithms Kruskal s Algorithm for MST Union-Find for Disjoint Sets 1 Kruskal s Algorithm for MST Work with edges, rather than nodes Two steps: Sort edges by increasing edge weight Select the first

More information

Drive-Thru Food Shop Checklist

Drive-Thru Food Shop Checklist This checklist is designed to assist you with your Dairy Queen Drive-Thru Food mystery shop. Review this document immediately before entering the Dairy Queen location. Before beginning your shop secure

More information

List Processing Patterns and List Comprehension

List Processing Patterns and List Comprehension List Processing Patterns and Review: Lists Summary of what we know about lists. A list is a sequence type (like strings and tuples), but that differently from them is mutable (it can change). Lists can

More information

LISP Programming. (23 (this is easy) hello 821)

LISP Programming. (23 (this is easy) hello 821) LISP Programming LISP is one of the simplest computer languages in terms of syntax and semantics, and also one of the most powerful. It was developed in the mid-1950 s by John McCarthy at M.I.T. as a LISt

More information

Python Lists and for Loops. Learning Outcomes. What s a List 9/19/2012

Python Lists and for Loops. Learning Outcomes. What s a List 9/19/2012 Python Lists and for Loops CMSC 201 Fall 2012 Instructor: John Park Lecture Section 01 Discussion Sections 02-08, 16, 17 1 Learning Outcomes Be aware that multiple items can be stored in a list. Become

More information

Perl Data Types and Variables. Data, variables, expressions, and much more

Perl Data Types and Variables. Data, variables, expressions, and much more Perl Data Types and Variables Data, variables, expressions, and much more Copyright 2006 2009 Stewart Weiss Data types in Perl Perl is unlike most high-level languages in that it does not make a formal

More information

Tecniche di Progettazione: Design Patterns

Tecniche di Progettazione: Design Patterns Tecniche di Progettazione: Design Patterns GoF: Composite 1 Composite pattern Intent Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects

More information

Maths Department Mental Agility

Maths Department Mental Agility Maths Department Mental Agility Denny High School Mental Agility Level Developing Exercise (Adding: break up and find compatible numbers OR balancing.) Example : 646 + 55 = 646 + 4 + 50 + = 70: or 646

More information

Section 3.1 Variables, Expressions and Order of Operations

Section 3.1 Variables, Expressions and Order of Operations Section.1 Variables, Expressions and Order of Operations A variable is a symbol, usually a letter of the alphabet that represents some varying or undetermined number. An algebraic expression is a mathematical

More information

List Processing Patterns and List Comprehension

List Processing Patterns and List Comprehension List Processing Patterns and List Comprehension Review: Lists Summary of what we know about lists. A list is a sequence type (like strings and tuples), but that differently from them is mutable (it can

More information

Florals II # by Laurel Burch DESIGNS

Florals II # by Laurel Burch DESIGNS #80191 19 DESIGNS Florals II by Laurel Burch 1 80191-01 Flower 1 2.60 X 3.90 in. 66.04 X 99.06 mm 17,483 St. n 1. Tamarack Detail...6011 n 2. Erin Green Detail... 5912 3. Papaya Detail... 0702 4. Pumpkin

More information

groceries = [ bananas, strawberries, apples, bread ]

groceries = [ bananas, strawberries, apples, bread ] MIT AITI Python Software Development Lab 04: Data Structures We have demonstrated in lecture how lists, tuples, and dictionaries each provide a valuable way to store information. Through the activities

More information

Scripting Languages Course 1. Diana Trandabăț

Scripting Languages Course 1. Diana Trandabăț Scripting Languages Course 1 Diana Trandabăț Master in Computational Linguistics - 1 st year 2017-2018 Today s lecture Introduction to scripting languages What is a script? What is a scripting language

More information

COMS 3101 Programming Languages: Perl. Lecture 6

COMS 3101 Programming Languages: Perl. Lecture 6 COMS 3101 Programming Languages: Perl Lecture 6 Fall 2013 Instructor: Ilia Vovsha http://www.cs.columbia.edu/~vovsha/coms3101/perl Lecture Outline Concepts: Subroutine references Symbolic references Saving

More information

Lecture 1. Torgeir R. Hvidsten Assistant professor in Bioinformatics Umeå Plant Science Center (UPSC) Computational Life Science Centre (CLiC)

Lecture 1. Torgeir R. Hvidsten Assistant professor in Bioinformatics Umeå Plant Science Center (UPSC) Computational Life Science Centre (CLiC) Lecture 1 Torgeir R. Hvidsten Assistant professor in Bioinformatics Umeå Plant Science Center (UPSC) Computational Life Science Centre (CLiC) My research interests A systems biology approach to model the

More information

Marysville JUSD Jan 7, 2019 thru Jan 31, 2019

Marysville JUSD Jan 7, 2019 thru Jan 31, 2019 Marysville JUSD Jan 7, 9 thru Jan 3, 9 8) Page Generated on: //8 ::7 PM Mon - /7/9 Break Cereal Assort 8/9 Sug Cheese String Mozz 8/oz LOL Fruit Apple Slices IW /oz Veg Carrot Snack Pack /c Milk % LF oz

More information

G Programming Languages Spring 2010 Lecture 6. Robert Grimm, New York University

G Programming Languages Spring 2010 Lecture 6. Robert Grimm, New York University G22.2110-001 Programming Languages Spring 2010 Lecture 6 Robert Grimm, New York University 1 Review Last week Function Languages Lambda Calculus SCHEME review 2 Outline Promises, promises, promises Types,

More information

CS201- Introduction to Programming Current Quizzes

CS201- Introduction to Programming Current Quizzes CS201- Introduction to Programming Current Quizzes Q.1 char name [] = Hello World ; In the above statement, a memory of characters will be allocated 13 11 12 (Ans) Q.2 A function is a block of statements

More information

CMSC 341 Hashing. Based on slides from previous iterations of this course

CMSC 341 Hashing. Based on slides from previous iterations of this course CMSC 341 Hashing Based on slides from previous iterations of this course Hashing Searching n Consider the problem of searching an array for a given value q If the array is not sorted, the search requires

More information

39% - 43%GP. January 2018

39% - 43%GP. January 2018 Great way to stay warm in January featuring Core-Mark's own Arcadia Bay Select Coffee, and Hot Chocolate. Plus, a great deal on the #1 Mini-Donut Brand - Hostess Donettes. HOSTESS BUNDLE TTL. CT 50 CT

More information