作业帮 > 字数作文 > 教育资讯

www.weather.com.cn

来源:学生作业帮助网 编辑:作业帮 时间:2024/09/25 12:25:29 字数作文
www.weather.com.cn字数作文

篇一:天气预报

Android导入外部数据库解析json获取天气预报

2013-01-11 09:43:24 我来说两句 作者:yhm2046

收藏

我要投稿 运行界面:

1.修改了下之前的代码,不用导入数据库到/data/data/包名 文件夹下,直接放在/res/raw文件夹不会被二进制压缩

[java]

public static SQLiteDatabase openDatabase(Context context) {

try {

// Context context=new TestActivity();

String databaseFilename = DATABASE_PATH + "/" + DATABASE_FILENAME; File dir = new File(DATABASE_PATH);

if (!dir.exists()) // 如果文件夹不存在创建文件夹

{

dir.mkdir();

System.out.println("File build success");

}

if (!(new File(databaseFilename)).exists()) { // 如果文件不存在创建文件

InputStream is = context.getResources().openRawResource( R.raw.chinacity);

FileOutputStream fos = new FileOutputStream(databaseFilename); byte[] buffer = new byte[8192];

int count = 0;

while ((count = is.read(buffer)) > 0) {

fos.write(buffer, 0, count);

}

fos.close();

is.close();

}

db = SQLiteDatabase.openOrCreateDatabase(databaseFilename, null);

} catch (Exception e) {

e.printStackTrace();

}

if (db != null) {

System.out.println("db build success!");

} else {

System.out.println("db build failed!");

}

return db;

}

得到数据库:

[java]

JSON mJson = new JSON(MainActivity.this);

[java]

db = DBUtils.openDatabase(mContext);

2.连接网络:

[java]

private static String getConnection(String path)

throws MalformedURLException, IOException, ProtocolException { URL url = new URL(path);

try {

HttpURLConnection cn = (HttpURLConnection) url.openConnection(); cn.setConnectTimeout(5 * 1000);

cn.setRequestMethod("GET");

// System.out.println("stream=======" + cn.getInputStream());

InputStreamReader in = new InputStreamReader(cn.getInputStream()); // System.out.println("in======" + in);

// 流的应用与读取

BufferedReader bu = new BufferedReader(in);

String line = bu.readLine().toString();

System.out.println("流数据line========" + line);

bu.close();

in.close();

return line;

} catch (Exception e) {

// TODO Auto-generated catch block

e.printStackTrace();

System.out.println("查询失败,请检查网络...");

return null;

}

}

注:这里我试过所有华为手机都连接不了,其他的htl,中兴都可以,不知道什么原因

3.json获取数据,通过中央气象台的apt访问

使用.cn/data/sk/101010100.html获取当日天气的信息,打开网址可以看到文本信息如下(已经格式化过):

{"weatherinfo":

{"city":"北京”,

"cityid":"101010100”,

"temp":"-1”,

"WD":"北风”,

"WS":"3级”,

"SD":"18%”,

"WSE":"3”,

篇二:Weather的导与学

Weather的导与学

——深港版小学英语三年级BOOK 5

深圳市南山实验教育集团麒麟小学 徐红艳

【教学设计】

教学内容:

1. 本课时具体的教学内容为:

New words: hot cold wet dry

拓展单词为:sunny windy raining snowing

Sentence patterns: What’s the weather like?

What’s the weather like in --- (城市)? (拓展句型) It’s--- .(天气的形容词)

It’s --- and ---. (拓展句型)

2.该课时内容的重点:

掌握单词的标准发音:hot cold wet dry

学会用以下句型对话:What’s the weather like?

What’s the weather like in --- (城市)? It’s--- . / It’s --- and ---.

难点:学生能够实际运用所学的词句对天气情况进行描述,和同学讨论,把本课的词句整合做出完整的天气预报。

教学目标:

语言知识:1.能听懂,会说、会读、会拼天气的单词:

2.能听懂,会说、会用句型:

(学会使用并列形容词来描述天气情况)

语言技能: 1. 通过所学的知识,能在对话、游戏及小组活动中与同

学流利地进行语言的交流;

2.运用所学的语言知识能对天气情况进行描述。

情感态度:1.营造轻松和谐的英语学习氛围;

2.调动学生的积极性,鼓励他们大胆开口讲英语;

3.积极参与合作交流,共同完成学习任务;

4.发挥动手动脑能力,创造性地完成学习任务。

文化意识:1.运用简单的语言描述不同地区的天气特征,通过知识的

拓展,了解句型变化,以及了解不同语言的应用。

2.学会热爱我们美丽的世界,热爱我们的生活。

设计理念:

教学策略:1.根据学生感兴趣的歌曲入手,激发学生的学习兴趣,使他

们能主动积极地参与课堂活动。

2.根据示范,培养应用所学知识描述天气情况的能力。

3.通过设计的各种活动,调动学生的积极性。

4.通过创设情境,帮助Minnie得到第一名的奖项来完成任

务,并取得不同的奖励来激励学生。给学生创造运用所学

知识进行语言交际的环境,培养学生语言运用能力。

5.体验、实践、参与、合作与交流的学习方式。

学习策略:1.通过歌曲,游戏,天气预报员等活动吸引学生的注意力,

培养观察力、记忆力和组内合作能力。

2.能主动参与小组活动,积极与他人合作,创造性的共同

完成学习任务。

3.能运用所学英语流利地进行表达和交流。

4.通过动画知识的拓展,了解不同天气的穿着。

采用的辅助手段或媒体:图片、词卡、多媒体动画、视频、课件、导

学任务单等。

课前需要准备的材料: 网上视频的收集、多媒体课件的制作、相关

动画及歌曲的选取等。

教学过程:

课前:前一天给学生下发了课前导学单,让学生完成导学单的任务,做好了课前

铺垫。Pre-teaching 课前学习单:

I、 Please read out the words loudly and do a Match.

请大声读出这些词并连线

windy

hot snowy wet cold rainy dry sunny

II、 Please read this Weather Forecast, then do the exercise. 请阅读此天气预报, 完成练习:

1. 圈出表示天气情况的词汇 2.找出新句型抄写在横线上(注意大写和标点)

__________________________________

Good morning, my friends. I'm Bill. / My name’s Bill.

What’s the weather like ?

It is sunny and hot in Shenzhen.

It is windy and dry in Beijing.

It is wet in Taiwan.

It’s snowy and cold in Heilongjiang.

Thank you! Have a nice day!

课中:Teaching Process

StepI. Warm-up / Review

1. Greeting.

2. Sing a song : How is the weather ?

Step II. Presentation / Practice

1. Lead in: T: How is the weather? We can also say: What’s the weather like? Today we are going to talk about weather.(出示

课题) Look! Who is coming? My friend Minnie. She

wants to be the best weather reporter. Can you help

her? You’re so helpful. And you can get some

presents.

2. MCAI:

1) T: Can you read?

Eg. l--- et --- let

p---et---pet

w--- et--- wet

dr--- y--- dry

tr--- y--- try

cr---y---cry

h--- ot--- hot

l--- ot --- lot

n--- ot--- not

c---old---cold

h---old---hold

t---old---told

Read and play finger game: T: Look at my fingers and read . (The teacher take out word cards, then the pupils read the words.) (学生和老师玩金手指游戏来操练单词,然后看词卡读单词)

2) T: Now listen and put the cards in the correct places.

Four students come to the front and do it. (老师请四名学生到前面来,按照老师朗读的顺序摆放单词卡)

3) T:More words about weather: windy rainy snowy

sunny ( The teacher puts the word cards on the blackboard.老师边领读边把词卡放到黑板上)

We can say them in a rhyme.

篇三:rainmeter天气代码

[Rainmeter]

Author=The丶4

[Metadata]

Name=

Config=

Description=

Instructions=

Version=

Tags=

License=

Variant=

Preview=

;End of added Metadata

[Variables]

;等号后面的内容修改为你所在地区的CODE

;具体细节请到.cn查询

WeatherCode=101280104

URL=http://m.weather.com.cn/data/#WeatherCode#.html

[MeasureWeatherRSS]

Measure=Plugin

Plugin=Plugins\WebParser.dll

UpdateRate=36000

Url=http://m.weather.com.cn/data/#WeatherCode#.html

RegExp="{"weatherinfo":{"city":"(.*)","city_en":"(.*)","date_y":"(.*)","date":"(.*)","week":"(.*)","fchh":"(.*)","cityid":"(.*)","temp1":"(.*)","temp2":"(.*)","temp3":"(.*)","temp4":"(.*)","temp5":"(.*)","tempF1":"(.*)","tempF2":"(.*)","tempF3":"(.*)","tempF4":"(.*)","tempF5":"(.*)","weather1":"(.*)","weather2":"(.*)","weather3":"(.*)","weather4":"(.*)","weather5":"(.*)","img1":"(.*)","img2":"(.*)","img3":"(.*)","img4":"(.*)","img5":"(.*)","img6":"(.*)","img7":"(.*)","img8":"(.*)","img9":"(.*)","img10":"(.*)","img_single":"(.*)","img_title1":"(.*)","img_title2":"(.*)","img_title3":"(.*)","img_title4":"(.*)","img_title5":"(.*)","img_title6":"(.*)","img_title7":"(.*)","img_title8":"(.*)","img_title9":"(.*)","img_title10":"(.*)","img_title_single":"(.*)","wind1":"(.*)","wind2":"(.*)","wind3":"(.*)","wind4":"(.*)","wind5":"(.*)","fl1":"(.*)","fl2":"(.*)","fl3":"(.*)","fl4":"(.*)","fl5":"(.*)","index":"(.*)","index_d":"(.*)","index48":"(.*)","index48_d":"(.*)","index_uv":"(.*)","index48_uv":"(.*)","index_xc":"(.*)","index_tr":"(.*)","index_co":"(.*)"}}"

StringIndex=1

;Debug=1

;index_tr旅游指数,index_uv紫外线指数,index_xc洗车指数,index_co舒适度指数

[MeasureWeatherNOW]

Measure=Plugin

Plugin=Plugins\WebParser.dll

UpdateRate=1800

Url=.cn/data/sk/#WeatherCode#.html

RegExp={"weatherinfo":{"city":"(.*)","cityid":"(.*)","temp":"(.*)","WD":"(.*)","WS":"(.*)","SD":"(.*)","WSE":"(.*)","time":"(.*)","isRadar":"(.*)","Radar":"(.*)"}}

StringIndex=1

[MeasureFBTime]

Measure=Plugin

Plugin=Plugins\WebParser.dll

Url=[MeasureWeatherNOW]

StringIndex=9

[MeasureTempNOW]

Measure=Plugin

Plugin=Plugins\WebParser.dll

Url=[MeasureWeatherNOW]

StringIndex=3

[MeasureWindNOW]

Measure=Plugin

Plugin=Plugins\WebParser.dll

Url=[MeasureWeatherNOW]

StringIndex=4

[MeasureFlNOW]

Measure=Plugin

Plugin=Plugins\WebParser.dll

Url=[MeasureWeatherNOW]

StringIndex=5

[MeasureSDNOW]

Measure=Plugin

Plugin=Plugins\WebParser.dll

Url=[MeasureWeatherNOW]

StringIndex=6

[MeasureAPNOW]

Measure=Plugin

Plugin=Plugins\WebParser.dll

Url=[MeasureWeatherNOW]

StringIndex=7

[MeasureSMNOW]

Measure=Plugin

Plugin=Plugins\WebParser.dll Url=

www.weather.com.cn

[MeasureWeatherNOW] StringIndex=10

[MeasureCity]

Measure=Plugin

Plugin=Plugins\WebParser.dll Url=[MeasureWeatherRSS] StringIndex=1

[MeasureWeatherNL]

Measure=Plugin

Plugin=Plugins\WebParser.dll Url=[MeasureWeatherRSS] StringIndex=4

[MeasureWeatherWeek]

Measure=Plugin

Plugin=Plugins\WebParser.dll Url=[MeasureWeatherRSS] StringIndex=5

[MeasureWeatherFB]

Measure=Plugin

Plugin=Plugins\WebParser.dll Url=[MeasureWeatherRSS] StringIndex=6

[MeasureWeatherHot]

Measure=Plugin

Plugin=Plugins\WebParser.dll Url=[MeasureWeatherRSS] StringIndex=8

[MeasureWeatherDesc]

Measure=Plugin

Plugin=Plugins\WebParser.dll Url=[MeasureWeatherRSS] StringIndex=18

[MeasureWeatherIcon]

Measure=Plugin

Plugin=Plugins\WebParser.dll Url=[MeasureWeatherRSS] StringIndex=23

[MeasureWeatherIcon2]

Measure=Plugin

Plugin=Plugins\WebParser.dll Url=[MeasureWeatherRSS] StringIndex=24

[MeasureWeatherWind]

Measure=Plugin

Plugin=Plugins\WebParser.dll Url=[MeasureWeatherRSS] StringIndex=45

[MeasureWeatherIndex]

Measure=Plugin

Plugin=Plugins\WebParser.dll Url=[MeasureWeatherRSS] StringIndex=55

[MeasureWeatherIndex_d] Measure=Plugin

Plugin=Plugins\WebParser.dll Url=[MeasureWeatherRSS] StringIndex=56

[MeasureWeatherUVIndexDesc] Measure=Plugin

Plugin=Plugins\WebParser.dll Url=[MeasureWeatherRSS] StringIndex=60

[MeasureWeatherTRIndexDesc] Measure=Plugin

Plugin=Plugins\WebParser.dll Url=[MeasureWeatherRSS] StringIndex=62

[MeasureWeatherCOIndexDesc] Measure=Plugin

Plugin=Plugins\WebParser.dll

Url=[MeasureWeatherRSS] StringIndex=63

;--------------------------------------

[MeterIcon]

X=0

Y=0

meter=bitmap

measurename=MeasureWeatherIcon bitmapimage="tianqi.png" bitmapframes=32

bitmapextend=1

bitmapdigits=1

[MeterDesc]

MeasureName=MeasureWeatherDesc Meter=STRING

X=85

Y=9

FontColor=30,144,255

FontFace=浪漫雅圆

FontSize=8

StringAlign=left

AntiAlias=1

AutoScale=1

Text="%1"

StringStyle=BOLD

StringEffect=SHADOW

[MeterCity]

Meter=STRING

MeasureName=MeasureCity X=53

Y=8

FontColor=255,210,0

FontFace=浪漫雅圆

FontSize=10

StringAlign=left

StringStyle=BOLD

StringEffect=SHADOW

Antialias=1

篇四:WP8锁屏界面显示农历和天气教程

WP8锁屏界面显示农历和天气教程

之前小编发过WP7手机锁屏界面显示农历和天气的教程,但很多的小白用户们似乎很难找到,那今天新锋网小编在为大家整理一篇针对的锁屏界面显示农历和天气的教程。

第一步:

打开.cn(中国天气网)

第二步:

搜索你的城市例:烟台,搜索出地址栏为:

.cn/weather/101120501.shtml

把地址栏上这九位数字:101120501 (代表烟台)覆盖到下面的订阅链接中。 http://tq121.weather.com.cn/fcics/101120501.ics

第三步:

登录Hotmail的日历进行订阅:

http://bay04.calendar.live.com/calendar/import.aspx?mkt=zh-CN

将第二步的订阅链接复制到刚才打开的网站上去,输入名称:(用户自定)。点击“订阅”完成!如上图↑↑

电脑操作完成。

下面我们设置手机:

手机-设置-电子邮件和账户-找到live id,长按-点击进行同步。就可以了。

WP手机待机显示效果为:

农历癸巳年【蛇年】四月十五

烟台多云 25℃~16℃

—————————————华丽的分割线——————————————

《农历、天气更新教迟的解决方法》

1、登陆HOTMAIL邮箱

2、打开网站hotmail中的日历,点击右侧上方的“选项”

3、在选项页面把修正时区时区,也就是GMT+8:00

4、在选项页面把一天的开始时间改为0:00

5、保存

6、到手机手动同步一次

农历更新比较迟的原因并不是服务器更新的问题,是注册时候选的时区和实际时区不符 另外一个原因就是hotmail里面默认的一日起始时间不是0:00

篇五:气象类网址链接

香港天文台:.hk

台风110:http://tf110.com/main.asp

福建水利气象信息网:/hurricane

法国La Reunion热带气旋中心:.au/ob ... e=NT&type=metar

世界天气服务网:/data

东亚地区地面天气数据:http://envf.ust.hk/dataview/gts/current

澳大利亚恶劣天气中心:http://australiasevereweather.com/cyclones

NCDC过往云图资料: .cn/special/gdsw.htm[/hide].cn/special/gdsw.htm[/hide[/url]]

***科学数据库:(目前发现的最全方面的数据库) / http://satellite.cma.gov.cn/eos/ http://tacc.cwb.gov.tw.nyud.net:8090/service/policy.htm 台湾福卫卫星资料 /srsapp/ 科学搜索引擎 /tropical/tracking/wp200602_model.html 几种数值TC路径预报

http://152.80.49.216/tc-bin/tc_home.cgi 类NRL

http://210.72.100.6/自然灾害数据空间查询/气象灾害查询.htm 中国灾害数据查询 http://photino.cwb.gov.tw/rdcweb/lib/ 交通部中央氣象局圖書館 /cgi-bin/product.dll/showtab?user=shszf&prod=prod09&data=shhdsk 华东天气实况

.cn/gjf/zdz.asp 全国自动站数据

跟踪热带气旋动向少不了雷达的帮忙

CMA-中国气象局的雷达拼图做的不错 /comm_img/radar.jpg

http://202.96.202.139/radpt.htm

美国的雷达图http://weather.noaa.gov/radar/其中还有关岛的雷达图。 实况资料同样不可少

这个软件很有用

http://bbs.typhoon.gov.cn/read.php?tid=4265&keyword=%D7%D4%B6%AF%D5%BE全国自动站填图系统

/comm_txt/shikuang.htm上海实况

http://218.94.36.199/江苏实况

.au/observations/observations.jsp?state=QLD&type=metar澳大利亚实况 / 著名的地下气象世界实况及历史资料(感觉不准) 接下来是各家机构的预报

CMA的在中国台风网上就可以看到,也可以在泉州气象网上看/qx/qxweb/typhoon/index.aspx

字数作文