Skip to content

Instantly share code, notes, and snippets.

View pavinduLakshan's full-sized avatar
🎯
Focusing

Pavindu Lakshan pavinduLakshan

🎯
Focusing
View GitHub Profile
import React from 'react';
import './payment_modal.css'
const PaymentModal = ({ orderId, name, amount }) => {
// Put the payment variables here
var payment = {
sandbox: true, // if the account is sandbox or real
merchant_id: '121XXXX', // Replace your Merchant ID
return_url: 'http://sample.com/return',
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
Class Stack {
private int arr[];
private int top;
private int size; // maximum no. of elements allowed in the stack
//Constructor
Stack (int size){
arr = new int[size]
size = size;
top = -1;
public int pop (){
if ( isEmpty() ){
System.out.println("No values to pop");
System.exit(1);
}
return arr[top--];
}
public void push (int x) {
if ( isFull() ){
System.out.println("Stack is full.");
return;
}
System.out.println("Inserting "+x);
arr[++top] = x;
public int currentSize{
return top+1;
}
public boolean isEmpty{
return top == -1;
}
public boolean isFull(){
return top == size - 1;
Class Stack {
private int arr[];
private int top;
private int size;
//Constructor
Stack (int size){
arr = new int[size]
size = size;
top = -1;
#include <time.h>
#include <stdio.h>
int main(){
clock_t start = clock();
int p = 0,n=20;
for(int i=1;p<=n;i++){
p = p+i;
#include <stdio.h>
int main(){
int p = 0,n=10;
for(int i=1;p<=n;i++){
p = p+i;
printf("%d\n",p);
}