Posts

Showing posts from February, 2013

Different symbols and its meaning and origin

Image
Symbols have their own world.Each of the symbols have its own meaning and history.A symbol can  represents an idea,thought or situation.I always get attracted with different types of symbols and then i get curiosity to know what that symbol is all about,what does it signify,and believe me those little symbols contains lot of information you can ever imagine.In this post I'am going to tell you about some of the symbols,there meaning,origin and history.Recently i saw the website of Dan Brown's novel  The Lost Symbol  .It had a game about symbols in which you have to identify the symbol.I assume most of the people have seen that but do you know what are all that symbols is about? How they came into existence and what they mean or signify?.So i will take some of the symbols from that and going to answers all the above questions. 1) Ying and Yang The symbol came into existence long back during yin dynasty and western zhou dynasty around (1400 BC) in china.The sign

What is HTML5? Is it the future of Web?

HTML5 is the fifth revision of HTML standard.It aims to provide language with support of latest multimedia which is easy to code and understand. HTML5 has many syntactic features and tags such as <audio> <video> <canvas> and many more. From the past few years there has been a huge buzz about HTML5 due to its simple and cleaner code but having strong application.Its <video> and <audio> support are the coolest thing.Earlier embedding audio or video was like headache you have to write hell lot of code for it.You don't need adobe flash player and other media players now,just two lines of code will make your way through it. Next comes the <canvas> tag.It is the drawable region in the HTML5 with height and width attributes. The javascript code inside it will provide you dynamically generated graphics.It may access the area through a full set of drawing functions.Some uses of canvas are animations,Games and Images. HTML5 provides very user-friend

Program to remove duplicate elements from the sorted linked list

Iam going to give just the function of above program but not the whole program.The function is explained at each line using comment line. void removeduplicates(struct node* head) { struct node* curr=head;                         // Make head as current node struct node node_next_to_next; if(curr==NULL) return; while(curr->next!=NULL)                     //Iterate up to the end of the linked list { if(curr->data==curr->next->data)         // compare the data of node to its next node in the linked list { node_next_to_next=curr->next->next;  // if its equal then make next_to_next node as curr->next->next free(curr->next);                                   // and delete the curr->next node curr->next=node_next_to_next;            // Now make curr->next node as node_next_to_next. }                                                          // Thus removing the duplicate element. else curr=curr->next;                    

Add two numbers without using Arithmetic Operators

#include<stdio.h> #include<conio.h> void add(int m,int n) {  printf("%d",printf("%*c%*c",m," ",n," ")); } int main() { add(3,5); getch(); } General syntax:- printf("%*d",width,char); where width is substituted in place of * in %*d and char is printed the number of times the width. Explanation:- In the above program " " is first printed m times followed by n times.So printf will return total number of " " which is nothing but m+n. Output:-               8

Kakuro Puzzle

Image
Kakuro is second popular puzzle in Japan after sudoku.The kakuro puzzle is played on 16X16 grid of cells which are filled with Black and White respectively.Apart from top row and leftmost column grid is divided into "entries" lines of white cell by the black cells. The black cells contain a diagonal slash from upper-left to lower-right and a number in one or both halves, such that each horizontal entry has a number in the black half-cell to its immediate left and each vertical entry has a number in the black half-cell immediately above it. These numbers are commonly called "clues". As you can see we have we have horizontal (3) and vertical clue (4).The main objective of Kakuro puzzle is to fill numbers from 1 to 9 in the white cells such that the sum of each horizontal block should be equal to the number on left horizontal clue and sum of each vertical blocks should be equal to the number on top Vertical clue.You cannot use a number more than once in one

Rail Fence Cipher

Rail Fence cipher is transposition cipher.In this cipher plaintext is written as diagonally downwards or you can say wave sort of pattern called "Rails".For example take a plaintext "I LIKE THIS BLOG" and arrange it in a wave pattern I         E            S          G   L    K   T     I     B    O      I           H           L So the encrypted code for this plaintext will be IESGLKTIBOIHT.To make it more easy to decrypt we can indicate spaces as * in the rails. I         K          H        B   *    I     E    T    I    *   L     G     L           *          S         O So now the ciphertext will be IKHB IETI LGL SO Now the question is how do we know that how many letters are taken in downward direction and upward direction? Well for that we have something called: Rails-The number of rows which determine the height of the waves Offset-Instead of starting on the top rail and moving down you can start on any rail and move up and down depending o

Implement other arithmetic operators using + operator

This is the program of implementing *,-,/ using + arithmetic operator. #include<stdio.h> #include<conio.h> int multiply(int i,int j) { int s=0; for(int k=0;k<j;k++) { s=s+i; } return s; } int substract(int i,int j) { int d=j<0?1:-1; return i+multiply(d,j); } int divide(int i,int j) { int count=0; if(i>j) { int d=i; while(d>0) { d=substract(d,j); count++; } } else { count=0; } return count; } int main() { int a=20,b=5; printf("%d\n",substract(a,b)); printf("%d\n",multiply(a,b)); printf("%d\n",divide(a,b)); getch(); }