Tutorial by Examples: commun

Create index.js as const {app, BrowserWindow, ipcMain} = require('electron') let win = null app.on('ready', () => { win = new BrowserWindow() win.loadURL(`file://${__dirname}/index.html`) win.webContents.openDevTools() win.on('closed', () => { win = null }) }) ipcM...
In this example we will make use of Redux and React Redux modules to handle our application state and for auto re-render of our functional components., And ofcourse React and React Dom You can checkout the completed demo here In the example below we have three different components and one connecte...
In this very first example, a basic serial write operation is started from an Arduino device. void setup() { // put your setup code here, to run once: Serial.begin(9600); } void loop() { // put your main code here, to run repeatedly: Serial.println("Hello World!"); dela...
All communications between Fragments must go via an Activity. Fragments CANNOT communicate with each other without an Activity. Additional Resources How to implement OnFragmentInteractionListener Android | Communicating With Other Fragments In this sample, we have a MainActivity that hosts t...
USE [MyDatabase] CREATE MESSAGE TYPE [//initiator] VALIDATION = WELL_FORMED_XML; GO CREATE CONTRACT [//call/contract] ( [//initiator] SENT BY INITIATOR ) GO CREATE QUEUE InitiatorQueue; GO CREATE QUEUE TargetQueue; GO CREATE SERVICE InitiatorService ON QUEUE...
For this demonstration we will use service broker construction created in another part of this documentation. Mentioned part is named 3. Create basic service broker construction on database (single database communication). USE [MyDatabase] DECLARE @ch uniqueidentifier = NEWID() DECLARE @msg XML...
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; ...
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...
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...
Pipes supports simple binary communication between a client and a server In this example: a client connects and sends a FirstMessage the server receives and answers DoSomething 0 the client receives and answers DoNothing step 2 and 3 are repeated indefinitely The command data type exchange...
The window.postMessage() method together with its relative event handler window.onmessage can be safely used to enable cross-origin communication. The postMessage() method of the target window can be called to send a message to another window, which will be able to intercept it with its onmessage e...
Node js code Sample to start this topic is Node.js server communicating with Arduino via serialport. npm install express --save npm install serialport --save Sample app.js: const express = require('express'); const app = express(); var SerialPort = require("serialport"); var po...

Page 2 of 2