brew install gnatsd
[NATS)(https://www.nats.io/documentation/tutorials/gnatsd-install/)
-
Create Server 1 server1.conf
-
Create Server 2 server2.conf
'use strict'; | |
// const repos = require('./repos'); | |
const FS = require('fs'); | |
// const trieDataSet = require('./trie-dataset'); | |
const Util = require('util'); | |
const Path = require('path'); | |
const modUtils = require('../mod-utils'); | |
const DATASET_PATH = process.env.DATASET_PATH; |
'use strict'; | |
const repos = require('./repos'); | |
const FS = require('fs'); | |
const trieDataSet = require('./trie-dataset'); | |
const Util = require('util'); | |
module.exports = Trie; | |
function Trie() { |
public class Rotator { | |
public String rotate(String input, int maxRotations) { | |
int current = -1; | |
char[] letters = input.toCharArray(); | |
final String original = input; | |
int start = input.length() - maxRotations; | |
// | |
for (int i = 0; i < letters.length; i++) { |
brew install gnatsd
[NATS)(https://www.nats.io/documentation/tutorials/gnatsd-install/)
Create Server 1 server1.conf
Create Server 2 server2.conf
public class LinkedList { | |
private Node head; | |
private Node current; | |
private boolean isFirst = false; | |
private int length; | |
public LinkedList() { | |
} |
function findMedian(input1, input2) { | |
let resultList = sortLists(input1 || [], input2 || []); | |
if (resultList.length > 0) { | |
let medianIdx = Math.floor(resultList.length / 2); | |
if (resultList.length % 2 === 0) { | |
return (resultList[medianIdx - 1] + resultList[medianIdx]) / 2; | |
} else { | |
return resultList[medianIdx]; | |
} |
// _Channels_ are the pipes that connect concurrent | |
// goroutines. You can send values into channels from one | |
// goroutine and receive those values into another | |
// goroutine. | |
package main | |
import "bufio" | |
import "fmt" | |
import "net" |
Start Fresh: | |
Step 1: | |
docker pull ramesh1211/optimus:c453d919e443 | |
Step 2: //Stop any existing Docker Processees. | |
docker stop $(docker ps) | |
Step3: | |
docker run -d -p 8009:8080 f914f44dbcc2 |
import RPi.GPIO as GPIO | |
import time | |
GPIO.setmode(GPIO.BOARD) | |
pin_to_circuit=7 | |
GPIO.setup(pin_to_circuit, GPIO.OUT) | |
public class TestSum { | |
public static void main(String[] args) { | |
List<Integer> inputNumbers = new ArrayList<Integer>(); | |
inputNumbers.add(3); | |
inputNumbers.add(4); | |
inputNumbers.add(6); | |
inputNumbers.add(2); | |
inputNumbers.add(5); |