In the case of a certain swift foundation, let us do some small programs to practice practiced hand, today to try to do a simple weather forecast. Create a new project, named Weather, and then go online to find a weather forecast API, Baidu search "
Weather forecast is a very useful service. If you can integrate the weather forecast on your website, you can query it easily.
I searched all the meteorological sites in China and did not find any web service. I was too stingy to go abroad. NOAA (Www.weather.gov) Provides a Web service, but cannot connect to the server
Currently, there are many websites that provide weather forecast services. Generally, they are used directly on their own websites. Some websites provide Web service interfaces.
Common Regular Expressions:The common method to reference weather forecasts is to use regular expressions to parse the weather forecas
);Counthtml = Innerhtml. indexof ( " BR " );Innerhtml = Innerhtml. Remove (counthtml - 1 , Innerhtml. Length - Counthtml). Trim ( " \ N " . Tochararray ()); String [] Result = Innerhtml. Split ( " , " . Tochararray ());Innerhtml = Result [ 1 ]; Return Innerhtml;}
Conclusion: The extraction and analysis of the above steps can extract almost all the desired data. The rest is the preparation and beautification of the front-end page.
Test address
Simply add
Use WebService to call Sina's weather forecast function
Use WebService to query weather forecastsThis is the weather web service.Code, Transferred from the book.1. Add a "Web Service" under the root directory of the website and name it "Weather". Be sure not to build the AS
Android weather forecast application design (2) III. Detailed Design
In this article, we refer. In addition, during source code analysis, only schematic and Structured code is selected for analysis. The complete source code of the program can be downloaded at http://download.csdn.net/detail/frankxuanhui/3593051.
(1) multi-thread processing of Weather Information
Previously, the content on other websites was automatically updated every day. I think this technology is amazing.I 've been wondering why their website is not big and it's impossible to have my own weather forecast center,However, the weather forecast is automatically updated every day, and we know from others that it
Weather forecast
265 Weather Forecast code:
[Ctrl + A ALL SELECT hint: You can modify some of the code, and then run]
QQ Weather Forecast Code (i):
[Ctrl + A ALL SELECT hint: You can modify some of the code, and then run]
QQ
Recent sneak in, engaged in a few days Python crawler, basic can achieve conventional network data crawling, such as embarrassing encyclopedia, Watercress film review, NBA data, stock data, weather, etc. crawl, the whole process is actually relatively simple, there are some html+css+dom trees and other knowledge is easy, I'm going to take the weather forecast as
Recently, there is a project demand for the micro-letter public number to increase the function of the weather forecast, using the vehicle networking API Baidu V3.0 in the weather query function to achieve. First of all, the final effect chart:
Project requirements: There is a good link between the micro-letter platform, Baidu registered account number, the ne
1. Free WebService Address: http://www.webxml.com.cn/zh_cn/index.aspxThere are many Web services such as weather forecast, cell phone attribution query and so on.2. Invoke the Weather forecast service example:Generate the client code using the Wsimport command that comes with the JDK:Wsimport-keep http://webservice.web
Ajax obtains data by city name (National Weather Forecast API) and ajaxapi
Preview a chart (relatively simple and rough)
Aggregate Data National Weather Forecast interface: https://www.juhe.cn/docs/api/id/39
Interface address: http://v.juhe.cn/weather/indexSupported formats
I believe many of my friends like to order some mobile phones.Weather ForecastAnd other short message services, but theseWeather ForecastAll pay-as-you-go instances. Although the price is not expensive, they are free and stable.Weather forecast text message subscriptionHow nice it is!
Google GoogleAfter entering the Chinese market, we are constantly striving to provide some localized services.GoogleWe launched our own completely free text message su
Get the weather forecast of Xujiahui and Xujiahui
Code:
-(Void) viewDidLoad {[super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. [self getWeatherInfo];} // obtain the weather forecast of Xujiahui-(void) getWeatherInfo {NSError * error; NSURLRequest * request = [NSURLRequest re
Previously saw people on the site of the content is automatically updated every day, think this technology is magical.
Also have been wondering why their website is not big, it is impossible to have their own forecast center,
But the weather forecast is automatically updated every day, and then learned from others, it is because there is a thief program this thin
First, the project shows the following results:Project Source code:Http://yunpan.cn/cZVWIieuFyK9I Access Password 2EACsecond, using the Aggregation Data SDK:(1) Aggregated data official website address: http://www.juhe.cn/(2) Register your account-Create a new app (in the Personal Center page-Data Center-request data) – Fill in your application – Find categories – weather forecast – National
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.