#12 Akeem Cherry

Open
akeemcherry wants to merge 1 commits from akeemcherry/JSON-Lab-2:master into master
8 changed files with 220 additions and 1 deletions
  1. 12
    0
      .idea/JSON-Lab-2.iml
  2. 4
    0
      .idea/encodings.xml
  3. 6
    0
      .idea/misc.xml
  4. 8
    0
      .idea/modules.xml
  5. 6
    0
      .idea/vcs.xml
  6. 162
    0
      .idea/workspace.xml
  7. 2
    1
      index.html
  8. 20
    0
      movies.js

+ 12
- 0
.idea/JSON-Lab-2.iml View File

@@ -0,0 +1,12 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<module type="WEB_MODULE" version="4">
3
+  <component name="NewModuleRootManager">
4
+    <content url="file://$MODULE_DIR$">
5
+      <excludeFolder url="file://$MODULE_DIR$/.tmp" />
6
+      <excludeFolder url="file://$MODULE_DIR$/temp" />
7
+      <excludeFolder url="file://$MODULE_DIR$/tmp" />
8
+    </content>
9
+    <orderEntry type="inheritedJdk" />
10
+    <orderEntry type="sourceFolder" forTests="false" />
11
+  </component>
12
+</module>

+ 4
- 0
.idea/encodings.xml View File

@@ -0,0 +1,4 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="Encoding" addBOMForNewFiles="with NO BOM" />
4
+</project>

+ 6
- 0
.idea/misc.xml View File

@@ -0,0 +1,6 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="JavaScriptSettings">
4
+    <option name="languageLevel" value="ES6" />
5
+  </component>
6
+</project>

+ 8
- 0
.idea/modules.xml View File

@@ -0,0 +1,8 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ProjectModuleManager">
4
+    <modules>
5
+      <module fileurl="file://$PROJECT_DIR$/.idea/JSON-Lab-2.iml" filepath="$PROJECT_DIR$/.idea/JSON-Lab-2.iml" />
6
+    </modules>
7
+  </component>
8
+</project>

+ 6
- 0
.idea/vcs.xml View File

@@ -0,0 +1,6 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="VcsDirectoryMappings">
4
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+  </component>
6
+</project>

+ 162
- 0
.idea/workspace.xml View File

@@ -0,0 +1,162 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ChangeListManager">
4
+    <list default="true" id="a7391be9-a3c3-43eb-bce9-efc02b29bc4c" name="Default Changelist" comment="">
5
+      <change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
6
+      <change afterPath="$PROJECT_DIR$/movies.js" afterDir="false" />
7
+      <change beforePath="$PROJECT_DIR$/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/index.html" afterDir="false" />
8
+    </list>
9
+    <ignored path="$PROJECT_DIR$/.tmp/" />
10
+    <ignored path="$PROJECT_DIR$/temp/" />
11
+    <ignored path="$PROJECT_DIR$/tmp/" />
12
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
13
+    <option name="SHOW_DIALOG" value="false" />
14
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
15
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
16
+    <option name="LAST_RESOLUTION" value="IGNORE" />
17
+  </component>
18
+  <component name="FileEditorManager">
19
+    <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
20
+      <file pinned="false" current-in-tab="true">
21
+        <entry file="file://$PROJECT_DIR$/movies.js">
22
+          <provider selected="true" editor-type-id="text-editor">
23
+            <state relative-caret-position="120">
24
+              <caret line="8" column="34" selection-start-line="8" selection-start-column="34" selection-end-line="8" selection-end-column="34" />
25
+            </state>
26
+          </provider>
27
+        </entry>
28
+      </file>
29
+      <file pinned="false" current-in-tab="false">
30
+        <entry file="file://$PROJECT_DIR$/index.html">
31
+          <provider selected="true" editor-type-id="text-editor">
32
+            <state relative-caret-position="105">
33
+              <caret line="7" column="7" lean-forward="true" selection-start-line="7" selection-start-column="7" selection-end-line="7" selection-end-column="7" />
34
+            </state>
35
+          </provider>
36
+        </entry>
37
+      </file>
38
+    </leaf>
39
+  </component>
40
+  <component name="FileTemplateManagerImpl">
41
+    <option name="RECENT_TEMPLATES">
42
+      <list>
43
+        <option value="JavaScript File" />
44
+      </list>
45
+    </option>
46
+  </component>
47
+  <component name="Git.Settings">
48
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
49
+  </component>
50
+  <component name="IdeDocumentHistory">
51
+    <option name="CHANGED_PATHS">
52
+      <list>
53
+        <option value="$PROJECT_DIR$/index.js" />
54
+        <option value="$PROJECT_DIR$/index.html" />
55
+        <option value="$PROJECT_DIR$/movies.js" />
56
+      </list>
57
+    </option>
58
+  </component>
59
+  <component name="ProjectFrameBounds">
60
+    <option name="x" value="10" />
61
+    <option name="y" value="44" />
62
+    <option name="width" value="1260" />
63
+    <option name="height" value="675" />
64
+  </component>
65
+  <component name="ProjectView">
66
+    <navigator proportions="" version="1">
67
+      <foldersAlwaysOnTop value="true" />
68
+    </navigator>
69
+    <panes>
70
+      <pane id="ProjectPane">
71
+        <subPane>
72
+          <expand>
73
+            <path>
74
+              <item name="JSON-Lab-2" type="b2602c69:ProjectViewProjectNode" />
75
+              <item name="JSON-Lab-2" type="462c0819:PsiDirectoryNode" />
76
+            </path>
77
+          </expand>
78
+          <select />
79
+        </subPane>
80
+      </pane>
81
+      <pane id="Scope" />
82
+    </panes>
83
+  </component>
84
+  <component name="PropertiesComponent">
85
+    <property name="WebServerToolWindowFactoryState" value="false" />
86
+    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
87
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
88
+    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
89
+  </component>
90
+  <component name="RunDashboard">
91
+    <option name="ruleStates">
92
+      <list>
93
+        <RuleState>
94
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
95
+        </RuleState>
96
+        <RuleState>
97
+          <option name="name" value="StatusDashboardGroupingRule" />
98
+        </RuleState>
99
+      </list>
100
+    </option>
101
+  </component>
102
+  <component name="SvnConfiguration">
103
+    <configuration />
104
+  </component>
105
+  <component name="TaskManager">
106
+    <task active="true" id="Default" summary="Default task">
107
+      <changelist id="a7391be9-a3c3-43eb-bce9-efc02b29bc4c" name="Default Changelist" comment="" />
108
+      <created>1543444831534</created>
109
+      <option name="number" value="Default" />
110
+      <option name="presentableId" value="Default" />
111
+      <updated>1543444831534</updated>
112
+      <workItem from="1543444833008" duration="1316000" />
113
+      <workItem from="1543533910816" duration="2713000" />
114
+    </task>
115
+    <servers />
116
+  </component>
117
+  <component name="TimeTrackingManager">
118
+    <option name="totallyTimeSpent" value="4029000" />
119
+  </component>
120
+  <component name="ToolWindowManager">
121
+    <frame x="10" y="44" width="1260" height="675" extended-state="0" />
122
+    <editor active="true" />
123
+    <layout>
124
+      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.24939467" />
125
+      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
126
+      <window_info id="Favorites" order="2" side_tool="true" />
127
+      <window_info anchor="bottom" id="Message" order="0" />
128
+      <window_info anchor="bottom" id="Find" order="1" />
129
+      <window_info anchor="bottom" id="Run" order="2" />
130
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
131
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
132
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
133
+      <window_info anchor="bottom" id="TODO" order="6" />
134
+      <window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
135
+      <window_info anchor="bottom" id="Version Control" order="8" />
136
+      <window_info anchor="bottom" id="Terminal" order="9" />
137
+      <window_info anchor="bottom" id="Event Log" order="10" side_tool="true" />
138
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
139
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
140
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
141
+    </layout>
142
+  </component>
143
+  <component name="TypeScriptGeneratedFilesManager">
144
+    <option name="version" value="1" />
145
+  </component>
146
+  <component name="editorHistoryManager">
147
+    <entry file="file://$PROJECT_DIR$/index.html">
148
+      <provider selected="true" editor-type-id="text-editor">
149
+        <state relative-caret-position="105">
150
+          <caret line="7" column="7" lean-forward="true" selection-start-line="7" selection-start-column="7" selection-end-line="7" selection-end-column="7" />
151
+        </state>
152
+      </provider>
153
+    </entry>
154
+    <entry file="file://$PROJECT_DIR$/movies.js">
155
+      <provider selected="true" editor-type-id="text-editor">
156
+        <state relative-caret-position="120">
157
+          <caret line="8" column="34" selection-start-line="8" selection-start-column="34" selection-end-line="8" selection-end-column="34" />
158
+        </state>
159
+      </provider>
160
+    </entry>
161
+  </component>
162
+</project>

+ 2
- 1
index.html View File

@@ -4,6 +4,7 @@
4 4
     <meta charset="UTF-8">
5 5
     <link href="./css/style.css" type="text/css" rel="stylesheet">
6 6
     <title>Import Local JSON Data | Zipcode Wilmington</title>
7
+    <script src="movies.js"></script>
7 8
 </head>
8 9
 <body>
9 10
     <header class="main-header group">
@@ -34,9 +35,9 @@
34 35
         <p>Append <code>"&ltbr&gt"</code> to output code to create a new line</p>
35 36
     </article>
36 37
 
37
-    <section>
38 38
     	<h1>Movie Information</h1>
39 39
     	<div id="result"></div>
40
+        <br><br>
40 41
     </section>
41 42
 </body>
42 43
 </html>

+ 20
- 0
movies.js View File

@@ -0,0 +1,20 @@
1
+var request = new XMLHttpRequest();
2
+request.open("GET", "https://data.sfgov.org/api/views/yitu-d5am/rows.json?accessType=DOWNLOAD", true);
3
+request.onreadystatechange = function () {
4
+    let data;
5
+    if ((request.status === 200 && request.readyState === 4)) {
6
+        data = JSON.parse(request.response);
7
+        var movieData = data.data;
8
+        let output = "Movies Filmed at the Golden Gate Bridge <br><br>";
9
+        for (let i = 0; i < movieData.length; i++) {
10
+            if (movieData[i][10] === "Golden Gate Bridge") {
11
+                var tempMovie = movieData[i];
12
+                output += "Movie Title: " + tempMovie[8] + "<br>";
13
+                output += "Release Year: " + tempMovie[9] + "<br>";
14
+                output += "Production Co.: " + tempMovie[12] + "<br><br>";
15
+            }
16
+        }
17
+        document.getElementById("result").innerHTML = output;
18
+    }
19
+};
20
+request.send();