javascript – Show contents in a book chapter and sections in a highly normalized repository

I want to present books that has chapters and sections, and contents in each book, chapter and section.

This is my schema:

type BookId = string
type ChapterId = string
type SectionId = string
type ContentId = string

export type SourceId =
| ChapterId
| SectionId
| BookId

type Book = {
  id: BookId,
  name: string,

type Chapter = {
  id: ChapterId,
  bookId: BookId,
  name: string
type Section = {
  id: SectionId,
  chapterId: ChapterId,
  name: string

type Content = {
  id: ContentId,
  sourceId: SourceId,
  name: string,
  content: string

This is how I query all the books, chapters and sections:

 list() {
    return this.bookRepo.all().then(books =>
      Promise.all( =>
        )).then(((contents, chapters)) =>
          Promise.all( =>
            )).then(((contents, sections)) =>
              Promise.all( =>
                this.bookRepo.contents( => (
                  section, contents
                .then(sections => (chapter, contents, sections)))))
            .then(chapters => (book, contents, chapters))))));

I just render as json at the moment, but the query code seems hard to maintain.

design – Is Pressman’s Software Engineering book relevant today?

I am teaching Software Engineering for quite some time. And Pressmans’s book is considered as the bible of Software Engineering.

However, I hate this book as it is full of stories.

  1. It mixes SSAD and OOAD without distinguishing them.
  2. He invents his own methods (of course referring to various papers)
  3. The example used throughout the book is good for nothing (Safe Home)
  4. He confuses with Web development and OOAD (trying to put web development as a part of OOAD).

And many more. I guess nothing is relevant for today’s software development process.

Suggestions and opinions are welcome.

dnd 3.5e – How does a Chameleon’s “floating” Bonus Feat interact with the various sacred vows from the Book of Exalted Deeds?

At 2nd level, the Chameleon prestige class gets a bonus feat. The description of the chameleon’s Bonus Feat ability states (Races of Destiny, p. 113):

Bonus Feat (Ex): At 2nd level, you gain a bonus feat. (…) At the start of each day, you can choose to change your bonus feat to any other feat for which you meet the prerequisites.

Assuming I have taken the Sacred Vow feat (Book of Exalted Deeds, p. 45) earlier in my career from another feat source, my character would then meet the prerequisites for other feats such as the “Vow of Poverty” or “Vow of Chastity” using this rotating feat slot.

These “Exalted” feats all have this nice little blurb on it (BoED, p. 47-48):

If you break your vow, you immediately and irrevocably lose the benefit of this feat. You may not take another feat to replace it.

Mechanically, if I were to swap out my exalted vows using the Bonus Feat ability from the Chameleon prestige class, I lost the vow without breaking the criteria of the oath. Or have I broken the vow by removing the feat voluntarily?

Is there an appropriate or articulate RAW interpretation of this ability interaction?
Or is this a “DM’s prerogative” type ruling?

air travel – I would like to book single round trip ticket from USA to China, but would like to have my friend in the same plane in my return trip back to USA

Me: USA to China (round trip)
my partner China to USA only.

But I would like to have my partner in same flight and next seat.

or should I book like, single one way ticket from USA to China and 2 one way ticket from China to USA for both of us.

which is less expensive? any thought or suggestions?


dungeons and dragons – What is the name of this book with an adventure on the backside?

I’m trying to find a book again that I had decades ago. It was a book for the dragonlance setting. It had a map on the backside with the city and the inn from the first novel and the surrounding area. On the map was also a location for a vampire mansion and inside the book were details on the mansion, the vampire and also infos about the different cast members from the book (including background infos).

All in all the book allowed one to play adventures just before the 1st novel was set.

Can someone tell me the name of the book?

Applying for a Passport Card while I already have Passport Book

Hi everyone I was wondering if someone on here could help me with my question. I am looking to apply for a Passport Card. The thing is that I currently own a Passport Book. I don’t want to use form DS-82 because I still want my Passport Book to be valid and I don’t want to be without it during the processing time. Is it possible for me to use form DS-11 and apply in person and use my birth certificate as Proof of Citizenship. Also if I apply for the Passport Card will my Passport Book definitely still be valid or do I have to tell the State Department specifically to keep it valid and NOT cancel it. I just want to make sure because ultimately I want to have both a valid Passport Book and a valid Passport Card.
Any help would be appreciated.

Anybody has experience in marketing a self-published book?

Anybody has experience in marketing a self-published book?

I know I can upload the book via kindle, but how do you do the initial marketing?

Its not like one can just upload on kindle and expect to be read.

How does it work then?

What will you post on twitter or fb everyday.
Its not like you can tweet update info about the book, like you do with blogs.
With a blog, we can post a link to the new blog post whenever we write one, one or two every week.
But novels take months to write.

So then what do you tweet or blog about?
Can’t tweet, my dog is licking my foot…

Anybody has any experience marketing a book?


dnd 5e – Are the Book of Shadow or Genie’s Vessel granted by Warlock features considered as magic items?

Basically the title.

If a Warlock fights by wielding their Book of Shadow or Genie Vessel in one hand as a spell focus and keeps the other one empty to meet the requirement of somatic component, they will eventually end up in situations where they are forced to use the book or vessel as an improvised weapon (like when an enemy closed the distance or when the Warlock needs to perform an Opportunity Attack). So the question is, would hitting someone with the spine of the book of shadow or their oil lamp of a Genie Vessel be considered using an improvised weapon with magical properties?

For the Vessel, It is a tiny object, but not specifically written as “a magical tiny object” even if the previous sentence mention that the patron has imbued magical powers with it. The Warlock can do lots of wacky stuff with it like sleeping in it or dragging others into it to rest, but it almost seems like its the power of the Class Feature using the item in question as the medium in which the feature’s power (and thus your Patron’s power) is expressed, and not the power of the Item proper.

Genie’s Vessel ;
1st-level Genie feature ;
Your patron gifts you a magical vessel that grants you a measure of the genie’s power. The vessel is a Tiny object, and you can use it as a spellcasting focus for your warlock spells. You decide what the object is, or you can determine what it is randomly by rolling on the Genie’s Vessel table.

The book of shadow is even more vague; it is only stated to be a grimoire, and nothing else about it’s materalistic properties are mentioned or explained further other than that if its lost or destroyed you can resummon it. How durable is it, anyway?

This also opens some icky boxes like “Would anti-magic fields suppress their magical properties or destroy them outright?” and something like “If the Genie’s Vessel is indeed a magic item and using it as an improvised weapon can pierce resistance, the Genie Warlock has access to a magical weapon that is basically the equivalent of a +0 but magical dagger at LV1” etc.

I am aware that some similar questions have been asked, like “Does attacking with an improvised weapon using a magic item count as a magical attack?” and “Are punches with Gauntlets of Ogre Strength magical, improvised weapon attacks?”; but the main issue here is that the vessel’s status as a separate magical item seems to be a bit unclear.

PS: Before someone says that using it as an improvised weapon is a poor choice of tactics, keep in mind that Genie Warlocks gain extra damage from the “Genie’s Wrath” Feature equal to their proficiency bonus. Compared to wielding a regular dagger with the damage of 1d4 + dex + pb, using the Genie’s Vessel as an improvised weapon of 1d4 + str + pb isn’t that bad; and depending on how the DM would rule it could be counted as magical and be able to pierce resistances.

8 – How do I delete all book page nodes, book outline, and uninstall book module

I would like to remove a book, its contents, its outline, and uninstall the book module itself.

I deleted all the “Book page” content type nodes. I then deleted the one book listed under:

However, when I try and uninstall the module using Drush I get the message:

“To uninstall Book, delete all content that is part of a book”

I’m assuming this is the outline data on non “Book page” nodes that I missed, but there’s nothing there in the Admin UI to tell me which ones they are. The UI says “No books available.”

sequences and series – Comparison Test Proof (Hammack’s Book of Proof, Third Edition, Exercise 13.8.2)

I am currently going through Hammack’s Book of Proof (3rd edition), and have been stuck on the following exercise for the past two weeks.

Prove the comparison test: Suppose $Sigma a_k$ and $Sigma b_k$ are series. If $0 le a_k le b_k$ for each $k$, and $Sigma b_k$ converges, then $Sigma a_k$ converges. Also, if $0 le b_k le a_k$ for each $k$, and $Sigma b_k$ diverges, then $Sigma a_k$ diverges.

Now, the reader is instructed to prove this using “Definition 13.7 (and Definition 13.5, as needed)” from the book which goes as follows.

Definition 13.7

A series $sum_{k=1}^{infty} a_k$ converges to a real number $S$ if its sequence of partial sums ${s_n}$ converges to $S$. In this case we say $sum_{k=1}^{infty} a_k = S$.

We say $sum_{k=1}^{infty} a_k$ diverges if the sequence ${s_n}$ diverges. In this case $sum_{k=1}^{infty} a_k$ does not make sense as a sum or does not sum to a finite number.

Definition 13.5

A sequence ${a_n}$ converges to a number $L in mathbb{R}$ provided that for any $epsilon > 0$ there is an $N > mathbb{N}$ for which $n > N$ implies $|a_n – L| < epsilon$.

If ${a_n}$ converges to $L$, we denote this state of affair as $lim_{n to infty} a_n = L$

If ${a_n}$ does not converge to any number $L$, then we say it diverges.

I am currently focusing on the first statement. Also, that statement intuitively makes sense to me: if the series $Sigma a_k$ has only non-negative terms, then it will either converge or diverge to infinity. However, since $0 le a_k le b_k$, it follows that $Sigma a_k le Sigma b_k$ and thus, if $Sigma a_k$ did diverge to infinity we would have a contradiction. I am able to formalize this as follows.

Proof. For the sake of contradiction, suppose $Sigma a_k$ diverges to infinity. That is, for every $L in mathbb{R}$ there exists a number $N’ in mathbb{N}$ for which $n ge N’$ implies $A_n > L$ where $A_n$ is a partial sum of $Sigma a_k$. Also, because $Sigma b_k$ converges to some number $B in mathbb{R}$, we have that for every $epsilon > 0$, there exists a number $N” in mathbb{N}$ for which $n > N”$ implies $|B_n – B| < epsilon$ where $B_n$ is a partial sum of $Sigma a_k$. Further, notice that if $0 le a_k le b_k$ for each $k$, then $A_n = (a_1 + a_2 + dots + a_n) le (b_1 + b_2 + dots + b_n) = B_n$.

Now, take $epsilon > 0$ and $L = B – epsilon$. Also, let $N = max(N’, N”)$. Then, if $n > N$ we have $A_n > B – epsilon$ and $|B_n – B| < epsilon$, or $B_n < epsilon + B$. Thus we have $B_n < epsilon + B < A_n$ and $A_n le B_n$, a contradiction. Therefore, $Sigma a_k$ must converge.

The problem I have is that although divergence to infinity implies divergence, divergence does not imply divergence to infinity. Therefore, for my proof to be complete, I would need to show that if $Sigma a_k$, it must diverge to infinity. However, I am unable to formalize this idea. I have looked it up online and stumbled accross proofs that uses Cauchy sequences or the monotone convergence theorem, but nothing that uses only the definitions above. I also tried a direct proof without any luck.

Any pointers or help would be greatly appreciated.