Seth 7 лет назад
Родитель
Сommit
852be56180
7 измененных файлов: 315 добавлений и 0 удалений
  1. 9
    0
      .idea/JSON-Lab-2.iml
  2. 6
    0
      .idea/misc.xml
  3. 8
    0
      .idea/modules.xml
  4. 6
    0
      .idea/vcs.xml
  5. 258
    0
      .idea/workspace.xml
  6. 1
    0
      index.html
  7. 27
    0
      movies.js

+ 9
- 0
.idea/JSON-Lab-2.iml Просмотреть файл

@@ -0,0 +1,9 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<module type="JAVA_MODULE" version="4">
3
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
4
+    <exclude-output />
5
+    <content url="file://$MODULE_DIR$" />
6
+    <orderEntry type="inheritedJdk" />
7
+    <orderEntry type="sourceFolder" forTests="false" />
8
+  </component>
9
+</module>

+ 6
- 0
.idea/misc.xml Просмотреть файл

@@ -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 Просмотреть файл

@@ -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 Просмотреть файл

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

+ 258
- 0
.idea/workspace.xml Просмотреть файл

@@ -0,0 +1,258 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ChangeListManager">
4
+    <list default="true" id="96853faa-e59e-4f05-ad93-b7fee7bddcff" 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
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
10
+    <option name="SHOW_DIALOG" value="false" />
11
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
12
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
13
+    <option name="LAST_RESOLUTION" value="IGNORE" />
14
+  </component>
15
+  <component name="FUSProjectUsageTrigger">
16
+    <session id="-558510518">
17
+      <usages-collector id="statistics.lifecycle.project">
18
+        <counts>
19
+          <entry key="project.open.time.1" value="1" />
20
+          <entry key="project.opened" value="1" />
21
+        </counts>
22
+      </usages-collector>
23
+      <usages-collector id="statistics.file.extensions.open">
24
+        <counts>
25
+          <entry key="html" value="1" />
26
+          <entry key="js" value="1" />
27
+          <entry key="ts" value="1" />
28
+          <entry key="xml" value="1" />
29
+        </counts>
30
+      </usages-collector>
31
+      <usages-collector id="statistics.file.types.open">
32
+        <counts>
33
+          <entry key="HTML" value="1" />
34
+          <entry key="JavaScript" value="1" />
35
+          <entry key="TypeScript" value="1" />
36
+          <entry key="XML" value="1" />
37
+        </counts>
38
+      </usages-collector>
39
+      <usages-collector id="statistics.file.extensions.edit">
40
+        <counts>
41
+          <entry key="html" value="7" />
42
+          <entry key="js" value="552" />
43
+        </counts>
44
+      </usages-collector>
45
+      <usages-collector id="statistics.file.types.edit">
46
+        <counts>
47
+          <entry key="HTML" value="7" />
48
+          <entry key="JavaScript" value="552" />
49
+        </counts>
50
+      </usages-collector>
51
+    </session>
52
+  </component>
53
+  <component name="FileEditorManager">
54
+    <leaf>
55
+      <file pinned="false" current-in-tab="false">
56
+        <entry file="file://$PROJECT_DIR$/index.html">
57
+          <provider selected="true" editor-type-id="text-editor">
58
+            <state relative-caret-position="585">
59
+              <caret line="39" column="37" selection-start-line="39" selection-start-column="37" selection-end-line="39" selection-end-column="37" />
60
+            </state>
61
+          </provider>
62
+        </entry>
63
+      </file>
64
+      <file pinned="false" current-in-tab="true">
65
+        <entry file="file://$PROJECT_DIR$/movies.js">
66
+          <provider selected="true" editor-type-id="text-editor">
67
+            <state relative-caret-position="210">
68
+              <caret line="14" column="18" selection-start-line="14" selection-start-column="18" selection-end-line="14" selection-end-column="18" />
69
+            </state>
70
+          </provider>
71
+        </entry>
72
+      </file>
73
+    </leaf>
74
+  </component>
75
+  <component name="FileTemplateManagerImpl">
76
+    <option name="RECENT_TEMPLATES">
77
+      <list>
78
+        <option value="JavaScript File" />
79
+      </list>
80
+    </option>
81
+  </component>
82
+  <component name="Git.Settings">
83
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
84
+  </component>
85
+  <component name="IdeDocumentHistory">
86
+    <option name="CHANGED_PATHS">
87
+      <list>
88
+        <option value="$PROJECT_DIR$/index.html" />
89
+        <option value="$PROJECT_DIR$/movies.js" />
90
+      </list>
91
+    </option>
92
+  </component>
93
+  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
94
+  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
95
+  <component name="JsGulpfileManager">
96
+    <detection-done>true</detection-done>
97
+    <sorting>DEFINITION_ORDER</sorting>
98
+  </component>
99
+  <component name="ProjectFrameBounds" extendedState="6">
100
+    <option name="y" value="23" />
101
+    <option name="width" value="1440" />
102
+    <option name="height" value="807" />
103
+  </component>
104
+  <component name="ProjectView">
105
+    <navigator proportions="" version="1">
106
+      <foldersAlwaysOnTop value="true" />
107
+    </navigator>
108
+    <panes>
109
+      <pane id="Scope" />
110
+      <pane id="PackagesPane" />
111
+      <pane id="ProjectPane">
112
+        <subPane>
113
+          <expand>
114
+            <path>
115
+              <item name="JSON-Lab-2" type="b2602c69:ProjectViewProjectNode" />
116
+              <item name="JSON-Lab-2" type="462c0819:PsiDirectoryNode" />
117
+            </path>
118
+            <path>
119
+              <item name="JSON-Lab-2" type="b2602c69:ProjectViewProjectNode" />
120
+              <item name="JSON-Lab-2" type="462c0819:PsiDirectoryNode" />
121
+              <item name=".idea" type="462c0819:PsiDirectoryNode" />
122
+            </path>
123
+            <path>
124
+              <item name="JSON-Lab-2" type="b2602c69:ProjectViewProjectNode" />
125
+              <item name="JSON-Lab-2" type="462c0819:PsiDirectoryNode" />
126
+              <item name="css" type="462c0819:PsiDirectoryNode" />
127
+            </path>
128
+            <path>
129
+              <item name="JSON-Lab-2" type="b2602c69:ProjectViewProjectNode" />
130
+              <item name="JSON-Lab-2" type="462c0819:PsiDirectoryNode" />
131
+              <item name="images" type="462c0819:PsiDirectoryNode" />
132
+            </path>
133
+          </expand>
134
+          <select />
135
+        </subPane>
136
+      </pane>
137
+    </panes>
138
+  </component>
139
+  <component name="PropertiesComponent">
140
+    <property name="WebServerToolWindowFactoryState" value="false" />
141
+    <property name="aspect.path.notification.shown" value="true" />
142
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1543414142600" />
143
+    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
144
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
145
+    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
146
+    <property name="settings.editor.selected.configurable" value="preferences.lookFeel" />
147
+  </component>
148
+  <component name="RunDashboard">
149
+    <option name="ruleStates">
150
+      <list>
151
+        <RuleState>
152
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
153
+        </RuleState>
154
+        <RuleState>
155
+          <option name="name" value="StatusDashboardGroupingRule" />
156
+        </RuleState>
157
+      </list>
158
+    </option>
159
+  </component>
160
+  <component name="SvnConfiguration">
161
+    <configuration />
162
+  </component>
163
+  <component name="TaskManager">
164
+    <task active="true" id="Default" summary="Default task">
165
+      <changelist id="96853faa-e59e-4f05-ad93-b7fee7bddcff" name="Default Changelist" comment="" />
166
+      <created>1543411494809</created>
167
+      <option name="number" value="Default" />
168
+      <option name="presentableId" value="Default" />
169
+      <updated>1543411494809</updated>
170
+      <workItem from="1543411496769" duration="2361000" />
171
+    </task>
172
+    <servers />
173
+  </component>
174
+  <component name="TimeTrackingManager">
175
+    <option name="totallyTimeSpent" value="2361000" />
176
+  </component>
177
+  <component name="ToolWindowManager">
178
+    <frame x="0" y="23" width="1440" height="807" extended-state="6" />
179
+    <editor active="true" />
180
+    <layout>
181
+      <window_info id="Image Layers" />
182
+      <window_info id="Designer" />
183
+      <window_info id="UI Designer" />
184
+      <window_info id="Capture Tool" />
185
+      <window_info id="Favorites" side_tool="true" />
186
+      <window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.4993007" visible="true" weight="0.24964234" />
187
+      <window_info id="Structure" order="1" sideWeight="0.5006993" side_tool="true" visible="true" weight="0.24964234" />
188
+      <window_info anchor="bottom" id="Database Changes" show_stripe_button="false" />
189
+      <window_info anchor="bottom" id="Version Control" />
190
+      <window_info anchor="bottom" id="Terminal" />
191
+      <window_info anchor="bottom" id="Event Log" side_tool="true" />
192
+      <window_info anchor="bottom" id="Message" order="0" />
193
+      <window_info anchor="bottom" id="Find" order="1" />
194
+      <window_info anchor="bottom" id="Run" order="2" />
195
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
196
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
197
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
198
+      <window_info anchor="bottom" id="TODO" order="6" />
199
+      <window_info anchor="right" id="Palette" />
200
+      <window_info anchor="right" id="Theme Preview" />
201
+      <window_info anchor="right" id="Capture Analysis" />
202
+      <window_info anchor="right" id="Palette&#9;" />
203
+      <window_info anchor="right" id="Database" />
204
+      <window_info anchor="right" id="Maven Projects" />
205
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
206
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
207
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
208
+    </layout>
209
+  </component>
210
+  <component name="TypeScriptGeneratedFilesManager">
211
+    <option name="version" value="1" />
212
+  </component>
213
+  <component name="VcsContentAnnotationSettings">
214
+    <option name="myLimit" value="2678400000" />
215
+  </component>
216
+  <component name="editorHistoryManager">
217
+    <entry file="file://$PROJECT_DIR$/.idea/vcs.xml">
218
+      <provider selected="true" editor-type-id="text-editor" />
219
+    </entry>
220
+    <entry file="file://$PROJECT_DIR$/index.html">
221
+      <provider selected="true" editor-type-id="text-editor">
222
+        <state relative-caret-position="585">
223
+          <caret line="39" column="37" selection-start-line="39" selection-start-column="37" selection-end-line="39" selection-end-column="37" />
224
+        </state>
225
+      </provider>
226
+    </entry>
227
+    <entry file="file://$APPLICATION_HOME_DIR$/plugins/JavaScriptLanguage/jsLanguageServicesImpl/external/lib.dom.d.ts">
228
+      <provider selected="true" editor-type-id="text-editor">
229
+        <state relative-caret-position="222">
230
+          <caret line="10295" column="4" selection-start-line="10295" selection-start-column="4" selection-end-line="10295" selection-end-column="4" />
231
+        </state>
232
+      </provider>
233
+    </entry>
234
+    <entry file="file://$PROJECT_DIR$/movies.js">
235
+      <provider selected="true" editor-type-id="text-editor">
236
+        <state relative-caret-position="210">
237
+          <caret line="14" column="18" selection-start-line="14" selection-start-column="18" selection-end-line="14" selection-end-column="18" />
238
+        </state>
239
+      </provider>
240
+    </entry>
241
+  </component>
242
+  <component name="masterDetails">
243
+    <states>
244
+      <state key="ProjectJDKs.UI">
245
+        <settings>
246
+          <last-edited>1.8</last-edited>
247
+          <splitter-proportions>
248
+            <option name="proportions">
249
+              <list>
250
+                <option value="0.2" />
251
+              </list>
252
+            </option>
253
+          </splitter-proportions>
254
+        </settings>
255
+      </state>
256
+    </states>
257
+  </component>
258
+</project>

+ 1
- 0
index.html Просмотреть файл

@@ -37,6 +37,7 @@
37 37
     <section>
38 38
     	<h1>Movie Information</h1>
39 39
     	<div id="result"></div>
40
+        <script src="movies.js"></script>
40 41
     </section>
41 42
 </body>
42 43
 </html>

+ 27
- 0
movies.js Просмотреть файл

@@ -0,0 +1,27 @@
1
+let request = new XMLHttpRequest();
2
+let URL = "https://data.sfgov.org/api/views/yitu-d5am/rows.json?accessType=DOWNLOAD";
3
+
4
+
5
+request.open('GET', URL);
6
+let data;
7
+request.onreadystatechange = function () {
8
+    if ((request.status===200) && (request.readyState===4)){
9
+       // console.log(request.responseText);
10
+    data = JSON.parse(request.responseText);
11
+    let movies = data.data;
12
+
13
+    console.log(movies);
14
+
15
+    let output = '';
16
+    for (let i = 0; i<movies.length; i++) {
17
+        if (movies[i].includes('Golden Gate Bridge')){
18
+           output += 'Title:'  + movies[i][8] + '<br>';
19
+           output += 'Year Released: '+ movies[i][9] + "<br>";
20
+           output += 'Production Company: ' + movies[i][12] + '<br>';
21
+        }
22
+    }
23
+        document.getElementById('result').innerHTML = output;
24
+    }
25
+};
26
+
27
+request.send();