By Manoj Naidu
-
To Launch an EC2 instance from aws console with all the credentials and configurations hooked.
To Launch an EC2 instance from aws console with all the credentials and configurations hooked.
class PaytmController < ApplicationController | |
skip_before_action :verify_authenticity_token | |
def paytm | |
@checksum = new_pg_checksum(params, MERCHANT_KEY) # MERCHANT_KEY = your Merchant key | |
end | |
def handle_payment | |
if params["CHECKSUMHASH"] | |
paytmHash = Hash.new |
require 'contentful' | |
client = Contentful::Client.new( | |
space: '<spacd_id>', | |
access_token: '<access-token>', | |
dynamic_entries: :auto | |
) | |
entries = client.entries # For grabbing entries | |
entries.each do |entry| |
#include <iostream> | |
using namespace std; | |
class Complex{ | |
int real,img; | |
public: | |
Complex(int real=0, int img=0){ | |
this->real = real; | |
this->img = img; | |
} |
#include <iostream> | |
using namespace std; | |
int give_max(int x, int y){ | |
return x>y ? x : y; | |
} | |
int main(){ | |
int (*f)(int,int); // Pointer declaration | |
f = give_max; // Pointer initialization with the function name |
def level_order(root) | |
result, queue = [], [] | |
return result if !root | |
queue << root | |
result << [root.val] | |
while !queue.empty? | |
len = queue.length | |
count = 0 | |
inter = [] | |
len.times do |
#include <iostream> | |
#include <queue> | |
using namespace std; | |
struct Node { | |
int data; | |
struct Node * left; | |
struct Node * right; | |
}*root=NULL; |
queue<TreeNode*> q; // To store the node addresses | |
vector<int> result; // To store the values in the node | |
result.push_back(root->val); | |
q.push(root); | |
while (!q.empty()) { | |
node = q.front(); | |
q.pop(); | |
if(node->left){ | |
result.push_back(node->left->val); | |
q.push(node->left); |
goal,foul,size,points,seg = [],[],[],[],[] | |
n = gets.to_i | |
n.times do | |
size << gets.to_i | |
g = gets.strip.split(/\s+/).map(&:to_i) | |
goal << g | |
f = gets.strip.split(/\s+/).map(&:to_i) | |
foul << f | |
end |