Tutorial by Examples: ar

Arrow function is the new way of defining a function in ECMAScript 6. // traditional way of declaring and defining function var sum = function(a,b) { return a+b; } // Arrow Function let sum = (a, b)=> a+b; //Function defination using multiple lines let checkIfEven = (a) => { ...
this in function refers to instance object used to call that function but this in arrow function is equal to this of function in which arrow function is defined. Let's understand using diagram Understanding using examples. var normalFn = function(){ console.log(this) // refers to global/windo...
This has been mentioned in other hybrid topics again and again. The old-school, but easy method to run Powershell is by: echoing the Powershell script into a temporary script Execute the temporary script Optionally remove the temporary script This is a sample script. @echo off echo power...
NSString *appDomain = [[NSBundle mainBundle] bundleIdentifier]; [[NSUserDefaults standardUserDefaults] removePersistentDomainForName:appDomain];
For example without a barrel, a consumer would need three import statements: import { HeroComponent } from '../heroes/hero.component.ts'; import { Hero } from '../heroes/hero.model.ts'; import { HeroService } from '....
If you don't think that malicious scripts can harm your site, you are wrong. Here is a list of what a malicious script could do: Remove itself from the DOM so that it can't be traced Steal users' session cookies and enable the script author to log in as and impersonate them Show a fake "Yo...
public class Equatable { public string field1; public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) return false; if (ReferenceEquals(this, obj)) return true; var type = obj.GetType(); if (GetType() != type) re...
Navigation bars are essentially a list of links, so the ul and li elements are used to encase navigation links. <ul> <li><a href="#">Home</a></li> <li><a href="#">About</a></li> <li><a href="#">...
To make a navigation bar using the HTML5 nav element, encase the links within the nav tag. <nav> <a href="#">Home</a> <a href="#">About</a> <a href="#">Contact</a> </nav>
When a notebook .Rmd is saved, an .nb.html file is created alongside it. This file is a self-contained HTML file which contains both a rendered copy of the notebook with all current chunk outputs (suitable for display on a website) and a copy of the notebook .Rmd itself. More info can be found at R...
One of the important areas of NLP is the matching of text objects to find similarities. Important applications of text matching includes automatic spelling correction, data de-duplication and genome analysis etc. A number of text matching techniques are available depending upon the requirement...
Since Supervised Learning consists of a target or outcome variable (or dependent variable) which is to be predicted from a given set of predictors (independent variables). Using these set of variables, we generate a function that map inputs to desired outputs. The training process continues until th...
In this Stack Overflow question, user txtechhelp found an issue with the ^ character which could cause a security issue. Cause anyInvaildCommand ^ Note: Make sure the caret(^) is the last character! Any extra CR\LF won't work at all! The caret looks for the next character to escape. However,...
Two main techniques allow passing data between GUI functions and Callbacks: setappdata/getappdata and guidata (read more about it). The former should be used for larger variables as it is more time efficient. The following example tests the two methods' efficiency. A GUI with a simple button is cre...
The first function, using an array, is much faster If called without the optional parameter, will default to .ThisWorkbook.ActiveSheet If the range is empty will returns Cell( 1, 1 ) as default, instead of Nothing Speed: GetMaxCell (Array): Duration: 0.0000790063 seconds GetMaxCell (Find ...
The procedures bellow will temporarily disable all Excel features at WorkBook and WorkSheet level FastWB() is a toggle that accepts On or Off flags FastWS() accepts an Optional WorkSheet object, or none If the ws parameter is missing it will turn all features on and off for all WorkSh...
fun startNewActivity(){ val intent: Intent = Intent(context, Activity::class.java) startActivity(intent) } You can add extras to the intent just like in Java. fun startNewActivityWithIntents(){ val intent: Intent = Intent(context, Activity::class.java) intent.putExtra(KEY_NA...
A single-value metrics aggregation that calculates an approximate count of distinct values. Values can be extracted either from specific fields in the document or generated by a script. POST /index/_search?size=0 { "aggs" : { "type_count" : { "ca...
.* in regex basically means "catch everything until the end of input". So, for simple strings, like hello world, .* works perfectly. But if you have a string representing, for example, lines in a file, these lines would be separated by a line separator, such as \n (newline) on Unix-like s...
Consider this example: He went into the cafe "Dostoevski" and said: "Good evening." Here we have two sets of quotes. Let's assume we want to match both, so that our regex matches at "Dostoevski" and "Good evening." At first, you could be tempted to keep...

Page 213 of 218