1,105,456 Community Members

Posts by Comatose

Member Avatar
Comatose
Taboo Programmer
2,536 posts since Dec 2004
Reputation Points: 290 [?]
Q&As Helped to Solve: 227 [?]
Skill Endorsements: 34 [?]
Team Colleague
 
1
 

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

Member Avatar
Comatose
Taboo Programmer
2,536 posts since Dec 2004
Reputation Points: 290 [?]
Q&As Helped to Solve: 227 [?]
Skill Endorsements: 34 [?]
Team Colleague
 
0
 

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

Member Avatar
Comatose
Taboo Programmer
2,536 posts since Dec 2004
Reputation Points: 290 [?]
Q&As Helped to Solve: 227 [?]
Skill Endorsements: 34 [?]
Team Colleague
 
0
 

What Platform?

Member Avatar
Comatose
Taboo Programmer
2,536 posts since Dec 2004
Reputation Points: 290 [?]
Q&As Helped to Solve: 227 [?]
Skill Endorsements: 34 [?]
Team Colleague
 
0
 

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

Member Avatar
Comatose
Taboo Programmer
2,536 posts since Dec 2004
Reputation Points: 290 [?]
Q&As Helped to Solve: 227 [?]
Skill Endorsements: 34 [?]
Team Colleague
 
0
 

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

Member Avatar
Comatose
Taboo Programmer
2,536 posts since Dec 2004
Reputation Points: 290 [?]
Q&As Helped to Solve: 227 [?]
Skill Endorsements: 34 [?]
Team Colleague
 
0
 

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

Member Avatar
Comatose
Taboo Programmer
2,536 posts since Dec 2004
Reputation Points: 290 [?]
Q&As Helped to Solve: 227 [?]
Skill Endorsements: 34 [?]
Team Colleague
 
0
 

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});
Member Avatar
Comatose
Taboo Programmer
2,536 posts since Dec 2004
Reputation Points: 290 [?]
Q&As Helped to Solve: 227 [?]
Skill Endorsements: 34 [?]
Team Colleague
 
0
 

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.

Member Avatar
Comatose
Taboo Programmer
2,536 posts since Dec 2004
Reputation Points: 290 [?]
Q&As Helped to Solve: 227 [?]
Skill Endorsements: 34 [?]
Team Colleague
 
0
 

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.

Member Avatar
Comatose
Taboo Programmer
2,536 posts since Dec 2004
Reputation Points: 290 [?]
Q&As Helped to Solve: 227 [?]
Skill Endorsements: 34 [?]
Team Colleague
 
0
 

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.

Member Avatar
Comatose
Taboo Programmer
2,536 posts since Dec 2004
Reputation Points: 290 [?]
Q&As Helped to Solve: 227 [?]
Skill Endorsements: 34 [?]
Team Colleague
 
0
 

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.

Member Avatar
Comatose
Taboo Programmer
2,536 posts since Dec 2004
Reputation Points: 290 [?]
Q&As Helped to Solve: 227 [?]
Skill Endorsements: 34 [?]
Team Colleague
 
0
 

Wait What?

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

Member Avatar
Comatose
Taboo Programmer
2,536 posts since Dec 2004
Reputation Points: 290 [?]
Q&As Helped to Solve: 227 [?]
Skill Endorsements: 34 [?]
Team Colleague
 
0
 

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.

Member Avatar
Comatose
Taboo Programmer
2,536 posts since Dec 2004
Reputation Points: 290 [?]
Q&As Helped to Solve: 227 [?]
Skill Endorsements: 34 [?]
Team Colleague
 
0
 

Here Here!

Member Avatar
Comatose
Taboo Programmer
2,536 posts since Dec 2004
Reputation Points: 290 [?]
Q&As Helped to Solve: 227 [?]
Skill Endorsements: 34 [?]
Team Colleague
 
0
 

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

Member Avatar
Comatose
Taboo Programmer
2,536 posts since Dec 2004
Reputation Points: 290 [?]
Q&As Helped to Solve: 227 [?]
Skill Endorsements: 34 [?]
Team Colleague
 
0
 

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

Member Avatar
Comatose
Taboo Programmer
2,536 posts since Dec 2004
Reputation Points: 290 [?]
Q&As Helped to Solve: 227 [?]
Skill Endorsements: 34 [?]
Team Colleague
 
0
 

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

Member Avatar
Comatose
Taboo Programmer
2,536 posts since Dec 2004
Reputation Points: 290 [?]
Q&As Helped to Solve: 227 [?]
Skill Endorsements: 34 [?]
Team Colleague
 
0
 

How 'Bout Reading The Sticky Post: http://www.daniweb.com/forums/thread41057.html ?

Member Avatar
Comatose
Taboo Programmer
2,536 posts since Dec 2004
Reputation Points: 290 [?]
Q&As Helped to Solve: 227 [?]
Skill Endorsements: 34 [?]
Team Colleague
 
0
 

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.

Member Avatar
Comatose
Taboo Programmer
2,536 posts since Dec 2004
Reputation Points: 290 [?]
Q&As Helped to Solve: 227 [?]
Skill Endorsements: 34 [?]
Team Colleague
 
0
 

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

system("word.exe");

Tag Cloud for Comatose