Ir al contenido principal.
Enlaces relacionados:  Prensa  Compañía  Clientes  Contáctenos
Solsoft

Foros

page results


Autor Mensaje
Escrito en: 09. 05. 2003 [16:39]
israel@FEE.TCHE.BR
Israel Jose Cefrin da Silva
Autor del tema
registrado desde: 31.12.1969
Entradas: 0
Hello,
Does somebody have a example or somehow to page results (like : 1 - 2 - 3
Next-> )?
If "yes", could send to the list ? or put on wiki.openisis/phpdemos ?

Tks

Israel Cefrin

------------------------------------------
Posted to Phorum via PhorumMail
Escrito en: 09. 05. 2003 [18:25]
roger@infomed.sld.cu
Roger Peña Escob
registrado desde: 31.12.1969
Entradas: 0
Mensaje citado por israel cefrin <israel@fee.tche.br>:

> Hello,
> Does somebody have a example or somehow to page results (like : 1 - 2 - 3
> Next-> )?
> If "yes", could send to the list ? or put on wiki.openisis/phpdemos ?
>

i have plans to do it this weekend icon_smile.gif, maybe you can do it too icon_smile.gif , and next week we
share our experience icon_smile.gif

saludos
roger


----------------------------------------------------------------------
Nodo central de la red Infomed (http://www.sld.cu)
Usuario linux: 97152 (http://counter.li.org)
Miembro del grupo de coordinacion de LinuxCuba (http://www.linux.cu)
----------------------------------------------------------------------


-------------------------------------------------
Este mensaje fue enviado usando el servicio de correo en web de Infomed
http://webmail.sld.cu

------------------------------------------
Posted to Phorum via PhorumMail
Escrito en: 10. 05. 2003 [12:07]
braulio
Braulio Solano Rojas
registrado desde: 16.05.2008
Entradas: 2
Hi!

> fetch_array function need that the isisdb be open
...
> is that a normal behaivor ? isis_fetch_array don't need $dbid just the
output of
> isis_search or isis_query output

Yes, you are right. When you call isis_fetch_array, you are calling
indirectly openIsisReadRow (from the OpenIsis library), and this last
function needs the db id. The db id is an integer and I saved it into the
result, however I suppose that if you close the database that integer does
not mean anything (a consistent semantic). I think Klaus can say a little
more about this.

Bye,

BJ

------------------------------------------
Posted to Phorum via PhorumMail
Escrito en: 10. 05. 2003 [12:43]
braulio
Braulio Solano Rojas
registrado desde: 16.05.2008
Entradas: 2
Hi!

Roger Peña Escobio wrote:
> Mensaje citado por Braulio José Solano Rojas <braulio@solsoft.co.cr>:

> also i need to play with the last-last version, cvs icon_smile.gif, can you give me a
glimpse about
> how to complile it? what i need and so on?

I think CVS is by default installed on Linux, it is on FreeBSD, I don't know
on Solaris. I mean, I don't know really if CVS is installed by default on
*Unix, but I think it is. If you are using windows download TortoiseCVS
(search in google). You will also have to look on the internet about CVS and
RCS (howto, tutorials, etc.).

Instructions to download the OpenIsis software from CVS as an anonymous user
are on:
http://sourceforge.net/cvs/?group_id=11257

About compiling there is a txt file about how to do it on the CVS (on
*Unix). For windows it is complicated, you need Visual C++ (not free) and
you will need some downloads from http://www.php.net. You could also try to
compile this with Cygwin.

Please see this:
http://www.php.net/manual/sv/printwn/install.windows.php#install.windows.build
http://www.devnewz.com/2002/0909.html

Best regards,

Braulio

------------------------------------------
Posted to Phorum via PhorumMail
Escrito en: 10. 05. 2003 [14:51]
braulio
Braulio Solano Rojas
registrado desde: 16.05.2008
Entradas: 2
Hi!

...
> losses information about the original field order.

> To solve these problems, an alternative representation is needed, and the
most natural seems to be this one:
...
> I agree that this structure may not be very handy when trying to access a
specific field, but at least it has the property of not loosing information
about field order. > And certainly the other structure (the one currently
used by the PHP extension) can be built from this one (but not the other way
round).

> Well, I guess this should go to the WishList...

> Any comments?

Of course. I have thought about the structure you are talking about
somedays ago. For different reasons by the way. Just because the structure
used right now has gived me a lot of troubles. Anyway I have added this
function to the extension:

/* {{{ proto array isis_fetch_flat_array(resource isis_result)
Return an array with result information (mfn and tags) */
ZEND_FUNCTION(isis_fetch_flat_array)

Verbi Gratia:

<table>
<?php

$dbid = isis_open("/var/db/isis/cds/cds");

$result = isis_search("$",$dbid);

while ($record = isis_fetch_flat_array($result) ) {
print (" <tr><td colspan=\"2\">MFN: $record[mfn]</td></tr>\n");
for ($i=0; $i<count($record)-1; ++$i) { //-1 because mfn is +1
list ($tag, $value) = $record[$i];
print (" <tr>\n".
" <td>$tag</td>\n".
" <td>".htmlspecialchars($value)."</td>\n".
" </tr>\n");
}
}

?>
</table>

I will still support isis_fetch_array. Maybe I could rename
isis_fetch_array to isis_fetch_deep_array or something else and have the
default behaviour of isis_fetch_array mapping to isis_fetch_flat_array, but
I will not do that without a public vote. Anyway some people have made
'stuff' with isis_fetch_array and I don't want to destroy their work
changing functions. I prefer to add new functionality to support everyone.

isis_fetch_flat_array works very fast, try it! It is an O(n) function.

Another comment: there are a lot of uses for text databases, not only
bibliographic data.

The function isis_fetch_flat_array is in the CVS, I have not made packages
yet. I will, but not right now. Please wait or use the CVS.

Best regards,

BJ

------------------------------------------
Posted to Phorum via PhorumMail
Escrito en: 10. 05. 2003 [17:56]
fgomez@criba.edu.ar
=?Windows-1252?Q?Fernando_J._G=F3mez?
registrado desde: 31.12.1969
Entradas: 0
Thanks Braulio for your answer!

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> used right now has gived me a lot of troubles. Anyway I have added this
> function to the extension:
> ...
> isis_fetch_flat_array works very fast, try it! It is an O(n) function.
>
> The function isis_fetch_flat_array is in the CVS, I have not made packages
> yet. I will, but not right now. Please wait or use the CVS.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

OK, I'll wait, and that's not a problem. I'm not still developing
applications with these tools, just trying to know them, and thinking about
them.

I thought that this basic fact of how the record data is presented to the
programmer deserved special attention, because after some time trying to
display adequately bibliographic information stored on Isis records (via
PFT, XSLT, PHP and JavaScript), it is this week that I've noticed that (in
this context) *both* representations are convenient and, in a certain sense,
necessary: an array indexed by field tag, and an array indexed by the
position of the field in the record ("order preserving").

But... the question of field order is also relevant at the moment of
*writing*. Specifically: are new fields added at the end of the record, or
can they be positioned at will within the record? I don't know about this
aspect of OpenIsis, so I just make this rather vague question, and wait for
Braulio, Klaus et al. to post their precise answers. Just let me add that in
June 2002 there was a thread in the Perl4Lib list, regarding precisely this
issue of field order preservation in MARC records. For those who might be
interested, it begins here:

http://www.rice.edu/perl4lib/archives/2002-06/msg00004.html

> Another comment: there are a lot of uses for text databases, not only
> bibliographic data.

Yes, of course! But I'm not sure what this comment means in this context...
By the way, I was not demanding that the structure which is most convenient
for manipulating bibliographic records should be imposed to the rest of the
world (sorry if that's what I seemed to suggest).

I wanted to stress that the use of a certain data structure implies the loss
of a certain kind of (probably useful) information. And I mentioned
bibliographic (and specifically MARC) records, because that's the "universe"
where I'm living now, and it's a "universe" that the OpenIsis community is
commited to support very strongly... well, at least their homepage says
that! icon_smile.gif

Best regards.

Fernando


======================================================Fernando J. Gómez

Biblioteca Dr. Antonio Monteiro
Instituto de Matemática de Bahía Blanca (CONICET/UNS)
Av. Alem 1253
8000 Bahía Blanca - Argentina
======================================================
------------------------------------------
Posted to Phorum via PhorumMail
Escrito en: 11. 05. 2003 [22:30]
valerio.venturi@inwind.it
Valerio Venturi
registrado desde: 31.12.1969
Entradas: 0
On Fri, 9 May 2003 17:39:07 -0300
"israel cefrin" <israel@fee.tche.br> wrote:

> Hello,
> Does somebody have a example or somehow to page results (like : 1 - 2 - 3
> Next-> )?
> If "yes", could send to the list ? or put on wiki.openisis/phpdemos ?
>
> Tks
>
> Israel Cefrin
>
>

This is mine. As a php newbie, I expect you'll find it stupid.
All suggestion is absolutely welcome.
First two function is quotient and rst of division beetwen integers.
Does php have built in ones?
$z below is first record of the ten shown.
successive is italian for next, precedenti is the contrary.


function quoziente($dividendo, $divisore) {
$x = 0;
while($dividendo - $x * $divisore + 1 > $divisore) {
$x++;
}
return $x;
}

function resto($dividendo, $divisore) {
$x = 0;
while($dividendo - $x * $divisore > $divisore) {
$x++;
}
return $dividendo - $x * $divisore;
}

echo "<tr><td colspan=\"2\" valign=\"top\" align=\"center\">
<table border=\"0\" cellspacing=\"10 \">
<tr>";

if ($z>90) {

$d = (quoziente($z,100) - 1) * 100 + 90;

echo "<td align=\"center\" valign=\"middle\">
<a href=\"ricerca_isis.php?z=" . $d . "&keyword=" . $keyword . "\">precedenti</a>
</td>";

}

for($x=0; $x<quoziente(isis_num_rows($result),10)-quoziente($z,100)*10+1 AND $x<10; $x++) {

$a = $z;
$a = quoziente($a,100) * 100 + 10 * $x;
$b = $a / 10 + 1;


if ($a!=$z) {

echo "<td align= \"center\" valign=\"middle\">
<a href=\"ricerca_isis.php?z=" . $a . "&keyword=" . $keyword . "\">" . $b . "</a>
</td>";

}

else {

echo "<td>" . $b . "</td>";

}

}

if ($z<quoziente(isis_num_rows($result),100)*100 OR isis_num_rows($result)>$z+100) {

$c = (quoziente($z,100) + 1) * 100;

echo "<td align=\"center\" valign=\"middle\">
<a href=\"ricerca_isis.php?z=" . $c . "&keyword=" . $keyword . "\">successive</a>
</td>";

}

echo "</tr>
</table>
</tr>
</table>";

}

------------------------------------------
Posted to Phorum via PhorumMail
Escrito en: 12. 05. 2003 [07:17]
paul@OpenIsis.org
Klaus Ripke
registrado desde: 31.12.1969
Entradas: 0
Hola

clearly the order needs to be preserved in several situations,
and an order preserving representation should be considered
the primary one.

There are basically three alternatives,
whose applicability varies between languages:
- as a flat array with an even number of elements,
alternatingly tags and values.
This one is convenient in weakly typed languages,
and especially in Tcl, where you can conveniently
loop such an array with foreach {tag val} $array {...}
consuming up two elements per iteration.
- as an array of structures or two element arrays,
each containing tag and value.
This works in all environments and should be only
slightly more costly.
- as the original C structure, with some commands giving
access to fields. Where extension commands are cheap,
as in Tcl, this is the cheapest and most powerful mode.
Within this C structure also additional interesting information
like the MFN and the originating DB, which in turn may
have an FDT to convert between field names and tags,
is available.

In order to be complete, the first two alternatives should also
be somehow augmented with MFN and DB.
Now that such a record model is available in Tcl,
it will be ported to PHP and others.

On Saturday 10 May 2003 23:56, you wrote:
> Yes, of course! But I'm not sure what this comment means in this context...
For example when storing arbitrary XML structures, order does matter.

> I wanted to stress that the use of a certain data structure implies the
> loss of a certain kind of (probably useful) information.
Yup. Lossy representations should be offered only as a convenience.
But, of course, we should continue to support the existing interfaces.


HAND
Klaus

------------------------------------------
Posted to Phorum via PhorumMail
Escrito en: 12. 05. 2003 [07:22]
paul@OpenIsis.org
Klaus Ripke
registrado desde: 31.12.1969
Entradas: 0
On Saturday 10 May 2003 18:07, you wrote:
> result, however I suppose that if you close the database that integer does
> not mean anything (a consistent semantic). I think Klaus can say a little
> more about this.

Those DB ids work exactly like the Unix file ids.
An open will return the lowest unused fid.
After a database is closed, this fid is invalid.
If another database is opened, it will be reused
and thus becomes valid again, but refering to the
other database.

So please don't close a DB until you're really through with it icon_wink.gif


HAND

------------------------------------------
Posted to Phorum via PhorumMail
Escrito en: 15. 05. 2003 [21:19]
braulio
Braulio Solano Rojas
registrado desde: 16.05.2008
Entradas: 2
¡Hola!

> i don't know if i can discuse clabel here, i'm preate sure i can't
> mainly because this is a php-openisis module list not an php-openisis
aplications list icon_smile.gif

I think your port of clabel is PHP at OpenIsis.

Everyone here can learn from your experience.

Be our guest to discuss this topic.

Just one suggestion, since you have ported clabel, maybe you should change
the name, since it is not the same software.

Bye!

Braulio

------------------------------------------
Posted to Phorum via PhorumMail



Iniciar sesión de usuario

Introduzca su nombre de usuario y contraseña para iniciar su sesión en el sitio web:
Iniciar sesión

¿Ha olvidado su contraseña?


Copyright © 2003-2009, Solsoft de Costa Rica S.A.
Declaración de privacidad