Tutorial by Examples: comp

Going to its roots, Logstash has the ability to parse and store syslog data. This example shows a basic configuration that gets you to that. input { file { path => [ "/var/log/syslog", "/var/log/auth.log" ] type => "syslog" } }...
wire d = 1'bx; // say from previous block. Will be 1 or 0 in hardware if (d == 1'b) // false in simulation. May be true of false in hardware
Simple Hello World Application: using System; namespace HelloWorld { class Program { static void Main(string[] args) { Console.WriteLine("Hello World"); } } } Equivalent IL Code (which will be JIT compiled) // Microsoft (R) ...
Completion can be used to match words used in a document. When typing a word, Ctrlp or Ctrln will match previous or next similar words in the document. This can even be combined with Ctrl-X mode to complete entire lines. For instance type something like: This is an example sentence. then go to ...
Nested for loops may be used to iterate over a number of unique iterables. result = [] for a = iterable_a for b = iterable_b push!(result, expression) end end Similarly, multiple iteration specifications may be supplied to an array comprehension. [expression for a = iterabl...
Generator comprehensions follow a similar format to array comprehensions, but use parentheses () instead of square brackets []. (expression for element = iterable) Such an expression returns a Generator object. julia> (x^2 for x = 1:5) Base.Generator{UnitRange{Int64},##1#2}(#1,1:5) Fun...
BFS can be used to find the connected components of an undirected graph. We can also find if the given graph is connected or not. Our subsequent discussion assumes we are dealing with undirected graphs.The definition of a connected graph is: A graph is connected if there is a path between every p...
A C library header can usually be included into a C++ program, since most declarations are valid in both C and C++. For example, consider the following foo.h: typedef struct Foo { int bar; } Foo; Foo make_foo(int); The definition of make_foo is separately compiled and distributed with the...
To use jquery in your Angular 2.x components, declare a global variable on the top If using $ for jQuery declare var $: any; If using jQuery for jQuery declare var jQuery: any This will allow using $ or jQuery into your Angular 2.x component.
The Sales Orders screen (SO.30.10.00) is a perfect example of a data entry form with a composite primary key. The primary key on the Sales Orders screen is composed by the Order Type and the Order Number: The recommended 2-step strategy to export data from the Sales Orders screen or any other dat...
Ext.define('App.Duck', { extend: 'Ext.Component', alias: 'widget.duck', initComponent: function () { this.callParent(arguments); this._quack(); }, _quack: function () { console.log('The duck says "Quack!"'); this.fireEvent('quack...
The rule that typedef declarations have the same syntax as ordinary variable and function declarations can be used to read and write more complex declarations. void (*f)(int); // f has type "pointer to function of int returning void" typedef void (*f)(int); // f is an alias for &...
Here counter is a child component accessed by demo which is a parent component using v-model. // child component Vue.component('counter', { template: `<div><button @click='add'>+1</button> <button @click='sub'>-1</button> <div>this is inside the child c...
You can use @ComponentScan in order to configure more complex package scanning. There is also @ComponentScans that act as a container annotation that aggregates several @ComponentScan annotations. Basic code examples @ComponentScan public class DemoAutoConfiguration { } @ComponentScans({@Co...
You might need a v-model on a computed property. Normally, the v-model won't update the computed property value. The template: <div id="demo"> <div class='inline-block card'> <div :class='{onlineMarker: true, online: status, offline: !status}'></div> ...
Install Xcode from the App Store. Install the Xcode developer tools > xcode-select --install This will provide basic command line tools such as gcc and make Install Mac Ports https://www.macports.org/install.php The OSX Sierra install package will provide an open-source method of ...
Taken from microsoft's github page with official documentation { "name": String, //The name of the project, used for the assembly name as well as the name of the package. The top level folder name is used if this property is not specified. "version": String, //The Semver versi...
A Java 8 compatibility kit for Scala. Most examples are copied from Readme Converters between scala.FunctionN and java.util.function import java.util.function._ import scala.compat.java8.FunctionConverters._ val foo: Int => Boolean = i => i > 7 def testBig(ip: IntPredicate) = ip.tes...
func sampleWithCompletion(completion:@escaping (()-> ())){ let delayInSeconds = 1.0 DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + delayInSeconds) { completion() } } //Call the function sampleWithCompletion { print("after on...
enum ReadResult{ case Successful case Failed case Pending } struct OutpuData { var data = Data() var result: ReadResult var error: Error? } func readData(from url: String, completion: @escaping (OutpuData) -> Void) { var _data = OutpuData(data: Data(), ...

Page 29 of 34