As it says at the bottom of every page on Stack Exchange:
site design / logo © 2015 stack exchange inc; user contributions licensed under cc by-sa 3.0 with attribution required
Based on the assertions in the linked documents, you can reuse Mi Yodeya content in whatever format you want, remixed however you want, as long as you acknowledge that the content came from Mi Yodeya - Stack Exchange, name the original authors of the content, and include links back to the original Q&A posts and author profiles. You do not need any additional permission from Stack Exchange or from the original authors to do this.
For examples of compliance with this policy, see any of the Mi Yodeya Publications.
In addition, see the Stack Exchange page on Trademark Guidance. Based on what it says there, you can and should use the Stack Exchange (and Mi Yodeya) name within your book, to indicate where the content came from, but not in any way (including in the book's title) that might make people think that the book was made in partnership with Stack Exchange. The same goes for the Stack Exchange and Mi Yodeya logos. (Mi Yodeya Publications were made in cooperation with Stack Exchange, with permission to use the name and logo.)