Tutorial by Examples: a

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;
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...
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...
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...
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...
Before we get our hands dirty with code, I feel it is necessary to understand how data is stored in firebase. Unlike relational databases, firebase stores data in JSON format. Think of each row in a relational database as a JSON object (which is basically unordered key-value pair). So the column nam...
I am gonna assume you already know about adding gradle dependencies firebase in android studio. If you don't just follow the guide from here. Add your app in firebase console, gradle sync android studio after adding dependencies. All dependencies are not needed just firebase database and firebase au...
Take a use case, like a chat app or a collaborative grocery list app (that basically requires a list of objects to be synced across users). If you use firebase database and add a value event listener to the chat parent node or grocery list parent node, you will end with entire chat structure from th...
When you have a huge JSON database, adding a value event listener doesn't make sense. It will return the huge JSON and parsing it would be time consuming. In such cases we can use pagination and fetch part of data and display or process it. Kind of like lazy loading or like fetching old chats when u...
In [1]: df = pd.DataFrame({'A': [1, 2, 3], 'B': [1.0, 2.0, 3.0], 'C': ['a', 'b', 'c'], 'D': [True, False, True]}) In [2]: df Out[2]: A B C D 0 1 1.0 a True 1 2 2.0 b False 2 3 3.0 c True Getting a python list from a series: In [3]: df['...
Magento is a very popular eCommerce application. It offers a great deal of customization and abilities from initial install. Here are a few suggestions for optimizing a Magento installation. Enabling Output Compression In your .htaccess file for Magento you will find a section of text starting wit...
First-time visitors to any web page has to make several HTTP requests. By using the “Expires” header you make the components of the requests cacheable. This avoids unnecessary HTTP requests on subsequent page views. You want to find the area of the .htaccess file that starts with <IfModulemod_ex...
Merge JS and CSS Files This particular tweak will reduce the number of HTTP requests on your eCommerce site. [box type=”alert” border=”full”]Note: This can sometimes break some applications. After performing the following steps, please ensure that the site still performs as it did before enabling ...
The model Magento uses to store customer and product data results in longer than average SQL queries and more reads. Enabling the Flat Catalog option for Categories and Products will merge product data into one table, therefore improving performance. Login to your administration area and go to – Sy...

Page 849 of 1099