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. MacTommy

    Python 2.7 bz2 support (on rhel)

    As always, I tried something right after posting this, and that worked... ;-) Just in case somebody stumbles upon this...: I was under the impression that it would only work when I did ./configure with --enable-shared. But it turned out that things were a lot less problematic when I didn't use...
  2. MacTommy

    Python 2.7 bz2 support (on rhel)

    Hi all, I am completely new to Python and I am trying to get some software to run, which crashes because 'module bz2' is missing. Indeed, if I say "import bz2" it says: "No module named bz2". So I tried recompiling Python, but somehow it won't include the bz2 module. Something goes wrong at...
  3. MacTommy

    Installing DBD::mysql on Mac OS X 10.6

    And also it says: Error: Can't load '/Users/mactommy/.cpan/build/DBD-mysql-4.020-NaxWTi/blib/arch/auto/DBD/mysql/mysql.bundle' Even though: $ ls -l /Users/mactommy/.cpan/build/DBD-mysql-4.020-NaxWTi/blib/arch/auto/DBD/mysql/mysql.bundle -rwxr-xr-x 1 root staff 428852 Sep 13 12:10...
  4. MacTommy

    Installing DBD::mysql on Mac OS X 10.6

    Yes, it does: $ ls -l /usr/local/mysql/lib/libmysqlclient.16.dylib -rwxr-xr-x 1 root wheel 4142080 Mar 14 2011 /usr/local/mysql/lib/libmysqlclient.16.dylib
  5. MacTommy

    Installing DBD::mysql on Mac OS X 10.6

    I seem to run into the same problems as others. I read the other threads on this forum but I can't seem to solve my problems. I am sorry if I overlooked something and double-posted. What I am trying to do is install DBD::mysql with cpan on Mac OS X 10.6.8 (64 bits). First, by the way, I...
  6. MacTommy

    Which Perl module for parsing ambiguous grammars?

    I am looking for a module that can parse ambiguous grammars and that gives me all the possible parse trees. Also, it should have 'actions'. I looked at Parse::Yapp and Parse::RedDescent which both look great, they have actions, but neither will give multiple solutions in case of ambiguity (or...
  7. MacTommy

    Issues Importing CSV file into MySQL database

    Something else you might want to look into is the MySQL documentation on loading data from a (possibly comma separated) file. That is way faster than using a script to do it line by line. http://dev.mysql.com/doc/refman/5.1/en/load-data.html And if you want to do it with a Perl script anyway...
  8. MacTommy

    String concatenation in replacement of preg_replace()

    Feherke you are an absolute king! This would never have occured to me anywhere in the (near) future. Thanks a lot! That still keeps me wondering though why ${1} doesn't work (nor ${01} for that matter). I thought that actually was meant for things like this (which was why I couldn't come up...
  9. MacTommy

    String concatenation in replacement of preg_replace()

    Oh yes, and if you do ">> $1 $iNewNeedle <<" as the replacement part (with a space (or a dot, or in fact any other non-variable symbol) in between the two) it does work...?!?
  10. MacTommy

    String concatenation in replacement of preg_replace()

    This is very weird... I have this piece of code: <?php $sString = "abc abc needle=567 def def"; $iNewNeedle = 123; print preg_replace("/(needle=)[0-9]+/", ">> $1$iNewNeedle <<", $sString); ?> It produces: abc abc >> 23 << def def The $1 ('needle=') part is gone, as is the first digit of...
  11. MacTommy

    Multisorting mixed associative arrays

    Yes. Thanks guys for all the suggestions!
  12. MacTommy

    Multisorting mixed associative arrays

    No, darrellblackhawk is right. It is not a bug, it is a documented feature. Though you might doubt its advantage of course.
  13. MacTommy

    Multisorting mixed associative arrays

    Yes, exactly. That is right of course. I was just wondering whether there would be a way I could force PHP to think of these indexes as strings rather than numbers, because I would rather not mess with the data (in the solution you sketched out I would have to keep track of when the appended...
  14. MacTommy

    Multisorting mixed associative arrays

    I am not sure if it is a bug or a feature but if I try the following code$aTest = array( '3 ' => array('a' => '3a', 'b' => '3b'), 'a' => array('a' => 'aa', 'b' => 'ab'), '5 ' => array('a' => '5a', 'b' => '5b') ); printArr($aTest); array_multisort(array_keys($aTest)...
  15. MacTommy

    Uploading files

    Thanks guys! I found out about the $_FILES['myFile']['error'] already but it didn't give one (an error, that is...). Probably because everything is fine. I just have to do something with the file before the script ends as jpadie says. That might be it because I have several scripts that work...
  16. MacTommy

    Uploading files

    Oops, that last bit is actually not true. setting upload_tmp_dir appears to have no effect at all..?!? The $_FILES['sUploadFile']['tmp_name'] is still set to something in /var/tmp/ while there is nothing there... So move_uploaded_files() can't find it and complains about that...
  17. MacTommy

    Uploading files

    This is a newbie question I guess. I've got a script that should let users upload files, but nothing seems to happen. The form looks like this: <form enctype="multipart/form-data" action="./myPage.php" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="10000000">...
  18. MacTommy

    XML::LibXML namespaces

    What do I have to do to have e.g. findnodes() work again when I am parsing XML that has a namespace involved..?!? If I run this code it works fine (returns 2 fields): #!/usr/bin/perl use strict; use XML::LibXML; my $sTestXml = <<TEST; <?xml version="1.0" encoding="UTF-8"?> <someRoot>...
  19. MacTommy

    Difference in onUnload when using link vs Back button

    Yes, I think I have to start thinking along the lines of what you describe. Sounds fair enough indeed. Doesn't solve the mystery of the onUnload behaviour though, but well... I read several things across the net about its behaviour being notoriously unreliable between browsers anyway. Thanks...
  20. MacTommy

    Difference in onUnload when using link vs Back button

    Yes, you are right of course. If the user closes the browser in some forceful kind of way or just pulls the plug or something the records would stay locked indefinitely. Nonetheless I have become intrigued by the difference in behaviour when unloading pages in different ways...

Part and Inventory Search

Back
Top