gc-http-factory
- 授权协议: MIT
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: https://gocardless.com/blog/gc-http-factory/
- 软件文档: https://github.com/gocardless/gc-http-factory
软件介绍
gc-http-factory 是一个 AngularJS 的扩展,提供更便利的 API 写法,例如常规我们定义一个 Service 的方法如下:
angular.app('app', []).factory('UsersService', function($http) { function findOne(id) { return $http.get('/api/users/' + id); }; function findAll() { return $http.get('/api/users'); }; function create() { return $http.post('/api/users'); }; return { findOne: findOne, findAll: findAll, create: create }; });
而使用 gc-http-factory 后可以这样写:
angular.app('app', ['gc.httpFactory']).factory('UsersService', function(HttpFactory) { return HttpFactory.create({ url: '/api/users/:id' }, { findOne: { method: 'GET' }, findAll: { method: 'GET' }, create: { method: 'POST' } }); });
调用方法:
UsersService.findAll(); //=> GET /api/users UsersService.findOne({ params: { id: 2 } }); //=> GET /api/users/2 UsersService.create({ data: { name: 'Jack' } }); //=> POST /api/users with { name: 'Jack' } as data
利用Python进行数据分析 原书第2版
Wes McKinney / 徐敬一 / 机械工业出版社 / 2018-7 / 119
本书由Python pandas项目创始人Wes McKinney亲笔撰写,详细介绍利用Python进行操作、处理、清洗和规整数据等方面的具体细节和基本要点。第2版针对Python 3.6进行全面修订和更新,涵盖新版的pandas、NumPy、IPython和Jupyter,并增加大量实际案例,可以帮助你高效解决一系列数据分析问题。 第2版中的主要更新包括: • 所有的代码,包括把Py......一起来看看 《利用Python进行数据分析 原书第2版》 这本书的介绍吧!