OW2 Consortium
Search OW2 Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | clif List | June 2008 Index

<--  Date Index  --> <--  Thread Index  -->

[clif] Re: RE : RE : Random setUniform out of range


Title: Votre signature email Orange (en France)
Fixed and commited in the trunk and 1.3.0 branch.

-- Bruno.

zze-Rubics DESPLAND M ext RD-SIRP-REN wrote:
Yes that was what i expected first :)
 
Marc


De: Bruno Dillenseger
Date: lun. 23/06/2008 17:39
À: zze-Rubics DESPLAND M ext RD-SIRP-REN
Cc: clif@xxxxxxx
Objet : Re: [clif] RE : Random setUniform out of range

zze-Rubics DESPLAND M ext RD-SIRP-REN a écrit :
Ok i found :
 
public long nextUniform(int min, int max)
 {
  return min + nextInt(max);
 }
 
max isn't the maximum value ...
 
for the range [401,500] min =401 max=99
 
is it alright ?
Honestly, this looks like a bug. I would expect something like:
return min + nextInt(max - min);
Do you agree?

Best regards,
-- Bruno. 

De: zze-Rubics DESPLAND M ext RD-SIRP-REN
Date: lun. 23/06/2008 17:22
À: clif@xxxxxxx
Objet : [clif] Random setUniform out of range

 Erf,
 
An other problem
 
I use a random generator to produce a number in the range [401;500]
 
    <control use="userid" name="setUniform">
          <params>
            <param name="min" value="401"></param>
            <param name="max" value="500"></param>
          </params>
        </control>
this is used to construct an uri for the httpInjector :
 
but when I look the apache log file I found :
192.168.22.228 - - [23/Jun/2008:17:09:50 +0200] "GET /soma/api/user/690?userFormat=68&serviceId=SA HTTP/1.1" 404 306 "-" "CLIF-ISAC HttpInjector"
192.168.22.228 - - [23/Jun/2008:17:09:50 +0200] "GET /soma/api/user/421?userFormat=68&serviceId=SA HTTP/1.1" 404 306 "-" "CLIF-ISAC HttpInjector"
192.168.22.225 - - [23/Jun/2008:17:09:50 +0200] "GET /soma/api/user/458?userFormat=68&serviceId=SA HTTP/1.1" 404 306 "-" "CLIF-ISAC HttpInjector"
192.168.22.225 - - [23/Jun/2008:17:09:50 +0200] "GET /soma/api/user/491?userFormat=68&serviceId=SA HTTP/1.1" 404 306 "-" "CLIF-ISAC HttpInjector"
did I make a mistake ?



<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 2006-2007, OW2 Consortium | contact | webmaster.