Listing posts

Displaying posts 326 - 328 of 328 in total
BNF - Backus Normal Form
mouse 1815 · person cloud · link
Last update
2016-07-02
2016
07-02
«Come scrivere definizioni»

BNF is one of the two main notation techniques for context-free grammars.

Example:

1
2
3
4
A sandwich consists of a lower slice of bread, mustard or mayonnaise;
optional lettuce, an optional slice of tomato; two to four slices of
either bologna, salami, or ham (in any combination); one or more slices
of cheese, and a top slice of bread.

This translates to:

1
2
sandwich ::= lower_slice [mustard|mayonnaise] lettuce? tomato?
             [bologna|salami|ham]{2,4} cheese+ top_slice

References: AListApart, Wikipedia


~~~ * ~~~

Ruby Bundler: set gem options
mouse 1836 · person cloud · link
Last update
2016-03-29
2016
03-29
« — »

Bundler accepts config options per gem, eg:

1
2
3
bundle config build.qrencoder \
  --with-qrencoder-include=/usr/local/include/qrencode.h
  --with-qrencoder-lib=/usr/local/lib/libqrencode.dylib 

~~~ * ~~~

Falling asleep in seconds
mouse 1588 · person cloud · link
Last update
2016-03-26
2016
03-26
«breathing technique»
  1. Before you begin, place the tip of your tongue on the roof of your mouth just above your teeth and keep it there throughout the exercise.
  2. Exhale completely through your mouth quite forcefully so you make a whoosh sound.
  3. Close your mouth and inhale quietly and softly through your nose for a mental count of four.
  4. Hold your breath and count to seven.
  5. Next, exhale completely through your mouth, making another whoosh sound for eight seconds in one large breath.
  6. Now inhale again and repeat the cycle three times for a total of four breaths.

All inhaling breaths must be quiet and through your nose and all exhaling breaths must be loud and through your mouth.


Source: Distractify.com