Hogwarts School of Witchcraft and Wizardry Prepares for Duels

Total Page:16

File Type:pdf, Size:1020Kb

Hogwarts School of Witchcraft and Wizardry Prepares for Duels HOGWARTS SCHOOL OF WITCHCRAFT AND WIZARDRY PREPARES FOR DUELS Grupptentamen i Programmeringsparadigm REGLER FÖR GRUPPTENT v Webben är öppen för deltagarna. v Deltagarna får endast kommunicera (angående tenten) med varandra. v Att aktivt begära hjälp eller information av utomstående via mejl, chatforums eller andra kanaler är förbjudet v Tentttiden är 6h och slutar 19:15 (+2h för de som jobbar i par). REGLER FÖR GRUPPTENT v Det finns 9 olika uppgifter i tenten. Sammanlagt kan de ge 20p. v Ni får fritt välja vem som kodar vilken uppgift eller hur ni samarbetar kring dem. v Ni får fritt välja för varje uppgift separat om ni kodar den på Haskell eller Prolog. v Det ska stå som kommentar för varje inlämnad uppgift vilken språkversion och OS som använts. REGLER FÖR GRUPPTENT v Inlämningen sker via mejl till [email protected] v Haskell-uppgifterna ska samlas i en fil, prolog-uppgifterna i en annan. Ifall ni använder system som inte är ömsesidigt kompatibla, får ni mejla flera filer (dokumentera detta i så fall!) v Varje inmejlad fil ska ha en kommentar om vilken grupp som producerat den. Koden ska ha kommentarer som visar hur den ska anropas. REGLER FÖR GRUPPTENT v Själva uppgifterna beskrivs på engelska, eftersom svenska språket än så länge är obekant vid Hogwarts. TEST DATA v You should use these lists to test the tasks that follow (naturally, you will decide how to represents the data in the lists, here they are given in pseudocode): v Slytherin students: • ("Draco Malfoy", "owl”) • ("Vincent Crabbe", "rat”) • ("Pansy Parkinson", "cat”) • ("Gregory Goyle", "cat”) TEST DATA v Gryffindor students: • ("Harry Potter", "owl”) • ("Hermione Granger", "cat”) • ("Ron Weasly", "rat”) v Ravenclaw students: • ("Luna Lovegood", "cat”) • ("Cho Chang", "rat”) • ("Padma Patil", "cat”) • ("Marcus Belby", "owl”) TEST DATA v Hufflepuff students: • ("Cedric Diggory", "cat”) • ("Hannah Abbot", "owl”) • ("Pomona Sprout", "rat”) TASK 1: DUELSTART 1P v In Hogwarts the unit that partakes in duels is a student and his/her magical pet. For duelStart you should model such a pair and then prepare this pair for the duel so that the points awarded for this pair start from 0. v You can write a Haskell function or a Prolog predicate for this; the functionality should be: v E g input: (”Harry Potter”, owl) output: (”Harry Potter”, owl) 0 (You choose how to represent this) TASK 2: DUELREADY 1P v In duelReady you work with a list of student & magical pet couples. duelReady should take a list of such couples and make them ready for a duel, using the function/predicate duelStart from the last task. The expected result is naturally of list of these couples, ready for duel: v E g • ("Cedric Diggory", "cat”) • ("Hannah Abbot", "owl”) • ("Pomona Sprout", "rat”) should be turned into … … TASK 2: DUELREADY 1P • ("Cedric Diggory", "cat"), 0 • ("Hannah Abbot", "owl"), 0 • ("Pomona Sprout", "rat”), 0 v You decide how to model this, but the result must be the same list of students, all ready for duel. TASK 3: PAIR FOR DUEL 2P v The function/predicate pairForDuel takes in two lists where the elements are student-pet couples, and pairs these couples with other such couples, so that one couple comes from one list , the other couple from the other list. pairForDuel must give as result all such possible couplings. v See next slide for example! TASK 3: PAIR FOR DUEL 2P v E g first list: • ("Harry Potter", "owl”) • ("Hermione Granger", "cat") v Second list: • ("Cedric Diggory", "cat”) • ("Hannah Abbot", "owl”) • ("Pomona Sprout", "rat") v … should yield ... TASK 3: PAIR FOR DUEL 2P v The result should be: • ("Harry Potter", "owl”) & ("Cedric Diggory", "cat”) • ("Harry Potter", "owl”) & ("Hannah Abbot", "owl”) • ("Harry Potter", "owl”) & ("Pomona Sprout", "rat”) • ("Hermione Granger", "cat") & ("Cedric Diggory", "cat”) • ("Hermione Granger", "cat") & ("Hannah Abbot", "owl”) • ("Hermione Granger", "cat") & ("Pomona Sprout", "rat”) TASK 4: SAME ANIMAL 1P v This function/predicate should check whether two student-pet couples have the same animal or not. v E g: • ("Harry Potter", "owl”) & ("Cedric Diggory", "cat”) => false • ("Harry Potter", "owl”) & ("Hannah Abbot", "owl”) => true TASK 5: PAIR FOR ANIMAL DUEL 3P v This function/predicate should work as pairForDuel, but only couples with the same kind of magical pets are allowed in the result: v E g • ("Harry Potter", "owl”) & ("Cedric Diggory", "cat”) • ("Harry Potter", "owl”) & ("Hannah Abbot", "owl”) • ("Harry Potter", "owl”) & ("Pomona Sprout", "rat”) • ("Hermione Granger", "cat") & ("Cedric Diggory", "cat”) • ("Hermione Granger", "cat") & ("Hannah Abbot", "owl”) • ("Hermione Granger", "cat") & ("Pomona Sprout", "rat”) TASK 6: COUPLE FOR DUEL 3P v Again we need to form (student, pet) pairs for duelling, but this time we simply pair the couples in the order that they have in the lists: the first couples from both lists will form a pair, the second couples the second pair and so on. However, as the House Lists are not equally long, there is a risk that some students will not get paired off. We might wish to find pairs for them later. So, coupleForDuel must give three results: (next slide!) TASK 6: COUPLE FOR DUEL 3P v Say whether all students in both the lists got paired off or not v Give the list of the new pairs v Give a list of those student-pet couples that did not get a pair (this list may be empty) v See next slide for an example! TASK 6: COUPLE FOR DUEL 3P v E g first list: • ("Harry Potter", "owl”) • ("Hermione Granger", "cat") v Second list: • ("Cedric Diggory", "cat”) • ("Hannah Abbot", "owl”) • ("Pomona Sprout", "rat") v … should yield ... TASK 6: COUPLE FOR DUEL 3P v ”There were students left over” v The list of pairs: • ("Harry Potter", "owl”) & ("Cedric Diggory", "cat”) • ("Hermione Granger", "cat") & ("Hannah Abbot", "owl”) v The list of those left over: • ("Pomona Sprout", "rat") TASK 7: THREAT 3P v threat is used to controll that two students do not threaten each other while training on a 5 x 5 field. The spells are cast on straight lines, so that the row and the column where the student stands are effected by the spell. (The magical architecture of the 5 x 5 training hall reflects the spells so that the whole row and the whole column where the student is standing are effected by the spell, but the rest of the space is uneffected.) v NB! The wizards/witches may NOT stand in the same slot!! (Next slide!) TASK 7: THREAT 3P v The function/predicate threat must check the position of a student casting the spell in this hall against the position of another student planning to enter the hall (remember, (s)he may choose to apparate in any slot) and say whether there is a threat that this student might be effected by the spell cast by the first student. v Threat must also see to it that the second student may not apparate on the slot reserved by the student casting the spell! (Next slide!) TASK 7: THREAT 3P 1 1 Hint: think very, very carefully 2 what you need to 2 know to model the task! Do NOT model what Student 2 is not is not needed … Student 2 is threatened threatened by the spell by the spell cast by cast by student 1 student 1 TASK 8: CROSSFIRE 3P v The function/predicate crossFire will help to determine whether a third person risks being hit by crossfire if (s)he enters the training local described above, with two students already casting spells in it. v Crossfire is defined as all the slots where the spells cast meet. v Remember to analyse the situation both for the case where the wizards training do not threaten each other, and for the one where they do! We are still working in the 5 x 5 training hall. (Next slide!) TASK 8: CROSSFIRE 1 1 crossFire must produce a list of 2 the slots to be 2 avoided (those with crossfire). 1 and 2 do not threaten Students 1 and 2 are each other. Crossfire threatened by each other. positions are marked in Crossfire positions are red. marked in red. TASK 9: SAFE 3P v A third person will apparate onto the arena at a given position – but is it safe? v Safe positions to apparate in are those that are not under threat (see task 7) or those where one risks crossfire (see task 8). v The function/predicate safe must check whether the slot where the third person plans to apparate is safe or not. GOOD LUCK WITH YOUR CODING MAGIC! https://www.google.com/search?q=hogwarts&biw=1440&bih=749&tbm=isch&imgil=8Db5n-ewbR6CBM%253A%253BUmXnQO0O_YykpM %253Bhttps%25253A%25252F%25252Fen.wikipedia.org%25252Fwiki%25252FHogwarts&source=iu&pf=m&fir=8Db5n-ewbR6CBM%253A %252CUmXnQO0O_YykpM%252C_&usg=__MQlngaztgHhWNUqsyl_nshvOzJI %3D&ved=0ahUKEwjNy_Dr45_MAhUOb5oKHSm5C00QyjcIJQ&ei=As4YV83COI7e6QSp8q7oBA#imgdii=8Db5n-ewbR6CBM%3A%3B8Db5n- ewbR6CBM%3A%3B50Cw-vVa3QB-4M%3A&imgrc=8Db5n-ewbR6CBM%3A .
Recommended publications
  • Librarians and Harry Potter: an Introduction of the SHHH! Personality Assessment Instrument Connie J
    View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by CommonKnowledge Volume 14 , Number 1 Lively Librarians Loose in the Limelight: Libraries in Popular Media (Spring 2008) | Pages 9 - 13 July 2014 Librarians and Harry Potter: An Introduction of the SHHH! Personality Assessment Instrument Connie J. Bennett Eugene Public Library Follow this and additional works at: http://commons.pacificu.edu/olaq Part of the Library and Information Science Commons Bennett, C. J. (2014). Librarians and Harry Potter: An Introduction of the SHHH! Personality Assessment Instrument. OLA Quarterly, 14(1), 9-13. http://dx.doi.org/10.7710/1093-7374.1186 © 2014 by the author(s). OLA Quarterly is an official publication of the Oregon Library Association | ISSN 1093-7374 | http://commons.pacificu.edu/olaq Librarians and Harry Potter: An Introduction of the SHHH! Personality Assessment Instrument by Connie J. Bennett adame Pince, the cranky mis- of the Hogwarts library’s restricted shelves, Director, tress of the library at Hogwarts, would stand squarely with the latter group. Eugene Public Library Mis hardly a role model to emulate. J.K. Rowling has acknowledged that the In the librarian’s constant search for profes- Pince caricature is merely a plot device. Dur- sional balance between providing generous ing a benefit reading on August 2, 2006 at community access to resources on the one Radio City Music Hall, answering a question hand—and safeguarding those resources from a librarian in the audience, she said, from the public on the other—she’s clearly “I thought you were going to attack me for on the parsimonious end of the continuum.
    [Show full text]
  • Co-Creating Harry Potter: Children’S Fan-Play, Folklore and Participatory Culture
    CO-CREATING HARRY POTTER: CHILDREN’S FAN-PLAY, FOLKLORE AND PARTICIPATORY CULTURE by © Contessa Small A thesis submitted to the School of Graduate Studies in partial fulfillment of the requirements for the degree of Doctor of Philosophy Department of Folklore Memorial University of Newfoundland April 2015 St. John’s Newfoundland Abstract A number of scholars have argued that children’s traditional artifacts and play are being replaced by media culture objects and manipulated by corporations. However, while companies target and exploit children, it is problematic to see all contemporary youth or “kid” culture as simply a product of corporate interests. This thesis therefore explores children’s multivocal fan-play traditions, which are not only based on corporation interests, but also shaped by parents, educators and children themselves. The Harry Potter phenomenon, as a contested site where youth struggle for visibility and power, serves as the case study for this thesis. Through the examination of an intensely commercialized form of children’s popular culture, this thesis explores the intricate web of commercial, hegemonic, folk, popular and vernacular cultural expressions found in children’s culture. This thesis fits with the concerns of participatory literacy which describes the multiple ways readers take ownership of reading and writing to construct meaning within their own lives. Due to the intense corporate and adult interests in Pottermania, children have continually been treated in the scholarly literature as passive receptors
    [Show full text]
  • Harry Potter
    THE BLADE, TOLEDO, OHIO O SUNDAY, JULY 15, 2007 SECTION B, PAGE 6 Keeping INup HONOR OF with JULY 4TH Harry Here’s a guide to the fi rst six books in the Harry Potter series WARNING: If you haven’t read the books, it may spoil the endings for you Harry Potter and the In the fi rst book of the series we are fi rst-year-students, Ron Weasley and former follower of Voldemort, of trying introduced to Harry, a bespectacled Hermione Granger, friends who help to steal the stone, it is discovered after Sorcerer’s Stone orphan with a thunderbolt scar on his Harry in his adventures. several dangerous adventures that forehead, who has been living with his Once at the school, Harry fi nds that it is Voldemort — working through aunt and uncle since he was a baby. he is a celebrity in the wizarding world the Defense Against the Dark Harry’s adoptive family, the Dursleys, and the truth about his parents’ deaths Arts teacher, Professor Quirrel treats him with scorn and loathing, — that his parents were killed battling — who is trying to take the while spoiling their obese son, Harry’s Lord Voldemort and when Voldemort stone and revive his power. self-centered cousin Dudley. tried to kill Harry using a killing curse it Voldemort is so weak he is On his 11th birthday, Harry learns rebounded, destroying the evil wizard. forced to live in Quirrel’s body he is a wizard and has been accepted Over the course of the school year, to survive.
    [Show full text]
  • Diagon Alley: Being a Stranger
    Harry Potter and the Sacred Text 1.05- Diagon Alley: Being a Stranger Casper: Hi, this is Casper. We recorded this episode before the attacks in Orlando, and wanted to offer our thoughts and love in response to the tragedy. A lot of people will turn to prayer or to their religious communities in such times of despair. We know that, for a whole ton of our listeners, that’s not really an option. What we wanted to suggest was, if there are times of sadness and loss of hope and courage, that this can be a kind of prayer, that turning to this text, and delving into it with attention and love, is a kind of prayer. So we found this one little passage that, for us, really speaks volumes in this time of mourning and of anger, that we hope will speak to you also. Vanessa: This offering is from The Goblet of Fire. It is the speech that Dumbledore makes when ​ ​ Cedric Diggory dies at the hands of Lord Voldemort. And every time I say the name ‘Cedric Diggory,’ I will be thinking of the forty-nine victims in Orlando, and of their families. “It is my belief, and never have I so hoped that I am mistaken, that we are all facing dark and difficult times. Some of you in this hall have already suffered directly. Many of your families have already been torn asunder. A week ago a student, Cedric Diggory, was taken from our midst. Remember Cedric. Remember if the time comes when you have to make a choice between what is right and what is easy, remember what happened to a boy who was good and who was kind and brave, because he strayed across the path of violence.
    [Show full text]
  • The Reflection of Attachment Style in J.K. Rowling's
    THE REFLECTION OF ATTACHMENT STYLE IN J.K. ROWLING’S PLAYSCRIPT HARRY POTTER AND THE CURSED CHILD TERM PAPER By: ANISA FAJRIANTI 2014130068 STRATA ONE (S-1) OF ENGLISH DEPARTMENT FACULTY OF LETTERS DARMA PERSADA UNIVERSITY JAKARTA 2018 THE REFLECTION OF ATTACHMENT STYLE IN J.K. ROWLING’S PLAYSCRIPT HARRY POTTER AND THE CURSED CHILD TERM PAPER Submitted in Part Fulfilling for Obtaining Strata One (S-1) Degree By: ANISA FAJRIANTI 2014130068 STRATA ONE (S-1) OF ENGLISH DEPARTMENT FACULTY OF LETTERS DARMAPERSADAUNIVERSITY JAKARTA 2018 ii Universitas Darma Persada iii Universitas Darma Persada iv Universitas Darma Persada v Universitas Darma Persada ACKNOWLEDGEMENT Alhamdulillahi rabbil ‘aalamiin, praise be to Allah SWT who has given the mercy and blesses to me to be able to finish my term paper entitled The Reflection Of Attachment Style In J.K. Rowling’s Playscript Harry Potter And The Cursed Child. This paper is submitted as a partial fulfillment of the requirements for obtaining the Strata One (S1) degree at the English Department, the Faculty of Letters, University of Darma Persada. There are many great people who always guide and support me from the beginning until I finish this term-paper. Their advices are very helpful for me to finish this term paper. By account of that, I would like to deliver a lot of gratitude to them, those great people are: 1. Dra. Karina Adinda, MA as the advisor who has guided me patiently and kindly in making my term-paper. 2. Drs. Rusydi M. Yusuf, M.Si as the reader who has checked and corrected the word by word in this term-paper patiently.
    [Show full text]
  • DISCUSSION GUIDE Year 4 Harry Potter and the Goblet of Fire
    DISCUSSION GUIDE Presented by the Year 4 Harry Potter and the Goblet of Fire Introduction to the Harry Potter Books In 1997 Joanne Rowling, a single parent living in guaranteed that she would be able to continue the story Edinburgh, Scotland, published her first book. It was the as she wished. Fans camped out overnight and lined up at fulfillment of a dream she’d had since she was a child. Her bookstores in record numbers as each new installment in story about an eleven-year-old orphaned boy who discovers the series appeared. his heritage of wizardry took the world by storm. Published as a children’s book, it was embraced by readers of all ages, This discussion guide is designed to help readers explore who found the engaging humor and gentle parody of the some of the deeper meanings underlying Rowling’s world real world to be enjoyable and thought provoking. of wizardry and magic. Incorporating elements of fantasy, mystery, humor, sports, and friendship, the series has wide Rowling had planned, from the beginning, to tell the story appeal for readers of all ages. On the surface the books are in a series of seven books. The initial success of the first title great adventure tales, but like all great fantasy literature, (published in England as Harry Potter and the Philosopher’s they also deal with universal human values, longings, Stone and in America as Harry Potter and the Sorcerer’s Stone) wishes, and choices. Year 4 Harry Potter and the Goblet of Fire Harry becomes aware of a wider wizarding world in this volume, as he attends the Quidditch World Cup with the Weasleys, and becomes involved in the Triwizard Tournament at Hogwarts, competing against students from other schools.
    [Show full text]
  • Yule Ball Tournament Questions: Tossups Only 1
    YULE BALL TOURNAMENT QUESTIONS: TOSSUPS ONLY 1. Before being refurbished, it was home to a number of unpleasant creatures such as doxies and boggarts. Its decor includes a serpent-shaped door knocker, as well as the mounted heads of house- elves and a strategically burned family tapestry. FTP, name this residence, the new headquarters for the Order of the Phoenix. Answer: Number 12, Grimmauld Place 2. Born to parents named Pollux and Irma, she died in 1985 as one of the last of her pure-blood line. She hated such members of her family as Alphard and Andromeda, which is why she magically burned their names off the family tree along with that of her son. Who, FTP, is this mother of Sirius? Answer: Walburga Black 3. This actor first gained fame on the stage for playing such roles as King Lear and Falstaff, but he became most famous with the movies The Singing Detective and, of course, his role in the Harry Potter movies, which he first took on in Harry Potter and the Prisoner of Azkaban. FTP, name this British-Irish actor, who replaced Richard Harris as Albus Dumbledore. Answer: Michael Gambon 4. They alone defend users against Lethifolds, though Dumbledore can also use them to send unforgeable messages. In Harry Potter and the Deathly Hallows, Umbridge's is a cat, and in the movie of Order of the Phoenix, Ginny's is a horse. What, FTP, are these creatures that are primarily used to defend wizards against Dementors? Answer: Patronus 5. According to Ron in Chamber of Secrets, Ginny loves these.
    [Show full text]
  • Harry Potter and the Cursed Child
    The digital heart of the Wizarding World www.pottermore.com Harry Potter and the Cursed Child Parts One and Two may not be performed in whole or in part and no use may be made of it whatsoever except under express license from the rights holders of the work, J.K. Rowling and Harry Potter Theatrical Productions Limited. Please email [email protected] with any inquiries. To Jack Thorne who entered my world and did beautiful things there. — J.K. Rowling For Joe, Louis, Max, Sonny, and Merle . wizards all . — John Tiffany To Elliott Thorne, born April 7, 2016. As we rehearsed, he gurgled. — Jack Thorne CONTENTS PART ONE ACT ONE ACT TWO PART TWO ACT THREE ACT FOUR ABOUT THE PRODUCTION BIOGRAPHIES OF THE ORIGINAL STORY TEAM ACKNOWLEDGEMENTS ACT ONE, SCENE ONE KING’S CROSS A busy and crowded station. Full of people trying to go somewhere. Amongst the hustle and bustle, two large cages rattle on top of two laden trolleys. They’re being pushed by two boys, JAMES POTTER and ALBUS POTTER, their mother, GINNY, follows after. A thirty-seven-year-old man, HARRY, has his daughter, LILY, on his shoulders. ALBUS: Dad. He keeps saying it. HARRY: James, give it a rest. JAMES: I only said he might be in Slytherin. And he might so . (Off his dad’s glare.) Fine. ALBUS (looking up at his mum): You’ll write to me, won’t you? GINNY: Every day if you want us to. ALBUS: No. Not every day. James says most people only get letters from home about once a month.
    [Show full text]
  • Professor Dumbledore's Advice for Law Deans, 39 U
    UIC School of Law UIC Law Open Access Repository UIC Law Open Access Faculty Scholarship 2008 Professor Dumbledore's Advice for Law Deans, 39 U. Tol. L. Rev. 269 (2008) Darby Dickerson John Marshall Law School Follow this and additional works at: https://repository.law.uic.edu/facpubs Part of the Legal Education Commons, and the Legal Profession Commons Recommended Citation Darby Dickerson, Professor Dumbledore's Advice for Law Deans, 39 U. Tol. L. Rev. 269 (2008) https://repository.law.uic.edu/facpubs/640 This Article is brought to you for free and open access by UIC Law Open Access Repository. It has been accepted for inclusion in UIC Law Open Access Faculty Scholarship by an authorized administrator of UIC Law Open Access Repository. For more information, please contact [email protected]. PROFESSOR DUMBLEDORE'S ADVICE FOR LAW DEANS Darby Dickerson* INTRODUCTION LBUS Percival Wulfric Brian Dumbledore.' Adorned with a long silver beard, midnight blue robes, and half-moon glasses,2 Dumbledore * Vice President and Dean, Stetson University College of Law. I would like to thank my research assistant, Casey Stoutamire, for her work on this piece, and my colleague, Professor Brooke Bowman, for her editing assistance. Also, as the author of the ALWD Citation Manual, I want to thank the University of Toledo Law Review editors for keeping my citations in that format and for allowing me to dispense with some traditional citation niceties, such as the "supra n. _, at " construction for books in the Harry Potter series and the strict use of id., so that readers can more easily locate the sources cited.
    [Show full text]
  • Study Allowing for Direct Comparison
    H A R R Y P O T T E R Significant Mortalities Sorcorer's Stone James & Lily Potter Both died at the wand of Voldemort with the Killing Curse. Professor Quirell They died while protecting Harry's crib. Died in vain trying to murder Harry in the chambers of Hogwarts. Chamber of Secrets Moaning Myrtle She was petrified when she looked into the eyes of the Basilisk. Serpent of Slytherin The Basilisk was killed by Harry. He stabbed Godric Gryffindor's sword through his mouth. Goblet of Fire Cedric Diggory He was killed by Peter Pettigrew with orders given by Voldemort with a killing curse during the last round of the Triwizard Tournament. Order of the Pheonix Sirius Black His hated cousin, Bellatrix, stuck him with a spell causing him to fall through the Veil during the Battle of the Department of Mysteries. Half-Blood Prince Albus Dumbledore Under his own orders, he was killed by Severus Snape in the Astronomy Tower. This was important in an overall plot to protect Snape's true loyalty. Deathly Hallows Hedwig Hedwig was murdered during the Dobby Battle of Seven Potters. He was struck by a killing curse most likely He was severely wounded mid- not meant for him. appariting while saving Harry and his friends at Malfoy Manor. He was ultimately killed by Bellatrix LeStrange's knife. Severus Snape He was killed in the Shrieking Shack during the Battle of Hogwarts by Voldmort's snake, Nagini. Voldemort believed killing Snape would make him Nagini master of the Elder Wand. Nagini is stabbed during the Battle of Hogwarts with Godric Gryffindor's sword by Neville Longbottom.
    [Show full text]
  • Lab 11 SQL-DML 4 (Stored Procedures, Cursors)
    Department of Computer Science University of Cyprus EPL342 –Databases Lab 11 SQL-DML 4 (Stored Procedures, Cursors) Panayiotis Andreou http://www.cs.ucy.ac.cy/courses/EPL342 12-1 EPL342: Databases – Panayiotis Andreou (University of Cyprus) Before We Begin • Start the SQL Server Management Studio –Start All Programs Microsoft SQL Server SQL Server Management Studio Server: APOLLO Authentication: SQL Server Authentication Username: <your username> Password: <your password> 12-2 EPL342: Databases – Panayiotis Andreou (University of Cyprus) Hogwarts table ID Name SID 1 Albus Dumbledore NULL 2 Argus Filch 1 3 Filius Flitwick 1 4 Rubeus Hagrid 1 5 Madam Hooch 1 6 Gilderoy Lockhart 1 7 Minerva McGonagall 1 8 Severus Snape 1 9 Cedric Diggory 5 10 Harry Potter 7 11 Ron Weasly 7 12 Hermione Granger 7 13 Any Slytherin 8 14 Draco Malfoy 8 15 Fred Weasly 3 16 George Weasly 3 12-3 EPL342: Databases – Panayiotis Andreou (University of Cyprus) Hogwarts Cursor Example DECLARE @ID int DECLARE: Variables for storing DECLARE @Name nvarchar(100) intermediate results Specifies a FORWARD_ONLY, DECLARE c CURSOR FAST_FORWARD READ_ONLY cursor with performance FOR SELECT ID, Name FROM Hogwarts optimizations enabled OPEN c OPEN: Initialize cursor and execute T- SQL statement FETCH NEXT FROM c INTO @ID, @Name FETCH: Move cursor to the 1st record WHILE @@FETCH_STATUS=0 WHILE: more records exist BEGIN --YOUR CODE HERE FETCH NEXT FROM c INTO @ID, @Name FETCH: Move cursor to the next record END CLOSE c CLOSE: Release the current result set DEALLOCATE c DEALLOCATE:
    [Show full text]
  • Respect, Cho Chang, and Asian Representation: a Critical Analysis of the White Gaze in Harry
    Respect, Cho Chang, and Asian Representation: A Critical Analysis of the White Gaze in Harry Potter A Senior Project Presented to The Faculty of the Communication Studies Department California Polytechnic State University, San Luis Obispo In Partial Fulfillment Of the Requirements for the Degree Bachelor of Arts By Kaitlin Pham Dr. Richard Besel Senior Project Advisor Signature Date Dr. Bernard Duffy Department Chair Signature Date © Kaitlin Pham Pham 2 Table of Contents Introduction 3 Respect & Representation: How Asian Labels Are Perpetuated Negatively Through Cho Chang Consumption and Creation of Media under the “White Gaze” 7 The Yellow Peril and the Repercussions it Faces with the White Gaze 9 Cho Chang: Athlete, Scholar, Courageous Friend, and/or Temptress? 14 Athlete 15 Scholar 17 Courageous Friend 19 Temptress 21 Conclusion 23 Works Cited 26 Pham 3 Respect & Representation: How Asian Labels Are Perpetuated Negatively Through ‘Cho Chang’ I was first drawn to The Harry Potter series during middle school after hearing the hype around J.K Rowling’s incredibly imaginative tale about the magical forces between good and evil. I had always been enthralled about stories regarding fantastical worlds, and Rowling’s stories are so remarkably thought-out, that the Latin-based Incantations to even minor character’s name contain a deeper subliminal meaning. That is, until we look at Harry’s first love interest, Cho Chang. It appears that many readers are absolutely perplexed about Cho Chang’s ethnicity. Her name indicates an Asian ethnic origin, but this distinction stops there. There are partial interpretations of her name within Japanese and Chinese languages, however, the full name does not make complete sense in either language.
    [Show full text]