Thursday, March 26, 2015

Requirment is the mother of invention


I deeply thought about ,how i should be unique from others and how my posts become unique.so i came with the idea "ideas of apps" 
After a long time i am posting this post ,this post deals about the applications or apps.In my context "apps" word refer to mobile apps,web apps,extensions (or) add-ons and softwares.
Apps ,the main motto of the apps will not only show the solution to our problems but also apps will help to serve different purposes like entertainment etc.
My main motto of these posts is to present you 
1) On what idea the apps are built ?
2) what are the uses of the apps?
3)what are the reasons (or) problems for creation of these ideas?
4)How the apps work?
So for frequent updates follow my blog.

Saturday, November 29, 2014

SOLAR TRACKING PANEL



/* SOLAR TRACKING SYSTEM*/










ORG 0H
ACALL LCDSTART
ACALL DISPLAY
MOV R0,#11H
ACALL STARTMOTOR

LCDSTART: MOV A,#38H
ACALL CMD
ACALL DELAY
MOV A,#0EH
ACALL CMD
ACALL DELAY
MOV A,#01H
ACALL CMD
ACALL DELAY
MOV A,#06H
ACALL CMD
ACALL DELAY
RET

DISPLAY: MOV A,#83H
ACALL CMD
ACALL DELAY
MOV A,#'S'
ACALL DATAWRT
ACALL DELAY
MOV A,#'O'
ACALL DATAWRT
ACALL DELAY
MOV A,#'L'
ACALL DATAWRT
ACALL DELAY
MOV A,#'A'
ACALL DATAWRT
ACALL DELAY
MOV A,#'R'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'T'
ACALL DATAWRT
ACALL DELAY
MOV A,#'R'
ACALL DATAWRT
ACALL DELAY
MOV A,#'A'
ACALL DATAWRT
ACALL DELAY
MOV A,#'C'
ACALL DATAWRT
ACALL DELAY
MOV A,#'K'
ACALL DATAWRT
ACALL DELAY
MOV A,#'I'
ACALL DATAWRT
ACALL DELAY
MOV A,#'N'
ACALL DATAWRT
ACALL DELAY
MOV A,#'G'
ACALL DATAWRT
ACALL DELAY
MOV A,#0C7H
ACALL CMD
ACALL DELAY
MOV A,#'S'
ACALL DATAWRT
ACALL DELAY
MOV A,#'Y'
ACALL DATAWRT
ACALL DELAY
MOV A,#'S'
ACALL DATAWRT
ACALL DELAY
MOV A,#'T'
ACALL DATAWRT
ACALL DELAY
MOV A,#'E'
ACALL DATAWRT
ACALL DELAY
MOV A,#'M'
ACALL DATAWRT
ACALL DELAY
MOV A,#9DH
ACALL CMD
ACALL DELAY
MOV A,#'B'
ACALL DATAWRT
ACALL DELAY
MOV A,#'Y'
ACALL DATAWRT
ACALL DELAY
MOV A,#0D9H
ACALL CMD
ACALL DELAY
MOV A,#'C'
ACALL DATAWRT
ACALL DELAY
MOV A,#'S'
ACALL DATAWRT
ACALL DELAY
MOV A,#'E'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'S'
ACALL DATAWRT
ACALL DELAY
MOV A,#'E'
ACALL DATAWRT
ACALL DELAY
MOV A,#'C'
ACALL DATAWRT
ACALL DELAY
MOV A,#'-'
ACALL DATAWRT
ACALL DELAY
MOV A,#'B'
ACALL DATAWRT
ACALL DELAY
RET

STARTMOTOR: MOV A,#01H
ACALL CMD
ACALL DELAY
MOV A,#82H
ACALL CMD
ACALL DELAY
MOV A,#'S'
ACALL DATAWRT
ACALL DELAY
MOV A,#'O'
ACALL DATAWRT
ACALL DELAY
MOV A,#'L'
ACALL DATAWRT
ACALL DELAY
MOV A,#'A'
ACALL DATAWRT
ACALL DELAY
MOV A,#'R'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'T'
ACALL DATAWRT
ACALL DELAY
MOV A,#'R'
ACALL DATAWRT
ACALL DELAY
MOV A,#'A'
ACALL DATAWRT
ACALL DELAY
MOV A,#'C'
ACALL DATAWRT
ACALL DELAY
MOV A,#'K'
ACALL DATAWRT
ACALL DELAY
MOV A,#'E'
ACALL DATAWRT
ACALL DELAY
MOV A,#'D'
ACALL DATAWRT
ACALL DELAY
MOV R5,#0DH
BACK: MOV A,R0
MOV P3,A
       MOV R0,A
ACALL DELAY1
MOV A,#9AH
ACALL CMD
ACALL DELAY
MOV A,#'6'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'A'
ACALL DATAWRT
ACALL DELAY
MOV A,#'M'
ACALL DATAWRT
ACALL DELAY

MOV A,#33H
MOV P3,A

ACALL DELAY1

MOV A,#09AH
ACALL CMD
ACALL DELAY
MOV A,#'7'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'A'
ACALL DATAWRT
ACALL DELAY
MOV A,#'M'
ACALL DATAWRT
ACALL DELAY

MOV A,#22H
MOV P3,A

ACALL DELAY1

MOV A,#09AH
ACALL CMD
ACALL DELAY
MOV A,#'8'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'A'
ACALL DATAWRT
ACALL DELAY
MOV A,#'M'
ACALL DATAWRT
ACALL DELAY

MOV A,#66H
MOV P3,A

ACALL DELAY1

MOV A,#09AH
ACALL CMD
ACALL DELAY
MOV A,#'9'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'A'
ACALL DATAWRT
ACALL DELAY
MOV A,#'M'
ACALL DATAWRT
ACALL DELAY

MOV A,#44H
MOV P3,A

ACALL DELAY1

MOV A,#09AH
ACALL CMD
ACALL DELAY
MOV A,#'1'
ACALL DATAWRT
ACALL DELAY
MOV A,#'0'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'A'
ACALL DATAWRT
ACALL DELAY
MOV A,#'M'
ACALL DATAWRT
ACALL DELAY

MOV A,#88H
MOV P3,A

ACALL DELAY1

MOV A,#09AH
ACALL CMD
ACALL DELAY
MOV A,#'1'
ACALL DATAWRT
ACALL DELAY
MOV A,#'1'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'A'
ACALL DATAWRT
ACALL DELAY
MOV A,#'M'
ACALL DATAWRT
ACALL DELAY

MOV A,#11H
MOV P3,A

ACALL DELAY1

MOV A,#09AH
ACALL CMD
ACALL DELAY
MOV A,#'1'
ACALL DATAWRT
ACALL DELAY
MOV A,#'2'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'N'
ACALL DATAWRT
ACALL DELAY
MOV A,#'O'
ACALL DATAWRT
ACALL DELAY
MOV A,#'O'
ACALL DATAWRT
ACALL DELAY
MOV A,#'N'
ACALL DATAWRT
ACALL DELAY


MOV A,#33H
MOV P3,A

ACALL DELAY1

MOV A,#09AH
ACALL CMD
ACALL DELAY
MOV A,#'0'
ACALL DATAWRT
ACALL DELAY
MOV A,#'1'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'P'
ACALL DATAWRT
ACALL DELAY
MOV A,#'M'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY


MOV A,#22H
MOV P3,A

ACALL DELAY1

MOV A,#09AH
ACALL CMD
ACALL DELAY
MOV A,#'0'
ACALL DATAWRT
ACALL DELAY
MOV A,#'2'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'P'
ACALL DATAWRT
ACALL DELAY
MOV A,#'M'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY

MOV A,#66H
MOV P3,A

ACALL DELAY1

MOV A,#09AH
ACALL CMD
ACALL DELAY
MOV A,#'0'
ACALL DATAWRT
ACALL DELAY
MOV A,#'3'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'P'
ACALL DATAWRT
ACALL DELAY
MOV A,#'M'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY

MOV A,#44H
MOV P3,A

ACALL DELAY1

MOV A,#09AH
ACALL CMD
ACALL DELAY
MOV A,#'0'
ACALL DATAWRT
ACALL DELAY
MOV A,#'4'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'P'
ACALL DATAWRT
ACALL DELAY
MOV A,#'M'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY


MOV A,#88H
MOV P3,A

ACALL DELAY1

MOV A,#09AH
ACALL CMD
ACALL DELAY
MOV A,#'0'
ACALL DATAWRT
ACALL DELAY
MOV A,#'5'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'P'
ACALL DATAWRT
ACALL DELAY
MOV A,#'M'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY

MOV A,#11H
MOV P3,A

ACALL DELAY1

MOV A,#09AH
ACALL CMD
ACALL DELAY
MOV A,#'0'
ACALL DATAWRT
ACALL DELAY
MOV A,#'6'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#'P'
ACALL DATAWRT
ACALL DELAY
MOV A,#'M'
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY
MOV A,#' '
ACALL DATAWRT
ACALL DELAY








RET




CMD: MOV P0,A
CLR P2.0
CLR P2.1
SETB P2.2
ACALL DELAY
CLR P2.2
RET
DATAWRT: MOV P0,A
SETB P2.0
CLR P2.1
SETB P2.2
ACALL DELAY
CLR P2.2
RET


DELAY: MOV R7,#0FFH
LOOP2: MOV R6,#0FFH
LOOP1: DJNZ R6,LOOP1
DJNZ R7,LOOP2
RET

DELAY1: MOV R1,#0FFH
BACK3: MOV R2,#50H
BACK2: MOV R3,#50H
BACK1: DJNZ R3,BACK1
DJNZ R2,BACK2
DJNZ R1,BACK3
RET

END









Friday, November 14, 2014

PASSING MESSAGE BETWEEN CLIENT AND SERVER IN SECURE WAY


/****************** CLIENT CODE ****************/



#include <stdio.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <string.h>

int main()
{
  int welcomeSocket, newSocket;
 struct sockaddr_in serverAddr;
  struct sockaddr_storage serverStorage;
  socklen_t addr_size;
char ptext[20];
 char ctext[20];
 char alpha[26]="abcdefghijklmnopqrstuvwxyz";
 char keyha[26]="noqfgiazywvxumsdtehbjckplr";
 int i,j;


  /*---- Create the socket. The three arguments are: ----*/
  /* 1) Internet domain 2) Stream socket 3) Default protocol (TCP in this case) */

  welcomeSocket = socket(PF_INET, SOCK_STREAM, 0);
  
  /*---- Configure settings of the server address struct ----*/
  /* Address family = Internet */

  serverAddr.sin_family = AF_INET;

  /* Set port number, using htons function to use proper byte order */

  serverAddr.sin_port = htons(7891);

  /* Set IP address to localhost */

  serverAddr.sin_addr.s_addr = inet_addr("127.0.0.1");

  /* Set all bits of the padding field to 0 */

  memset(serverAddr.sin_zero, '\0', sizeof serverAddr.sin_zero);  

  /*---- Bind the address struct to the socket ----*/

  bind(welcomeSocket, (struct sockaddr *) &serverAddr, sizeof(serverAddr));

  /*---- Listen on the socket, with 5 max connection requests queued ----*/

  if(listen(welcomeSocket,5)==0)
    printf("Listening\n");
  else
    printf("Error\n");

  /*---- Accept call creates a new socket for the incoming connection ----*/

  addr_size = sizeof serverStorage;
  newSocket = accept(welcomeSocket, (struct sockaddr *) &serverStorage, &addr_size);

  /*---- Send message to the socket of the incoming connection ----*/

printf("\n Encryption : ");
 printf("\n Enter the plain text :");
 for(i=0;i<6;i++)
scanf("%c",&ptext[i]);
 for(i=0;ptext[i]!='\0';i++)
   for(j=0;alpha[j]!='\0';j++)
   {
if(ptext[i]==alpha[j])
{
ctext[i]=keyha[j];
break;
}
   }
 ctext[strlen(ptext)]='\0';
  
 send(newSocket,ctext,20,0);
}

I used monoaplhabetic cipher to encrypt the message.


/****************** SERVER CODE ****************/

#include <stdio.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <string.h>

int main(){
  int clientSocket,i,j;
  struct sockaddr_in serverAddr;
  socklen_t addr_size;
  char ptext[20];
 char ctext[20];
 char alpha[26]="abcdefghijklmnopqrstuvwxyz";
 char keyha[26]="noqfgiazywvxumsdtehbjckplr";


  /*---- Create the socket. The three arguments are: ----*/
  /* 1) Internet domain 2) Stream socket 3) Default protocol (TCP in this case) */

  clientSocket = socket(PF_INET, SOCK_STREAM, 0);
  
  /*---- Configure settings of the server address struct ----*/
  /* Address family = Internet */

  serverAddr.sin_family = AF_INET;

  /* Set port number, using htons function to use proper byte order */

  serverAddr.sin_port = htons(7891);

  /* Set IP address to localhost */

  serverAddr.sin_addr.s_addr = inet_addr("127.0.0.1");

  /* Set all bits of the padding field to 0 */

  memset(serverAddr.sin_zero, '\0', sizeof serverAddr.sin_zero);  

  /*---- Connect the socket to the server using the address struct ----*/

  addr_size = sizeof serverAddr;
  connect(clientSocket, (struct sockaddr *) &serverAddr, addr_size);

  /*---- Read the message from the server into the buffer ----*/

  recv(clientSocket, ctext, 6, 0);

  /*---- Print the received message ----*/

printf("the cipher text is");
for(i=0;i<6;i++) 
printf(" %c",ctext[i]);
  for(i=0;ctext[i]!='\0';i++)
  for(j=0;keyha[j]!='\0';j++)
  {
if(ctext[i]==keyha[j])
{
 ptext[i]=alpha[j];
 break;
}
  }
 printf("\n The Plain text is : ");
 for(i=0;i<6;i++)

printf(" %c",ptext[i]);


}

I used monoalphabetic cipher to decrypt the algorithm.

THE OUTPUTS ARE:


First server code should be executed and it will give "listening" output. After that we must execute the client code ,so that it will ask us to enter the key or message(I assumed the message as the key),then we will enter the key(or)message. It will show the encrypted message in client  side and also in server side.Now in server side we can observe both encrypted message and decrypted message .
In this way message is securely travelled from the client system to 
server system. 


server listening to client requests.

             client asking to enter the key or message


Message encrypted
  
Message decrypted


By using monoaplhabetic cipher ,i encrypted and decrypted data.

Sunday, September 7, 2014

DEVELOPING CSS 2

color and background properties:
These properties allow us to specify the foreground color and background of an element.
Background may be colors or images.background properties should allow authors to position a background it and declare whether it should be fixed with respect to
------------------------------------------------------------------------------------------------------------------------------
property name                                                                     value
------------------------------------------------------------------------------------------------------------------------------
color                                                                                color name or RGB value
------------------------------------------------------------------------------------------------------------------------------
background-color                                                             color name or RGB value  
------------------------------------------------------------------------------------------------------------------------------
background-image                                                            url("url of the image")
-----------------------------------------------------------------------------------------------------------------------------
background-repeat                                                          repeat,repeat-x,repeat-y,repeat-z
------------------------------------------------------------------------------------------------------------------------------
background                                                                    any or all of the above properties
--------------------------------------------------------------------------------------------------------------------------

Box properties:
The css box model describes the rectangular boxes that are generated for elements in the documentary.Each box has a content area and optional surrounding adding border and margin areas.The size of each area is specified by properties defined below
The properties will be based on the margin,border and padding as well as their relative positions i.e,top ,bottom,left and right.