DreamsCoder.com

We Code your Dreams

How to Integrate Google reCAPTCHA in Your Website



How to Integrate Google reCAPTCHA in Your Website


Click here for Live Demo

Source Code



This video is an explanation of how to integrate the Google reCAPTCHA into your website


Step 1: Generate Keys from here https://www.google.com/recaptcha/intro/invisible.html

Step 2: Client Side integration i.e. in Head tag and site key in the form.

Step 3: Server Side integration i.e. entering your secret key and Sending POST request



Label - php


by -




Simple code in C for Binary tree traversal: Preorder, Inorder and Postorder



Simple code in C for Binary tree traversal: Preorder, Inorder and  Postorder


Click here for Live demo

Source code

Binar Tree Traversal

  • Preorder
  • Inorder
  • Postorder

  • #include 
    #include 
    
    typedef struct BST
    {
        int data;
        struct BST *left;
        struct BST *right;
    } node;
    
    node *create();
    void insert(node *, node *);
    void preorder(node *);
    void postorder(node *);
    void inorder(node *);
    
    int main()
    {
        int ch;
        node *root = NULL, *temp, *current;
        printf("
    Enter the number of Nodes you want :	");
        scanf("%d", &ch);
        printf("
    Enter %d Nodes data :
    ", ch);
        do
        {
            temp = create();
            if (root == NULL)
                root = temp;
            else
                insert(root, temp);
            ch--;
    
        } while (ch != 0);
    
        printf("
    Preorder Traversal
    ");
        preorder(root);
    
        printf("
    Inorder Traversal
    ");
        inorder(root);
    
        printf("
    Postorder Traversal
    ");
        postorder(root);
    
        printf("
    ");
    
        return 0;
    }
    
    node *create()
    {
        node *temp;
    
        temp = (node *)malloc(sizeof(node));
        scanf("%d", &temp->data);
        temp->left = temp->right = NULL;
        return temp;
    }
    
    void insert(node *root, node *temp)
    {
        if (root == NULL)
        {
            root = temp;
        }
        else
        {
    
            if (temp->data < root->data)
            {
                if (root->left != NULL)
                    insert(root->left, temp);
                else
                    root->left = temp;
            }
    
            if (temp->data > root->data)
            {
                if (root->right != NULL)
                    insert(root->right, temp);
                else
                    root->right = temp;
            }
        }
    }
    
    void preorder(node *root)
    {
        if (root != NULL)
        {
            printf("%d 	", root->data);
            preorder(root->left);
            preorder(root->right);
        }
    }
    
    void postorder(node *root)
    {
        if (root != NULL)
        {
            postorder(root->left);
            postorder(root->right);
            printf("%d 	", root->data);
        }
    }
    
    void inorder(node *root)
    {
        if (root != NULL)
        {
            inorder(root->left);
            printf("%d 	", root->data);
            inorder(root->right);
        }
    }

    Label - data-structure


    by -




    Creating a Simple Bar Graph on Canvas with Live example and Code [Explained in Video]



    Creating a Simple Bar Graph on Canvas with Live example and Code [Explained in Video]


    Click here for Live Demo



    Source Code




    
     
    
        Enter the values seperated by a comma

    Label - Html


    by -




    How to Detect Ad Blocker on your website using Javascript



    How to Detect Ad Blocker on your website using Javascript


    Live Demo

    Add this code in your website


    
    
    

    Label - javascript


    by -




    Printing the singly linked list in reverse order using recursion in C



    Printing the singly linked list in reverse order using recursion in C


    Live Demo



    Source code




    
    
    #include 
    #include 
    
    struct node
    {
        int data;
        struct node *next;
    } *temp, *head, *curr;
    
    void ReversePrint(struct node *head);
    void RegularPrint(struct node *curr);
    void add();
    
    void add()
    {
        int num;
        int data, i;
        printf("Enter number of nodes :");
        scanf("%d", &num);
        for (i = 0; i < num; i++)
        {
            temp = (struct node *)malloc(sizeof(struct node));
            printf("Enter the data :");
            scanf("%d", &data);
            temp->data = data;
            if (i == 0)
            {
                head = temp;
                curr = head;
            }
            else
            {
                curr->next = temp;
                curr = temp;
            }
        }
        printf("
    RegularPrintlaying in regular order");
        curr = head;
        RegularPrint(curr);
        printf("RegularPrintlaying in reverse order");
        ReversePrint(head);
    }
    
    void RegularPrint(struct node *curr)
    {
        if (curr == NULL)
            return;
        printf("%d 	", curr->data);
        curr = curr->next;
        RegularPrint(curr);
    }
    
    void ReversePrint(struct node *head)
    {
        if (head == NULL)
            return;
        ReversePrint(head->next);
        printf("%d 	", head->data);
    }
    
    int main()
    {
        add();
    
        return 0;
    }

    Label - data-structure


    by -




    next page >

    Latest Technology,Tricks and Tips