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...
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...
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...
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...
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...
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...
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...
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...?!?
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...
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...
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)...
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...
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...
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">...
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>...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.