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 dencom 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: *

  • Users: MacTommy
  • Content: Threads
  • Order by date
  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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)...
  6. 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">...
  7. 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>...
  8. MacTommy

    Difference in onUnload when using link vs Back button

    I am using an AJAX function that calls some PHP file when the user unloads a page. This runs fine when the unload is fired because of a link being clicked on. However, if I hit backspace or the browser's back button the PHP appears not to be executed (even though the alert I set in Javascript...
  9. MacTommy

    Access to FULLTEXT index

    I created some tables that have a FULLTEXT index on some columns. Obviously, MySQL stores these indexes somewhere? My question is: where?!? Or my real question is: how can I retrieve information from these indexes (like all the words they contain). (I already asked this question a while back...
  10. MacTommy

    Generating/deducing regular expressions

    I am totally aware of the fact that it is not a really solvable task, but I would like to make (well..., have) something that generates a regular expression based on 2 or more strings. Or the most strict regular expression possible or something... So if you would feed it "a123" and "345b" it...
  11. MacTommy

    Knowing which regular expression matched

    I know how to solve this in a not so elegant way, but somehow I have the feeling I am missing something obvious. What I want is this: I've got a couple (possibly 1000's) of regexps. I want to go through a string, each time finding the first regexp that matches, and returning some relevant bit...
  12. MacTommy

    LEFT JOIN with multiple tables

    Dear all, I've got a query that does a LEFT JOIN. Something like this: SELECT a.id, myB.someField, c.someColumn FROM c, a LEFT JOIN b AS myB ON (myB.id = a.id) which works. However, if I reverse the two tables in the FROM clause, it doesn't work anymore. It seems like the table in the ON part...
  13. MacTommy

    onMouseOut fires on any html element in its container?!?

    How can I preventy onMouseOut event from firing when the cursor hovers over any other html-element inside that container..?!? onMouseOver fires directly aftwards, but still... For reference, I've got this code: <html> <body> <div id=myMenu onMouseOut="javascript:alert('onMouseOut')"...
  14. MacTommy

    utf-8 encoded strings in RSS feeds

    Dear all, I am using XML::RSS::Parser (Perl 5.8.8) to download RSS feeds. These feeds however regularly are utf-8 encoded, so the raw XML looks like this: <?xml version="1.0" encoding="UTF-8"?> ... <item> <title>€˜Title with quotesg’</title> <link>http://feeds.someRSS.nl/</link>...
  15. MacTommy

    Can't restart debugger with Perl 5.8.8

    Dear all, I just installed Perl 5.8.8 (built for MSWin32-x86-multi-thread). Now if I do perl -d, or debug in Emacs it all runs fine, but if I restart the debugger (option -R), it complains, saying that: Your vendor has not defined POSIX macro _SC_OPEN_MAX, used at C:\Perl\lib/perl5db.pl line...
  16. MacTommy

    CGI script not allowed to move files

    I have a cgi script that tries to move files. #!/usr/bin/perl -w use strict; use File::Copy; print "content-type: text/html\n\n"; my $sFile = "myFile.txt"; my $sFolder = "myDir"; if( ! move($sFile, $sFolder) ) { print "Couldn't move $sFile to $sFolder: $!<p>"; } else { print "Moved...
  17. MacTommy

    Can you look into a FULLTEXT index??

    I created some tables that have a FULLTEXT index on some columns. Obviously, MySQL stores these indexes somewhere? My question is: where?!? Or my real question is: how can I retrieve information from these indexes (like all the words they contain).
  18. MacTommy

    Auto incrementing in a select statement

    Can I put something in a SELECT statement that adds a new value for me for every row, preferrably starting at some particular value. What I mean is, normally, you say: > SELECT word FROM words WHERE word LIKE 'a%'; +------+ | word | +------+ | a | | aa | | aaa | +------+ And what I...
  19. MacTommy

    Problem with Statistics::Burst

    Hi all, I just downloaded and installed the Statistics::Burst package without any problem. When I run a test script that is just like the code in the example I get an error, saying: Can't take log of 0 at blib\lib\Statistics\Burst.pm (autosplit into...

Part and Inventory Search

Back
Top