This file contains 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
# Build tool files | |
.gradle/ | |
.mvn/ | |
/out | |
/build | |
node_modules/ | |
# Compiled class file | |
*.class |
This file contains 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 ballerina/http; | |
listener http:Listener helloWorldEP = new(9095, config = { httpVersion: "2.0" }); | |
service hello on helloWorldEP { | |
resource function sayHello(http:Caller caller, http:Request req) { | |
// Send a Push Promises for 2 resources with 2 methods. | |
http:PushPromise promise1 = new(path = "/resource1", method = "GET"); |
This file contains 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
package DM; | |
/* | |
Porter stemmer in Java. The original paper is in | |
Porter, 1980, An algorithm for suffix stripping, Program, Vol. 14, | |
no. 3, pp 130-137, | |
See also http://www.tartarus.org/~martin/PorterStemmer |
This file contains 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
// LinkedList_OOP_Queue.cpp : Defines the entry point for the console application. | |
// L.D.C.Lakmal | |
#include "stdafx.h" | |
#include <iostream> | |
using namespace std; | |
typedef int E; | |
class Node { |
This file contains 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
// LinkedList_OOP_Stack.cpp : Defines the entry point for the console application. | |
// L.D.C.Lakmal | |
#include "stdafx.h" | |
#include <iostream> | |
using namespace std; | |
typedef int E; | |
class Node { |
This file contains 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 ballerina/grpc; | |
import ballerina/jwt; | |
listener grpc:Listener paymentsEP = new(9191, | |
secureSocket = { | |
key: { | |
certFile: "/path/to/public.crt", | |
keyFile: "/path/to/private.key" | |
} | |
} |
This file contains 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 ballerina/grpc; | |
GrpcClient clientEP = check new("https://localhost:9191", | |
auth = { | |
issuer: "order-service", | |
audience: ["payment-service", "delivery-service"], | |
keyId: "5a0b754-895f-4279-8843-b745e11a57e9", | |
jwtId: "JlbmMiOiJBMTI4Q0JDLUhTMjU2In", | |
customClaims: { "scp": "admin" }, | |
expTime: 3600, |
This file contains 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 ballerina/http; | |
import ballerina/graphql; | |
listener http:Listener apiGateway = new(9090, | |
secureSocket = { | |
key: { | |
certFile: "/path/to/public.crt", | |
keyFile: "/path/to/private.key" | |
} | |
} |
This file contains 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 ballerina/http; | |
http:Client clientEP = check new("https://localhost:9092", | |
secureSocket = { | |
cert: "/path/to/client-public.crt", | |
key: { | |
certFile: "/path/to/server-public.crt", | |
keyFile: "/path/to/server-private.key" | |
} | |
} |
This file contains 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 ballerina/http; | |
listener http:Listener listenerEP = new(9091, | |
secureSocket = { | |
key: { | |
certFile: "/path/to/server-public.crt", | |
keyFile: "/path/to/server-private.key" | |
}, | |
mutualSsl: { | |
verifyClient: http:REQUIRE, |
NewerOlder