Classes and Objects Lab Learn to use lpq and lprm commands. 2. Learn to manage your file space. Restrict size of Netscape disk cache.

Similar documents
Windows Me Navigating

Once you click on the Enterprise Icon found on your desktop you will be asked for your password. This Default Code Is

Attaching Codesoft 6 to an ODBC Database

How to set up an Amazon Work Profile for Windows 8

Lab 1: Silver Dollar Game 1 CSCI 2101B Fall 2018

Frequently Asked Questions for Faculty

Barchard Introduction to SPSS Marks

WINDOWS NT BASICS

LPR for Windows 95/98/Me/2000 TCP/IP Printing User s Guide

Implement an ADT while using Subversion

PROSIM and Its Installation Guide

Microsoft Excel 2007 Lesson 7: Charts and Comments

Intro to Linux. this will open up a new terminal window for you is super convenient on the computers in the lab

Windows XP. A Quick Tour of Windows XP Features

EDTE 330A/B. Educational Technology in the Classroom: Applications and Integrations

MAY CANVAS UPDATES FOR TEACHERS

Importing source database objects from a database

Free Performance Check for Your PC: Get the Best Windows 7 Features Back

Using The Graph Club 1.5

Microsoft Office 2010 consists of five core programs: Word, Excel,

How To Archive\Burn Your Documents to CD\DVD Using Roxio

Let s Make a Front Panel using FrontCAD

Barchard Introduction to SPSS Marks

CPSC 150 Laboratory Manual. Lab 1 Introduction to Program Creation

Microsoft Windows Software Manual for FITstep Stream Version 3

Chapter 1. Getting Started

Submitting Assignments

PART 7. Getting Started with Excel

Mac OS X Server Print Service Administration. For Version 10.3 or Later

I.A.M. National Pension Fund Remittance Report Software

My Site. Introduction

Google Drive: Access and organize your files

Cmpt 101 Lab 1 - Outline

Lab 1: Setup 12:00 PM, Sep 10, 2017

Computer Basics: Step-by-Step Guide (Session 2)

Lab - Share Resources in Windows

SCHEMATIC DESIGN IN QUARTUS

GRAPHIC #1. Open . Save

3 USING NERO BURNING ROM

Here is a step-by-step guide to creating a custom toolbar with text

Using Rutgers University Power Macs

Entourage & Your Quota For the Macintosh Using Entourage for OS X Keith Roberts

Perceptive Data Transfer

Fiery EXP6000/EXP5000 Color Server SERVER & CONTROLLER SOLUTIONS. Printing from UNIX

Windows 2000 Professional

This is Lab Worksheet 7 - not an Assignment

MTU Computer Structure

Microsoft Windows Software Manual for FITstep Pro Version 3

Welcome to Cole On-line Help system!

JS Lab 1: (Due Thurs, April 27)

University of Florida EEL 3701 Dr. Eric M. Schwartz Madison Emas, TA Department of Electrical & Computer Engineering Revision 1 5-Jun-17

Once file and folders are added to your Module Content area you will need to link to them using the Item tool.

Top Producer 7i Tips & Tricks Volume 1

Programming Lab 1 (JS Hwk 3) Due Thursday, April 28

Introduction to SPSS

Motion Graph Practice

Document Imaging User Guide

In this lab, you will build and execute a simple message flow. A message flow is like a program but is developed using a visual paradigm.

Windows XP Software Installation Instructions GCC Elite Series Printers

DATA ACQUISITION USING THE BIOPAC DATA SYSTEM

How to make a Work Profile for Windows 10

Installing and Configuring Windows 7 Client

Create and Delete PF Keys

Distributed OrcaFlex. 1. Introduction. 2. What s New. Distributed OrcaFlex

Mind Power Math: Middle School Algebra, Part 1

Basic Computer Operations

Getting Started with Command Prompts

UPDATING YOUR POS SOLUTIONS NEWSAGENCY SYSTEM

Introducing Your Sun Desktop

SECTION 5 USING STUDENT

Single Menus No other menus will follow necessitating additional user choices

Lab #0 Getting Started Due In Your Lab, August 25, 2004

How to Get Started. Figure 3

Performer to DP2 Hot Folder Reference Manual Rev There is only one file involved with installing the Performer to DP2 Hot Folder.

UPDATING SOCRATES Version Build May 2018

Lesson 9 Reports in QuickBooks

This is Lab Worksheet/Installation 7

You might think of Windows XP as a set of cool accessories, such as

Results Manager Step Sets for Classroom Interface

Mac Software Manual for FITstep Pro Version 3

Remote Workspace. Nubo End User Guide. Version: 1.3 Date: June, Copyright 2017 by Nubo Inc. All rights reserved. Page 1

SAM Server Utility User s Guide

Mail Merge - Create Letter

NetBackup 7.6 Replication Director A Hands On Experience

The QuickCalc BASIC User Interface

ASTRA 7.5 Quick Reference Guide

Exercise 1: Introduction to MapInfo

Excel 2016 Basics for Mac

Microsoft SharePoint 2010

Lab 1 Introduction to R

1. Restarting a computer which is already running is referred to as

PM4 + Partners Knowledge Articles

IT 220 Course Notes. Don Colton Brigham Young University Hawaii

A Quick-Reference Guide. To access reddot:

A Quick Tour GETTING STARTED WHAT S IN THIS CHAPTER?

PlanWell 4.0 User Guide

COPYRIGHTED MATERIAL. Using Adobe Bridge. Lesson 1

Lab1: Use of Word and Excel

Guidelines for lesson creation [with basic topics to be covered] (1-1, 1-2) Parts of a computer and identifying

Setting up PyCharm Professional

Transcription:

Purpose 1. Learn to use lpq and lprm commands. 2. Learn to manage your file space. Restrict size of Netscape disk cache. quota -v, du commands 3. Using the File Manager to copy and remove files. 4. Explore the string Class. 5. Explore the grid Class. Make Printing Easier During this course you will frequently have to print files either for your own studying or for handing in. There are problems which can occur associated with printing and it is important that you understand both the problems and how to resolve them. In this lab we will discuss two such problems. 1. Occasionally, you may print something and discover that you printed the wrong file. You can inspect a printer s queue by issuing the command lpq and remove a print job by using the lprm command and the job number listed in the lpq command. Here is a sample run. altair{1077}% print test5.cc [test5.cc (C++): 1 page on 1 sheet] [Total: 1 page on 1 sheet] sent to the standard output request id is dana350-972 (1 file) altair{1078}% lpq dana231 is ready and printing Rank Owner Job File(s) Total Size active hyde 972 standard input 14532 bytes altair{1079}% lprm 972 dana350-972: cancelled altair{1080}% It is important to know that only the person who submitted the print job can cancel it. 2. Sometimes you might print a job and then find that it hasn t appeared in the printer s output tray. Using the CSCI 203 Page 1 September 23 24, 2002

File Space Problems Each student in this course is given a 20 megabyte file space limit. Though this should be plenty of space for this course, there are things which can happen which can gobble up the space very quickly. Here are two things you can do to help alleviate the problems. Resetting the Size of Netscape Cache Note: If you have already set your Netscape cache to a small value then skip these steps. Make the following modification to the setup of Netscape. 1. Start Netscape, if you haven t done so already. 2. Pull down the Netscape Edit menu and select Preferences from the menu the last menu item. 3. A window will open up with a list of items on the left and more stuff on the right. On the left side select the bottom item Advanced by clicking on the right-pointing arrow at the beginning of the line. This should bring up two or three new lines below. 4. From the new lines, click on Cache. 5. New entries will appear on the right. Change the entry for Disk cache to read 500 rather than 5000. 6. Click on OK. You have reset Netscape to maintain a 500K byte cache rather than a 5 megabyte cache. How Much Space Are You Using? Another thing you can do to keep track of your disk space usage is to run the UNIX command quota -v each week. If you execute this command in your home directory it will inform you of the total disk space you are currently using. If the command reports 10,240, then you currently using 10 megabytes half your quota. If this number gets close to 20,000 then talk to your instructor about how to reduce your file space utilization. CSCI 203 Page 2 September 23 24, 2002

If you want to know how much space you are using per subdirectory use the UNIX command du This will show how the space is being used and what you might like to remove. Dragging Files in the File Manager If the file manager is not currently running then start it by selecting File Manager on the Files submenu of the Workspace Menu. One of the nicer features of the File Manager allows you to copy files without using the UNIX command prompt. Be sure that the File Manager is open to your home directory. Enter your Labs directory to get access to the directories for the labs already completed the window should now have, at least, directories Lab1, Lab2 and Lab3 (names may vary). Place the pointer on the folder for Lab1, press the left mouse button and keep it down. Now, with the mouse button still pressed, move the mouse so that the folder icon is moved onto the main workspace background release the mouse button. The icon should now be on the workspace. We call this just-completed action dragging an item from one location to another. Copying files Double click the new folder icon which you have placed on the workspace. You should see the icon replaced by a new File Manager window, but this one open to the Lab1 directory. In the original File Manager window enter the Lab2 directory. In the Lab2 directory select a file icon (try error.cc) and drag it to the new File Manager window stopping and releasing the mouse button when the icon is over the main File Manager window. The file should have been moved from the first directory to the second. Repeat the process in the reverse direction. Now repeat the action with the following modification: before pressing the mouse button (to start the dragging) press and hold down the control key now press the mouse button and drag the file dropping it on the other File Manager window this time the file should have been copied rather than moved i.e., there are now two copies of the file, whereas with a move there will remain just one. Clean Up Your Directory Space Set the two file manager windows as follows. Have one positioned in your home directory and the other in your Labs directory. Now look at the files you have in CSCI 203 Page 3 September 23 24, 2002

your home directory. If you have files which belong in one of your lab directories then move them there (using drag and drop ). Also, delete any files which are no longer needed. Especially you should remove all files with an.exe extension. If you ever need anyone one of them, you can easily just recompile them. You may close the second File Manager window. The string Class Copy the file secret.cc from the ~cs203/labs/lab4 directory (the usual place) to your Lab4 directory (create the directory first if you haven t done so already). This program will ask you to type five words and then five integer values. The idea is that each integer value specifies a character position in the corresponding input word. The program will print out a word composed of the five characters specified in the input. Look at the end of this section to see what will be required for your handin.txt file. Compile and run the program enter the following data (as shown). cheap energy can cause problems 4 2 1 0 5 Notice the clever result. 1. Modify the program so that the integer entered is interpreted as the position from the end of the string. You must do some arithmetic in order to get the correct result. For the example above, the program output should look like Enter five words: cheap energy can cause problems Enter five integers: 0 3 1 4 2 Secret word is peace 2. Add a new string variable to the program and assign it the value obtained by concatenating together all five words (plus intervening spaces word1 + " " +... ). Display the value of this new variable and the value obtained by taking the following substring (use substr): the whole string without the first two and last two characters. The problem, of course, is that you don t know how long the string will be each time this must work for all input. When you display the value of the substring, display it surrounded by single quote marks such as shown. If the program is run with the five words indicated in the earlier input example, the complete program output should be as follows. CSCI 203 Page 4 September 23 24, 2002

Enter five words: cheap energy can cause problems Enter five integers: 0 3 1 4 2 Secret word is peace cheap energy can cause problems eap energy can cause proble You should be able to make this modification to your program using the string class substr() and length() methods. For this section, hand in the final program (since it includes the previous parts) and the output from a single execution. The grid Class Look at the end to see what will be required for your handin.txt file. You are to use the grid class discussed in Mercer s text on pages 123 129. You should read these pages carefully. You will need to use the following line to include the class: #include "/home/hydra/courses/cs203/include/grid" 1. Here is a grid pattern. Write a C ++ program which creates and displays this grid.......0......####......0.....<...... 2. Add code to your grid program which will cause the player to traverse the grid picking up the 0s, avoiding the # s and returning to the starting place. Display the state of the grid initially and when the player has returned to its starting point. Consult the Mercer text if necessary. CSCI 203 Page 5 September 23 24, 2002

What to Hand In Put in your handin.txt file the following: 1. For string class section, hand in the final program (since it includes both parts) and the output from a single execution. 2. For grid class section, hand in the final program and the output from an execution. CSCI 203 Page 6 September 23 24, 2002