Nikola Brežnjak blog - Tackling software development with a dose of humor
  • Home
  • Daily Thoughts
  • Ionic
  • Stack Overflow
  • Books
  • About me
Home
Daily Thoughts
Ionic
Stack Overflow
Books
About me
  • Home
  • Daily Thoughts
  • Ionic
  • Stack Overflow
  • Books
  • About me
Nikola Brežnjak blog - Tackling software development with a dose of humor
Books

The Rosie Project – Graeme Simsion

The quotes I noted from the book The Rosie Project by Graeme Simsion. This book was actually recommended  by Bill Gates, and here’s what he said about it:

This is one of the most profound novels I’ve read in a long time.

I also liked this book very much and marked it as a favorite on my Shelfari account and have commented it as

Try to imagine Sheldon Cooper (TBBT OFC) on a mission to find a wife. Well, you don’t have to – you can simply read this book :).Though am not a fan of romances, this one is excellent.

Anyways, the quotes:

We will risk our life to save a person from drowning, yet not make a donation to save dozens of children from starvation.

I am able to hug Rosie. This was the issue that caused me the most fear after she agreed to live with me. I generally find body contact unpleasant, but sex is an obvious exception. Sex solved the body contact problem. We’re now also able to hug without having sex, which is also convenient at times.

Stack Overflow

How to select all rows which have a field equal to {}

profile for Nikola at Stack Overflow, Q&A for professional and enthusiast programmers
I’m a big fan of Stack Overflow and I tend to contribute regularly (am currently in the top 0.X%). In this category (stackoverflow) of posts I will will be posting my top rated questions and answers. This, btw, is allowed as explained in the meta thread here.

My question was:

I see few rows like this in my table:

     id  | val
 --------+------------
    1    | {}
    2    | {}

Of course not all are equal to {}, and I would like to query them out and then update them to {0}. However, trying the following fails:

UPDATE table SET val={0} WHERE val={};

I must be missing something obvious, please point out what.

The answer, by user sandipon, was:

 

UPDATE table SET val='{0}' WHERE val='{}';

Recent posts

  • Discipline is also a talent
  • Play for the fun of it
  • The importance of failing
  • A fresh start
  • Perseverance

Categories

  • Android (3)
  • Books (114)
    • Programming (22)
  • CodeProject (35)
  • Daily Thoughts (77)
  • Go (3)
  • iOS (5)
  • JavaScript (127)
    • Angular (4)
    • Angular 2 (3)
    • Ionic (61)
    • Ionic2 (2)
    • Ionic3 (8)
    • MEAN (3)
    • NodeJS (27)
    • Phaser (1)
    • React (1)
    • Three.js (1)
    • Vue.js (2)
  • Leadership (1)
  • Meetups (8)
  • Miscellaneou$ (77)
    • Breaking News (8)
    • CodeSchool (2)
    • Hacker Games (3)
    • Pluralsight (7)
    • Projects (2)
    • Sublime Text (2)
  • PHP (6)
  • Quick tips (40)
  • Servers (8)
    • Heroku (1)
    • Linux (3)
  • Stack Overflow (81)
  • Unity3D (9)
  • Windows (8)
    • C# (2)
    • WPF (3)
  • Wordpress (2)

"There's no short-term solution for a long-term result." ~ Greg Plitt

"Everything around you that you call life was made up by people that were no smarter than you." ~ S. Jobs

"Hard work beats talent when talent doesn't work hard." ~ Tim Notke

© since 2016 - Nikola Brežnjak