SQL Constraints

Good to remember

In SQL, we have the following constraints:NOT NULL – Indicates that a column cannot store NULL valueUNIQUE – Ensures that each row for a column must have a unique valuePRIMARY KEY – A combination of a NOT NULL and UNIQUE. Ensures that a column or combination of two or more columns have an unique identity which helps to find a particular record in a table more easily and quicklyFOREIGN KEY – Ensure the referential integrity of the data in one table to match values in another tableCHECK – Ensures that the value in a column meets a specific conditionDEFAULT – Specifies a default value when specified none for this column

via SQL Constraints.


  • Ctrl-b c Create new window

  • Ctrl-b d Detach current client

  • Ctrl-b l Move to previously selected window

  • Ctrl-b n Move to the next window

  • Ctrl-b p Move to the previous window

  • Ctrl-b & Kill the current window

  • Ctrl-b , Rename the current window

  • Ctrl-b % Split the current window into two panes

  • Ctrl-b q Show pane numbers (used to switch between panes)

  • Ctrl-b o Switch to the next pane

  • Ctrl-b ? List all keybindings

  • Ctrl-b [ then PageUp PageDown

via http://blog.hawkhost.com/2010/06/28/tmux-the-terminal-multiplexer/

use the shift key while using mouse if scrolling is enabled.

Want to Lose Fat? Don’t Eat Carbs for Breakfast!

Why You Shouldn’t Eat Carbs for Breakfast

You’re probably shocked to find out that eating carbohydrates in the morning can lead to weight gain. Let me explain you why this happens. Earlier in the day insulin sensitivity is higher in both muscle and fat cells. Having a carbohydrate rich meal for breakfast will cause your body to store fat. Ghrelin, the hunger control hormone, is released in your body throughout the night, which stimulates the production of growth hormone and makes you hungry. As this happens, your body starts to burn fat for energy and reduces the protein breakdown for use as fuel. Growth hormone levels peak about two hours after you wake up as long you don’t spike insulin levels by eating carbs.

In other words, you start the day burning fat. Even when you’re working out, your body will burn more calories than normal on an empty stomach. What happens if you eat carbs for breakfast? First of all, your insulin levels as well as your blood glucose levels will increase, which reduces fat burning for the rest of the day. At the same time, your cortisol levels will remain high. This sudden insulin spike stimulates the production of new empty fat cells while lowering your levels of growth hormone and ghrelin.

The bottom line is that eating carbs earlier in the day will have a negative impact on both fat burning and muscle building. Not only it lowers your growth hormone levels, but increases blood sugar levels and leads to weight gain.

via Want to Lose Fat? Don’t Eat Carbs for Breakfast!.

Productivity Tricks for the Neurotic and Crazy (Like Me) | Tim Ferriss

It doesn’t take much to seem superhuman and appear “successful” to nearly everyone around you. In fact, you just need one rule: What you do is more important than how you do everything else, and doing something well does not make it important.

And when — despite your best efforts — you feel like you’re losing at the game of life, remember: Even the best of the best feel this way sometimes.

via Productivity Tricks for the Neurotic and Crazy (Like Me) | Tim Ferriss.

Exclusive: Air traffic system failure caused by computer memory shortage | Reuters

She said that process “used a large amount of available memory and interrupted the computer’s other flight-processing functions”.

You should always always always check your input params size!

“It’s very over-budget and behind schedule, so it doesn’t surprise me that it’s got some bugs – it’s the way it presented itself” that’s alarming, Moss said.

No words…. The same all other the world.

via Exclusive: Air traffic system failure caused by computer memory shortage | Reuters.

Want to Get Out Alive? Follow the Ants – Issue 13: Symmetry – Nautilus

“If you have an exit in the middle of the wall, you can imagine coming from the left side, the right side, and straight,” Shiwakoti says. These different streams of ants, or people, have to merge at the exit and take turns to pass. But people are impatient, and start pushing and shoving. Columns help structure the flow. “The column gives you some channels on the left and on the right, and this reduces the conflict at the exit.” The reason the corner exit is so efficient, Shiwakoti says, is because it has an intrinsic ability to structure the flow. “If the exit is in the corner, then people are probably only coming from left and right, so you have a more uniform flow.”

via Want to Get Out Alive? Follow the Ants – Issue 13: Symmetry – Nautilus.

WHY THE MONA LISA STANDS OUT | More Intelligent Life

Good read.
On one hand – art may be made popular/iconic by marketing (this has direct impact to our brains).
On second – still there are good and bad art. But one have to have knowledge to detect it.


The social scientists are right to say that we should be a little sceptical of greatness, and that we should always look in the next room. Great art and mediocrity can get confused, even by experts. But that’s why we need to see, and read, as much as we can. The more we’re exposed to the good and the bad, the better we are at telling the difference. The eclecticists have it.

via WHY THE MONA LISA STANDS OUT | More Intelligent Life.

Searching 20 GB/sec: Systems Engineering Before Algorithms | Scalyr Blog

When processing large amounts of data, it’s important to choose a good algorithm, but “good” does not always mean “fancy”. It’s important to think about how your code will perform in practice. Constant factors drop out of “Big O” analysis, but they can be large enough to matter in the real world. Simpler algorithms are easier to optimize, and less vulnerable to bad edge-case behavior.

via Searching 20 GB/sec: Systems Engineering Before Algorithms | Scalyr Blog.

chinese number websites secret meaning

Why the preference for digits over letters? It mostly has to do with ease of memorization. To a native English-speaker, remembering a long string of digits might seem harder than memorizing a word. But that’s if you understand the word. For many Chinese, numbers are easier to remember than Latin characters. Sure, Chinese children learn the pinyin system that uses the Roman alphabet to spell out Mandarin words (for example, the word for “Internet,” 网络, is spelled wangluo in pinyin). And yes, Arabic numerals (1-2-3) are technically just as much a foreign import as the Roman alphabet (A-B-C). But most Chinese are more familiar with numbers than letters, especially those who didn’t go to college. To many, “Hotmail.com” might as well be Cyrillic.