Join David Gassner for an in-depth discussion in this video Calculating statistics for a range of dates, part of Code Clinic: C#.
…So far I've described how I configured my web service, and how I wrote the code…to get the data and then format it as JSON to send back to the requester.…Now I'll describe how I'm handling the aggregation of…values for more than one date at a time.…And for this, I'll go to the GetData method of the feed manager class.…Just as with the Console application, I have these…three constants, Wind Speed, Barometric Pressure and Air Temperature.…And each time the GetData method is called, I'm using the start date, the…end date, and the data type to go get the data from the cache.…
Now this is a different condition than the console application.…Remember in my introduction I said I didn't want to do all…these operations synchronously in the web service, so in this code I've established…a rule that says if any particular combination of date and data…type isn't represented in my local data cache, I won't try to respond.…Instead, I'll just throw an exception.…And because the code that you see starting at line…33 isn't wrapped in a try catch block, the exception…
Author
Updated
12/16/2014Released
7/15/2014David introduces challenges and then provides an overview of his solutions in C#. Challenges include topics such as statistical analysis, searching directories for images, and accessing peripheral devices.
Visit other courses in the series to see how to solve the exact same challenges in languages like C++, Java, PHP, Python, and Ruby.
Skill Level Intermediate
Duration
Views
Q: Why can't I access the Lake Pend Orielle site (http://lpo.dt.navy.mil)?
A: The Lake Pend Orielle site is not accessible in some geographical areas. We have contacted the owner of the server to try to resolve this issue.
Q: I am unable to access the Lake Pend Oreille data from outside the U.S.
A: A static copy of this data is provided here for lynda.com members outside of the U.S
Related Courses
-
Code Clinic: PHP
with David Powers4h 44m Intermediate -
Code Clinic: Python
with Barron Stone2h 23m Intermediate -
Code Clinic: Ruby
with Kevin Skoglund5h 42m Intermediate
-
Introduction
-
Welcome1m 2s
-
Using the exercise files2m 15s
-
-
Problem One: Statistical Analysis
-
Overview of my solution6m 59s
-
Problem Two: Image Analysis
-
Identify the image subset3m 31s
-
-
Problem Three: Eight Queens
-
Overview of my solution5m 3s
-
Building the user interface2m 51s
-
Displaying the solutions4m 45s
-
Problem Four: Accessing Peripherals
-
Overview of my solution5m 37s
-
Playing system sounds3m 59s
-
Problem Five: Recursion and Directories
-
Overview of my solution6m 18s
-
Displaying the results2m 33s
-
Problem Six: Building the Web
-
Overview of my solution4m 22s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Calculating statistics for a range of dates