Come to get the Impact of Computer Knowledge...

Come to get the Impact of Computer Knowledge...
Mac Computer Education

4.1.13

Sanjeev Sir (Mac Computer Education) Associated with IIT Computers

Linked List Basic Operations
- Creation
- Display
- Insertion ( at First, in Mid, at Last)
- Deletion
- Searching
- Counting


#include<stdio.h>
#include<conio.h>
#include<alloc.h>
struct node{
        int data;
        struct node *next;
} *head;
void create()
{
        char ch;
        do
        {
                struct node *new_node, *current;

                new_node = (struct node *) malloc(sizeof(struct node));
                printf("\nEnter the Data: ");
                scanf("%d",&new_node->data);
                new_node->next=NULL;
                if(head == NULL)
                {
                        head = new_node;
                        current = new_node;
                }
                else
                {
                        current->next=new_node;
                        current=new_node;
                }
                printf("\n\nDo you want to create another [y/n] :");
                ch=getche();
        }while(ch!='n');
}
void insert_beg(int val)
{
        struct node *temp;

        temp = (struct node *) malloc(sizeof(struct node));
        temp->data = val;

        temp->next = head;
        head = temp;
}
void insert_end(int val)
{
        struct node *temp, *ptr;

        temp = (struct node *) malloc(sizeof(struct node));
        temp->data = val;
        temp->next = NULL;
        ptr = head;

        while(ptr->next != NULL)
                ptr=ptr->next;

        ptr->next = temp;
}
void insert_mid(int val, int key)
{
        struct node *temp, *ptr;

        temp =(struct node*) malloc(sizeof(struct node));
        temp->data = val;

        ptr = head;
        if(head->data == key)
        {
                temp->next = head->next;
                head->next = temp;
        }
        else
        {
                while(ptr->next != NULL)
                {
                        if(ptr->next->data == key)
                        {
                                ptr = ptr->next;
                                temp->next = ptr->next;
                                ptr->next = temp;
                        }
                        ptr = ptr->next;
                }
        }
}
void delete_node( int val )
{
        struct node *ptr;
        if(head->data == val)
        {
                head = head->next;
                return;
        }
        ptr=head;
        while(ptr->next != NULL )
        {
                if(ptr->next->data == val)
                {
                        ptr->next = ptr->next->next;
                        return;
                }
                else
                        ptr = ptr->next;
        }
}
void Display_nodes()
{
        struct node *ptr;
        ptr = head;
        while(ptr != NULL)
        {
                printf("| %d |->", ptr->data);
                ptr=ptr->next;
        }
        printf("\b\b    ");
}
int count_nodes()
{
        int i=0;
        struct node *ptr;
        ptr=head;
        while(ptr!=NULL)
        {
                ptr=ptr->next;
                i++;
        }
        printf("\n\nTotal Number of Nodes: %d",i);
}
int search_node(int val)
{
        int pos=0;
        struct node *ptr;
        ptr=head;
        while(ptr!=NULL)
        {
          pos++;
                if(ptr->data == val)
                {
                        return pos;
                }
                ptr=ptr->next;
        }
}

main()
{
        int choice;
        char ch;
        int val,key;
        do
        {
        clrscr();
        printf("\n\n==============| Main Menu |======================\n");
        printf("|\t1. Create List                          |\n");
        printf("|\t2. Display List                         |\n");
        printf("|\t3. Delete Node                          |\n");
        printf("|\t4. Insert Node at First                 |\n");
        printf("|\t5. Insert Node at End                   |\n");
        printf("|\t6. Insert Node in Mid                   |\n");
        printf("|\t7. Search any Node                      |\n");
        printf("|\t8. Count Total Nodes                    |\n");
        printf("|\t9. Exit                                 |\n");
        printf("=================================================\n");
        printf("Enter Your Choice Number: ");
        scanf("%d",&choice);
        switch(choice)
        {
        case 1:
                printf("\n\n------------------| List Creation |------------------\n");
                printf("\n\nFirst time creation...\n\n");
                create();
                break;
        case 2:
                printf("\n\n-------------------| Display List |-------------------\n");
                printf("\nList : ");
                Display_nodes();
                break;
        case 3:
                printf("\n\n-------------------| Node Deletion |----------------\n");
                printf("\nAvailable List is...\n");
                Display_nodes();
                printf("\n\nEnter the DATA to delete: ");
                scanf("%d",&val);
                delete_node(val);
                printf("\nNow, List is...\n");
                Display_nodes();
                break;
        case 4:
                printf("\n\n-------------------| Insert Node at First |------------\n");
                printf("\n\nEnter the Data: ");
                scanf("%d",&val);
                insert_beg(val);
                Display_nodes();
                break;
        case 5:
                printf("\n\n-------------------| Insert Node at End |------------\n");
                printf("\n\nEnter the Data: ");
                scanf("%d",&val);
                insert_end(val);
                Display_nodes();
                break;
        case 6:
                printf("\n\n-------------------| Insert Node in Mid |------------\n");
                printf("\n\nEnter the Data to insert: ");
                scanf("%d",&val);
                printf("\nEnter the Node Data (key value):");
                scanf("%d",&key);
                insert_mid(val,key);
                Display_nodes();
                break;
        case 7:
                printf("\n\n-------------------| Search any Node |---------------\n");
                printf("\n\nEnter the Data: ");
                scanf("%d",&val);
                key = search_node(val);
                printf("\n\nGiven Data:[ %d ] is at Position: %d",val,key);
                break;
        case 8:
                printf("\n\n-------------------| Count Total Nodes |--------------\n");
                count_nodes();
                break;
        case 9:
                printf("\n\n\nTHANK YOU FOR USING MY PROGRAM....\n\nPress any key to quit...");
                getch();
                exit();
        default:
                printf("\n\n\nINVALID CHOICE NUMBER\n\n\nTRY AGAIN....");
        }
        printf("\n\n\nDo you want to continue [y/n]: ");
        ch=getche();

        }while(ch!='n');

        printf("\nProgram Written By: Sanjeev Kumar\nTopic : Linked-List\n\nPress any key to quit...");

        getch();
}

15.2.12

[DTP] Ques 2009 : (a) What do you mean by templates in Corel Draw? How it is created, edited and saved?
(b) How does the undo setting and access drawing information customized? Also describe fountain fills, pattern fills, mesh fills and texture fills.

(a) Ans: Templates in CorelDRAW:
Templates are specialized files that may be saved based on existing settings and/or document contents.Templates can be used as starting points to avoid repetitive page setup, document defaults, and other document-specific properties. we can recognize template files by their unique .cdt file extension.


Opening Templates:
To open an existing template file with the aim of creating a new document based on the template, choose file-> New From Template to open the New From Template dialog, as shown in figure:

Here we can choose from a half-dozen categories organized into tabbed areas based on document type.
Clicking each tabbed area reveals lists of template files. While a template is selected , the preview window displays a thumbnail of the first page of the template. To include the template's content and its setup and formatting, when opening a document based on a template, click the Include Graphics option (Selected by default) or deselect the option to open a blank shell,
Click OK or double-click the file to open a new unsaved document using the template's properties and /or content.


Creating/Saving Template:
We can open any template file for editing and change its actual template format and / or it's content. Use the File-> Open Command and choose CorelDRAW Template (CDT) as the file type.


Before the file opens, a dialog will ask whether we want to open the template as a new document or for editing. If our aim is to open a new document based on the template content and structure, leave New From Template option in combination with the With Contents option. If we want to edit the template file our self, choose Open For Editing.
When saving an edited template file, performing a Save command automatically saves the file as template without opening any dialog -- and without the need to re-specify the file as a CDT template file in the Save dialog box.


(b) Ans:  
The undo setting: 

When it happens to backing out of a multistep operations or accomplishing a task by trial and error, there's nothing better than the Undo Command. This option provides all kinds of ways for us to reverse our last action.
   It is possible using the Basic Undo Commands:
Choose Edit-> Undo or use the standard Ctrl+Z shortcut. To reverse an Undo command, choose Edit->Redo or use the Ctrl+Shift+Z shortcut.
CorelDRAW 12 provides both of these commands Undo and Redo as buttons in the Standard Toolbar, which may be used either to Undo or Redo Single or multiple commands. These Standard toolbar Undo/Redo buttons have the new popout menus, in which clicking the button applies to the most recent actions, and clicking the popout reveals a brief listing of recent commands.
Undo and Redo popouts show our most recent actions at the top of the listing.
We can customize the number of Undo levels in CorelDraw. Default settings are set to record our 20 most recent actions, but this value may be set as high as 99,999 actions. To access Undo options, open the Options dialog (Ctrl + J) , and click General.
Using the Undo Docker
Coreldraw provides Undo Docker, for more control over our most recent actions. We can open Undo Docker by choosing Tools-> Undo Docker. It enables us to view our drawing as it appeared prior to certain recent actions and/or save our recent actions as a Visual Basic for Applcations (VBA) macro.
The Undo Docker displays our most recent actions in reverse of the Undo and Redo popout menus, with recent actions placed at the bottom of the docker list.

Drawing information customized

For a quick summary of our document's contents, use the Document Information dialog. We choose File->Document Info to open the dialog and use the available options to list specific information. Categories consist of File, Document, Graphic Objects, Text Statistics, Bitmaps, Styles, Effects, Fills, and Outlines.




Rest answer is coming soon...

[DTP] Ques 2009 : (a) Define master pages in Page Maker. Describe the steps to create master page.
(b) What are the different types of non-printing guides available in Page Maker? Discuss them. Also state how you will lock and unlock it.

(a) Define master pages in Page Maker. Describe the steps to create master page.








(b) What are the different types of non-printing guides available in Page Maker? Discuss them. Also state how you will lock and unlock it.



Use of guides in PageMaker:
Guides are used to help visualize non-printing areas, align text, and align images and other graphic elements on the page and to each other.

how guides work in Adobe PageMaker.
Ø  To select an object and not the guide that overlaps it hold down Command (Mac) or Ctrl (Windows) while selecting the object.
Ø  To avoid grabbing the guides instead of other objects on the page go to View > Send Guides to Back. Do this without a publication open and all new publications will have this Option already set.
Ø  If you accidentally drag a guide out of position:
o   Immediately after moving a page or column guide, choose Edit > Undo or press Command+Z (Mac) or Ctrl+Z (Windows)
o   If page and column guides are based on a master page, choose Layout > Copy Master Guides to remove local guides and replace them with the master guides.
Ø  To precisely position objects on the page, choose View > Snap to Guides then drag guides into the desired position. Objects will then snap to the nearest margin, column, and ruler guides.
Ø  Adjust the Snap to Zone - that area around the edge of the page and guides within which objects are considered aligned - in File > Preferences > Layout Adjustment > Snap to Zone.
Ø  Use Utilities > Plug-ins > Grid Manager for greater control of guides and to save an arrangement of column and ruler guides for use as a layout grid in other publications.
PageMaker uses three types of guides:
1.    margin guides,
2.     ruler guides, and
3.    column guides.



A publication can have up to 120 ruler guides including guides on master pages and publication pages.
There are multiple ways to create and modify margin, column, and ruler guides in Adobe PageMaker. Try all these mouse, menu, and keyboard methods.
·         Set margin guides in the Document Setup dialog box. Specify top, bottom, left, and right margins.
·         To create ruler guides, position the pointer in the horizontal or vertical ruler. Click, hold, and drag down or drag right to position the ruler guide on the page. The pointer changes to a two-way arrow until the mouse button is released.
·         To help precisely align ruler guides with ticks on the horizontal and vertical rulers, choose View > Snap to Rulers. As guides are dragged on to the page, they will snap to the nearest tick on the ruler when the mouse button is released.
·         To keep from accidently repositioning guides after you have them where you want them, choose View > Lock Guides.
·         Choose Layout > Column Guides to specify uniform columns with gutters.
·         To create different column setups for the top and bottom of a page, follow this procedure:
1.    Choose Layout > Column Guides and enter the Number Of Columns for the top of the page.
2.    Pull down a horizontal ruler guide to the point where you want the top column setup to end.
3.    Place your text in the columns of the top of the page, using the horizontal guide as the bottom of the columns.
4.    In Column Guides dialog box enter the Number Of Columns for the bottom of the page. Make sure the Adjust Layout check box is not selected.
5.    Pull down another horizontal ruler guide that represents the top position of the bottom column setup.
6.    Place new text or continue the text from the top column setup into the column setup at the bottom of the page.

There are multiple ways to make margin, column, and ruler guides visible and invisible as well as remove them completely in PageMaker. Try all these methods.
·         Choose View > Show/Hide Guides to make column, ruler, and margin guides visible or invisible.
·         To remove a ruler guide, select the guide and drag it off the page.
·         To remove all ruler guides at one time, choose View > Clear Ruler Guides (Lock Guides must be off).
Rulers and guides are crucial desktop publishing tools for document layout. The horizontal and vertical rulers are designed to help you position the different elements on your page. They need to be visible if you want to use the ruler guides.
·         To display the rulers, click on the View menu and then select Show Rulers.
·         To hide the rulers, select Hide Rulers in the View menu.
·         To toggle between displaying and hiding the rulers use the short cut: [Ctrl + R]
How to Change the Ruler Unit of Measurements
You can specify and change the system of measurement to use for your rulers. In the Windows version of PageMaker, you can even choose a different measurement unit for each ruler. Here's how to change ruler unit of measurements:
·         Click on the File menu, and then select Preferences.
·         Click on General… to open the Preferences dialog box. (Short Cut: Ctrl+K).
·        
http://images.brighthub.com/be/2/be2f7e2d90abdbd7bd0e5dd2f3a5d0a9ee95d539_large.jpg

Click on the Measurements in drop-down list, and choose a measurement system for your horizontal ruler.
·         Click on the Vertical ruler drop-down list, and choose a measurement system for your vertical ruler.
·         Click on OK.


Ruler Guides
The PageMaker ruler guides are non-printing lines that help you position text and images on the pages of your document precisely. You can display, 
http://images.brighthub.com/d5/6/d56331d11913d6de138687c39c8e77fdccd1b7d9_large.jpg

 hide lock, move and remove the ruler guides as your needs change.
You need to display the ruler guides in order to use them to position elements in the document, but you can also hide them if you want to view just the elements that will print.
·         To display the ruler guides, click on the View menu and then select Show Guides.
·         To hide the ruler guides when they are activated, select Hide Guides under in the View menu.
·         To toggle between showing and hiding the ruler guides, use the short cut: [Ctrl + ;]
Locking
You can lock the Ruler Guides in place to avoid moving them unintentionally.
·         To lock the ruler guides, click on the View menu and then select Lock Guides.
·         To unlock the Ruler Guides, deselect Lock Guides under in the View menu.
·         To toggle between locking and unlocking the Guides use the shortcut: [Alt+Ctrl+ ]
Positioning
You can position new ruler guides as needed so as to align elements in your document. You can create as many ruler guides as you need.
·         Display the horizontal or vertical ruler from which you want to position the guide [View >> Show Rulers]
·         Click on the Pointer tool and then position it anywhere in the ruler area. Now click and hold.
·         Drag and drop the guide to the position you desire on your document. The new guide will appear as a colored line.
·         You can reposition a ruler guide at any time with a similar drag and drop method. If the guide is locked, you need to unlock it [View >> Lock Guides] before you can move it.
Removing
You can remove your ruler guides individually or all at one time.
·         To remove an individual guide, select the pointer tool, then click and hold your guide. Drag it back into the ruler area, and then release.
·         To remove the ruler guides all at one time, click on the View menu and then select Clear Ruler Guides. This will remove all the ruler guides you placed in the document, leaving the column and margin guides behind.
·         NOTE: If the guide is locked, you need to unlock it [View >> Lock Guides] before you can remove it.


Using 'Snap-To'
You can position elements in your document by forcing alignment. This is a quick way to position multiple elements consistently. You can do this by making the element or elements align with (snap to) your ruler increments or to ruler guides.
·         To snap to rulers, click on the View menu and then select Snap to Rulers. This snaps the object to the nearest ruler increment.
·         To snap to a guide, click on the View menu and then select Snap to Guides. This snaps the object to a ruler guide if it is moved within 3 pixels of the guide.
·         To deactivate the Snap to feature, click the View menu and deselect the option.