- 授权协议: 未知
- 开发语言: Java
- 操作系统: 跨平台
- 软件首页: https://github.com/ghuiii/Fruit
- 软件文档: https://github.com/ghuiii/Fruit/blob/master/README.md
- 官方下载: https://github.com/ghuiii/Fruit
软件介绍
Fruit
简单的说Fruit之于html正如Gson之于Json,它能让你以一种注解的方式来描述解析的逻辑。下面是一个例子:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | public class FruitInfo {
@Pick("div#only")
private String favorite;
@Pick(value = "div#only", attr = Attrs.OWN_TEXT)
private String favoriteOne;
@Pick(value = "div#only", attr = Attrs.HTML)
private String favoriteHtml;
@Pick(value = "img.apple", attr = Attrs.SRC)
private String img;
@Pick(value = "a.author", attr = Attrs.HREF)
private String blog;
@Pick("div.fruit")
private List<Item> items;
public static class Item {
@Pick("strong.name")
private String name;
@Pick(".color")
private String color;
@Pick(attr = "id")
private int id;
}
} |
这里就不做更多的说明了,GitHub项目主页有更丰富的使用说明,欢迎访问查看。
V2er
V2er就是开始时说的那个要开发的V2EX客户端。
这个APP的开发是从去年底开始一直到今年9月中旬基本开发完成,到现在也迭代了几个版本,在市场上也获得了很多用户的好评与鼓励平均评分在4.8,
欢迎各位朋友去下载使用,在Google Play及酷安市场已上架。
前几天也写了个基本版 - V2er-Core把V2er的核心代码开源了。这个小项目完整的展示了如何利用 “Fruit/Retrofit2/OKHttp3/RxJava” 来开发这种APP(数据大部分来源于html及少量json接口)
下面一段代码是最终实现后的Retrofit API Service代码样例(是不是看上去和使用真的Json接口一样)
1 2 3 4 5 6 7 | public interface APIs {
@GET("/api/topics/hot.json") @Json
Observable<DailyHotInfo> dailyHot();
@GET("/") @Html
Observable<NewsInfo> homeNews(@Query("tab") String tab);
} |
最后再贴一张V2er-Core实现的效果图:
大家可以去这里找到它的源码。
An Introduction to Probability Theory and Its Applications
William Feller / Wiley / 1991-1-1 / USD 120.00
Major changes in this edition include the substitution of probabilistic arguments for combinatorial artifices, and the addition of new sections on branching processes, Markov chains, and the De Moivre......一起来看看 《An Introduction to Probability Theory and Its Applications》 这本书的介绍吧!
