Vasu Jain

Student at Chandigarh university

Photography

Photography is the process of creating still or moving pictures by recording radiation on a sensitive medium like film or an electronic sensor. The products of photography are called negatives and photographs, the latter being developed from the negatives. Light patterns reflected or emitted by objects activate a sensitive chemical or electronic sensor during a timed exposure usually through a photographic lens in a camera. The camera stores the resulting information chemically or electronically. Photographers control the camera and lens to expose the light recording material to the required amount of light to form a latent image (on film) or raw file (in digital camera) which, after due processing, is converted to a usable image. In digital cameras, instead of film, an electronic image sensor based on light-sensitive devices is used. Photography can also be called an art and good photographers often exhibit their oeuvre like artists exhibit their paintings. In fact, the Greek word for photography means ‘drawing with light’. Photography has many applications in business, science and filmmaking, fashion, tourism, advertising, etc. Thus, there is fashion photography where people specialize in taking pictures of models in such a way that it highlights the designer costumes and accessories they sport. To promote tourism to a particular place, attractive brochures have to be designed. These will feature photographs of the tourist spots. Many industries too prepare brochures and catalogues featuring pictures of their products. In films, still photographers take stills of certain scenes to promote new films in the media. The movie camera is different from still cameras. It takes a rapid sequence of photographs on strips of film. Each series of images forms a frame. The frames are played back later on a movie projector. In the advertising industry, photo shoots are very common. The products to be advertised have to be shot and sometimes models are also part of the shoots. Good photographers are much in demand and charge hefty fees for their services. A talented photographer can also make a model’s career by helping them to put together a good portfolio. Professional courses are available for those who aspire to become photographers.Good jobs in the media also await them in prestigious magazines like the ‘National Geographic’. Newspapers also have staff photographers who accompany reporters to cover events. Photographers are also hired to cover weddings, birthdays and other important personal occasions. Some of the world famous photographers include Henri Cartier-Bresson who is considered as the greatest photographer of the last century and Alfred Eisenstaedt of ‘Life’ magazine. Photography is a lifelong hobby for many people.

B tree

#include<iostream> using namespace std;    // A BTree node class BTreeNode {     int *keys;  // An array of keys     int t;      // Minimum degree (defines the range for number of keys)     BTreeNode **C; // An array of child pointers     int n;     // Current number of keys     bool leaf; // Is true when node is leaf. Otherwise false public:     BTreeNode(int _t, bool _leaf);   // Constructor        // A function to traverse all nodes in a subtree rooted with this node     void traverse();        // A function to search a key in the subtree rooted with this node.         BTreeNode *search(int k);   // returns NULL if k is not present.    // Make the BTree friend of this so that we can access private members of this // class in BTree functions friend class BTree; };    // A BTree class BTree {     BTreeNode *root; // Pointer to root node     int t;  // Minimum degree public:     // Constructor (Initializes tree as empty)     BTree(int _t)     {  root = NULL;  t = _t; }        // function to traverse the tree     void traverse()     {  if (root != NULL) root->traverse(); }        // function to search a key in this tree     BTreeNode* search(int k)     {  return (root == NULL)? NULL : root->search(k); } };    // Constructor for BTreeNode class BTreeNode::BTreeNode(int _t, bool _leaf) {     // Copy the given minimum degree and leaf property     t = _t;     leaf = _leaf;        // Allocate memory for maximum number of possible keys     // and child pointers     keys = new int[2*t-1];     C = new BTreeNode *[2*t];        // Initialize the number of keys as 0     n = 0; }    // Function to traverse all nodes in a subtree rooted with this node void BTreeNode::traverse() {     // There are n keys and n+1 children, travers through n keys     // and first n children     int i;     for (i = 0; i < n; i++)     {         // If this is not leaf, then before printing key[i],         // traverse the subtree rooted with child C[i].         if (leaf == false)             C[i]->traverse();         cout << " " << keys[i];     }        // Print the subtree rooted with last child     if (leaf == false)         C[i]->traverse(); }    // Function to search key k in subtree rooted with this node BTreeNode *BTreeNode::search(int k) {     // Find the first key greater than or equal to k     int i = 0;     while (i < n && k > keys[i])         i++;        // If the found key is equal to k, return this node     if (keys[i] == k)         return this;        // If the key is not found here and this is a leaf node     if (leaf == true)         return NULL;        // Go to the appropriate child     return C[i]->search(k); }

Queue using linked list

#include<stdio.h> #include<conio.h> struct Node { int data; struct Node *next; }*front = NULL,*rear = NULL; void insert(int); void delete(); void display(); void main() { int choice, value; clrscr(); printf("\n:: Queue Implementation using Linked List ::\n"); while(1){ printf("\n****** MENU ******\n"); printf("1. Insert\n2. Delete\n3. Display\n4. Exit\n"); printf("Enter your choice: "); scanf("%d",&choice); switch(choice){ case 1: printf("Enter the value to be insert: "); scanf("%d", &value); insert(value); break; case 2: delete(); break; case 3: display(); break; case 4: exit(0); default: printf("\nWrong selection!!! Please try again!!!\n"); } } } void insert(int value) { struct Node *newNode; newNode = (struct Node*)malloc(sizeof(struct Node)); newNode->data = value; newNode -> next = NULL; if(front == NULL) front = rear = newNode; else{ rear -> next = newNode; rear = newNode; } printf("\nInsertion is Success!!!\n"); } void delete() { if(front == NULL) printf("\nQueue is Empty!!!\n"); else{ struct Node *temp = front; front = front -> next; printf("\nDeleted element: %d\n", temp->data); free(temp); } } void display() { if(front == NULL) printf("\nQueue is Empty!!!\n"); else{ struct Node *temp = front; while(temp->next != NULL){ printf("%d--->",temp->data); temp = temp -> next; } printf("%d--->NULL\n",temp->data); } }

Advantages and disadvantages of GST

Advantages and disadvantages  GST is a simple tax system. Now, the taxpayer won’t be confused about the what type of taxes he/she should pay. There will be only one tax, which is GST. The agenda of the government behind introducing GST itself is “One Nation, One Tax”. GST Act is going to ease the stress of taxes from the Indian businesses and manufacturers. They now have to pay lower taxes, and it will surely increase the scope of a better business environment and flexibility. India is economically growing at a lightning speed. The developed countries like Sweden, Denmark, Germany, Switzerland, Japan – have moved to a common GST (Goods and Service Tax) to provide one common window for tax collection. So now GST has become a standard for the global business and India being progressing towards the development had to embrace a uniform, sophisticated tax system which is GST. GST will surely increase the number of taxpayers, which will in turn help to reduce the tax rates as more people are paying taxes. Removal of the Cascading Tax Effect is another advantage of GST. In simple words “cascading tax effect” means a tax on tax. In previous tax system, the tax was levied on goods at each stage of the production process up to the point of being sold to the final consumer. A cascaded tax is a type of turnover tax with each successive transfer being taxed inclusive of any previous cascade taxes being levied this creates a burden of taxes on the end user. It is easy to create tax challan and pay it online on GST portal, tax file can be signed digitally. As every coin has two sides, even The GST has its own set of drawbacks and disadvantages.  GST is a newly introduced tax system in India. A common man is unaware of how the GST works moreover citizens are used to the previous direct taxes, so it would take the time to digest the whole big change and also to get familiar with the GST. Also, all the business software, processes like accounting and ERP software need to be updated with the latest tax system. Under GST some services will become costlier such as TeleCom, Airlines, Banking, Insurance will be costlier under GST bill.  Under new rules, tax needs to file each month and compliances are made more stringent, this might create a problem for small businesses. Same way Invoices needs to be GST complaint or else there are hefty fines, small businesses may not afford this transition. CA services and GST Complaint account software and related tools will add cost to Small businesses. Filing tax also faces some technical problems (faced by myself), most of the time digital signature don’t work, and a lot of people dont know the technical know-how to solve the issue. In this case, CA asks for handing over digital signature so that he/she can file returns on behalf of you. This is can be a serious identity theft issue, with DSC one can digitally sign any document. (If you know anyone who hands over their DSC to CA, make them aware of this.). Government is not spreading awareness about it. Though it’s been said that there will be only ONE TAX under GST, in reality, there are different tax slab taxes which ranges from 0% (for exempted goods), 3%,5%,12%,18% and 28%.  On top of which there are different cess needs to be paid. There are other smaller problems which arising not directly because of GST but due to its indirect effects. Small manufacturers who are dealing with high taxed material tend to buy it from unregistered vendors to evade high taxes. We have also seen some hotels and restaurants taking advantages of GST and charged customers higher taxes. Likewise, a lot of business spiked there prices by giving GST excuse.

Insertion and deletion in b+ tree

Insertion: 1) Initialize x as root. 2) While x is not leaf, do following ..a) Find the child of x that is going to to be traversed next. Let the child be y. ..b) If y is not full, change x to point to y. ..c) If y is full, split it and change x to point to one of the two parts of y. If k is smaller than mid key in y, then set x as first part of y. Else second part of y. When we split y, we move a key from y to its parent x. 3) The loop in step 2 stops when x is leaf. x must have space for 1 extra key as we have been splitting all nodes in advance. So simply insert k to x. Deletion: Remove the required key and associated reference from the node. If the node still has enough keys and references to satisfy the invariants, stop. If the node has too few keys to satisfy the invariants, but its next oldest or next youngest sibling at the same level has more than necessary, distribute the keys between this node and the neighbor. Repair the keys in the level above to represent that these nodes now have a different “split point” between them; this involves simply changing a key in the levels above, without deletion or insertion. If the node has too few keys to satisfy the invariant, and the next oldest or next youngest sibling is at the minimum for the invariant, then merge the node with its sibling; if the node is a non-leaf, we will need to incorporate the “split key” from the parent into our merging. In either case, we will need to repeat the removal algorithm on the parent node to remove the “split key” that previously separated these merged nodes — unless the parent is the root and we are removing the final key from the root, in which case the merged node becomes the new root (and the tree has become one level shorter than before).

Linked list

#include <stdio.h> #include <stdlib.h>    // A linked list node struct Node {   int data;   struct Node *next; };    /* Given a reference (pointer to pointer) to the head of a list and     an int, inserts a new node on the front of the list. */ void push(struct Node** head_ref, int new_data) {     /* 1. allocate node */     struct Node* new_node = (struct Node*) malloc(sizeof(struct Node));        /* 2. put in the data  */     new_node->data  = new_data;        /* 3. Make next of new node as head */     new_node->next = (*head_ref);        /* 4. move the head to point to the new node */     (*head_ref)    = new_node; }    /* Given a node prev_node, insert a new node after the given     prev_node */ void insertAfter(struct Node* prev_node, int new_data) {     /*1. check if the given prev_node is NULL */     if (prev_node == NULL)     {       printf("the given previous node cannot be NULL");       return;     }        /* 2. allocate new node */     struct Node* new_node =(struct Node*) malloc(sizeof(struct Node));        /* 3. put in the data  */     new_node->data  = new_data;        /* 4. Make next of new node as next of prev_node */     new_node->next = prev_node->next;        /* 5. move the next of prev_node as new_node */     prev_node->next = new_node; }    /* Given a reference (pointer to pointer) to the head    of a list and an int, appends a new node at the end  */ void append(struct Node** head_ref, int new_data) {     /* 1. allocate node */     struct Node* new_node = (struct Node*) malloc(sizeof(struct Node));        struct Node *last = *head_ref;  /* used in step 5*/        /* 2. put in the data  */     new_node->data  = new_data;        /* 3. This new node is going to be the last node, so make next of           it as NULL*/     new_node->next = NULL;        /* 4. If the Linked List is empty, then make the new node as head */     if (*head_ref == NULL)     {        *head_ref = new_node;        return;     }        /* 5. Else traverse till the last node */     while (last->next != NULL)         last = last->next;        /* 6. Change the next of last node */     last->next = new_node;     return; }    // This function prints contents of linked list starting from head void printList(struct Node *node) {   while (node != NULL)   {      printf(" %d ", node->data);      node = node->next;   } }    /* Driver program to test above functions*/ int main() {   /* Start with the empty list */   struct Node* head = NULL;      // Insert 6.  So linked list becomes 6->NULL   append(&head, 6);      // Insert 7 at the beginning. So linked list becomes 7->6->NULL   push(&head, 7);      // Insert 1 at the beginning. So linked list becomes 1->7->6->NULL   push(&head, 1);      // Insert 4 at the end. So linked list becomes 1->7->6->4->NULL   append(&head, 4);      // Insert 8, after 7. So linked list becomes 1->7->8->6->4->NULL   insertAfter(head->next, 8);      printf("\n Created Linked list is: ");   printList(head);      return 0; }