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 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', |
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
<!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" |
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
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; |
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 int pop (){ | |
if ( isEmpty() ){ | |
System.out.println("No values to pop"); | |
System.exit(1); | |
} | |
return arr[top--]; | |
} |
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 void push (int x) { | |
if ( isFull() ){ | |
System.out.println("Stack is full."); | |
return; | |
} | |
System.out.println("Inserting "+x); | |
arr[++top] = x; |
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 int currentSize{ | |
return top+1; | |
} | |
public boolean isEmpty{ | |
return top == -1; | |
} | |
public boolean isFull(){ | |
return top == size - 1; |
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
Class Stack { | |
private int arr[]; | |
private int top; | |
private int size; | |
//Constructor | |
Stack (int size){ | |
arr = new int[size] | |
size = size; | |
top = -1; |
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
#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; |
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
#include <stdio.h> | |
int main(){ | |
int p = 0,n=10; | |
for(int i=1;p<=n;i++){ | |
p = p+i; | |
printf("%d\n",p); | |
} |
NewerOlder