This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"info": { | |
"_postman_id": "767f8402-3259-1c5a-5597-fb9a62a77193", | |
"name": "Camunda OC Demo", | |
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" | |
}, | |
"item": [ | |
{ | |
"name": "Task List", | |
"request": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.List; | |
import java.util.stream.IntStream; | |
import java.util.stream.Stream; | |
import java.util.function.Predicate; | |
public class Main{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.Color; | |
import java.util.function.Function; | |
public class Main { | |
public static void execute(Function<NewBrightColor, Color> func) { | |
func.apply(new NewBrightColor()); | |
} | |
public static void main(String[] args) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AsyncRequest{ | |
ListeningExecutorService executor = MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(8)); | |
public void makeRequest(String url) throws Exception{ | |
// task to execute in executor | |
Callable<String> asyncTask = new Callable<String>() { | |
@Override | |
public String call() throws Exception { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Fetcher { | |
public void downloadURL(String url, FetcherCallback callbackHandler); | |
} | |
interface FetcherCallback { | |
public void onData(String data); | |
public void onError(Exception e); | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -ev | |
# Reference: https://github.com/mininet/mininet/wiki/Installing-new-version-of-Open-vSwitch | |
# How to test: ovs-vsctl -V | |
# Check permission | |
test $(id -u) -ne 0 && echo "This script must be run as root" && exit 0 | |
#Remove old version ovs | |
aptitude remove openvswitch-common openvswitch-datapath-dkms openvswitch-controller openvswitch-pki openvswitch-switch -y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Exercise 1: | |
First Hello Program | |
1. First to the root directory of Hello project: | |
$ cd /home/opendaylight/bootcamp/opendaylight-application-dev-training/Code-Sample/Md-Sal-Demo/hello | |
How we generated the project directory structure: | |
2. Compile the code | |
$ mvn clean install -DskipTests -X ( -o to build offline) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from requests.auth import HTTPBasicAuth | |
from websocket import create_connection | |
""" | |
Executing the file: | |
$ python rest_app.py (edit the BASEURL according to the controller ip (address, port)) | |
Steps to follow to test the code: |
NewerOlder