Skip to content

Instantly share code, notes, and snippets.

View daveRanjan's full-sized avatar
💭
Working Class Hero

Devendra Tiwari daveRanjan

💭
Working Class Hero
View GitHub Profile
openapi: 3.0.0
info:
title: CAM Final
version: 1.0.0
servers:
- url: http://{{cam_server_url}}
paths:
/api/v1/folders/{folderId}/list:
get:
tags:
@daveRanjan
daveRanjan / HashMapTest.java
Created July 14, 2022 09:52
Coding Question 1
import java.util.HashMap;
import java.util.Map;
public class HashMapTest {
public static class A {
String name;
public int hashCode() {
return name.hashCode();
@daveRanjan
daveRanjan / EventStructure.json
Created July 21, 2020 06:44
Event Structure with 5Ws
{
"eventSource":"IVR", #Who
"eventVersion":"1",
"eventSourceId":"23-5-54" #Where
"eventAt":"2020-7-7 12:54:00", #When
"eventType":"InteractionStart/InteractionEnd", #Why
"eventId":"95a496e8-5c46-4c88-af15-c38778283430",
"eventFlowId":"42512ff9-3cdd-8df6-3925-ba8fcebe8796",
"eventSequece":"3",
"eventData": { #What
@daveRanjan
daveRanjan / JWTQuickTests.java
Created September 19, 2017 20:19
JWTFunctionalityUT
package com.example.usergroups;
import com.auth0.jwt.JWT;
import com.auth0.jwt.JWTVerifier;
import com.auth0.jwt.algorithms.Algorithm;
import com.auth0.jwt.exceptions.InvalidClaimException;
import com.auth0.jwt.exceptions.JWTCreationException;
import com.auth0.jwt.interfaces.DecodedJWT;
import org.json.JSONException;
import org.json.JSONObject;
public class Notify implements SmsSender, EmailSender {
@Override
public class send(){
//Todo: try to send something
// What if now I only want to use default send() method from SmsSender
// You can call the default method of SmsSender using super keyword
SmsSender.super.send();
//similarly you can call send method from EmailSender
public interface SmsSender{
default void send(){
System.out.println("Sms send successfully");
}
}
public interface EmailSender {
default void send(){
System.out.println("Email send successfully");
}
}
class Barfi implements Eatable {
// In most of the cases :P
public String shape = "Rectangle"
}
public class TestRunner {
public static void main(String[] args){
public class Pickle implements Eatable {
@Override
public void taste(){
System.out.println("hey its spicy, don't eat too much!");
}
}
public interface Eatable {
default void taste(){
System.out.println("YeYe this tastes great");
}
}