XML-Formatted Response Example (http://www.omdbapi.com/?s=titanic&r=xml) SOP Basics Slide 32
View full slide show




Answer #include struct Book { char title[50]; char author[50]; char subject[100]; int book_id; }; void printBook( struct Book *book ) { /* function declaration */ void printBook( struct Book *book ); printf( printf( printf( printf( int main( ) { struct Book Book1; struct Book Book2; /* Declare Book1 of type Book */ /* Declare Book2 of type Book */ "Book "Book "Book "Book title : %s\n", book->title); author : %s\n", book->author); subject : %s\n", book->subject); book_id : %d\n\n", book->book_id); } /* book 1 specification */ strcpy( Book1.title, "C Programming"); strcpy( Book1.author, "Nuha Ali"); strcpy( Book1.subject, "C Programming Tutorial"); Book1.book_id = 6495407; /* book 2 specification */ strcpy( Book2.title, "Telecom Billing"); strcpy( Book2.author, "Zara Ali"); strcpy( Book2.subject, "Telecom Billing Tutorial"); Book2.book_id = 6495700; /* print Book1 info by passing address of Book1 */ printBook( &Book1 ); /* print Book2 info by passing address of Book2 */ printBook( &Book2 ); return 0; } Copyright © 2017 by Jones & Bartlett Learning, LLC an Ascend Learning Company
View full slide show




Multi-Faceted Sentiment Summary (query=“Da Vinci Code”) Facet 1: Movie Facet 2: Book Neutral Positive Negative ... Ron Howards selection of Tom Hanks to play Robert Langdon. Tom Hanks stars in the movie,who can be mad at that? But the movie might get delayed, and even killed off if he loses. Directed by: Ron Howard Writing credits: Akiva Goldsman ... Tom Hanks, who is my favorite movie star act the leading role. protesting ... will lose your faith by ... watching the movie. After watching the movie I went online and some research on ... Anybody is interested in it? ... so sick of people making such a big deal about a FICTION book and movie. I remembered when i first read the book, I finished the book in two days. Awesome book. ... so sick of people making such a big deal about a FICTION book and movie. I’m reading “Da Vinci Code” now. So still a good book to past time. This controversy book cause lots conflict in west society. … 61
View full slide show




Multi-Faceted Sentiment Summary (query=“Da Vinci Code”) Facet 1: Movie Facet 2: Book Neutral Positive Negative ... Ron Howards selection of Tom Hanks to play Robert Langdon. Tom Hanks stars in the movie,who can be mad at that? But the movie might get delayed, and even killed off if he loses. Directed by: Ron Howard Writing credits: Akiva Goldsman ... Tom Hanks, who is my favorite movie star act the leading role. protesting ... will lose your faith by ... watching the movie. After watching the movie I went online and some research on ... Anybody is interested in it? ... so sick of people making such a big deal about a FICTION book and movie. I remembered when i first read the book, I finished the book in two days. Awesome book. ... so sick of people making such a big deal about a FICTION book and movie. I’m reading “Da Vinci Code” now. So still a good book to past time. This controversy book cause lots conflict in west society. … Keynote at SIGIR 2011, July 26, 2011, Beijing, China 28
View full slide show




Multi-Faceted Sentiment Summary [Mei et al. 07] (query=“Da Vinci Code”) Facet 1: Movie Facet 2: Book Neutral Positive Negative ... Ron Howards selection of Tom Hanks to play Robert Langdon. Tom Hanks stars in the movie,who can be mad at that? But the movie might get delayed, and even killed off if he loses. Directed by: Ron Howard Writing credits: Akiva Goldsman ... Tom Hanks, who is my favorite movie star act the leading role. protesting ... will lose your faith by ... watching the movie. After watching the movie I went online and some research on ... Anybody is interested in it? ... so sick of people making such a big deal about a FICTION book and movie. I remembered when i first read the book, I finished the book in two days. Awesome book. ... so sick of people making such a big deal about a FICTION book and movie. I’m reading “Da Vinci Code” now. So still a good book to past time. This controversy book cause lots conflict in west society. … 70
View full slide show




Blog Sentiment Summary (query=“Da Vinci Code”) Facet 1: Movie Facet 2: Book Neutral Positive Negative ... Ron Howards selection of Tom Hanks to play Robert Langdon. Tom Hanks stars in the movie,who can be mad at that? But the movie might get delayed, and even killed off if he loses. Directed by: Ron Howard Writing credits: Akiva Goldsman ... Tom Hanks, who is my favorite movie star act the leading role. protesting ... will lose your faith by ... watching the movie. After watching the movie I went online and some research on ... Anybody is interested in it? ... so sick of people making such a big deal about a FICTION book and movie. I remembered when i first read the book, I finished the book in two days. Awesome book. ... so sick of people making such a big deal about a FICTION book and movie. I’m reading “Da Vinci Code” now. So still a good book to past time. This controversy book cause lots conflict in west society. … 2007 © ChengXiang Zhai LLNL, Aug 15, 2007 32
View full slide show




Aspect Sentiment Summarization Query: “Da Vinci Code” Topic 1: Movie Topic 2: Book Neutral Positive Negative ... Ron Howards selection of Tom Hanks to play Robert Langdon. Tom Hanks stars in the movie,who can be mad at that? But the movie might get delayed, and even killed off if he loses. Directed by: Ron Howard Writing credits: Akiva Goldsman ... Tom Hanks, who is my protesting ... will lose your favorite movie star act faith by watching the the leading role. movie. After watching the movie I went online and some research on ... Anybody is interested in it? ... so sick of people making such a big deal about a FICTION book and movie. I remembered when i first read the book, I finished the book in two days. Awesome book. ... so sick of people making such a big deal about a FICTION book and movie. I’m reading “Da Vinci Code” now. … So still a good book to past time. This controversy book cause lots conflict in west society. 179 MIAS Tutorial Summer 2011
View full slide show




The Netflix Program: Netflix Classification use the RentsTrainingTable, Rents(MID,UID,Rating,Date) and class label Rating, to classify new (MID,UID,Date) tuples (i.e., predict ratings). Nearest Neighbor User Voting: uid votes on rating(MID,UID) if it is near enough to UID in it’s ratings of movies M={mid 1, ..., midk} (i.e., near is based on a User-User correlation over M ). User-User-Correlation? (Pearson, Cosine?) and the set M={mid1,…, midk }. Nearest Neighbor Movie Voting: mid votes on rating(MID,UID) if its ratings by U={uid1,..., uidk} are near enough to those of MID (i.e., near is based on a Movie-Movie correlation over U). Movie-Movie-Correlation? (Pearson or Cosine or?) and set U={uid 1,…, uidk }. mpp-mpred.C reads PROBE, loops thru (Mi, ProbeSup(Mi), pass each to mpp-user.C. mpp-mpred.C can call separate instances of mpp-user.C for many Us (in parallel (governed by # of slots.) mpp-user.C loops thru ProbeSup(M), reads config file, prints prediciton(M,U) to predictions prunes, loops thru user voters, V. calculating a V-vote. Combines V-votes and returns vote. movie-vote.C similar. We must loop thru V’s (VPHD rather than HPVD) because the HP required of most correlation calculations is impossible using AND/OR/COMP. ( Mi, ProbeSup(Mi)={Ui1, …, Uik})  Loops thru ProbeSup, from uservote, movieVOTE writes Predict(Mi,Uik) to predictions  Uik ProbeSup(Mi) For user votes, mpp-user.C calls user-vote.C For movie votes, mpp-user.C calls movie-vote.C user-vote.C mpp-mpred.C mpp-user.C ( Mi , Sup(Mi), Uik , Sup(Uik ))  ( Mi , Sup(Mi), Uik , Sup(Uik ))  VOTE(Mi ,Uik )   vote(Mi ,Uik ) movie-vote.C user-vote.C The data mining algorithms in movie-vote.C (first the Nearest Neighbor Classification code, then ARM code, then? Similar (dual) code either exists or will exist in user-vote.C. The file, movie-vote-full.C, contains ARM attempts, Boundary-based attempts and the Nearest Neighbor Classification attempts. The file, movie-vote-justNN.C contains only the NN attempts (so we will start with that). A long term goal: generalize the code away from the Netflix problem and toward a generic data mining system (e.g., for use by the Treeminer Corp. on, say, satellite imagery?) prune.C
View full slide show




Cinematch use Training Table Rents(MID,UID,Rating,Date), to classify new (MID,UID,Date) (i.e., predict ratings). Nearest Neighbor User Voting: uid votes on rating(MID,UID) if it is near enough to UID in it’s ratings of movies M={mid 1, ..., midk} (i.e., near is based on a User-User correlation over M ). User-User-Correlation? (Pearson, Cosine?) and the set M={mid1,…, midk }. Nearest Neighbor Movie Voting: mid votes on rating(MID,UID) if its ratings by U={uid1,..., uidk} are near enough to those of MID (i.e., near is based on a Movie-Movie correlation over U). Movie-Movie-Correlation? (Pearson or Cosine or?) and set U={uid 1,…, uidk }. mpp-mpred.C reads PROBE, loops thru (Mi, ProbeSup(Mi), pass each to mpp-user.C. mpp-mpred.C can call separate instances of mpp-user.C for many Us (in parallel (governed by # of slots.) mpp-user.C loops thru ProbeSup(M), reads config file, prints prediciton(M,U) to predictions For user votes, mpp-user.C calls user-vote.C For movie votes, mpp-user.C calls movie-vote.C user-vote.C prunes, loops thru user voters, V. calculating a V-vote. Combines V-votes and returns vote. movie-vote.C similar. mpp-mpred.C We must loop thru V’s (VPHD rather than HPVD) because the HP required of most correlation calculations is impossible using AND/OR/COMP. The data mining algorithms in movie-vote.C (first Nearest Neighbor Classification code) Similar (dual) code either exists or will exist in user-vote.C. The file, movie-vote-full.C, contains ARM attempts, Boundarybased attempts and the Nearest Neighbor Classification attempts. The file, movie-vote-justNN.C contains only the NN attempts (so we will start with that). ( Mi, ProbeSup(Mi)={Ui1, …, Uik})  Loops thru ProbeSup, from uservote, movieVOTE writes Predict(Mi,Uik) to predictions  Uik ProbeSup(Mi) mpp-user.C ( Mi , Sup(Mi), Uik , Sup(Uik ))  ( Mi , Sup(Mi), Uik , Sup(Uik ))  VOTE(Mi ,Uik )   vote(Mi ,Uik ) movie-vote.C user-vote.C prune.C
View full slide show




Example Directory Protocol • Block is Exclusive: current value of the block is held in the cache of the processor identified by the set Sharers (the owner) => three possible directory requests: – Read miss: owner processor sent data fetch message, causing state of block in owner’s cache to transition to Shared and causes owner to send data to directory, where it is written to memory & sent back to requesting processor. Identity of requesting processor is added to set Sharers, which still contains the identity of the processor that was the owner (since it still has a readable copy). State is shared. – Data write-back: owner processor is replacing the block and hence must write it back, making memory copy up-to-date (the home directory essentially becomes the owner), the block is now Uncached, and the Sharer set is empty. – Write miss: block has a new owner. A message is sent to old owner causing the cache to send the value of the block to the directory from which it is sent to the requesting processor, which becomes the new owner. Sharers is set to identity of new owner, and state of block is made Exclusive. 03/24/19 UAH-CPE 631 15
View full slide show




CPE 631 AM Example Directory Protocol  Block is Exclusive: current value of the block is held in the cache of the processor identified by the set Sharers (the owner) => three possible directory requests: – Read miss: owner processor sent data fetch message, causing state of block in owner’s cache to transition to Shared and causes owner to send data to directory, where it is written to memory & sent back to requesting processor. Identity of requesting processor is added to set Sharers, which still contains the identity of the processor that was the owner (since it still has a readable copy). State is shared. – Data write-back: owner processor is replacing the block and hence must write it back, making memory copy up-to-date (the home directory essentially becomes the owner), the block is now Uncached, and the Sharer set is empty. – Write miss: block has a new owner. A message is sent to old owner causing the cache to send the value of the block to the directory from which it is sent to the requesting processor, which becomes the new owner. Sharers is set to identity of new owner, and state of block is made Exclusive. 24/03/19 UAH-CPE631 21
View full slide show




Example Directory Protocol • Block is Exclusive: current value of the block is held in the cache of the processor identified by the set Sharers (the owner) => three possible directory requests: – Read miss: owner processor sent data fetch message, causing state of block in owner’s cache to transition to Shared and causes owner to send data to directory, where it is written to memory & sent back to requesting processor. Identity of requesting processor is added to set Sharers, which still contains the identity of the processor that was the owner (since it still has a readable copy). State is shared. – Data write-back: owner processor is replacing the block and hence must write it back, making memory copy up-to-date (the home directory essentially becomes the owner), the block is now Uncached, and the Sharer set is empty. – Write miss: block has a new owner. A message is sent to old owner causing the cache to send the value of the block to the directory from which it is sent to the requesting processor, which becomes the new owner. Sharers is set to identity of new owner, and state of block is made Exclusive. 03/24/19 UAH-CPE 631 32
View full slide show




CPE 631 AM Example Directory Protocol  Block is Exclusive: current value of the block is held in the cache of the processor identified by the set Sharers (the owner) => three possible directory requests: – Read miss: owner processor sent data fetch message, causing state of block in owner’s cache to transition to Shared and causes owner to send data to directory, where it is written to memory & sent back to requesting processor. Identity of requesting processor is added to set Sharers, which still contains the identity of the processor that was the owner (since it still has a readable copy). State is shared. – Data write-back: owner processor is replacing the block and hence must write it back, making memory copy up-to-date (the home directory essentially becomes the owner), the block is now Uncached, and the Sharer set is empty. – Write miss: block has a new owner. A message is sent to old owner causing the cache to send the value of the block to the directory from which it is sent to the requesting processor, which becomes the new owner. Sharers is set to identity of new owner, and state of block is made Exclusive. 24/03/19 UAH-CPE631 11
View full slide show




Example Directory Protocol • Block is Exclusive: current value of the block is held in the cache of the processor identified by the set Sharers (the owner) => three possible directory requests: – Read miss: owner processor sent data fetch message, causing state of block in owner’s cache to transition to Shared and causes owner to send data to directory, where it is written to memory & sent back to requesting processor. Identity of requesting processor is added to set Sharers, which still contains the identity of the processor that was the owner (since it still has a readable copy). State is shared. – Data write-back: owner processor is replacing the block and hence must write it back, making memory copy up-to-date (the home directory essentially becomes the owner), the block is now Uncached, and the Sharer set is empty. – Write miss: block has a new owner. A message is sent to old owner causing the cache to send the value of the block to the directory from which it is sent to the requesting processor, which becomes the new owner. Sharers is set to identity of new owner, and state of block is made Exclusive. 03/24/19 64
View full slide show




Creative Commons Licenses     Attribution. You let others copy, distribute, display, and perform your copyrighted work — and derivative works based upon it — but only if they give credit the way you request. Noncommercial. You let others copy, distribute, display, and perform your work — and derivative works based upon it — but for noncommercial purposes only. No Derivative Works. You let others copy, distribute, display, and perform only verbatim copies of your work, not derivative works based upon it. Share Alike. You allow others to distribute derivative works only under a license identical to the license that governs your work.
View full slide show




Question - books.c • Write a program to define a structure called Book. The Book structure should have a title, author, subject and a book id as attributes. • Write a function printBook(struct Books *book) that print book details: • E.g Book title : C Programming Book author : Sam Anders Book subject : C Programming [email protected] 117 ~/CS310/ch02]$ ./books Book book_id : 6495407 Book title : C Programming • In theBook main function declare and initialize 2 books and print author : Sam Anders Book subject : C Programming Tutorial their details: Book book_id : 6495407 Book Book Book Book title : Telecom Billing author : Sara Smith subject : Telecom Billing Tutorial book_id : 6495700 Copyright © 2017 by Jones & Bartlett Learning, LLC an Ascend Learning Company
View full slide show




State Diagram Reading commands Initialization turn copier “on“ system status=“not ready” display msg =“please wait” display status =blinking subsystems ready entry/ switch machine on do: run diagnostics do: initiate all subsystems not jammed system status=“Ready” display msg =“enter cmd” display status =steady paper full entry/ subsystems ready do: poll user input panel do: read user input do: interpret user input turn copier “off” start copies Making copies system status=“Copying” display msg=“copy count =” display message=#copies display status=steady entry/ start copies do: manage copying do: monitor paper tray do: monitor paper flow copies complete paper tray empty paper jammed problem diagnosis system status=“J ammed” display msg=“paper jam” display message=location display status=blinking load paper system status=“load paper” display msg=“load paper” display status=blinking entry/ paper empty do: lower paper tray do: monitor fill switch do: raise paper tray not jammed entry/ paper jammed do: determine location do: provide correctivemsg. do: interrupt making copies Figure Need 7.6 Preliminary UML state diagram a photocopier You Know No for Specifics This Diagram 
View full slide show




Helpful SAP Transaction Codes SAP Transaction Code Description ZCOA_BO Chart of Accounts ZSACCTSEC Security for Accounts ZSUSERSEC ZFMRP_RFFMEP1AX User Security Funded Program Budget Actual Report Statistical Orders: Actual Line Items Document Journal-All Postings Report ZOPEN_ENCUMBRANCE Current Open Encumbrance Report F.10 G/L Chart of Accounts S_KI4_38000034 Index of Commitment Items(GLs) FM5S FIFM: Display Fund KS03 Display Cost Center S_KI4_38000038 Index of Funds Centers KO03 Display Internal Order KOK5 Master Data List Internal Orders ZBUDACT Budget To Actual ZBUDGETBALANCE Budget Balance Report ZGMGRANTD Grants Master-Display Only Z_BUD_FP ZKOB1 SAP Security Role Budget Restricted Display General Financial Display Given to every person when they are given an SAP user account Budget Restricted Display Financial Restricted Display for Statistical Orders Budget Restricted Display or Grant Restricted Display Budget Restricted Display General Financial Display Budget Display General Financial Display General Financial Display Budget Display General Financial Display General Financial Display Budget Restricted Display Budget Restricted Display General Grant Display
View full slide show