Tutorial by Examples: c

Most Rx operators take an optional scheduler on which to schedule their future iterations. If not supplied they will use their default configured scheduler. Supplying a scheduler can be useful for testing purposes in which we like to talk about virtual time instead of real time for speed of test exe...
Tuples are often used within collections but they must be handled in a specific way. For example, given the following list of tuples: scala> val l = List(1 -> 2, 2 -> 3, 3 -> 4) l: List[(Int, Int)] = List((1,2), (2,3), (3,4)) It may seem natural to add the elements together using im...
YAML supports three styles of escape notation: Entity Escapes a. space: " " b. colon: ":" c. ampersand: "&" Unicode Escapes a. space: "\u0020" b. single quote: "\u0027" c. double quote: "\u0022" ...
Use this to reset the table to the condition at which it was created. This deletes all rows and resets values such as auto-increment. It also doesn't log each individual row deletion. TRUNCATE TABLE Employees
First simple Example: You have a ticket automat which gives exchange in coins with values 1, 2, 5, 10 and 20. The dispension of the exchange can be seen as a series of coin drops until the right value is dispensed. We say a dispension is optimal when its coin count is minimal for its value. Let M ...
We have a set of jobs J={a,b,c,d,e,f,g}. Let j in J be a job than its start at sj and ends at fj. Two jobs are compatible if they don't overlap. A picture as example: The goal is to find the maximum subset of mutually compatible jobs. There are several greedy approaches for this problem: Earli...
Matrix chain multiplication is an optimization problem that can be solved using dynamic programming. Given a sequence of matrices, the goal is to find the most efficient way to multiply these matrices. The problem is not actually to perform the multiplications, but merely to decide the sequence of t...
In the view file In the base html (index.html) where we usually include the angular scripts or the html that is shared across the app, leave an empty div element, the flash messages will be appearing inside this div element <div class="flashmessage" ng-if="isVisible"> ...
In order to create a scheduler,the entry needs to be created in liferay-portlet.xml provding scheduler class and trigger value for timing of scheduler triggering <portlet-name>GetSetGo</portlet-name> <icon>/icon.png</icon> <scheduler-entry> ...
Dependencies: GNU Make Version > 3.80 an ISO/ ANSI C-Compiler (e.g. gcc) an extractor like tar or gzip zlib-devel readline-devel oder libedit-devel Sources: Link to the latest source (9.6.3) Now you can extract the source files: tar -xzvf postgresql-9.6.3.tar.gz There are a large ...
Options for returning in a PL/pgSQL function: Datatype List of all datatypes Table(column_name column_type, ...) Setof 'Datatype' or 'table_column'
PROC IMPORT DATAFILE = "file-path/file-name.xlsx" OUT=data_set DBMS=XLSX REPLACE;
How to read a netCDF file (.nc) with python gdal ? import gdal # Path of netCDF file netcdf_fname = "/filepath/PREVIMER_WW3-GLOBAL-30MIN.nc" # Specify the layer name to read layer_name = "hs" # Open netcdf file.nc with gdal ds = gdal.Open("NETCDF:{0}:{1}".f...
Computed properties will automatically be recomputed whenever any data on which the computation depends changes. However, if you need to manually change a computed property, Vue allows you to create a setter method to do this: Template (from the basic example above): <div id="example"...
Viridis (named after the chromis viridis fish) is a recently developed color scheme for the Python library matplotlib (the video presentation by the link explains how the color scheme was developed and what are its main advantages). It is seamlessly ported to R. There are 4 variants of color scheme...
ColorBrewer project is a very popular tool to select harmoniously matching color palettes. RColorBrewer is a port of the project for R and provides also colorblind-friendly palettes. An example of use colors_vec <- brewer.pal(5, name = 'BrBG') print(colors_vec) [1] "#A6611A" &quot...
Quite often there is a need to glimpse the chosen color palette. One elegant solution is the following self defined function: color_glimpse <- function(colors_string){ n <- length(colors_string) hist(1:n,breaks=0:n,col=colors_string) } An example of use color_glimpse(...
The package colorspace provides GUI for selecting a palette. On the call of choose_palette() function the following window pops-up: When the palette is chosen, just hit OK and do not forget to store the output in a variable, e.g. pal. pal <- choose_palette() The output is a function that t...
Function colors() lists all the color names that are recognized by R. There is a nice PDF where one can actually see those colors. colorRampPalette creates a function that interpolate a set of given colors to create new color palettes. This output function takes n (number) as input and produces a...

Page 646 of 826