Sunday, February 1, 2015

Create a basic Animation to show the floating background

Create a basic Animation to show the floating background

1.In this draw the rectangle from the rectangle tool on the stage using free-transform tool fill complete stage to the rectangle & sleet the color as per your choice from the fill color option

2.Click on frame10 & press f6 or right click on frame 10 & select insert keyframe or select the color from fill color option(as per your choice)

3.Select the frame & press f6 & select the color as per your choice)

4.Save your work & test the movie.

Create a basic Image slide Animation to show either fading in & out

Create a basic Image slide Animation to show either fading in & out

1.Open a new file, go to file -> new a screen called new document select flash document & click on OK go to modify->document a file size of 300px by 200px.

2.Select the bitmap pic that you want to fade in & fade out from your picture file, select file->import to library from the menu bar a screen name import to library will open choose the file name &click on open. Repeat these steps for the entire bitmap picture.

3.Drag the pic from library panel to the stage select the picture by clicking on it go to modify->convert to symbol from menu bar a dialog box named create new symbol will appear. Give the name as pic-mc select ‘movie clip’ click on OK.

4.Click on your movie clip go to frame15 insert a key-frame right click on layer1 in the middle of the frame1 to frame15 the frames will become black select create motion tween an arrow from frame1 to frame15 will appear. Again click on frame 30 Insert a key-frame a second arrow will paper automatically.

5.Click on frame1 here we will give the fade in effect select the picture by clicking on it. Go to properties in the panel below color->alpha give 0% to it. Your pic has faded in click on frame 30.here we will give the fade in effect select the picture by clicking on it. Go to properties in the panel below the stage go to color->Alpha give 0% to it.

6.Repeat the steps 3 to 5 in layer2 from the frame31 to 46 to 60.to make a new layer, click on the button.

7.Save your work & press enter.

Create a basic animation using shape tweening, frame animation

Create a basic animation using shape tweening, frame animation (copy, paste)
    

Shape tweening

Step 1:-Draw a vector using any of the drawing tools in flash say a small circle & remove its border

Step 2:-Click the 10th frame in the timeline & insert a keyframe (f6), now draw another shape say a diamond using the rectangle tool without a border on to the circle.

Step 3:-Now right click on any frame in between these two key frames & select shape option from the tween panel of the properties inspector

Step 4:-Save your work & test the movie(ctrl+enter)
    


Frame Animation

Step 1:Create a vector/plain text using any of the drawing tools in flash, say a text with ‘Animation’ typed as shown in the example or as per your choice & break it using break apart(ctrl+B)to separate the Alphabets as Shown below.

Step 2:-In frame-by-frame animation we create the object for each frame so as to produce an animation sequence.

Step 3:-Insert keyframe(f6) & move the alphabets so as to produce an animation sequence

Step 4:-Repeat the above step as far as desired to create frame-by-frame animation as shown in the example

Step 5:-Save your work & test the movie(ctrl+Enter)

Create a basic Animation to show the realistic ball movement.

Create a basic Animation to show the realistic ball movement.
(By using Macromedia Flash 8)

Step 1 :- Draw a vector using any of the drawing tools in flash say a small circle & convert it into a symbol (f8) by selecting the graphic option & name the symbol say ball.

Step 2 :-Click the 20th frame in the timeline & insert a frame(f5)

Step 3 :-Now right-click the 20th frame in the timeline & select create motion tween(or motion option from the tween panel of the properties inspector) & insert a keyframe(f6)

Step 4 :-Select the 10th frame & insert a keyframe(f6)&move the ball to a different position say above the current position to create a motion sequence(automatically tweened by flash)

Step 5:-Save your work & test the movie(ctr+enter)

Thursday, January 1, 2015

Solved C Programs

Solved C Programs






1.C program to check odd or even using modulus operator


#include<stdio.h>
main()
{
   int n;
   printf("Enter an integer\n");
   scanf("%d",&n);
    if ( n%2 == 0 )
      printf("Even\n");
   else
      printf("Odd\n");
    return 0;
}


2. Program in C for Fibonacci Series


#include<stdio.h>
 int main()
{
   int n, first = 0, second = 1, next, c;

   printf("Enter the number of terms\n");
   scanf("%d",&n);

   printf("First %d terms of Fibonacci series are :-\n",n);

   for ( c = 0 ; c < n ; c++ )
   {
      if ( c <= 1 )
         next = c;
      else
      {
         next = first + second;
         first = second;
         second = next;
      }
      printf("%d\n",next);
   }
    return 0;
}


3. C program to check number is  palindrome number or not


#include <stdio.h>
 int main()
{
   int n, reverse = 0, temp;
   printf("Enter a number to check if it is a palindrome or not\n");
   scanf("%d",&n);
    temp = n;
    while( temp != 0 )
   {
      reverse = reverse * 10;
      reverse = reverse + temp%10;
      temp = temp/10;
   }

   if ( n == reverse )
      printf("%d is a palindrome number.\n", n);
   else
      printf("%d is not a palindrome number.\n", n);

   return 0;
}


4.C program to check a leap year


#include <stdio.h>
 int main()
{
  int year;

  printf("Enter a year to check if it is a leap year\n");
  scanf("%d", &year);

  if ( year%400 == 0)
    printf("%d is a leap year.\n", year);
  else if ( year%100 == 0)
    printf("%d is not a leap year.\n", year);
  else if ( year%4 == 0 )
    printf("%d is a leap year.\n", year);
  else
    printf("%d is not a leap year.\n", year); 
   return 0;
}


5. Prime number program in c language


#include<stdio.h>
 int main()
{
   int n, i = 3, count, c;
    printf("Enter the number of prime numbers required\n");
   scanf("%d",&n);

   if ( n >= 1 )
   {
      printf("First %d prime numbers are :\n",n);
      printf("2\n");
   }

   for ( count = 2 ; count <= n ;  )
   {
      for ( c = 2 ; c <= i - 1 ; c++ )
      {
         if ( i%c == 0 )
            break;
      }
      if ( c == i )
      {
         printf("%d\n",i);
         count++;
      }
      i++;
   }
    return 0;
}


6. C program to check a number is prime number or not


#include<stdio.h>
main()
{
   int n, c = 2;
    printf("Enter a number to check if it is prime\n");
   scanf("%d",&n);

   for ( c = 2 ; c <= n - 1 ; c++ )
   {
      if ( n%c == 0 )
      {
         printf("%d is not prime.\n", n);
     break;
      }
   }
   if ( c == n )
      printf("%d is prime.\n", n);
    return 0;
}


7. C program to reverse a number  entered 


#include <stdio.h>
 int main()
{
   int n, reverse = 0;
   printf("Enter a number to reverse\n");
   scanf("%d",&n);
    while (n != 0)
   {
      reverse = reverse * 10;
      reverse = reverse + n%10;
      n = n/10;
   }
    printf("Reverse of entered number is = %d\n", reverse);
    return 0;
}



8. Swapping of two numbers in C program 


#include <stdio.h>
int main()
{
   int x, y, temp;

   printf("Enter the value of x and y\n");
   scanf("%d%d", &x, &y);

   printf("Before Swapping\nx = %d\ny = %d\n",x,y);

   temp = x;
   x    = y;
   y    = temp;

   printf("After Swapping\nx = %d\ny = %d\n",x,y);

   return 0;
}


9. Factorial program in C using for loop


#include <stdio.h>
 int main()
{
  int c, n, fact = 1;

  printf("Enter a number to calculate it's factorial\n");
  scanf("%d", &n);

  for (c = 1; c <= n; c++)
    fact = fact * c;

  printf("Factorial of %d = %d\n", n, fact);

  return 0;
}


10. Print the Star as shown below 

    *

  ***

*****

  ***

    *


#include <stdio.h>
int main()
{
  int n, c, k, space = 1;
   printf("Enter number of rows\n");
  scanf("%d", &n);
   space = n - 1;
   for (k = 1; k <= n; k++)
  {
    for (c = 1; c <= space; c++)
      printf(" ");
     space--;
     for (c = 1; c <= 2*k-1; c++)
      printf("*");
     printf("\n");
  }
   space = 1;
   for (k = 1; k <= n - 1; k++)
  {
    for (c = 1; c <= space; c++)
      printf(" ");
     space++;
     for (c = 1 ; c <= 2*(n-k)-1; c++)
      printf("*");
     printf("\n");
  }
   return 0;
}

Thursday, December 11, 2014

Multimedia


Multimedia refers to content that uses a combination of different content forms. This contrasts with media that use only rudimentary computer displays such as text-only or traditional forms of printed or hand-produced material. Multimedia includes a combination of text, audio, still images, animation, video, or interactivity content forms.

Categories of multimedia:-Multimedia may be broadly divided into
1.Linear and
2.Interactive (Non-linear).

Linear active content progresses often without any navigational control for the viewer such as a cinema presentation. Non-linear uses interactivity to control progress as with a video game or self-paced computer based training. Hypermedia is an example of non-linear content.
Multimedia presentations can be live or recorded. A recorded presentation may allow interactivity via a navigation system. A live multimedia presentation may allow interactivity via an interaction with the presenter or performer.

Components of multimedia:-
1) Computer System: Workstation,MPEG/Video/DSP
2) Communication Networks : Token Ring,FDDI , Ethernet,Intranet,ATM  ,Internet
3) Display Devices :Hi-Rsolution monitors,CD-quality speakers,Colour printers,HDTV,SVGA,etc.
4) Capture devices : -Video Camera,Video Recorder ,Audio Microphone,Keyboards,Mice
5) Storage devices :- Hard disks,CD ROM,DVD,etc.

Major characteristics:-
Multimedia presentations may be viewed by person on stage, projected, transmitted, or played locally with a media player. A broadcast may be a live or recorded multimedia presentation. Broadcasts and recordings can be either analog or digital electronic media technology. Digital online multimedia may be downloaded or streamed. Streaming multimedia may be live or on-demand.

Multimedia games and simulations may be used in a physical environment with special effects, with multiple users in an on-line network, or locally with an offline computer, game system, or simulator.

The various formats of technological or digital multimedia may be intended to enhance the users' experience, for example to make it easier and faster to convey information. Or in entertainment or art, to transcend everyday experience.

Application:-Multimedia finds its application in various areas including, but not limited to, advertisements, art, education, entertainment, engineering, medicine, mathematics, business, scientific research and spatial temporal applications. 

Monday, November 17, 2014

SSD

SSD  :-
  • A solid-state driveis a data storage device using integrated circuit assemblies as memory to store data persistently.
  • SSD technology uses electronic interfaces compatible with traditional block input/output (I/O) hard disk drives, thus permitting simple replacement in common applications.
  • SSDs have no moving (mechanical) components. This distinguishes them from traditional electromechanical magnetic disks such as hard disk drives (HDDs) or floppy disks, which contain spinning disks and movable read/write heads.
  • SSDs are still roughly seven to eight times more expensive per unit of storage than HDDs.
  • SSDs use NAND-based flash memory, which retains data without power.
  • SSD includes a controller that incorporates the electronics that bridge the NAND memory components to the host computer.
  • SSDs have no moving parts and therefore are basically silent, although electric noise from the circuits may occur.
  • Susceptibility to environmental factors-No moving parts, very resistant to shock and vibration.
  • Storage capacity-In 2013, SSDs were available in sizes up to 2 TB, but less costly 128 to 512 GB drives were more common.
  • Power consumption-High performance flash-based SSDs generally require half to a third of the power of HDDs. High-performance DRAM SSDs generally require as much power as HDDs, and must be connected to power even when the rest of the system is shut down.
  •  SSDs were mainly used in those aspects of mission critical applications where the speed of the storage system needed to be as high as possible. Since flash memory has become a common component of SSDs, the falling prices and increased densities have made it more cost-effective for many other applications. 
  • Advantage :-Speed: This is where SSDs shine. An SSD-equipped PC will boot in seconds, certainly under a minute. A hard drive requires time to speed up to operating specs, and will continue to be slower than an SSD during normal operation. A PC or Mac with an SSD boots faster, launches apps faster, and has higher overall performance. 
  • SSD technology has been developing rapidly.
  • Typically the same file systems used on hard disk drives can also be used on solid state disks.
  • While not a file system feature, operating systems must also align partitions correctly to avoid excessive read-modify-write cycles.
  • A typical practice for personal computers is to have each partition aligned to start at a 1 MB mark, which covers all common SSD page and block size scenarios, as it is divisible by 1 MB, 512 KB, 128 KB, 4 KB and 512 bytes. Modern operating system installation software and disk tools handle this automatically.
  • Other features designed for hard disk drives, most notably defragmentation, are disabled in SSD installations 
  • HDDs win on price, capacity, and availability. SSDs work best if speed, ruggedness, form factor, noise, or fragmentation (technically part of speed) are important factors to you. If it weren't for the price and capacity issues, SSDs would be the winner hands down.
  • Last but not least, an SSD and an HDD can be combined (like Voltron) on systems with technologies like Intel's Smart Response Technology. SRT uses the SSD invisibly to help the system boot faster and launch apps faster.

Sunday, November 2, 2014

Notes on php

The limitations of cookies :-
1) the cokkie specification says that 
I) no cookie can exceed 4KB in size,
II) only 20 cookies are allowed per domain ,
III) and a total of 300 cookies can be stored on the client side
2) There is no control over when the browsers actually expire cookies.

Type juggling :-
1) The conversion of a value from one type to another is called casting.
2) This kind of implicit casting is called type juggling in PHP.

Regular expressions:-
1) Definition :- A regular expression is a string that represents a pattern .The regular expression functions compare that pattern to another string and see if any of the string matches the pattern .Some functions tell you whether there was a match, while others make changes to the string.
2) PHP provides support for two different types of regular expressions :
1) POSIX and 
2) Perl- compatible
3) POSIX regular expressions are less powerful and sometimes slower , than the Perl - compatible functions ,but can be easier to read.
4)There are three uses for regular expressions:
1) matching ,which can also be used to extract information from a string ;
2) substituting new text for matching text; and
3) spilitting a string into an array of smaller chunks.
5) PHP has functions for all three behaviours for both Perl and POSIX regular expressions .For instance ,erg() does a POSIX match ,while preg_match() does a Perl match .
6) Fortunately ,there are a number of similarities between basic POIX and Perl regular expressions, so we'll cover those before dealing into the details of each library. 

Serialzation:-
1) Serializing an object means converting it to bytestream representation that can be stored in a file. This  is useful for persistent data , for example , PHP sessions automatically save and restore object.
2) Serialization in PHP is mostly automatic - it requires little extra work from you.

Design pattern


Why design pattern?
To make project new libraries are created.
New classes can be used for further program i.e. Classes are reusable.
Thus the problem which is reusable is design pattern.


Definition Design Pattern
Each pattern describes a problem which occurs over and over again in our environment and then describes the code of the solution to that problem in such a way that you can use this solution a million times over without ever doing it the same way twice.

Elements of design pattern :-
1) Pattern name
2) Problem
3) Solution
4) Consequences

The person requires documentation for design pattern i.e. Describing design pattern.
For this there are as follows:-
1) Pattern name and classification
2) Intent
3) Also known as ( different names for them e.g. Abstract class has user class name )
4) Motivation ( why person problem to motivate for design pattern )
5) Applicability ( Real life situations where used )
6) Structure ( data structures )
7) Participants ( objects and components )
8 ) Collaboration (collaborate)
9) Consequences ( Advantage and disadvantages) also drawbacks
10) Implementation
11) Sample code( code of any object oriented language )
12) Known Uses
13) Related Patterns .( relationship with other design pattern)
14) Factory methods ( only methods used for design pattern)

The catalog of design pattern :-
1) Abstract factory
2) Prototype
3) Singleton ( means single object )
4) Adaptor
5) Decorator
6) Proxy
7) Command
8) Observer
9) Strategy

Featured posts

Happy Independence Day August 15th

 Here's a message for India's Independence Day (August 15th): "शुभ स्वतंत्रता दिवस! आजादी की 79वीं वर्षगांठ पर, आइए हम अपने देश...

Popular posts