Tutorial by Examples: and

If you want to use the shorthand you can make use of conditional logic with the following shorthand. Only the string 'false' will evaluate to true (2.0). #Done in Powershell 2.0 $boolean = $false; $string = "false"; $emptyString = ""; If($boolean){ # this does not ru...
<mvc:View controllerName="sap.m.sample.ListCounter.List" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m"> <List headerText="Fruits" items="{path:'products>/Products', sorter:{path:'Name'}, filter:{path:'Type', o...
import AVFoundation class QRScannerViewController: UIViewController, AVCaptureMetadataOutputObjectsDelegate { func viewDidLoad() { self.initCaptureSession() } private func initCaptureSession() { let captureDevice = AVCaptureDevice .defa...
Use the quotestar register to copy/paste between Vim and system clipboard "*yy copies the current line into the system clipboard "*p pastes the content of the system clipboard into Vim
Method Overriding and Overloading are two forms of polymorphism supported by Java. Method Overloading Method overloading (also known as static Polymorphism) is a way you can have two (or more) methods (functions) with same name in a single class. Yes its as simple as that. public class Shape{ ...
One of the best features of async/await syntax is that standard try-catch coding style is possible, just like you were writing synchronous code. const myFunc = async (req, res) => { try { const result = await somePromise(); } catch (err) { // handle errors here } }); Here'...
Let's discuss with an example. From n items, in how many ways you can choose r items? You know it is denoted by . Now think of a single item. If you don't select the item, after that you have to take r items from remaining n-1 items, which is given by . If you select the item, after that you hav...
Email clients use different rendering engines to render HTML emails: Apple Mail, Outlook for Mac, Android Mail and iOS Mail use WebKit Outlook 2000/02/03 use Internet Explorer 6 Outlook 2007/10/13 use Microsoft Word Web clients use their browser’s respective engine (e.g. Safari uses WebKit, Ch...
Tables for Layout The structure of an HTML email file is similar to that of a web page: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Hello!</title> </head> <body> &...
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(...
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...
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['...
If mapping covariantly over only the first argument, or only the second argument, is desired, then first or second ought to be used (in lieu of bimap). first :: Bifunctor f => (a -> c) -> f a b -> f c b first f = bimap f id second :: Bifunctor f => (b -> d) -> f a b -> f...
A LocalDate is a date without a timezone. Consider using them when you are only concerned with the year, month, and day of month and are not interested in an exact time. For example, when we write our date of birth (such as 1960-01-01) we don't care about the timezone in which it happened.
Go to File > Settings > Keymap and select the Keymaps option from: Mac OS X Emacs Visual Studio Eclise Netbeans Jbuilder and others, to map the shortcuts to the wanted tool ones.
simpleCLI go to simpleCLI, enter the following code java weka.classifiers.rules.ZeroR -t path/to/a-file-of-dataset Jython Example codes from Advanced Weka MOOC course lesson 5.1 # imports import weka.core.converters.ConverterUtils.DataSource as DS import weka.filters.Filter as Filter impor...
# imports import weka.core.converters.ConverterUtils.DataSource as DS import weka.filters.Filter as Filter import weka.filters.unsupervised.attribute.Remove as Remove import os # load data data = DS.read(os.environ.get("MOOC_DATA") + os.sep + "iris.arff") # remove clas...
Sometimes we don't want to load the entire XML file in order to get the information we need. In these instances, being able to incrementally load the relevant sections and then delete them when we are finished is useful. With the iterparse function you can edit the element tree that is stored while ...
create table tgt ( id, val ) as select 1, 'a' from dual union all select 2, 'b' from dual ; Table TGT created. create table src ( id, val ) as select 1, 'x' from dual union all select 2, 'y' from dual ; Table SRC created. update ( select t.val as t_val, s.val as s_val ...

Page 116 of 153