Tutorial by Examples: arc

The component code is given as below. import { Component } from '@angular/core'; @Component({ selector: 'my-app', template: '<h1>{{title}}</h1>' }) export class MyAppComponent{ title = 'welcome'; } For angular testing, angular provide its testing utilities along with t...
The Search API provides access to recent tweets*. This is as opposed to the Stream API, which provides search results in real-time. <example> *Note that "the Search API is focused on relevance and not completeness" - Twitter Search API
UITabBarController building in Swift 3 Change image color and title according to selection with changing selected tab color. import UIKit class TabbarController: UITabBarController { override func viewDidLoad() { super.viewDidLoad() self.navigationController?.isNavigat...
There are several ways to search a given value in std::set or in std::multiset: To get the iterator of the first occurrence of a key, the find() function can be used. It returns end() if the key does not exist. std::set<int> sut; sut.insert(10); sut.insert(15); sut.insert(22); ...
/** * NetSuite will loop through each record in your search * and pass the record type and id for deletion * Try / Catch is useful if you wish to handle potential errors */ function MassDelete(record_type, record_id) { try { nlapiDeleteRecord(record_type, record_id...
ng new NewProject or ng init NewProject
Sometimes, you need to output to more than one index in ElasticSearch, or have a custom mapping you want to apply to new indices as they roll in. There are two ways to apply a custom mapping. One way, is to upload an ElasticSearch template. See the ElasticSearch documentation for that. The other ...
With a simple for loop, all zip archives in a directory can be extracted. for (i in dir(pattern=".zip$")) unzip(i) The dir function produces a character vector of the names of the files in a directory matching the regex pattern specified by pattern. This vector is looped through w...
Starting with version 2.7 ElementTree has a better support for XPath queries. XPath is a syntax to enable you to navigate through an xml like SQL is used to search through a database. Both find and findall functions support XPath. The xml below will be used for this example <Catalog> &l...
The function takes the argument of the current node index, adjacency list (stored in vector of vectors in this example), and vector of boolean to keep track of which node has been visited. void dfs(int node, vector<vector<int>>* graph, vector<bool>* visited) { // check whethe...
Note: These instructions are targeted at .NET Core 1.0.4 & 1.1.1 SDK 1.0.1 and higher. When using binary archives to install, we recommend the contents be extracted to /opt/dotnet and a symbolic link created for dotnet. If an earlier release of .NET Core is already installed, the directory and ...
Many watchOS apps (like Workout, Weather, Music, etc) have a main WKInterfaceTable or a set of buttons which are hooked up to another controller, similar to the navigation on iOS. This is called hierarchical view structure. To connect a button, Ctrl-Drag from the button to a controller, and select ...
class Node(object): def __init__(self, val): self.l_child = None self.r_child = None self.val = val class BinarySearchTree(object): def insert(self, root, node): if root is None: return node if root.val < node.val: ...
In a Searched Case statement, each option can test one or more values independently. The code below is an example of a searched case statement: DECLARE @FirstName varchar(30) = 'John' DECLARE @LastName varchar(30) = 'Smith' SELECT CASE WHEN LEFT(@FirstName, 1) IN ('a','e','i','o','u') ...
One of the best Linux distributions currently for Raspberry Pi (from now on, "RPi") is Arch Linux. This web shows the installation for: RPi2. ARMv7 architecture (32 bits). RPi3. There are two options: ARMv7 architecture (32 bits) or AArch architecture (64 bits). This t...
$service = new NetSuiteService(); $search = new TransactionSearchAdvanced(); $internalId = '123';//transaction internalId $search->criteria->basic->internalIdNumber->searchValue = $internalId; $search->criteria->basic->internalIdNumber->operator = "equalTo"; ...
https://bl.ocks.org/SumNeuron/7989abb1749fc70b39f7b1e8dd192248
Before checking the specific syntax, let's take a look on how to setup your environment to load needed plugins. Setup To load data directly from ElasticSearch you need to download the elasticsearch-hadoop plugin. You have different ways to make it work, for a quick setup you can do the following. ...
Compress-Archive -Path C:\Documents\* -CompressionLevel Optimal -DestinationPath C:\Archives\Documents.zip This command: Compresses all files in C:\Documents Uses Optimal compression Save the resulting archive in C:\Archives\Documents.zip -DestinationPath will add .zipif not present. -Li...

Page 11 of 13