Tutorial by Examples: com

Creates a graph topology in a distributed manner so that each node defines its neighbors. Each node communicates its rank among neighbors with MPI_Neighbor_allgather. #include <mpi.h> #include <stdio.h> #define nnode 4 int main() { MPI_Init(NULL, NULL); int rank; ...
Test automation framework can have several components depending on automation planned. Some of them(though not limited to) are: Test Runner (TestNG, JUnit, Jest, Protractor, Cucumber) Test Container (BDD Specs-Steps, Junit Tests, Spec based functions) Test Environment Configuration Test Data S...
To use multi-threading in MATLAB one can use the batch command. Note that you must have the Parallel Computing toolbox installed. For a time-consuming script, for example, for ii=1:1e8 A(ii)=sin(ii*2*pi/1e8); end to run it in batch mode one would use the following: job=batch("da&quot...
When creating a model for a table that has a composite primary key, additional work is required on the Object for the model Entity to respect those constraints. The following example SQL table and Entity demonstrates the structure to store a review left by a customer for an item in an online store....
const languages = [ 'JavaScript', 'Python', 'Java', 'Elm', 'TypeScript', 'C#', 'F#' ] // one liner const Language = ({language}) => <li>{language}</li> Language.propTypes = { message: React.PropTypes.string.isRequired } /** * If there are more ...
Below is an Employer entity class which is mapped to the table employer. As you can see I used fetch = FetchType.LAZY instead of fetch = FetchType.EAGER. The reason I am using LAZY is because Employer may have a lot of properties later on and every time I may not need to know all the fields of an Em...
To illustrate this, here is a function that has 3 different "wrong" behaviors parameter is completely stupid: we use a user-defined expression parameter has a typo: we use Oracle standard NO_DATA_FOUND error another, but not handled case Feel free to adapt it to your standards: DE...
You can use the ng generate or ng g command to generate Angular building blocks (components, services, pipes, etc.). You can find all possible blueprints in the table below: ScaffoldUsageShortenedComponentng generate component component-nameng g c component-nameDirectiveng generate directive direc...
class MyToolbarControl { public: MyToolbarControl(HWND hWndToolbar, HWND hWndNotifyParent = nullptr) : _Handle(hWndToolbar) { if (hWndNotifyParent == nullptr) { hWndNotifyParent = GetAncestor(hWndToolbar, GA_ROOTOWNER); } SetWindowSubclass( ...
Pack your com.stackoverflow.${whatever} clases on a jar called stackoverflow.jar Create folder com/stackoverflow/main on ${WILDFLY_HOME}/modules Put the jar on the last dir Create a file called module.xml with the following content: <?xml version="1.0" encoding="UTF-8"...
For some reason you develop a new version of com.stackoverflow (say version 1.1), then you should: Create folder com/stackoverflow/1.1 on ${WILDFLY_HOME}/modules Put the new jar on last dir Create file module.xml on last dir with the following content <?xml version="1.0" encodin...
file_unzip = 'filename.zip' unzip = zipfile.ZipFile(file_unzip, 'r') unzip.extractall() unzip.close()
file_untar = 'filename.tar.gz' untar = tarfile.TarFile(file_untar) untar.extractall() untar.close()
If you have an Arduino connected to a computer or a Raspberry Pi, and want to send data from the Arduino to the PC you can do the following: Arduino: void setup() { // Opens serial port, sets data rate to 9600 bps: Serial.begin(9600); } void loop() { // Sends a line over serial: Se...
To create a customization plugin, you simply create a class derived from CustomizationPlug and package it into customization. While the system is publishing customization project, it will execute the OnPublished and UpdateDatabase methods implemented in your customization plugin only within the curr...
<# .SYNOPSIS Gets the content of an INI file. .DESCRIPTION Gets the content of an INI file and returns it as a hashtable. .INPUTS System.String .OUTPUTS System.Collections.Hashtable .PARAMETER FilePath Specifies the path to the input INI file. .EXAMPLE ...
<# .SYNOPSIS Reads a CSV file and filters it. .DESCRIPTION The ReadUsersCsv.ps1 script reads a CSV file and filters it on the 'UserName' column. .PARAMETER Path Specifies the path of the CSV input file. .INPUTS None. You cannot pipe objects to ReadUsersCsv.ps1. ...
So what we will try to do is to compile a following function int sum(int a, int b) { return a + b + 2; } on the fly. And here's the entire .cpp example: #include <iostream> #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Module.h" #include "llvm/IR/I...
Some very simple and low cost hardware devices, like sensors, use a one-bit communication protocol. A single bi-directional data line connects the device to a kind of micro-controller. It is frequently pulled up by a pull-up resistor. The communicating devices drive the line low for a pre-defined du...
There are 2/3 options to connect components together in Talend. You should always try to use OnSubjob connectors. This saves a lot of headaches. You'll see from the examples why. What happens when you mix the connection types / What is the execution order? If OnComponent OnSubjob Keep in mi...

Page 57 of 65