Group Abstract Group Abstract

Message Boards Message Boards

Twogether: A webapp listing all the films given two actors

Posted 7 years ago
4 Replies

Thanks. I have a great nephew who is interested in learning to code. I sent the code to his parents so that they can see what can be done with very little work. I think that almost all the commands are covered in Stephen's book, which is where I will start him learning,

This looks awesome, thanks for sharing! But how does this work? It would be interesting to see the code. If you want to know how to post code - here is a guide: http://wolfr.am/READ-1ST

POSTED BY: Marina Shchitova

Here's the code:

CloudDeploy[
FormPage[{
{"actor1", "Name one movie star:"}-> Person,
{"actor2", "Name another movie star:"} -> Person
},
With[
{ movies=EntityClass["Movie", {EntityProperty["Movie", "Cast"] -> ContainsAll[{#actor1, #actor2}]}],
numMovies = Length[EntityList[movies]]
},
Grid[
Join[ {{"", "Title", "Poster", "Release Date"}}, 
Partition[
Flatten[
Riffle[
Range[numMovies],
EntityValue[movies,{"Name","Image", "ReleaseDate"}]
]
],
4],
1], 
Frame->All 
] 
]&,
AppearanceRules-> <|"Title" -> "Two-gether",
"Description" ->"Enter the names of any two actors, and get a list of all the movies they starred in together.",
"SubmitLabel" -> "Go!"|>,
PageTheme -> "Red"
],
"twogether",
Permissions -> "Public"]
Attachments:

Great. IMDB used to do this, but doesn't anymore.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard