Find Jobs
Hire Freelancers

Weather in VB.net Code

$31 USD

Zrušeno
Zveřejněno před více než 11 roky

$31 USD

Zaplaceno při doručení
Introduction Every time I wanted to use a weather forecast for my site, I found it too confusing. Each method I found had problems - some of the weather forecast Web services did not work properly. Eventually I noticed that Yahoo! has an RSS for its weather forecast. I decided to make a program to use that in my site and I created a class for it! I hope it will be useful for others who want to have weather forecasts in their programs. Yahoo! Weather RSS feed The Yahoo! Weather RSS feed enables you to get up-to-date weather information for your location. You can save this feed in My Yahoo! or your favorite feed aggregate. You can also incorporate the RSS data into your own Web site or client application. The Yahoo! Weather RSS feed is a dynamically-generated feed that is based on zip code or Location ID. RSS Request The Yahoo! Weather RSS feed request follows simple HTTP GET syntax: start with a base URL and then add parameters and values after a question mark (?). Multiple parameters are separated by an ampersand (&). There are two parameters for Weather RSS: p for location u for degrees units (Fahrenheit or Celsius) RSS Response The Yahoo! Weather RSS feed is an XML document that conforms to RSS 2.0 specifications. RSS is an XML document containing: a single channel element representing the feed, several elements containing metadata about the feed itself, and one or more item elements describing individual items within the feed. You can find all information about these elements on the Yahoo Developer page here. As it is represented in an XML document, we can convert it to classes by XML Serialization in .NET. Understanding XML Serialization in the .NET Framework XML Serialization enables you to convert common language runtime objects into XML documents or streams, and vise versa. XML Serialization makes it possible to convert XML documents into such a meaningful format that all programming languages can process the converted documents without any difficulty. You don't need to know much about XML Serialization to use this code, but it can help you to change or customize it yourself. Using the Code Using this code is as simple as making an instance of it and then sending its required parameters (Yahoo! Weather RSS parameters) to its constructor. The first parameter is US zip code or Location ID. The second one is Units for temperature. Send "f" for Fahrenheit or "c" for Celsius and then you can use it! Like this: Collapse | Copy Code Dim t As New clsWeather("JoXX" & Format([login to view URL] + 1, "0000"), "c") [login to view URL] = [login to view URL] & "?" [login to view URL] = [login to view URL]([login to view URL]) & " Weather " [login to view URL] = [login to view URL] & "?" [login to view URL] = [login to view URL] [login to view URL] = [login to view URL] [login to view URL] = [login to view URL] [login to view URL] = [login to view URL] [login to view URL] = CInt(Val([login to view URL])) & " kph" [login to view URL] = [login to view URL]([login to view URL])
IČ projektu: 2432750

O projektu

Vzdálený projekt
Aktivní před 12 roky

Chcete si vydělat nějaké peníze?

Výhody podávání nabídek na Freelancer

Stanovte si rozpočet a časový rámec
Získejte za svou práci zaplaceno
Načrtněte svůj návrh
Registrace a podávání nabídek je zdarma

O klientovi

Pochází z JORDAN
Jordan
0,0
0
Členem od čvn 23, 2012

Ověření klienta

Díky! Poslali jsme vám e-mailem odkaz pro získání kreditu zdarma.
Při odesílání e-mailu se něco pokazilo. Zkuste to prosím znovu.
Registrovaných uživatelů Zveřejněných projektů
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Načítání náhledu
Bylo uděleno povolení ke geolokaci.
Vaše doba přihlášení vypršela a byli jste odhlášeni. Přihlaste se znovu.