Commit graph

566 commits

Author SHA1 Message Date
Chris Couzens
7119dc5ad9 Use provided struct in CSV tab delimiter example (#499)
The CSV encoding tab delimiter example has a struct to deserialize into.
However it wasn't used.

I've changed it to use the provided struct.
It may make more sense to remove it instead, as it isn't the point of
this example. If it turns out to be the preferred method in the pull
request process, I'll do so.
2018-11-20 15:53:29 -08:00
Julian Gehring
3491f21654 Fix swapped links for web client examples (#495)
Two link targets for web client download examples have been swapped, revert them. And also remove a dot at the end of a heading in one of the examples.
2018-11-12 16:48:21 -08:00
Jim Turner
26744a77b9 Fix multiply-scalar-vector-matrix recipe (#487)
The original version was incorrect about `ndarray`'s treatment of 1-D
arrays as vectors, and it incorrectly indicated that `*` performed
matrix multiplication.

`ndarray` decides whether a 1-D array is a row vector or column vector
in matrix multiplication by whether it is on the left-hand side or
right-hand side. (The behavior matches NumPy. If it's on the left-hand
side, it's a row vector, while if it's on the right-hand side, it's a
column vector.) The original version incorrectly indicated that
calling `.reversed_axes()` on a 1-D array would make it into a column
vector. In fact, calling `.reversed_axes()` on a 1-D array has no
effect since a 1-D array has only 1 axis.

Matrix multiplication is performed with `.dot()`, not `*`. The `*`
operator performs element-wise multiplication.
2018-10-11 13:56:32 -07:00
Jim Turner
cb852c17d8 Improve vector norm recipe (#486)
This removes an unnecessary allocation caused by `.mapv()` in the
original version, replaces `&Array1<f64>` argument types with
`ArrayView1<f64>` (see the new text for reasoning), and takes
advantage of the `array!` macro to make the array creation more
concise.
2018-10-11 13:55:47 -07:00
Vishal Sodani
720e65780e Add Postgres database recipe (#456) (#481)
Postgres Database Recipes
2018-10-11 13:54:46 -07:00
Andrew Gauger
5d3f4a1e76
Merge pull request #485 from rust-lang-nursery/revert-482-bump-mdbook
Revert "Bump mdbook version"
2018-10-10 15:17:00 -07:00
Andrew Gauger
40265251d8 Revert "Update to mdbook 0.2.1 (#482)"
This reverts commit fbcaca6c05.
2018-10-10 15:15:49 -07:00
James Hinshelwood
fbcaca6c05 Update to mdbook 0.2.1 (#482) 2018-10-10 09:13:29 -07:00
James Hinshelwood
45b2243cf1 Add various simple matrix recipes (#471)
* Add various simple matrix recipes
2018-10-10 09:00:02 -07:00
Andrew Gauger
3486ccebd7
Install Python 3.6 before using it (#480) 2018-10-09 09:05:14 -07:00
James Hinshelwood
580e16feff Reorganise science and fix broken links (#473) 2018-10-08 15:10:09 -07:00
Jeff Hajewski
4147bdf696 Removes quick run in favor of main for compression recipes. (#468)
See issue #433
2018-10-05 16:59:48 -07:00
Laurențiu Nicola
bbc81c48d7 Bump crossbeam, image and memmap (#467) (#467) 2018-10-05 16:58:59 -07:00
Jeff Hajewski
d70df91077 Adds vector norm example. (#466)
Part of tracking issue #450.

Once #452 is merged I will rebase and add appropriate section links.
Similarly, once #463 is merged I will update badge links.
2018-10-05 16:56:15 -07:00
Laurențiu Nicola
78a99d0eb1 Add SQLite database open recipe (#464) (#464)
Databases yay!
2018-10-05 16:54:57 -07:00
Jeff Hajewski
466b74ca72 Adds vector sum example. (#461)
This is part of tracking issue #450.
2018-10-03 15:59:14 -07:00
Andy Gauge
656e486ff6 cleanup 2018-10-03 15:32:21 -07:00
Andy Gauge
b00bcde000 Merge branch 'master' of https://github.com/brson/rust-cookbook 2018-10-03 15:25:53 -07:00
Laurențiu Nicola
d4cbf55038 CONTRIBUTING.md clarifications (#465) 2018-10-03 15:21:24 -07:00
James Hinshelwood
c362fcadf5 Add ndarray badge and link (#463) 2018-10-03 15:13:31 -07:00
James Hinshelwood
d3ce33c9fe Add trigonometry recipes (#462) 2018-10-03 15:12:56 -07:00
Ludwig PACIFICI
d6f4af68e3 Recipe: Distance between points (#452)
* Update std badge version

* Added recipe: Distance between two points on the Earth

Fixes #446
2018-10-03 15:09:49 -07:00
Andy Gauge
bb607c6069 Active voice 2018-10-02 15:38:41 -07:00
Laurențiu Nicola
2b29e72423 Upgrade to reqwest 0.9 (#460) 2018-10-02 15:14:37 -07:00
Siddharth Naithani
d4e44638ee added ansi_term example (#457)
* added ansi_term example

* added ansi and ansiterm to dictionary

* Delete ansi_terminal.md

* Update arguments.md

* link shows but does not work

* bug fix [link now shows and works perfectly]

* highlighted `` ansi-term name

* resolved flaws

* fixed issues with travis CI
2018-10-02 15:07:35 -07:00
Andy Gauge
bb73dd9c7f Alphabetize Categories 2018-10-02 10:54:47 -07:00
Petri-Johan Last
e8eb3d1a58 Complex numbers example (#458)
* Added Mathematics section. A Complex Numbers section was added under this new section

* Complex numbers are now under the correct heading and sub-headings. Added some more examples for using complex numbers

* Forgot to add new sections in science.md for the new recipes
2018-10-02 09:02:03 -07:00
Januson
c6d6b58835 Recipe Series: Sort Vector #437 (#444)
* Add simple sorting vector of integers
* Add sorting of vector of floats
* Add sorting of vector of structs
2018-09-20 07:53:22 -07:00
Anmol Sharma
cdb53e75bd Update rand.md (#451)
Fixed a typo
2018-09-20 07:52:58 -07:00
nimtiazm
7e59e4efb4 Fixed file-descriptor leak by waiting for child processes to terminate. Fixes #393. (#435) 2018-07-17 09:51:29 -07:00
Julien Delange
aa840e6138 Add example for mime crate parsing filenames 2018-07-12 15:25:30 -07:00
Julien Delange
4b1ed71d95 Mime type from filename 2018-07-12 15:21:43 -07:00
Michał Budzyński
254ee9bf43 Hide examples showing custom header setup until a clean solution is available (#430)
Hidden ./src/web/clients/requests/header.md and
./src/web/clients/api/rate-limited.md as the custom header story is being reworked
in https://github.com/hyperium/headers
2018-07-11 13:13:51 -07:00
Michal Budzynski
ab7bedc0a5 bump num to 0.2 2018-07-11 10:59:21 +02:00
Andrew Gauger
97dabe59ae
Restructure Cookbook (#404) 2018-07-10 14:07:24 -07:00
Michał Budzyński
601873ec69 bump error-chain to 0.12 in order to silence unused_doc_comment (#428) 2018-07-10 13:43:57 -07:00
Andrew Gauger
c991738112
Update template to support FontAwesome move (#427) 2018-07-10 13:23:21 -07:00
Frank Drolshagen
5b749edea6 Fix minor grammar error 2018-07-10 14:34:52 +02:00
Andrew Gauger
82e7fde4b7
mdBook 0.1.8 2018-07-09 15:28:04 -07:00
Junjie Huang
47dd9fe17e update link of Range to Uniform in rand example (#420)
* fix broken Rang link

As the rand 0.5 have been published, fix the Range link to Uniform, and correct the example.

* fix conflict from upstream

* Wildcard link to rand's Uniform
2018-07-02 10:29:37 -07:00
Michał Budzyński
0c167cb32c support for additional linters (link-checker & aspell) (#410)
* Added support for additional linters (html-proofer link checker)

- added additional test matrix item just for linters
- install and build mdbook only when needed to speedup CI
- reorganized the travis scripts

* Added spellchecking script from rust-book to CI

also fixed minor typos

* updated and moved serde_json links to propper position

* move link checking to link-checker
2018-06-06 08:33:25 -07:00
Yogesh Choudhary
af25e615d2 fix rand crate example and broken links 2018-06-04 12:58:13 +02:00
Dominik Winecki
78a59fb0f7 Move rand doc links to docs.rs 2018-05-21 21:44:50 +02:00
Dominik Winecki
ad658f8e21 Fix broken rand links 2018-05-21 21:44:50 +02:00
Michal Budzynski
331171bfbb Hotfix for missing FontAwesome on mdBook 0.1.7
cc https://github.com/rust-lang-nursery/rust-cookbook/issues/416
2018-05-16 23:31:25 +02:00
Michal Budzynski
43a34ef1cb support search by updating to mdbook 0.1.7 2018-05-16 22:40:39 +02:00
Dominik Winecki
b83f6c323d Update ring badge link 2018-05-15 14:46:08 +02:00
Dominik Winecki
e62320ef6c Update doc link location for ring crate 2018-05-15 14:46:08 +02:00
Michal Budzynski
6fec9ecfc4 Bump version of logging crates and fix broken links in logging.md 2018-05-15 00:44:18 +02:00
Michal Budzynski
d7c86d0560 bumped crate versions
`csv`, `hyper`, `regex`, `rayon`, `image`
2018-05-15 00:44:18 +02:00