2010-06-28

这两天主要把UPNP的功能模块完善和整合

1-主要流程是发送discover 消息到内网多播端口,并接受反馈

2-根据反馈查询描述文件地址(192.168.1.90:49152/iftcdevicedesc.xml)

3-根据ip ,port,filename下载xml

4-解析xml,获取描述字段(<presentationURL>http://192.168.1.90/</presentationURL>

 

注:

http协议下载文件

 szxml =  "GET /iftcdevicedesc.xml HTTP/1.1\r\n";
 szxml += "HOST: 192.168.1.90:49152\r\n";
 szxml += "Accept: */*\r\n";
 szxml += "Connection:close\r\n";
 szxml += "User-Agent: GeneralDownloadApplication\r\n";
 szxml += "\r\n";

末尾应加入换行符作为req的结尾,开始忘记这个,server一直返回BAD REQUEST400 ,郁闷了半天
编写一个 SQL 查询,筛选出过去一年中订单总量 少于10本 的 书籍 ,不考虑 上架(available from)距今 不满一个月 的书籍。并且 假设今天是 2019-06-23。 建表语句如下: Create table If Not Exists Books (book_id int, name varchar(50), available_from date); Create table If Not Exists Orders (order_id int, book_id int, quantity int, dispatch_date date); Truncate table Books; insert into Books (book_id, name, available_from) values ('1', 'Kalila And Demna', '2010-01-01'); insert into Books (book_id, name, available_from) values ('2', '28 Letters', '2012-05-12'); insert into Books (book_id, name, available_from) values ('3', 'The Hobbit', '2019-06-10'); insert into Books (book_id, name, available_from) values ('4', '13 Reasons Why', '2019-06-01'); insert into Books (book_id, name, available_from) values ('5', 'The Hunger Games', '2008-09-21'); Truncate table Orders; insert into Orders (order_id, book_id, quantity, dispatch_date) values ('1', '1', '2', '2018-07-26'); insert into Orders (order_id, book_id, quantity, dispatch_date) values ('2', '1', '1', '2018-11-05'); insert into Orders (order_id, book_id, quantity, dispatch_date) values ('3', '3', '8', '2019-06-11'); insert into Orders (order_id, book_id, quantity, dispatch_date) values ('4', '4', '6', '2019-06-05'); insert into Orders (order_id, book_id, quantity, dispatch_date) values ('5', '4', '5', '2019-06-20'); insert into Orders (order_id, book_id, quantity, dispatch_date) values ('6', '5', '9', '2009-02-02'); insert into Orders (order_id, book_id, quantity, dispatch_date) values ('7', '5', '8', '2010-04-13');
07-15
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值