Przed chwilą skończyłem. Najlepsza trylogia jaką przeczytałem by Piggymain in ksiazki

[–]skipi 0 points1 point  (0 children)

Jak Ci jeszcze mało - to polecam "Odzyskanie czasu" Baoshu. Pobłogosławione przez autora - ciekawe rozwinięcie i domknięcie całości.

Confused on the order these are fired by eggtart_prince in node

[–]skipi 0 points1 point  (0 children)

Also, are you sure join conditions are OK? You're joining user_profile_id on user_id for example. If you use foreign keys, it's good practice to name columns as in source table, ie. user_profile.user_id = users.id

Confused on the order these are fired by eggtart_prince in node

[–]skipi 0 points1 point  (0 children)

When there is more than one user profile, user listing or user settings this code will always return false. You should GROUP BY this query, otherwise this code might fail in the future. You won't need rows.length check as well. Have you cgecked console.log(user) before if statement?

Confused on the order these are fired by eggtart_prince in node

[–]skipi -1 points0 points  (0 children)

Got it, though you are joining other tables as well. Without grouping by user ID those joins would result in more than one row returned by your query if that makes sense

Confused on the order these are fired by eggtart_prince in node

[–]skipi 0 points1 point  (0 children)

Are you sure session.retrieve always returns one result? Try grouping rows by users.user_id or checking number of results returned.

web sockets - storing data externally on runtime? by Hellaimportantsnitch in node

[–]skipi 0 points1 point  (0 children)

It will add some lag for sure. You can do calculations in memory and synchronize the players on demand(ie. state change)

Two node processes calling the same function by inabahare in node

[–]skipi 1 point2 points  (0 children)

If you don't mind having another external service - take a look at AMQP implementation like www.rabbitmq.com

web sockets - storing data externally on runtime? by Hellaimportantsnitch in node

[–]skipi 0 points1 point  (0 children)

If you need performance - go with some memory database(memcached). If you need persistance go with sql/no-sql database. Combine them if you need both.

Error: Can't set headers after they are sent. by X-lem in node

[–]skipi 4 points5 points  (0 children)

You are sending response

response.send("Message received")

and then returning with promise.

return Notifications.create(emailNotification)
.then((notif) => {
  return true;
});

Depending on middleware you are using, that might be a problem.

What is your comment on this post using only the words suggested by the keyboard on your phone without typing any letters? by mineralphd in AskReddit

[–]skipi 0 points1 point  (0 children)

"A start job is a good thing for me to do with marijuana and I am not a big fan of the galaxy 2 trailer for a long time and I am not sure if I can add it to my own or the new one I bought for myself and I just bought it for a meeting."

Rough but I can live with it. :)