Listing posts

Displaying posts 186 - 189 of 189 in total
Calorie camminata in salita
mouse 295 · person cloud · link
Last update
2016-07-18
2016
07-18
« — »

Le kilocalorie per camminare in salita sono:

1
kcal = (peso_velocita + 0.17 * pendenza_perc) * kg_peso_corporeo * km_percorsi

dove per velocità inferiori a 5km/h peso_velocita vale 0.6, altrimenti (5-8km/h) vale 0.8.

Ad esempio, pesando 80Kg camminare per 3km con una pendenza del 10% ad una velocità inferiore ai 5km/h:

1
kcal = (0.6 + 0.17 * 10) * 80 * 3 = 408

Per calcolare la pendenza di una salita, considerandola come un triangolo:

1
pendenza = cateto_minore / ipotenusa

Ad esempio, per un tapis roulant lungo 85cm, con un dislivello di 11.5cm:

1
pendenza_perc = 11.85 / SQRT(11.5^2 + 85^2) * 100 = 13.4%

Fonte: Cibo360


~~~ * ~~~

BNF - Backus Normal Form
mouse 288 · 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 320 · 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 309 · 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