A Readme file representing how a facade pattern can be used
import some-thirdparty-library.*;
class Upload {
String uploadMyFile(String apiKey, MultipartFile file){
// We meed to first authenticate
A Readme file representing how a facade pattern can be used
import some-thirdparty-library.*;
class Upload {
String uploadMyFile(String apiKey, MultipartFile file){
// We meed to first authenticate
public class AtPay implements Payment { | |
@Override | |
public void debitUser() { | |
System.out.println("Money deducted from user using AtPay"); | |
} | |
@Override | |
public void checkUserBalance() { | |
System.out.println("User balance checked using AtPay"); | |
} |
public class Main { | |
public static void main(String[] args){ | |
Singleton new1 = Singleton.getInstance("John", 30); | |
Singleton new2 = Singleton.getInstance("Doe", 28); | |
System.out.println("new 1 "+ new1.getName()+" "+ new1.getAge()); | |
System.out.println("new 2 "+ new2.getName()+" "+ new2.getAge()); | |
} | |
} |
public class Singleton { | |
private static Singleton instance; | |
private String name; | |
private int age; | |
private Singleton(String name, int age){ | |
this.name = name; | |
this.age = age; | |
} |
FROM maven:3.8.5-openjdk-17 as builder | |
WORKDIR /app | |
COPY pom.xml . | |
RUN mvn dependency:go-offline | |
COPY src/ ./src/ | |
RUN mvn clean package -DskipTests=true | |
FROM eclipse-temurin:17-jdk-alpine as prod | |
RUN mkdir /app | |
COPY --from=builder /app/target/*.jar /app/app.jar |
FROM eclipse-temurin:17-jdk-alpine as prod | |
RUN mkdir /app | |
COPY --from=builder /app/target/*.jar /app/app.jar | |
ENV SERVER_PORT=6060 | |
WORKDIR /app | |
EXPOSE 6060 | |
ENTRYPOINT ["java","-jar","/app.jar"] |
FROM maven:3.8.5-openjdk-17 as builder | |
WORKDIR /app | |
COPY pom.xml . | |
RUN mvn dependency:go-offline | |
COPY src/ ./src/ | |
RUN mvn clean package -DskipTests=true |
#include<stdio.h> | |
#include<string.h> | |
/** | |
* https://www.oanda.com/currency-converter/en/ | |
* As of 1st October 2023 | |
*/ | |
void display_name(); | |
void execute_conversion(); |
#include <stdio.h> | |
int main() | |
{ | |
int Marks[3][5] = { | |
{71, 75, 67, 73, 45}, // maths | |
{77, 65, 56, 78, 58}, // physics | |
{63, 57, 79, 88, 33} // chemistry | |
}; | |
int out_index; |
#include<stdio.h> | |
int main() | |
{ | |
int numbers[10]; | |
int i; | |
printf("You will be promted to enter any 10 numbers of choice, and only even numbers will be added \n\n"); | |
for(i = 0; i < 10; i++) { |