Tutorial by Examples: l

When you execute scala in a terminal without additional parameters it opens up a REPL (Read-Eval-Print Loop) interpreter: nford:~ $ scala Welcome to Scala 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_66). Type in expressions for evaluation. Or try :help. scala> The REPL allows ...
Prerequisites This topic is not about Redux and/or Ngrx : You need to be comfortable with Redux At least understand the basics of RxJs and Observable pattern First, let's define an example from the very beginning and play with some code : As a developer, I want to : Have an IUser inter...
Live upcase server that returns error when input string is longer than 10 characters. Server: const express = require('express'), jsonParser = require('body-parser').json(), app = express(); // Add headers to work with elm-reactor app.use((req, res, next) => { res.setHeader...
###### Used for both Classification and Regression examples library(randomForest) library(car) ## For the Soils data data(Soils) ###################################################### ## RF Classification Example set.seed(656) ## for ...
DescriptionCodeAssign immutable int valueval x = 3Assign mutable int valuevar x = 3Assign immutable value with explicit typeval x: Int = 27Assign lazily evaluated valuelazy val y = print("Sleeping in.")Bind a function to a nameval f = (x: Int) => x * xBind a function to a name with expl...
To use an in memory cache in your ASP.NET application, add the following dependencies to your project.json file: "Microsoft.Extensions.Caching.Memory": "1.0.0-rc2-final", add the cache service (from Microsoft.Extensions.Caching.Memory) to ConfigureServices method in Startup...
If you have a dataframe with missing data (NaN, pd.NaT, None) you can filter out incomplete rows df = pd.DataFrame([[0,1,2,3], [None,5,None,pd.NaT], [8,None,10,None], [11,12,13,pd.NaT]],columns=list('ABCD')) df # Output: # A B ...
In barplot, factor-levels are placed on the x-axis and frequencies (or proportions) of various factor-levels are considered on the y-axis. For each factor-level one bar of uniform width with heights being proportional to factor level frequency (or proportion) is constructed. The barplot() function...
The Vector3 structure contains some static variables that provide commonly used Vector3 values. Most represent a direction, but they can still be used creatively to provide additional functionality. Vector3.zero and Vector3.one Vector3.zero and Vector3.one are typically used in connection to a...
Laravel Socialite provides an expressive, fluent interface to OAuth authentication with Facebook, Twitter, Google, LinkedIn, GitHub and Bitbucket. It handles almost all of the boilerplate social authentication code you are dreading writing. Read more about this here
JSX is not meant to be interpreted by the browser. It must be first transpiled into standard Javascript. To use JSX you need to install the plugin for babel babel-plugin-transform-vue-JSX Run the Command below: npm install babel-plugin-syntax-jsx babel-plugin-transform-vue-jsx babel-helper-vue-jsx...
The code below calculates the value of PI using a recursive approach. Modify the MAX_PARALLEL_RECURSIVE_LEVEL value to determine at which recursion depth stop creating tasks. With this approach to create parallelism out of recursive applications: the more tasks you create, the more parallel tasks cr...
Detailed instructions on getting sonata-admin set up or installed.
`This way you will get the newest ruby but it has its downsides. Doing it like this ruby will not be managed by any application. !! Remember to chagne the version so it coresponds with your !! you need to download a tarball find a link on an official website (https://www.ruby-lang.org/en/downloa...
Probably the easiest choice, but beware, the version is not always the newest one. Just open up terminal and type (depending on your distribution) in Debian or Ubuntu using apt $> sudo apt install ruby in CentOS, openSUSE or Fedora $> sudo yum install ruby You can use the -y option so...
Probably the easies way to set up ruby on windows is to go to http://rubyinstaller.org/ and from there donwload an executable that you will install. You don't have to set almost anything, but there will be one important window. It will have a check box saying Add ruby executable to your PATH. Confi...
First UC in the example Gems $> gem install nokogiri can have a problem installing gems because we don't have the permissions for it. This can be sorted out in more then just one way. First UC solution a: U can use sudo. This will install the gem for all the users. This method should be frowne...
Consider the following ranges A1:A3 and B1:B3 as below =SUMPRODUCT(--(A1:A3="c"),B1:B3) This will first manipulate (A1:A3="c") into the following array A1="c" = FALSE A2="c" = FALSE A3="c" = TRUE Then apply the -- operator which converts...
Sometimes you need to make a script for someone but you are not sure what he has on his machine. Is there everything that your script needs? Not to worry. Bundler has a great function called in line. It provides a gemfile method and before the script is run it downloads and requires all the necessa...
Go to the repository you want to clone (something like: https://bitbucket.org/username/repo) On the left side, click on ... and choose Clone A small window will appear, copy the url (something like: git clone https://[email protected]/hamzawey/vm_dop_experiment.git) Open a terminal windo...

Page 667 of 861