BackgroundWe need simple access to XML to parse XML documents. So you just have to know where the results are in the XML document code and then parse it. For example, in the following picture, we want to know about the weather in Sfax, Tunisia:
In the beginning, we need to specify the city or state where we want to know the weather.
The code is as follows
Copy Code
String C
Recent projects selected from the Chinese Weather network to take weather forecast data, API address is: http://www.weather.com.cn/data/cityinfo/101110101.html. 101110101 of which is the city's code, the specific needs of the city, the city code can be searched in Baidu.
At the beginning of the data to be taken to the Chinese and symbols are garbled, and finally through the following methods to solve. First
Modify the URL to get weather conditions in other cities
such as Guangzhou is:
Http://weather.yahoo.com/forecast/CHXX0037_c.html
Note only applies to get the weather forecast on Yahoo
The following are the referenced contents:Getweather.aspx-----------------------------------GetWeather.aspx.cs---------------------------------------Using System;Using System.Collections;Using System.ComponentModel;
First, there are a few things to prepare before preparing the program.1 First you need to adjust the Android DNS address. (I'll mention it at the end)http://www.eoeandroid.com/forum.php?mod=viewthreadtid=309756page=1#pid3230430The control of SMS SMS in 2Android. (I'll mention it at the end)http://blog.csdn.net/xieqibao/article/details/67487163 Android AK Code application, this Baidu AK can apply for itselfHere's an AK http://api.map.baidu.com/telematics/v3/w
The URL for obtaining the 72-hour weather forecast is:
Http://weather.all2rss.com/
For example:
The weather forecast for Shenzhen is:
Http://weather.all2rss.com/weatherrss.asp? City =% C9 % ee % db % da(Note: The red part can be replaced with the appropriate city HTML code)
RSS data is:
Then extract the corresponding data using the relevant programming language.
For example, get the
Today, a Web service interface was suddenly used to dockThink about it, Apache CXF can publish the service, you should also receive servicesThen went to try a bit, during the various mistakes of various helplessLater on-line a search, find out the following DongdongSuddenly there was a slap in the face of the impulse,Here is the weather interface provided by the National WeatherReturn to JSON format file, parse JSON file data to get what you wantInter
After Windows 7 is installed, the weather tool is not good. I have collected some repair methods on the Internet, and finally the repair is successful. I would like to share with you here.I searched for a modified ZH-CN on the Internet and released it to F: \ Program Files \ Windows Sidebar \ gadgets \ weather. in the gadget folder (my system disk is a f disk), that is, to replace the original ZH-CN folder,
Call the weather forecast interface to call the weather forecast
Solution 1:
The browser does not allow cross-origin access due to security restrictions. However, the PHP server is allowed. We can use the PHP file as a proxy and call the interface through PHP.
For detailed interface analysis, see: http://www.cnblogs.com/wangjingblogs/p/3192953.html
Return JSON format
PHP code
HTML code
Solution 2:
Fo
This article describes the Java call to the China Weather Network API to obtain weather information. Share to everyone for your reference. The implementation method is as follows:
An example of Harbin Ice Country weather API call weather Information private String GetWeatherInfo2 () {StringBuilder info = new Stri
After efforts to modify the Weather.js file, you can get the weather forecast in China!
It has been said by friends that the Chinese region cannot use the weather forecast because the Wlsrvc.dll file detects that the locale is set to China and returns 1506, indicating that "your current country or region does not support this service." "
In fact, if we enter the address directly in the browser can return to
Ink How transparent the weather:
We just click on the "Software" in the phone and then after we enter the "setting" effect as shown in the following image;
Then, after opening the entry, we click on the "personality function" effect as shown in the following image;
The desktop plugin default skin background to show completely transparent can!
Okay, this is a small series for you to organize an article on the ink
Cause Analysis: This problem occurs mainly because the Android system time and time zone are incorrect. We only need to set the system time correctly to solve this problem.Solution1. As shown in the following figure, no data is displayed. Now, click "settings" on the left, as shown in the following figure.Then, in the settings panel, we found "automatic date and time" and we canceled this.Then we will see the following settings in the entry date and time.Enter the date settin
Copy codeThe Code is as follows:Header ("content-type: text/html; charset = UTF-8 ");$ Weather = file_get_contents ("http://www.weather.com.cn/data/sk/101280601.html ");Echo $ weather;?>
Copy codeThe Code is as follows:Here is: The temperature is Wind direction: Wind power:
Copy Code code as follows:
Header ("Content-type:text/html;charset=utf-8");
$weather = file_get_contents ("http://www.weather.com.cn/data/sk/101280601.html");
Echo $weather;
?>
Copy Code code as follows:
Here are: The temperature is Wind Direction: Wind:
Free Windows and Linux VPS Providers 2017After surfing many days, I-finally found some VPS providers that give us VPS servers with free of charge without have to Pay anything.1. Desktone–vmware Horizon AirFree Windows and Linux VPS Providers 2016VMware Horizon offers 7-day free trial pack for Windows $
SolutionDuring VPs startup, stop, backup, recovery, and other typical operations, the VPs will be locked first.When the VPs is locked, the VPs cannot beProgramOperatedTo avoid conflicts between other operations and the current operationAfter the operation is completed, the lock is automatically released.
For example,
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.