Tutorial by Examples

With the Tap Gesture, you can make any UI-Element clickable (Images, Buttons, StackLayouts, ...): (1) In code, using the event: var tapGestureRecognizer = new TapGestureRecognizer(); tapGestureRecognizer.Tapped += (s, e) => { // handle the tap }; image.GestureRecognizers.Add(tapGestureR...
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...
Open a raster that covers the globe and extract a subset of the raster. import gdal # Path to a tiff file covering the globe # http://visibleearth.nasa.gov/view.php?id=57752 tif_name = "/path_name/land_shallow_topo_21600.tif" # Open raster in read only mode ds = gdal.Open(tif_n...
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...
The HTML <p> element defines a paragraph: <p>This is a paragraph.</p> <p>This is another paragraph.</p> Display- You cannot be sure how HTML will be displayed. Large or small screens, and resized windows will create different results. With HTML, you cannot chang...
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> ...
There are numerous problems minimizing lateness, here we have a single resource which can only process one job at a time. Job j requires tj units of processing time and is due at time dj. if j starts at time sj it will finish at time fj=sj+tj. We define lateness L=max{0,fj-dh} for all j. The goal is...
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 ...
CREATE [OR REPLACE] FUNCTION functionName (someParameter 'parameterType') RETURNS 'DATATYPE' AS $_block_name_$ DECLARE --declare something BEGIN --do something --return something END; $_block_name_$ LANGUAGE plpgsql;
Options for returning in a PL/pgSQL function: Datatype List of all datatypes Table(column_name column_type, ...) Setof 'Datatype' or 'table_column'
This package generates a file that your IDE understands, so it can provide accurate autocompletion. Generation is done based on the files in your project. Read more about this here
PROC IMPORT DATAFILE = "file-path/file-name.xlsx" OUT=data_set DBMS=XLSX REPLACE;
Part I : Setup the Mac machine to use shenzhen Go to terminal Install Shenzhen sudo gem install shenzhen sudo gem install nomad-cli Download XCode command line utility xcode-select --install Popup shows up with the below text The xcode-select command requires the command line d...
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"...
Ruby 2.3.0 added the safe navigation operator, &.. This operator is intended to shorten the paradigm of object && object.property && object.property.method in conditional statements. For example, you have a House object with an address property, and you want to find the street_n...
If you want to get the properties of the file (like the name or the size) you can do it before using the File Reader. If we have the following html piece of code: <input type="file" id="newFile"> You can access the properties directly like this: document.getElementById...
Create a vector source var vectorSource = new ol.source.Vector({}); Initiate Map Object and add vector Layer to the map and Source as the vectorSource var map = new ol.Map({ layers: [ new ol.layer.Tile({ source: new ol.source.OSM() }), new ol.layer.Vector({ ...
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...

Page 1038 of 1336