Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re^5: Perl and MongoDB find error

by Anonymous Monk
on Apr 11, 2012 at 09:22 UTC ( #964483=note: print w/replies, xml ) Need Help??

in reply to Re^4: Perl and MongoDB find error
in thread Perl and MongoDB find error

that example might have been outdated, i checked the code of module , it doesn't support

I find that hard to believe :| Actually, I do not believe it :)

Replies are listed 'Best First'.
Re^6: Perl and MongoDB find error
by Kanishka.black0 (Scribe) on May 22, 2012 at 16:35 UTC
    find is not working i check the code, it been redirected to query in for final processing , even i was unable to digest at first.

      If you look at the tests in the distribution, they don't even test ``find'' with supplied key/value pairs, per what OP wants to do. For example:

       my $some_users = $users->find({"name" => "Joe"});

      If you try this, you'll get undefined values as you iterate over the cursor.

      (example taken straight from the documentation of MongoDB::Tutorial)

      OTOH, if you try this:

      my $john = $users->find({"name" => qr/joh?n/i});

      It seems to work. (Also from the documentation.)

      How bizarre.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://964483]
[oiskuu]: You want to draw the path? $iter = combinations( $TOP_HEIGHT .. $NODE_HEIGHT, $pos); then get the path from the iter, level change at depth x, for(..) $pos += $level_change; something like that
[oiskuu]: yergh, <code> tags... [$top_height .. $node_height]
[Eily]: Discipulus by demonstrate I suppose you mean simulate with perl?
[Eily]: the demonstration itself is fairly easy. The number of paths on a node is the sum of the numbers of paths to the two nodes above (or one node above on the edges of the triangle)
[Eily]: since the value of a node is also the sum from the two nodes above, you just have to demonstrate that the equality is true at the top of the triangle
[Discipulus]: yes Eily, thanks oiskuu but i dont get it.. ;=( maybe I'll ask a SOPW

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2018-03-19 11:13 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (239 votes). Check out past polls.