Sobes.tech

Can you give examples when using foreign keys is not advisable?

225

Look at the database schema above — what can be added, or is everything fine?

223

How would you solve the problem of loading a million users into memory (risk of memory and delay)?

207

-- Display all books and their authors/co-authors in a simple tabular format. -- Example: -- book_name | author_name -- --------------------|------------- -- Master and Margarita | Igor -- Eugene Onegin | Ivan

197

Does the variable capture problem in a goroutine depend on the Go version?

194

We want to get only active users, but what is wrong with the isActive filter?

188

-- List all authors and the number of their books. -- Example: -- author_name | book_count --------------------------- -- Igor | 2 -- Ivan | 1 -- List authors who have written more than 2 books.

182

package maptask import "fmt" import "time" func Foo() { data := make(map[int]bool) for i := 0; i < 10; i++ { go func() { data[i] = true }() } time.Sleep(time.Second * 1) for k, v := range data { fmt.Println(k, v) } }

179

What if you need to search by part of the book's title (substring)?

172

Where would you start implementing pagination in this method?

165

What are other ways to protect a map from concurrent access besides mutex?

154

Maybe you can suggest something else besides Mutex and sync.Map for record protection?

152

What is the name of the WITH ... AS (...) construction on line 84 of the query?

146

-- List all books and their authors/co-authors in a simple tabular form. -- Example: -- book_name | author_name -- --------------------|-------------- -- Master and Margarita | Igor -- Eugene Onegin | Ivan -- List all authors and the number of their books. -- Example: -- author_name | book_count -- ------------|----------- -- Igor | 2 -- Ivan | 1

144
/2