kc0arf 68 Posting Virtuoso Team Colleague

Hello,

I would code this using a bubble-sort (or other sort) that after the input is completed, the numbers in the array are sorted. Then, you can do a compare, and discard the duplicate elements. Then, you can run through the array and count the elements.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

Welcome to DaniWeb. For the best help, it is best to find the proper forum for your subject (C++) and then post some code that you are having troubles with, and the community will look at it and help you out. They will ask you to show your work... so no posting of the homework assignment and asking for an answer.

If you do not know the code, post psuedo code:

Begin
Ask for name
Ask for phone number
Store record
Print it out
Write to File
End

And then we can go from there.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

Welcome to Linux! There are some things to learn, and you are in for a small challenge, but it is very well worth it, and you will be a happier fella for taking this step.

A FIRST MAJOR STEP you have already made -- you have realized that you should not be running around as the root user for normal day-to-day tasks. Only use Root when you need it. There are weeks that can go by that I have not used the root user operation... if you setup your system properly, and assign the rights correctly, you too can have a peaceful life.

If you are going to really migrate to Linux, you need to learn how to work in the Terminal, the Command Line Interface (CLI).

Look into the launcher bar there for the System Tools --> Terminal. If you are logged in as a normal user, here you can use the "su -" command to promote yourself to being a super-user. Security note: If you want only certain people to have this functionality on your public boxes, you can change the perms so that only a certain group of users can use this command. I have done this for 2+ years with no hiccups.

Ok, so you are in the terminal window. Time for a few commands:

cd Changes the directory
pwd Prints the path of the current directory
chmod Changes the permissions on a file
chown Changes …

TKSS commented: Excellent work my friend...you helped this person with fantastic info! :) +1
kc0arf 68 Posting Virtuoso Team Colleague

Hello,

Please tell us what you did to fix it. :)

Thanks,

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

It is sounding like a hardware error, but there is one thing that you might be able to do. Do you have OS 9 loaded somewhere on that laptop? no, not running Classic, but where you can boot into OS 9? See if you can do that, and then if the OS 9 system recognizes the media. If it does, you have a software problem. If it does not, you have a hardware problem.

If not, try booting from the OS X install disk. If it works, software on the hard drive. If it doesn't, I would be more suspicious on the hardware failure.

If the combo drive is too expensive, consider an external USB/Firewire CD/DVD burner / reader. Instead of upgrading my cd-rom to a DVD, I went out and got an external unit. Then again, I am on a G3 Lombard.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

Gosh I remember Print Shop on my Apple IIe and using an Imagewriter printer to make large banners. I take it they have advanced the page layout software part of it. Thank you for the note to go and take a look.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hi,

You may also want to see if those screens will be supported by your Packard Bell computer. If it is an older one, your video card might not have the horsepower to drive the screens.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

Are you referring to Freehand, as in Aldus Freehand, the vector graphics program similar to Illustrator? I am wondering if Freehand had the type control characteristics that Quark, InDesign, RagTime offer.

Thanks,

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

AVOID QUARK LIKE THE PLAGUE!!! If you have any doubts, go to www.quark.com and into the support forums, found off the Support menu. You will see the wrath of people getting PAID to use the Quark program, and they are about to cause a revolution in the DTP industry. While it may be true that Quark is #1 in the industry, Adobe is giving them a serious run for the money, and a conversion may happen. Quark remains hostile to the user community. Stay away from it!

I have migrated my Quark materials to Ragtime. The Ragtime interface is a different pariidgm, but it is cross platform, and the software works, and works WELL. For the home user who doesn't want to shell out $$ for the program, Ragtime is awesome. Many a club newsletter have been made with it.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

My guess is that your XP Home machine does not have you authenticated properly... in other words, doesn't know who you are. You might (change that to BETTER) have firewall software running at home, and it may be blocking your commands.

I am also very curious on why you would want to do this sort of thing, and what security-conscious network administrator would allow such a thing. You may have a special relationship with your employer to allow such a setup, but coming from a security minded administrator (me), I would not allow these commands to be effective.

If I had to implement such a thing, I would install PC Anywhere, or get encrypted VNC working, and shut the computer down via the Start Menu.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

I would enter the numbers into an array, and then have the computer do a bubble sort on them. With the Bubble, the largest value will be on the top ( array[0] ) and the largest value would be on the bottom ( array [5] ) .

Code for a bubble sort is around the internet somewhere. Granted, it is not the most efficient code, but you are looking at only a handful of elements.

Then you can whack off the [0] and the [5] elements, and add the rest and get your answer.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

When booting from the XP CD, the software should ask you where to install it. In that screen, you should see the partions available listed. You should be able to delete the partition, effectively forcing you to re-partition and implied re-format.

If you are having troubles booting from CD, then there is something else at work. Does your system give you a message saying "Press any key to boot from CD..." or something to that effect? If so, you need to tap a key to get into the OS and boot from there.

If this doesn't work, you may need to go to another computer, and make boot floppies. I know you can do that for 2000; I am not sure (but betting you can!) do it for XP. Look for a folder called BootDisks or the like on the root level of the CD-ROM. There should be a utility and some image files.

ENjoy,

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Cool beans!

Glad that it is working for you. Take care, and enjoy.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

You are going to need to use the Printer Utility to attach to the printer in OS X, and set it up from there. Does your Asante Laserbridge support IP? If not, you are also going to need to turn on AppleTalk in the Network control panel, and grab the name from there.

Let us know how it works,

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

I would be interestd in what Apple sent you for partition information.

What they are trying to do is have you optimize your hard drive, meaning re-arrange your files on the hard drive so that they are fragment free, and nicely laid out for the OS to work with. While this can speed some things up on your computer, it is not a complete necessity.

Windows comes with an internal disk defragmenter and Linux uses a file system (ext3) that minimizes fragmentation. It has always been a third-party addition for Mac OS (7,8,9,X) to have a defragmenter around.

Since going to X 2 years ago now or so, I have not defragmented my hard drive. I am not under any pressure to do so in the future. I would leave it alone, and enjoy your Mac.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

I moved this request out of the Tutorial section... the thread was misplaced, and belongs here.

Second, we do not do your homework. We will assist with your posted program, helping you work the kinks out. But we will not do your assignment, that is unethical for you to ask us to, and unethical for us to supply it to you.

PLease send us your code. If you do not know where to start, send us your psuedo code. Let's work on this and learn how to do it, not how to get it done without doing it.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

It is spelled beans.

And no, your efforts to learn C++ are not going to go to waste. You should be learning coding style, learning that comments are just as important as the actual code, and learning about data structures and algorithms. Perhaps even efficient code... there are many ways to do things.

Continue to grow with C++. You might not ever master it, but you will learn a lot of things from it.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

If you do go to OS X, your best bet is to get to OS X 10.2 (Jag) or 10.3 (Panther). The orig OS X (you said you had 10.0) and 10.1 had serious printing issues (SLOW!) and other little things up with it (my Powerbook had non-optimized video resulting in a very slow computer. Quicktime movies were horrible!).

Also, if your computer came with 8.x, there is a good chance it is an older computer, meaning it might not have ample memory and hard drive. For X to run nice, you need at least 256 MB of Ram. It will run with less, but you will pay for that in performance that your older computer (am guessing PPC 604 or 603 series) cannot really afford.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Good Morning,

It is possible to work with zip files on the Mac. While it is not the traditional Stuffit format, there are Zip programs out there for the Mac, and most of them Shareware.

My guess is that you have some sort of segmenting going on, although I am not sure. Why? Because You unzipped the archive, the single archive, and now have all the .p01 .p02 .p03 files. Perhaps you have an installation sets of disks, or maybe these are pages to a postscript program.

This could help. Download a file typer utility, such as:

http://www.frederikseiffert.de/filetype/

Don't change anything, but find out what the file types of the .p01 ... files are. They may be defined, they might not be. BUt they might hint to where they belong.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello Papa Smurf,

You wrote out pretty clear instructions on how to work regedit, but failed to tell the user on how to backup the registry. Your post is incomplete.

As an administrator, I have links setup to answer common questions too, and have taken the time to proofread what I publish, avoiding the attitude and the issue of missing information as best as I can.

Help is always welcome; attitude is best checked at the door.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

There is a way to disable the countdown, but you should make sure you have your data backed up before you make this modification. While it isn't a serious mod, if you do something wrong, you might not be able to boot properly, and that can be costly.

On your C:\ there is a file called boot.ini Inside it, you will see a value called Timeout=xx where xx will be the number of seconds hat the computer will wait before booting.

I would suggest that you place it down to 5 seconds. WHile you may want to have it be "immediate", there may come a time and place that you need that delay, and wish you had it in there.

UNLESS YOU REALLY KNOW WHAT YOU ARE DOING, do not adjust any other parameters. You will find definitions for other boot partitions within this file. Leave them alone.

Enjoy,

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

Looks like it's time to contact the manufacture and have the drive swapped. The Firewire will be much faster (assuming the drive mechanism can keep up) than the USB package is.

Take care, and hope all is well.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

I hope you are able to get that working. I have not upgraded to Firewire technology, so don't know everything about it. I am still working with SCSI and USB, although I think I have left serial behind.

Take care, and let us know.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

A Hardware Interrupt is a "message" that the hardware will give the CPU saying that attention is needed somewhere else. For example, if your CPU is adding some numbers together, and something comes in on the serial port (such as a modem connection), the port will send an interrupt to the CPU, and ask it to read the data sitting in the buffer. Keyboards, mice, even the video cards have interrupts.

I think that you have an OS issue, as it is happening globally, and you are losing the battle with it. Because you mention that your computer is quite fast running one program, I am going to believe your hardware and RAM are alright.

If I were you, I would save off my data, and re-install from ground zero. As complex as windows is, you could spend the better part of another month trying to find it. Start clean.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

Couple things to consider:

1) FTP can be compromised. Passwords are sent in the clear. While it is not likely, this could cause a problem.

2) Dialup can move about 14 MB per hour. 1024 MB / 14 = a lot of time. Dialup will not do it for you. Hell, downloading a CD-ROM over a good cable modem connection takes a good 45 - 60 minutes.

3) Aside from home movies that you make on your own, one has to wonder what in the world you are doing with so much data. If you were to get a cable modem, and the cable company was monitoring their systems, they WOULD notice you moving that data on a regular basis, and may knock on your door. (I know it is possible -- I monitor the data flow on my networks, and have knocked on a few desks already)

4) I think your best bet is going to be cutting DVDs and mailing them to him. Or if one of you have a laptop, go to the other fella's place, and eat some pizza while moving the data on a local network.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

I would plug it in, and go into the System Profiler, and see if the Powerbook G4 sees it. IF so, great. If not, then there may be a problem.

If the System Profiler correctly identifies it, then I wonder if there is a security issue on the device. But I think the device should be "mounted" first, before any such warning is displayed.

Also check to see if the G4 is up to date on system software.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

First, a comment on style. I see that you do some declarations of variables inside of functions between instruction segments. That made the code hard to read. You may wish to consider placing all of your definitions at the top of the function, so that eyes do not have to hunt down where things are declared,

Second, I don't think that you can do a

string bob = lyrics;

I think you need to do a strcpy(); on the two arrays (strings). Better yet, just do a

members = strlen(lyrics);

Why bother with Bob?

A purist might complain that you wasted too much memory and processor cycles :)

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

I looked at your code, and it appears to be a bubble-sort. Here is what I would do.

1) Get yourself a nice sheet of paper, and a pencil.

2) Draw out your data structure.

+-------+      +------------------+  +------------------+
| head  |       | data     |  point |   | data     |  point |
+-------+      +------------------+  +------------------+

Remember to draw little boxes for the temp pointers and stuff too.

3) Go through your code by hand, and fill in the paper as the computer would during the iterations. Do not assume when doing this by hand. Go through the motions, and stick with it. You will find your error.

4) In my coding days, I was always sure to make a duplicate head pointer, just in case I messed up the transition somewhere. Guess it was mild parinoia.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

I am curious. What block?

If you turn on the computer, and hold down the C key while it boots, it should boot to the CD-ROM, and load up the installation materials (assuming you have the setup CD-ROM in the drive).

Good Luck.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello Laurel,

Yes, by re-formatting, the computer is "brand-new" with whatever software you choose to install on it. What you will want to do is get ahold of the system disks, and startup the computer with them. Using a utility called the "Disk Utility" (found in the blue apple menu when loading from OS X systems disks), format the hard drive before performing the installation.

Once that is done, you will be prompted to enter in new password information, and from there, may install new software.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

File sharing requires 4 things: network, network protocol, network services, and file permissions.

Sounds like you have the network and protocol phases correct... one machine can talk to the other.

My guess is to see if the share is properly configured on XP, and if youhave sharing permissions setup on the XP box.

I think you will find it a permissions problem, as the computer is reporting Access Denied.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

In all seriousness, it is better to not have one computer (the mac) depend on another computer (xp) for network access. Your best design will be a wireless router that has a firewall properly configured to pipe the internet into the two computers in parallel, instead of trying to get one to act in the middle.

Besides, if you get a good college project going, and friends have to come over with their laptops, you are all ready to go to get on the net and sit at a kitchen table and get wired in and all set.

Good Luck with this.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

My wireless router cost me ~$89.00 (Buffalo Tech, 802.11g -- works great!). 1 billion = 1 x 10 ^ 9, so your router would cost you 8.9 x 10 ^ -10 billions of dollars, or more properly written 0.00000000089 billion dollars.

If you are getting an iBook with a Airport Card already, you can avoid 2 pizza parties (~$20 each) and 2 cases of beer for two weeks, and get the router. :) That will be easier than trying to get the Windows XP box working with all the firewall modifications and headaches.

It is the smart thing to do.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hi,

Glad to hear you got a good Sync to start with! Makes you feel better!

I haven't used the iSync with my Visor. Stuck with Palm's software exclusively. I am so used to that interface that the new iCal seems clunky to me.

Piece of history: Apple used to have a child company called Claris, and they wrote, in the early 90's a software package called Claris Organizer. Palm purchased it in the mid-90's, and used it as their desktop software on the Mac, and later on the PC. Seems interesting that Apple wrote a second "organizer" style of program.

As Virex is running a set of background processes, after you kill it, you have to reboot the computer.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

I was hoping he had a Wireless Router so that the XP and X boxes would be peers, and not one dependant on the other.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

Do you have McAfee Virux installed? I tried out that software, and my palm blew up with file locked errors. I did the re-install thing, and then thought for a moment before it dawned on me that Virux was the problem.

My Palm is actually a Handspring Visor, and once the McAfee was removed from my OS X system, the Palm was happy.

Let us know.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

I would love to help you with this, but need to know more about your setup. I assume that the Mac is going to be OS X, and the Windows XP machine is already there and running. What I need to know is 1) how knowledgable are you with the systems, and 2) how your network is going to be wired.

Once we get that figured out, I can help you with the details.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

I would do for this case 4 partitions:

swap (2x RAM memory)
/
/var
/home

/var will need about 400 MB. Want to isolate it so that any log files that are made will not fill up the main system.

To do Linux Properly (in my humble opinion)

/
swap
/usr
/home
/var
/temp
/internet

and I build them on 10 GB disks (or larger) so that they can grow and be happy. In this design, /usr would have the largest partion size. I also like having /internet/ftp and /internet/www in one location, so that I can have flexibility on how to offer permissions, and remote access.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

I would suggest that you do a Google search on "Lisp OS X" and see if you can port your Lisp 4.2 code into the programs available for OS X. Be prepared for a porting issue though; I do not know Lisp, and have no way to test it. But, I think it would be wise for you to look into the other OS X native solutions instead of investing loads of time.

You can start here:

http://www.david-steuber.com/~david/Lisp/OSX/

Let us know what you find!

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Wow. Looks like a bunch of us working on it at the same time. Cool.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

hello,

I am working with:

cat filename.txt | grep @

and getting the email names reduced to something in the one line. I am thinking that this will help. What I wonder is if we can get grep to simply output the found expression instead of the whole dang line.

I am also wondering if AWK will do what you need.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

To expand on MacTecTom's idea there, you will need to work NetInfo as a administrator of the computer (note that administrator here does not mean root account).

In order to set the root password, find the root user, and remove the * in the password field. Leave the password blank. Save the domain. Quit the NetInfo program.

Next, open a terminal. Type in:

su -

Then, type in

passwd

and then enter in a password. the Computer will ask you to re-type it. Note that the computer will not display any stars or dots or anything for the characters you type in.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hi,

What kind of system? Windows 2000? XP? If it is any one of those, be sure to logoff at night. But if the techno geek is good, you will need to delete the cookies, history, and other things.

But do not think this is a safe answer. If the company has suspicion that you are doing something wrong, they can examine your computer from upstream, and pull your information in real-time and track where you are going. Deleting all the stuff locally will stop the busybody... but will not stop the educated IT Jedi who knows the force.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

2020search is an Ad ware program. It has probably made edits to your registry to prevent removal. You may need to do the manual removal from the registry, or you might find success with a spyware removal problem.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

DMR --

DUH! The coffee did not kick in. I have been doing ASCII art like that since 1990. Never dawned on me that writing in that fashion would cause it.

Boy I feel dumb.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Um,

Not sure how I got smiley faces after the drive name. They are not appropariate within the context they appear. Please pardon the mess.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

I would save any data you have on those drives, and format the box clean. I would also partition that 200 GB drive into three volumes: System (C:), Applications (D:), and Data (E:). Partitioning will prevent data loss due to logical / system issues, but partitioning will not protect from mechanical drive failure.

Why do this?

* You might have a corrupted partition without the 48 bit logical block addressing. You were seeing the full partition at one time, and now you are not. It is possible that the OS mucked something up in the file tables. Clean it now.

* You have some serious registry issues. Registery Editor is an exteremly powerful tool, and while you did back things up properly, it might not work the way you intend it to. Remember, your partitions are out of whack, and the golden road was long left behind.

* You want a nice stable system, not possible nightmares lurking around the corner. Bite the bullet and do it now, when you have some leisure time to do it.

* Partitions are a great idea. You get around the hard disk limits, and you a lot more flexibility. I have done multiple partitions for a long time now, and have had no problems at all. Multiple partitions can even make backup schemes easier.... have the backup software just touch the data partition.

Yup. Rebuild your box. That is what I would do.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello,

I am wondering if this is still happening to you. What version of OS X are you running? 10.0 and 10.1 were, um, not the best for printing. 10.2 introduced CUPS printing (better) and 10.3 has worked fine for me.

Let us know,

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Hello Dani,

Mac OS X is a *nix, and it has a crontab just like Linux and the rest of them. If you take a look at /etc/crontab, it will show you that these scripts are called regularly.

Here is mine:

yoda:/etc Christian$ cat crontab
# /etc/crontab
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
HOME=/var/log
#
#minute hour mday month wday who command
#
#*/5 * * * * root /usr/libexec/atrun
#
# Run daily/weekly/monthly jobs.
15 3 * * * root periodic daily
30 4 * * 6 root periodic weekly
30 5 1 * * root periodic monthly

The order of the colums are:

MINUTE HOUR DAY MONTH WEEKDAY USER "ACTUAL COMMAND"

So, according to my line, I am running the daily at 3:15am (the times are in 24 hour clocks), the weekly runs on a Saturday (1=Mon, 2=Tue, 6=Sat), and the monthly happens on the 1st of the month, at 5:30 in the morning.

Yes, these are just like the familiar /etc/daily and /etc/monthly that you are familiar with.

Honestly, nearly all of the Mac users out there will not be aware of these files, and what they do. Apple has done well keeping things GUI based, but for us intense computer people, the Unix kernel is well... sexy. :)

Great question Dani. Good to see ya.

Christian

kc0arf 68 Posting Virtuoso Team Colleague

Good Morning,

It is possible that you are using your Startup disk for cache files before burning to the CD device. Programs like Toast will need an area of hard drive space to do housekeeping events before making the CD.

So, if you have 660 MB of CD Material + 120 MB of cache set, you are at 780 MB of need, plus whatever VM and the rest are doing.

You might need to go through and delete some files before you go any further on the project. You might also need to change volumes where the cache is located, and that could be difficult.

I am about to turn in for the night. Will check in the morning for a response.

Christian