Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. paulfrance

    client server communication

    What about something like encapsulating it in a struct with an ID integer?
  2. paulfrance

    Doing C++ home, C in school

    Try here:- http://www.icce.rug.nl/documents/cplusplus/ or Bruce Eckel's excellent free online Thinking in C++ books. http://maththinking.com/boat/languageBooksIndex.html These should offer you some insight into the differences and similarities between C and C++. paulf
  3. paulfrance

    Read a File Backwards?

    Thinking about it, don't read the file backwards a byte at a time, that would be too painful. If you don't know the length of a record, have a guess at the approximate size of 100 lines and seek back to there. Read the end of the file into a string and count the linebreaks. If there's less than...
  4. paulfrance

    Read a File Backwards?

    I don't think there are any built in mechanisms to do this but I'm sure its possible using some combination of the following:- open the file seek the end use tell to get the current file position If your records are fixed length deduct length x 100 in bytes from tell and then seek there and...
  5. paulfrance

    string to double cast operation..

    It is not possible to cast string to a double value in the way you suggest. However, you can convert it with the following function from <stdlib.h> double atof(const char *s) //ascii to float paulf
  6. paulfrance

    fooling me for ages....

    One thing I noticed is that this line:- $code =~ s/[category]/category/g; is probably meant to replace [category] with category but the [] symbols are used in regexs to group chars so try escaping them like so:- $code =~ s/\[category\]/category/g; paulf
  7. paulfrance

    do i need to worry about multiple scritpts accessing one file?

    Yes, you do need to worry. If you're using a unix type system you should lock the file with flock(<FILE_HANDLE>, 2), where 2 is exclusive lock. flock is only voluntary, and will only preserve the file form other scripts using flock as well. Un(f)lock with flock(<FILE_HANDLE>, 8) when you're...
  8. paulfrance

    Perl Script Delete Problem

    Well, I guess the permission thing is because the script that creates the directory is not leaving it in a state where it can be deleted by another script. In your file creation script after the point where it creates the directory try adding the line, (and create a log file while you're at...
  9. paulfrance

    Perl Script Delete Problem

    Sorry if I confused you with the logfile thing, it's really very simple. It just means open file where you can write stuff from your script. Then you can read them with in Notepad or whatever when your script has run to see what happened:- Add this line to the top of your deleteuser...
  10. paulfrance

    Perl Script Delete Problem

    Not sure what the problem is but you could try this to find out. Set up a logfile somewhere and have your script open it for write each time it runs. Modify your rmdir lines to be something like:- rmdir(&quot;$add_ntpath\\accounts\\$delete&quot;) or print LOG &quot;rmdir failed because...
  11. paulfrance

    This is my 3rd post for this problem..... must be a real challenge?

    I forgot to add that because the path is virtual it's not the full root path on your server but the path as if you're linking like an href. paulf
  12. paulfrance

    This is my 3rd post for this problem..... must be a real challenge?

    Tels This how we used to call our scripts with SSIs when I used to work for a dotcom. All our servers were Linux but it might be worth a try. <!--#include virtual=&quot;/cgi-bin/script.pl&quot;--> paulf
  13. paulfrance

    Double Hash?

    If my memory is correct I think you need another pair of braces {} around the hash in the second foreach:- sort keys %{ rt::states{$from_state}} paulf
  14. paulfrance

    This is my 3rd post for this problem..... must be a real challenge?

    Well, first off I don't know a thing about Windows web servers but have you tried any of the following:- i, Check that any simple SSI will work. <!--#echo var=&quot;SERVER_NAME&quot;--> for example. Maybe your server isn't configured to run SSIs. ii, Should there be a colon after the command...
  15. paulfrance

    Reading found information from a file

    Just as an aside. If you want to read a whole file in real quick you should consider undefining the line separator thus. { #brackets limit the scope of local local $/ = undef; $buffer = <IN>; #the whole will now be read here } paulf
  16. paulfrance

    Chat script

    Try adding these tags into the header of your htm page containing the chat. <meta http-equiv=&quot;Refresh&quot; content=&quot;7&quot;> <meta http-equiv=&quot;Pragma&quot; content=&quot;no-cache&quot;> content=&quot;7&quot; will make the page refresh automatically every 7 secs. In order to...
  17. paulfrance

    Solving determinant of a 3X3 using arrays

    This might be of interest to you:- http://www.ulib.org/webRoot/Books/Numerical_Recipes/bookcpdf.html paulf
  18. paulfrance

    Help with C in UNIX environment

    There might be something here:- http://www.cm.cf.ac.uk/Dave/C/CE.html paulf
  19. paulfrance

    A simple web server code made with C++

    This is a good tutorial to get you started. It's all in C but you can convert it I guess. http://www.ecst.csuchico.edu/~beej/guide/net/ Also, try searching for these two docs on http://www.google.com &quot;An Introductory 4.4BSD Interprocess Communication Tutorial&quot; and &quot;An...
  20. paulfrance

    char *, char[ ], and changing conditions.

    One reason could be (from the code you've given us) that when an && statement is evaluated if the first term is false the second term is not evaluated (since there's no point, the statement will still evaluate to false). So your 'loop < size' statement is probably not being called in time to...

Part and Inventory Search

Back
Top