Small accumulation, weather forecast ~, Accumulate Weather Forecast

Source: Internet
Author: User

Small accumulation, weather forecast ~, Accumulate Weather Forecast

Today, I saw that the web Service of the company's original website weather forecast seems dead, and then I took the time to read it myself. Although this function seems simple, for me, however, it is also a kind of accumulation. Code:

Front-end:
<Head runat = "server"> <title> weather forecast ~ </Title> 

The front-end page is very rough. I know that it mainly refers to the implementation process of this function:

Background:
Protected void Page_Load (object sender, EventArgs e) {if (! IsPostBack) {disp_weather ("Beijing") ;}} public void Btn_Tijiao_Click (object sender, EventArgs e) {string diming = TB_DIMING.Text.Trim (); if (diming! = "") Disp_weather (diming);} private void disp_weather (string city) {try {string [] arrAy = null; ArrayList weather = Bnn_Weather.Get_3day_weather (city); if (weather. count> 0) {DateTime dt = Convert. toDateTime (weather [3]. toString (); Literal5.Text = weather [5]. toString (). replace ("Air Quality:", ""); arrAy = weather [7]. toString (). split (''); Literal2.Text = arrAy [1]. toString (); Literal3.Text = weather [8]. toString (); Literal4.Text = weather [9]. toString (); if (weather [10]. toString () = weather [11]. toString () {Literal1.Text = "  alert ('your city cannot be found ') </script> ");}} public class Bnn_Weather {public static ArrayList Get_3day_weather (string CityName) {try {// interface address: http://webservice.webxml.com.cn/WebServices/WeatherWS.asmx WeatherWS wc = new WeatherWS (); string [] strarr = wc. getWeather (CityName, ""); ArrayList list = new ArrayList (); int listLength = strarr. length; if (listLength> 0) {for (int I = 0; I <listLength; I ++) {list. add (strarr [I]) ;}} return list ;}catch (Exception e) {throw ;}}}

Before Baidu an example is to add a WebService in the project, and then my colleagues told me that a method is through the command prompt tool in VS2010: WSDL http://webservice.webxml.com.cn/WebServices/WeatherWS.asmx and then will locally output a class file, the nature is the same, but I don't know.

Accumulating ....

By the way, you can append the required weather image in the image:

Http://files.cnblogs.com/houlin/tqimg.zip


Where did the weather forecast start?

A long time ago, since the birth of mankind, we have suffered from bad weather. We always wanted to forecast the weather one day. However, this kind of effort is not successful.
The turning of things occurred in the November 14, 1854 s of the Crimea war. The British and French combined fleet and Russia fought in the Black Sea. When the joint ship captured the port and was about to log on, a wind volume of 11 ~ The 12-level storm struck more than 30 ships, including the French flagship ship, in the united ship, causing serious damage. Afterwards, the Paris Observatory chief lefarié was commissioned to investigate the ins and outs of the storm. He sent a mail to meteorologists from various countries to collect information from ~ 5-day weather report on the 16th day. A total of 250 replies were received. He entered the data on a map (the weather map later) and found that the storm moved regularly from the east to the south, causing disasters in France and Spain one or two days ago. Therefore, in March 19, 1855, he made a report at the French Emy of sciences. It was suggested to organize a meteorological station network and use a telegram (invented at the time) to centralize them in one place. By analyzing the chart, we can predict the future path of the storm. In 1856, France first achieved weather forecast and set up a storm warning business. This is the first country in the world to take meteorological work as a national undertaking. By the end of the 19th century, 21 countries around the world have established specialized meteorological institutions. China was in 1906.
The need of society is a powerful motive force for scientific development. Although meteorological disasters keep planting seeds for themselves to conquer themselves (weather forecasts), this seeds cannot sprout at will. For example, in ancient China, agricultural land was built, and farming also needed weather forecasts. China has become one of the most meteorological disasters in the world due to the monsoon climate with great annual variability. However, the weather map forecast was not first born in China.
Originally, in philosophy, even if the society needs to be very strong, it is only an external cause. External factors must take effect through internal factors to convert conflicts and generate weather forecasts. Of course, for the purpose of farming and life, China has also accumulated a wealth of weather (forecast) sayings and experiences for thousands of years. However, since there is no scientific theory, and there is no modern meteorological instrument observation, the forecasting factor cannot be quantified, so it can only stay in the qualitative empirical stage. Western countries have a pressure gauge, and a pressure value. With a pressure value, they have an equal pressure line, a weather map, and a weather forecast.
 
When did the weather forecast start?

Since its birth, humans have suffered from bad weather, and they always want to forecast the weather one day. However, this kind of effort is not successful.
The turning of things occurred in the November 14, 1854 s of the Crimea war. The British and French combined fleet and Russia fought in the Black Sea. When the joint ship captured the port and was about to log on, a wind volume of 11 ~ The 12-level storm struck more than 30 ships, including the French flagship ship, in the united ship, causing serious damage. Afterwards, the Paris Observatory chief lefarié was commissioned to investigate the ins and outs of the storm. He sent a mail to meteorologists from various countries to collect information from ~ 5-day weather report on the 16th day. A total of 250 replies were received. He entered the data on a map (the weather map later) and found that the storm moved regularly from the east to the south, causing disasters in France and Spain one or two days ago. Therefore, in March 19, 1855, he made a report at the French Emy of sciences. It was suggested to organize a meteorological station network and use a telegram (invented at the time) to centralize them in one place. By analyzing the chart, we can predict the future path of the storm. In 1856, France first achieved weather forecast and set up a storm warning business. This is the first country in the world to take meteorological work as a national undertaking. By the end of the 19th century, 21 countries around the world have established specialized meteorological institutions. China was in 1906.
The need of society is a powerful motive force for scientific development. Although meteorological disasters keep planting seeds for themselves to conquer themselves (weather forecasts), this seeds cannot sprout at will. For example, in ancient China, agricultural land was built, and farming also needed weather forecasts. China has become one of the most meteorological disasters in the world due to the monsoon climate with great annual variability. However, the weather map forecast was not first born in China.
Originally, in philosophy, even if the society needs to be very strong, it is only an external cause. External factors must take effect through internal factors to convert conflicts and generate weather forecasts. Of course, for the purpose of farming and life, China has also accumulated a wealth of weather (forecast) sayings and experiences for thousands of years. However, since there is no scientific theory, and there is no modern meteorological instrument observation, the forecasting factor cannot be quantified, so it can only stay in the qualitative empirical stage. Western countries have a pressure gauge, and a pressure value. With a pressure value, they have an equal pressure line, a weather map, and a weather forecast.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.