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 strongm 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. phn737

    in c, you can vary the chunk size when send a file to a host socket...

    cdlvj, in your sample, it looks like only portion of the file got read (by substr) and sent. how repeat/loop to send entire file? this is what i currently have: ... while ( read( OpenedFile, $file, $myBufferSize ) ) { # print $socket substr($file,0,512); # print $socket substr($file,512,512)...
  2. phn737

    in c, you can vary the chunk size when send a file to a host socket...

    in c, you can vary the chunk size when send a file to a host socket. how is this accomplish? how can it be done in perl?
  3. phn737

    how to specify socket buffer size/length?

    anyone else have any suggestion? Kirsle comment seems incorrect: he maximum packet size (also called the MTU, or Maximum Transmission Unit) and default packet size can vary depending on the media. For ethernet (LAN), the max packet size is 1500 octets. For dialup, it is 576 octets. For token...
  4. phn737

    how to specify socket buffer size/length?

    i am openning a file and printing it to a socket. what i want to do is to be able to control the chunk size of the packet being sent (ie. 128K or 512K or 1024K etc...), how can i do this? thx
  5. phn737

    how to seach for a specific string in a file; using grep in perl

    Thank you for your reply. Yes, this helped. I was thinking of use perl's grep function (from a win32 environment...). But i am not there yet, your code will put the entire line containing the matched string in the array @f. Is there a way to get just the matching string (which is a single word...
  6. phn737

    how to seach for a specific string in a file; using grep in perl

    hello, i would like to search a file to see if a specific string exist and return true or false. not sure how to use grep within perl, is this possible? please help. thanks.
  7. phn737

    why 32-bit .exe application run in dos after backup to cd

    the problem: I backup a 32-bit setup application to a CD; i notice the app no longer retain the original icon, when run it runs in dos and fail 'program too big to fit in memory' any idea to resolve issue?
  8. phn737

    How to use sed to this substitution?

    By using the example below, this seem to be working fine for me and does what I wanted: sed '/-a[0-9]*/s/-a/-B aa=/g' Thank you, jamisar, for your assistance and effort. We can end this post for now I will re-post if this give me any problem.
  9. phn737

    How to use sed to this substitution?

    I tried the solution that jamisar provided, and getting this error: sed: invalid option --B ... There seem to be some syntax error in the solution.
  10. phn737

    How to use sed to this substitution?

    Thank you, jamisar, for replying to my post. In the solution you provided, the substitution would appears to work (I have not actually try it yet) because the number, &quot;23&quot;, is known; but what if I do not know the number following the -a<###> ahead of time, how would I approach that...
  11. phn737

    How to use sed to this substitution?

    I have the following line in a file: word1 -a<follow by some number here> word2 (eg: word1 -a23 word3) I need to change &quot;-a23&quot; to &quot;-B aa=23&quot;. I am having a hard time trying to get this done in sed. Could someone please help. Due to other substitution in my script done by...
  12. phn737

    How to use mysql_init and mysql_options correctly for LOAD DATA LOCAL?

    Yes the import.txt file is uploaded to the same directory that the php script is executing from (which is on the same machine that is hosting the apache and mysql). So you do think I need to add the 'mysql_init' and 'mysql_options' functions into my php script?
  13. phn737

    How to use mysql_init and mysql_options correctly for LOAD DATA LOCAL?

    OK, so I have this problem with MySQL 3.23.53 (win2k) and Apache2.0.43(running as module) and PHP4.3.0(dev) (this is necessary for Apache2.0.43 to run as module; php bug). I have a script that load data from a csv file into a DB. The problem is in newer version of MySQL 'LOAD DATA LOCAL INFILE'...
  14. phn737

    LOAD DATA LOCAL INFILE not processing next line.

    Okay, finally found the problem: One of the field (field_b)in the table is datatype int(255) and default is NULL and unique. The problem is the statement: $result = mysql_db_query($sql_db,&quot;LOAD DATA LOCAL INFILE './db_upload/import.txt' INTO TABLE table1 FIELDS TERMINATED BY ',' ENCLOSED...
  15. phn737

    'LOAD DATA LOCAL INFILE command not supported

    When trying to use 'LOAD DATA LOCAL INFILE' with Apache2.0.43 (running a module) and MySQL 3.23.53, it return the error the command is not supported. This is because the function is disable for security issue, but when I tried to start mysql with 'c:\mysql\bin\mysqld-nt --local-infile=1' it...
  16. phn737

    LOAD DATA LOCAL INFILE not processing next line.

    Still does not work. I tried without the &quot;enclosed by&quot; clause and it still does not process all the lines, only the first line gets inserted into the table.
  17. phn737

    LOAD DATA LOCAL INFILE not processing next line.

    I tried to see if there is any newline \n or carriage return \r in the file at the end of each line, and in fact od (octal dump - a unix utilities for ms shell 2.x) does shows \n and \r (0001420 5 , 2 \r \n) but not sure why this line: $result = mysql_db_query($sql_db,&quot;LOAD DATA...
  18. phn737

    LOAD DATA LOCAL INFILE not processing next line.

    I have a csv file saved from Excel that I am trying to import into a mysql table. The problem is that only the first line gets inserted, the rest of the file is not inserted into table1. This is the mysql command that is processing the file: $result = mysql_db_query($sql_db,&quot;LOAD DATA...
  19. phn737

    How to populate a selection box without repeating item with same name.

    sleipnir214, Thank you. Yes, that is what I needed. You just have all the answer :-) . And I was about to attempt to use 'in_array' function to walk through and check for repeating string when I have to idea if in_array is appropriate for the task and no very strong on coding. As someone once...
  20. phn737

    How to populate a selection box without repeating item with same name.

    Well, I am not sure but let me try to explain. So I have a table (t1) with ~100 rows and in one of the column (c3)contains one of the following value (blank,type1,type2,type3...). So I would like the selection box to have the name of each item only once. What I have so far will populate all the...

Part and Inventory Search

Back
Top