Tutorial by Examples: f

The ROUND function rounds a value. The number of decimal places to round to is specified by a positive value in the num_digits parameter. A negative value for the num_digits will round the integer portion of the value left of the decimal point, e.g. to the nearest 10 (for -1) or to the nearest 1000 ...
The excel formula TRUNC is used to truncate a number to a given number of decimal places, specified by the optional num_digits parameter. If this parameter is defined as a negative value it will truncate the integer portion of the value. If the parameter is omitted then the default value is 0 which ...
The Excel function MROUND is used to round a number to an interval other than a power of 10. These examples show MROUND to the nearest quarter and to the nearest even number. Starting withMROUND(b,0.25)MROUND(b,2)23.9319521124.00242.7931353882.75221.9390306422.002213.7419373913.751416.7704741216.7...
You need to find out the IP address of the container running in the host so you can, for example, connect to the web server running in it. docker-machine is what is used on MacOSX and Windows. Firstly, list your machines: $ docker-machine ls NAME ACTIVE DRIVER STATE URL ...
While your Meteor app is running locally: meteor mongo --url
A dotfile is a file whose names begin with a .. These are normally hidden by ls and not listed unless requested. For example the following output of ls: $ ls bin pki The -a or --all option will list all files, including dotfiles. $ ls -a . .ansible .bash_logout .bashrc .lesshst ...
Mage::app()->getStore()->getGroup()->getName()
package { import flash.display.Sprite; import flash.events.Event; public class Viewport extends Sprite { /** Constructor */ public function Viewport() { super(); // Listen for added to stage event addEventListener(Event.ADDED_TO_STAGE, addedToStageHandle...
The factorial function is a Haskell "Hello World!" (and for functional programming generally) in the sense that it succinctly demonstrates basic principles of the language. Variation 1 fac :: (Integral a) => a -> a fac n = product [1..n] Live demo Integral is the class of in...
The web.config system.web.httpRuntime must target 4.5 to ensure the thread will renter the request context before resuming your async method. <httpRuntime targetFramework="4.5" /> Async and await have undefined behavior on ASP.NET prior to 4.5. Async / await will resume on an arb...
With a two-way filter, we are able to assign a read and write operation for a single filter that changes the value of the same data between the view and model. //JS Vue.filter('uppercase', { //read : model -> view read: function(value) { return value.toUpperCase(); }, ...
Create a DataFrame from multiple lists by passing a dict whose values lists. The keys of the dictionary are used as column labels. The lists can also be ndarrays. The lists/ndarrays must all be the same length. import pandas as pd # Create DF from dict of lists/ndarrays df = pd.DataFrame({'...
If an iterator method has a yield inside a try...finally, then the returned IEnumerator will execute the finally statement when Dispose is called on it, as long as the current point of evaluation is inside the try block. Given the function: private IEnumerable<int> Numbers() { yield re...
In Python 3 the cmp built-in function was removed, together with the __cmp__ special method. From the documentation: The cmp() function should be treated as gone, and the __cmp__() special method is no longer supported. Use __lt__() for sorting, __eq__() with __hash__(), and other rich compariso...
Function level annotations help IDEs identify return values or potentially dangerous code /** * Adds two numbers together. * * @param Int $a First parameter to add * @param Int $b Second parameter to add * @return Int */ function sum($a, $b) { return (int) $a + $b; } /** * ...
File level metadata applies to all the code within the file and should be placed at the top of the file: <?php /** * @author John Doe ([email protected]) * @copyright MIT */
If a class extends another class and would use the same metadata, providing it @inheritDoc is a simple way for use the same documentation. If multiple classes inherit from a base, only the base would need to be changed for the children to be affected. abstract class FooBase { /** * @par...

Page 73 of 457