1,080,434 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?

Posts by Comatose

Heavens Yes! Watch this thread get deleted... just like my tutorials.

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 216
Skill Endorsements: 27

Ah, ok... so in the new text file, you want it Tab delimited... so the upper case words <tab> definition. K.

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 216
Skill Endorsements: 27
Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 216
Skill Endorsements: 27

I'm not sure what you mean by in a column... in a text file?

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 216
Skill Endorsements: 27

You could tokenize (strtok) by "<" and stick each piece into a vector or so... then get it's size().

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 216
Skill Endorsements: 27

Because you never increment "n" anywhere. In your do while, you need to stick an n++ some place.

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 216
Skill Endorsements: 27

You need to remove the 'mysql' parameter from connect. Should look something like this:

use DBI;

$dsn="DBI:mysql:database=mysql";
$dbh=DBI->connect($dsn, 'root', 'root', {RaiseError => 1});
Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 216
Skill Endorsements: 27

FTP uses two ports (typically 20 and 21). One of those ports is meant to handle all of your commands. The other one, is meant to return data to you. If you receive an EOF on the command channel, it likely means that the command channel (port 21) is indicated that the file transfer has completed successfully, and it's telling you that it's done sending the file (EOF). I've never used the ftp module, so I can't tell you where to fix it... doing it with just sockets, I'd make the code simply discard the EOF, and use it to inform me to close the file handle....you'll want to look at the ftp module's properties, or see if you can error trap the error and discard it.

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 216
Skill Endorsements: 27

You could look into using find: find / -name $1 or you could try doing it by piping it to grep: find / | grep "$1" , but in order for you to make it go from shallowest to deepest, you might have to do something with sort, such as piping the data to it: find / | grep "$1" | sort -g . As for only going 5 levels deep, and printing errors if not found, you are probably bound to rely on awk and/or sed.

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 216
Skill Endorsements: 27

In Samba, the dollar sign has special meaning (something to do with netbios and/or hidden shares). Try sharing the name on the 'doz box without a $, and try to connect to it. You MIGHT be able to escape the $ or replace it with \044 or something crazy, but you might as well just make a share without the $, and use it.

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 216
Skill Endorsements: 27

ah, you are missing a slash of some kind it seems... you are escaping the first backslash with the second. You probably need to add something like this:

$map_drive = '/cygdrive/c/windows/system32/net use x: \\\\share1\\share2';

I dunno if there is a cleaner way to say "hey, don't escape this stuff", but this should work.

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 216
Skill Endorsements: 27

Wait What?

You're running a script on *nix, and want that script to map a drive on a windows machine?????

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 216
Skill Endorsements: 27

Nah, in the overridden virtual wage() method, simply put something like cout << "Manager" in the Manager's method, and cout << "Casual" in the Casual's method.

Or make a virtual overridden method for each class that is like "GetType()", and have wage() call GetType(). The proper way to do what you want to do, is to use polymorphism... regardless of how you choose to get the type.

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 216
Skill Endorsements: 27
Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 216
Skill Endorsements: 27

To give yourself a pat on the back? Another Interesting Fact: you can also post your own arbitrary snippets... but can't post tutorials.

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 216
Skill Endorsements: 27

mkay. Have you done a msgbox on rs.RecordCount, to ensure it has the right number of elements? Like, just before the first if?

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 216
Skill Endorsements: 27

How 'Bout using code tags, and reading the office tutorial?
http://www.daniweb.com/tutorials/tutorial51307.html

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 216
Skill Endorsements: 27
Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 216
Skill Endorsements: 27

Moderators are not supposed to strip posts out

Sir, I beg to differ. When a question is posted to a thread that is old or solved or heck, when they are not the OP.... a moderator is supposed to "split" that into a new thread. I mean, I did when I was a moderator.

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 216
Skill Endorsements: 27

I hate suggesting things like this but you can use system:

system("word.exe");
Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 216
Skill Endorsements: 27
 
© 2013 DaniWeb® LLC
Page generated in 0.1597 seconds using 2.67MB