Technical docs for maintenance of apps ?

2009-03-14 Thread jbv
Hi list,

Just curious : how do you guys handle technical docs for your apps
(mostly for maintenance) in case of complex algorithms and/or
architecture ?

Fos instance, I have a cgi script (triggered by a rev client app) that
is
used once a day to update a DB, and it also outputs a text file that
contains
javascript variables structured as xml (this file is then used /
imported by various
web pages as part of the javascript needed to work properly).
Furthermore,
the (large) xml data are structured in a very efficient way to reduce
its size for
faster download and faster use inside those webpages...
All this stuff is quite fast and efficient, but frankly I wonder if I'll
be able to
remember every detail in 6 months...

So the question is : is there any efficient way to describe all these
multi-level
tasks / fine-tuning of scripts and data for further maintenance ?

Thanks,
JB


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


[semi OT] Rev cgi and php

2009-02-12 Thread jbv
Hi list,

I have a Rev cgi script that is called from a webpage via XMLHttpRequest

and the POST method and that outputs xml data.

Now I'm trying to launch that script from a php script on the same Linux
server.
I found several methods to do that on the web, but my choice is quite
limited
since the server runs php 4.3 which is too old for some recent php
functions...

Nevertheless, I managed to launch that cgi script, although I can't
manage to
send POST data to it... Whatever I try, $REQUEST_METHOD contains GET
and all parameters are ignored...
OTOH when I use the GET method, $QUERY_STRING contains the right
parameters passed to the script...

As this is semi-OT and as I don't want to clutter the list with php
code, may I
ask php experts to contact me off-list with usefull and brilliant
suggestions ?

Thanks in advance,
JB


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: CGI on Win servers?

2009-02-11 Thread jbv


Richard ,

> I've only used the Rev engine on Linux and BSD, never on Windows servers
> yet.
>
> Anything tricky about using it on Win as a CGI, or should it be about as
> straightforward as on Linux?
>
> --

The only time I used Rev cgi on a Win server, it was as easy and straightforward
as on Linux, except that I never managed to interface it with mySQL and had to
write 2 short PHP scripts for that...

JB


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


repeat question

2009-01-11 Thread jbv
Hi list,

In the following loops :

repeat for each line j in myVar
repeat for each word w in last item of j
end repeat
end repeat

is "last item of j" evaluated every time the 'repeat for each word w"
loop runs ?

I'm asking, because when trying the following :

repeat for each line j in myVar
get last item of j
repeat for each word w in it
end repeat
end repeat

it gets about 20% faster...

Thanks,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Latest Rev cgi engines for Linux server ?

2009-01-11 Thread jbv


Bill,

Do you have any idea of the specs of the Dreamhost environment ?

thanks,
JB

> Hi JB,
>
> > Does anyone have some experience to share on a Linux distro for a server
> > and one of the most recent versions of Rev, that would allow cgi scripts
>
> I'm running Rev 3.0 with success on Dreamhost. However, my other hosting
> provider (cPanel-based) does not like Rev 3.0 ... I haven't had time to dig
> into it thoroughly, and they haven't been quick to respond to my emails
> about it.
>
> - Bill
>
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Latest Rev cgi engines for Linux server ?

2009-01-08 Thread jbv
Hi list,

I'm in the process of building a new version of a website I did for a
client circa 2004-2005. It was mostly built around Rev 2.5 and Linux.
My client thinks of migrating to a new (and cheaper) ISP, and why
not on a faster server.

According to my experience, Rev 2.5 was heavily environment dependent
and I've been told a while ago by Rev support that post-2.5 cgi engines
of Rev would be less environment dependent...

Does anyone have some experience to share on a Linux distro for a server

and one of the most recent versions of Rev, that would allow cgi scripts

written for Rev 2.5 to migrate without much change ? The server is also
using PHP 4.3.2 and mySQL 4.0.15.

Thanks in advance,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Rev cgi & mySQL (again)

2009-01-03 Thread jbv
Hello again,

For those interested in the latest episodes of my struggle with mySQL,
here's a summary : I've tried the MATCH (col1) AGAINST ("word1 word2")
construct, and it's blazing fast (roughly 50 to 100 times faster than my 
previous
queries full of OR statements...
But there's a couple of drawbacks : columns on which MATCH.. AGAINST is
used need to have a fulltext index attached to them (which is logical), BUT 
there's
a minimum word length limit on such indexes (default length is 4, set with a 
mySQL
global). No wonder it's so fast, since lots of words are ignored...
So, if you need smaller words to become searchable, you need to modify the
ft_min_word_len global (setting it to 1 if you need all words to be searchable) 
and
restart mySQL... and reconstruct your indexes as well.
And then searches via  MATCH ... AGAINST become almost as slow as regular
SELECT searches...

Oh, and I forgot to mention that there's also a list of rejected words that can 
be modified
in another global...

JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Rev cgi & mySQL (again)

2009-01-02 Thread jbv


Jan,

Thanks for the comment.

If you guys are interested, here is a clue on how my table is structured :
there are 2 columns (varchar type) Col1 and Col2 containing single words.
The additional part (with the "/" construct) happens very seldom, so I guess
it can be ignored in the performance discussion...

So the query is quite straightforward, for instance :
SELECT Col1, Col2, Col3, Col4 FROM myTable WHERE Col1 = "toto" OR
Col2 = "toto" OR Col1 = "tata" OR Col2 = "tata" OR Col1 = "titi" OR Col2 = 
"titi"...
up to possibly 50 elements.
As for indexes, it really helps, since the performance drops when they're 
removed...
but searches still remain slow (imho) : 5 to 6 sec to find 10 or 15 matches 
among
4 records...

If anyone has clues regarding the best way to build such queries, please feel 
free to
speak... May be parenthesis would help ?

Best,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Rev cgi & mySQL (again)

2009-01-02 Thread jbv


Bill,

> Hi jbv,
>
> I am less of an expert with SQL than many, but I think you can simplify your
> query a bit using the MATCH...AGAINST keywords:
>
> for example, the first part (b) of your query might look like:
>
> -- convert myList1 to a space-delimited items
>
> SELECT Col10, Col11, Col12, Col13, Col14, Col15
> FROM myTable WHERE
> MATCH (Col1,Col2) AGAINST ('{myList1}')"
>
> notice that I use single quotes to enclose strings; you shouldn't need your
> " &q& " business cluttering things up.

ok, I'll try that...

>
>
> I'm not sure I can figure out the second (a) part of the query, like what is
> the %/ construction? Is that a special escape character, or part of the
> literal text you're looking for? A fully-constructed query example would be
> easier to wrap my head around and simplify.

the "/" is actually used as a separator in some columns of the table...

>
>
> Nevertheless, I'm pretty sure the performance hit is in the data transfer
> from SQL to Rev, so keeping that as small as possible should speed things up
> significantly. I know the tendency is to suck as much data as possible into
> Rev, where you can manipulate it with more familiar tools... but SQL is
> designed for transactions. Trust that it will handle well-formed queries
> quickly, and focus Rev on presentation, not massaging/selecting/sorting
> data.
>

I too am less than an expert, but I tend to disagree with you on that issue :
acccording to my experience, splitting "large" queries into a set of "smaller"
ones
doesn't help much as for speed of data transfer between mySQL and Rev : what
you gain by returning small chunks of data is almost always lost by the
multiplication
of queries...
When one needs to grab large amounts of data from a DB, a good solution is to
use the "SELECT ... INTO OUTFILE..." construct to export data as a text file
that can
be then opened in Rev. Rather ugly, I agree, but much faster...

Last but not least, in my examples, I don't think the performance difference is
in the
data transfer. Actually, the fact that the boolean part of the query can
feature up to 50
elements doesn't imply that the amount of data returned will be huge...
Furthermore,
when I send the same query from PHPmyAdmin (adding "LIMIT 1, 10" for instance),

or when I use "SELECT COUNT(*)" instead of "SELECT Col1, Col2 etc" (which
returns
only 1 integer) I get similar processing times in mySQL...
I'd like to add also that my table includes fulltext indexes on every
searchable column, which
imho should speed up things in some way... it actually does, coz when I delete
those indexes,
processing time of the query is significantly longer...

Please correct me if I'm wrong, but even if I have no clue on how mySQL
processes queries,
imho there is no big difference between the structure of the SQL query and my
Rev code...
The only difference being the content of the table already available as a text
file when the
Rev code starts... This file text is generated once a day (when the table is
updated, so no need
to generate it each time the script runs), and it takes only 300 / 320 msec to
generate it,
which is less that 20% of the performance difference between both techniques...

So, unless proven wrong, I feel like sticking to my first conclusion that
Transcript is faster than
SQL (if that makes any sense)...

Best,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Rev cgi & mySQL (again)

2009-01-02 Thread jbv


Bill, Ruslan,

Thanks for your answers.

To answer some of your questions, I only need to read data from mySQL,
and the nested booleans are of the ( ... OR ... OR ...) AND ( ... OR ...) type.

I don't if anyone's interested, but here are examples of my code :

--example 1 : using mySQL

put quote into q
put "" into b
repeat for each item i in myList1--myList1 may contain up to 50 
items
put " OR Col1 = " &q& i &q& " OR Col2 = " &q& i &q after b
end repeat
put "(" into word 1 of b
put " ) " after b

if item x of myList2 is not "0" then
put "" into a
get item x of myList2
repeat for each char k in it--may contain up to 10 chars
if a = "" then
put " Col3 LIKE " &q& k & "%" &q& " OR Col3 LIKE " &q& "%/" & k & 
"%" &q into a
else
put " OR Col3 LIKE " &q& k & "%" &q& " OR Col3 LIKE " &q& "%/" & k 
& "%" &q
after a
end if
 end repeat
if a is not "" then
put " AND ( " & a & " ) " after b
end if
end if

put "SELECT Col10, Col11, Col12, Col13, Col14, Col15 FROM myTable WHERE " & b 
&" AND Col20
!= " &q&q into myREQUEST
put revDataFromQuery(,,theID,myREQUEST,) into myVar



--example 2 : using Rev

--reads table dump
 open file path
 read from file path until EOF
 close file path
 put it into myV0--table dump already includes the Col20 != ""  
condition from
the above SQL request

put quote into q

put "" into myV
if myList1 is not 0 then
put "" into c
repeat for each char k in myList2
if c = "" then
put " char 1 of d = " &q& k &q& " or d contains " &q& "/" & k &q 
into c
else
put " or char 1 of d = " &q& k &q& " or d contains " &q& "/" & k &q 
after c
end if
end repeat
repeat for each line j in myV0
get item 1 of j
put item 3 of j into a
put item 4 of j into d
repeat for each item i in myList1
if (it = i or a = i) and (the value of c) then
put j &cr after myV
exit repeat
end if
end repeat
end repeat
else
repeat for each line j in myV0
get item 1 of j
put item 3 of j into a
repeat for each item i in myList1
if it = i or a = i then
put j &cr after myV
exit repeat
end if
end repeat
end repeat
end if

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Rev cgi & mySQL (again)

2009-01-02 Thread jbv
Hi there

I have a mySQL table with about 4 entries. I also have a Rev cgi 2.5

script that sends (very) complex SELECT requests; in which the "WHERE"
part can feature as much as 50 nested booleans winth "and", "or",
"binary" etc

For quite some time I realized that requests to mySQL slow down my
scripts
in a terrible way, both because of the complexity of the requests, and
also because
of (imho) a buffer size problem when the amount of data returned is
huge...

I've tried several tricks to improve the speed of my scripts (like "one
big request"
vs "several small requests in a loop"), but with no luck...

finally, I tried the following : I dumped the content of myTable as a
text file, opened
it in the Rev script, and did the selection of records inside a "repeat
for each line" loop.
And to my surprise, the speed of the script improved to almost 40%
(which is a lot for
a script that used to take 5 to 6 sec, and now takes 3.5 to 4 sec)...

Well, I don't know what conclusion to draw from this... Besides the
obvious superiority
of Transcript... I guess some wise and experienced guys will tell me
that for sophisticated
DB processing I should have switched to a better product (like
Valentina) long time ago...

But nevertheless I'm curious to know if anyone already faced the need to
(almost) completely
drop SQL in favor of Transcript for DB data search...

Best,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: [slightly OT] reliability of mySQL & Rev cgi ?

2008-12-29 Thread jbv
Thank you all for your answers to my post.

In fact I finally solved my problem by re-starting Apache,
mySQL and PHP on the server...
My only worry is that it could start to malfunction again,
and how to detect it...

JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: [slightly OT] reliability of mySQL & Rev cgi ?

2008-12-26 Thread jbv


Kee Nethery a *crit :

> not a mySql guy but I'm betting there is something you could add to
> the statement to get the data in the same order every time.
> Kee Nethery
>
> On Dec 26, 2008, at 6:57 AM, jbv wrote:
> >
> >
> > SELECT col1, col2, col3, col4 FROM myTable WHERE myList LIKE "% value1
> > %" OR
> > myList LIKE BINARY("% value2 %") OR myList LIKE "% value3 %" OR myList
> > LIKE "% value4 %" OR...
>
>   order by col1 desc
>

I tried that already but it doesn't help...

I'm sure you're right, there's something I should add to my requests to get the 
same
results no matter the order in which requests are sent to mySQL, but I still 
have to
figure out what...
Any wise suggestion is welcome...

JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


[slightly OT] reliability of mySQL & Rev cgi ?

2008-12-26 Thread jbv
Hi list,

I'm puzzled... I have a Rev cgi script that sends a serie of requests to
a mySQL DB
inside a loop. Those requests are rather complex, for example :

SELECT col1, col2, col3, col4 FROM myTable WHERE myList LIKE "% value1
%" OR
myList LIKE BINARY("% value2 %") OR myList LIKE "% value3 %" OR myList
LIKE "% value4 %" OR...

each request can find up to 1000 records in a table containing about
45000 records.

Here's my problem : let's say my loop can contain 3 successive requests
: Req1, Req2 and Req3.
According to what endusers type in a text field on the webpage that
accesses the cgi script, the
loop can features these 3 requests in different order, and depending on
the order in which these
requests are sent from the cgi script to mySQL, SLIGHTLY DIFFERENT sets
of records are returned...

Actually, it looks like, when the requests are sent in certain orders, a
few records are missing in
the results...

Should I jump to the conclusion that it's a mySQL reliability problem,
or a problem with Rev, or ?

as anyone already experienced anything similar ? In fact I'd like to
know if it's a known mySQL problem
before doing further investigations in possible bugs in my script...
Various google searches haven't brought
anything useful...

I'm using Rev cgi 2.5 with mySQL 4.0.15 on a Linux server.

Thanks,
JB


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Core Midi

2008-12-14 Thread jbv


Beat Cornaz a *crit :

>
> I will reply to you René off list.
>
> If there are more people who would like to get involved in getting
>
> real time Midi data from and to Revolution going,
>
> please contact me and I will try to coordinate
> the thing.

Just curious : why keeping this off-list ?

I'm interested in that topic and would like to be involved in any
follow-up, on or off-list...

thanks in advance,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Things I Learned Recently

2008-12-11 Thread jbv
Hi again

I just realized that there was a mistake in the code posted
in my previous message... Please find the right code below
(conclusions of the test remain the same though) :

put "toto tata titi tete" into myVar
put the milliseconds into tt
repeat 10 times
if wordoffset("tete",myVar) > 0 then
end if
end repeat
put the milliseconds - tt
--returns a value between 103 and 110

put "toto,tata,titi,tete" into myVar
put the milliseconds into tt
repeat 10 times
if itemoffset("tete",myVar) > 0 then
end if
end repeat
put the milliseconds - tt
--returns a value between 130 and 136

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Things I Learned Recently

2008-12-11 Thread jbv


Mark Wieder a *crit :

> Some Things I Thought I Knew But On Checking Find Aren't True
>
> 1. Back in the day I could have sworn that "contains" was deprecated
> as being much slower than "is in", in that it made an extra copy of
> the target before checking. This is no longer true, if it ever was.
> The following two statements run at exactly the same speed:

don't know if anyone is interested, but in the same vein, I've been living
for years with the idea that variables organized as items were faster to
process than variables organized as words, but lately I discovered that
wordoffset is actually faster than itemoffset .
Examples (tested on my old PC under XP with Rev 2.5) :

put "toto tata titi tete" into myVar
put the milliseconds into tt
repeat 10 times
if wordoffset("tete",ref) > 0 then
end if
end repeat
put the milliseconds - tt
--returns a value between 103 and 110

put "toto,tata,titi,tete" into myVar
put the milliseconds into tt
repeat 10 times
if itemoffset("tete",ref) > 0 then
end if
end repeat
put the milliseconds - tt
--returns a value between 130 and 136

wordoffset seems to be 15 to 20% faster, which is a lot IMHO...

Best,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Strange thing happening with array (old fashioned)

2008-11-09 Thread jbv
Hi folks,

Just for the anecdote, here's a strange behaviour (probably a bug) that
wasted almost
1 hour of my coding time to find its origin (I'm using an old Rev cgi
engine 2.5 on a
linux server).
When I was running the following code :

 repeat for each word w in myList_of_words

put "SELECT Col1, Col2, Col3, Col4 FROM myTable WHERE Col5
LIKE " "e& "%S$" & w &" %""e into myREQUEST
put revDataFromQuery(,,theID,myREQUEST,) into myVar

--lots of processing here, not relevant for the anecdote

repeat for each line j in myVar
put item 1 of j &tab& item 3 to 6 of j &cr after
myNew_list[w]
end repeat

end repeat

some entries of myNew_list array were spoiled / mixed with some binary
crap...

I finally found the solution as follows : :

 repeat for each word w in myList_of_words

put "SELECT Col1, Col2, Col3, Col4 FROM myTable WHERE Col5
LIKE " "e& "%S$" & w &" %""e into myREQUEST
put revDataFromQuery(,,theID,myREQUEST,) into myVar

--lots of processing here, not relevant for the anecdote

put "" into myNew_list[w]

repeat for each line j in myVar
put item 1 of j &tab& item 3 to 6 of j &cr after
myNew_list[w]
end repeat

end repeat

So, it looks like keys in old-style arrays weren't created properly
on-the-fly, but had to be initialized forst...
I wonder is it"s the same with the new arrays in 3.0

Best,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Rev cgi, xmlhttprequest and http headers

2008-09-12 Thread jbv
Hi list,

I'm using Rev cgi for an xmlhttprequest in a web page.
Everything works fine, except on IE6 where the display of some xml data
refuses to refresh...

My question : am I right to try to set the http headers (on the Rev cgi
side)
so that it "forces" the browser to refresh the xml content ?

Here's the code I'm using to do so :

put "Cache-Control: no-cache" into myHeaders
put cr & "Pragma: no-cache, must-revalidate" after myHeaders
put cr & "Expires: 0" after myHeaders

set the httpheaders to myHeaders

I might be missing something, because even if I include the above code
in
my cgi script, the xml content still doesn't refresh in IE6...

Thanks in advance,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: REV Send Email via CGI and mail.php script on the fly?

2008-08-04 Thread jbv


John ,

>
>
> Can a rev cgi create a mail.php file, execute the php file by forwarding data 
> to it, and then delete the file it created, all in one swoop?
>

the answer is "yes". You don't even need to create a file and then delete it...
I've been doing that for years : my Rev cgi script calls a php lib with all the
requested parameters... I'm using a php lib because I found one very useful
on some website and didn't want to bother writing my own...
And I'm using a Rev cgi script because, apart from sending emails, I have
numerous tasks to do that are easier to code in Rev than in php, but you can
make it simpler : just send a POST request from your stack to a simple php
script on your server...

Best,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: [semi OT] Display problem with pdf files uploaded via Rev cgi

2008-07-11 Thread jbv
Hi again,

If anyone interested, I found the solution.

In the first version of my cgi script, before saving the pdf code as a bin file
on the server, I was running the following loop :

  repeat while first char of myPDF = cr
   delete first char of myPDF
  end repeat

but the wasn't enough; the code to run is :

  repeat while first char of myPDF = cr or the chartonum of first char of myPDF 
= 13
   delete first char of myPDF
  end repeat

If the pdf code contains some junk before the actual 1st line of pdf
%PDF-1.3which indicates the file format and the pdf version
IE6+ treats the file as text, while FF seems to check a little further...

Best,
JB

> Hi guys,
>
> Here I am, facing another weird problem...
>
> I have built a js file uploader, with rev cgi on the server side to
> parse
> the multipart/form-data and save the uploaded file in the right
> directory.
> After upload, the end user can check what's been uploaded in a webpage
> where all uploaded files are listed as links in a  object.
>
> Everything works like a charm, except for one silly detail : pdf files
> that
> have been uploaded with my tool open as text in the browser, while other
>
> pdf files uploaded via a regular ftp client open fine in Acrobat Reader,
> and
> this happens ONLY in IE6+ on Windows, while any pdf file opens fine in
> Acrobat Reader in FF...
>
> Any suggestion on what I could check (and possibly fix) ?
>
> Thanks in adavance,
> JB
>
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


[semi OT] Display problem with pdf files uploaded via Rev cgi

2008-07-11 Thread jbv
Hi guys,

Here I am, facing another weird problem...

I have built a js file uploader, with rev cgi on the server side to
parse
the multipart/form-data and save the uploaded file in the right
directory.
After upload, the end user can check what's been uploaded in a webpage
where all uploaded files are listed as links in a  object.

Everything works like a charm, except for one silly detail : pdf files
that
have been uploaded with my tool open as text in the browser, while other

pdf files uploaded via a regular ftp client open fine in Acrobat Reader,
and
this happens ONLY in IE6+ on Windows, while any pdf file opens fine in
Acrobat Reader in FF...

Any suggestion on what I could check (and possibly fix) ?

Thanks in adavance,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Who is the customer? (RE: rev apps on iPhone?)

2008-06-29 Thread jbv


viktoras,

>
>  2) openGL 3D or some sort of integration or an ability to talk to some
> 3-rd party crossplatform 3D engine like UNITY or Blender. B.t.w. UNITY
> announced iPhone support this year, so if RR also targets this platform...
>

sorry for intruding, but this has been in the air since 2002/2003 when Rev
was still MC... actually I even started working on an external for (limited)
openGL control back then...
This has been already discussed at length on this list before (and must still
be available in the archives) but to summarize the point : after a couple of
weeks of work on this project, it bacame obvious that an external was a too 
limited
approach for openGL access, and that the ability for developpers to add their
own primitives to Transcript would be the right way to proceed...
That was in 2003, but back then RR was busy with other priorities and finally
the idea died...
It was shortly reborn a couple of times in threads about Rev / Transcript 
possible
improvements, especially the possibility to add our own functions to Revcode,
and more generally around the idea of building a development framework around
Rev that would allow developpers to just jump in and start coding and test new
ideas on their own, before dealing / discussing anything with RR...

But well, that was 4 or 5 years ago, and it seems that some ppl here are still
waiting for a real table object...

JB (who said the "B" stands for "bitter" ?)

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: multiple lines SQL request via revdb_execute ?

2008-06-19 Thread jbv


Hi Mark,

Thanks for the fast reply.

> Hi JB,
>
> I don't think it is possible to send multiple-line MySQL syntax.

That's a real pity; even more when you realize that it's possible in 
phpMyAdmin...

>
> Do you have a loop in your locally running stack, which calls the Rev
> CGI in a loop, or do you have the loop in your Rev CGI script? This
> would make a big difference, because the latter is much faster than
> the former.
>

actually my problem is strictly limited to cgi scripts.
Here's an exemple of what I'd like to do :

put "UPDATE myTable SET N = N+1 WHERE id = 1;" &cr into myREQ
put "UPDATE myTable SET N = N- 10 WHERE id = 5;" after myREQ
put revdb_execute(theID, myREQ) into tQueryResult

I've thought of using some php code that I'd call from the Rev cgi script via a
shell call, but the msec I'd gain by sending a multiple-line mySQL request would
be lost during the shell call... [sigh]

Best,
JB (quite frustrated)

>
> --
> Best regards,
>
> Mark Schonewille
>
> Economy-x-Talk Consulting and Software Engineering
> http://economy-x-talk.com
> http://www.salery.biz
>
> Benefit from our inexpensive hosting services. See 
> http://economy-x-talk.com/server.html
>   for more info.
>
> On 19 jun 2008, at 12:14, jbv wrote:
>
> > Hi list,
> >
> > I think I've already posted a similar question long time ago (couldn't
> > retrieve it
> > in the archives though) but didn't get any answer AFAIR...
> >
> > Anyway, here I go again : has anyone succeeded in sending a multiple
> > lines
> > SQL request to mySQL via revdb_execute ?
> >
> > I've tried any possible syntax I could think of (requests separated by
> > semicolons
> > and/or line returns, etc) but nothing seems to work...
> > And I haven't found anything in the doc...
> >
> > Any idea if that's possible or not ? It would be great if it was
> > possible, because
> > when using Rev cgi with mySQL, and especially multiple successive
> > requests in
> > loops, cgi scripts can get slowed down dramatically...
> >
> > Thanks in advance,
> > JB
>
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


multiple lines SQL request via revdb_execute ?

2008-06-19 Thread jbv
Hi list,

I think I've already posted a similar question long time ago (couldn't
retrieve it
in the archives though) but didn't get any answer AFAIR...

Anyway, here I go again : has anyone succeeded in sending a multiple
lines
SQL request to mySQL via revdb_execute ?

I've tried any possible syntax I could think of (requests separated by
semicolons
and/or line returns, etc) but nothing seems to work...
And I haven't found anything in the doc...

Any idea if that's possible or not ? It would be great if it was
possible, because
when using Rev cgi with mySQL, and especially multiple successive
requests in
loops, cgi scripts can get slowed down dramatically...

Thanks in advance,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Rev cgi upgrade question

2008-06-14 Thread jbv
Hi list,

I'm about to re-design a web site that I built around Rev cgi
in 2004/2005. Back then I used Rev cgi 2.5 Linux.
Because of several new features, the site might get significantly
more trafic than before, especially in tasks requiring lots of
requests to mySQL.

I was wondering if it was worth upgrading to 2.9 or if I could
stick to 2.5...
Besides, because of the possibly increased trafic, I'm planing to
switch to php for some scripts (the more used ones) because of
the multithread advantage of php. Although I was wondering
whether the most recent versions of Rev offered increased speed
that could be an alternative to the use of php...

Thanks in advance,
JB


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: lineoffset slower than "repeat for each line j" ?

2008-05-29 Thread jbv


Richard,

> I don't understand why lineoffset is slower, however, and have submitted
> a request to have it reviewed for potential optimization:
> 

I'm wondering if lineoffset could get slower when the wholematches are set to 
false...
I might be wrong, but it might be a more complex task to identify portions of 
lines
than whole lines...

JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: lineoffset slower than "repeat for each line j" ?

2008-05-29 Thread jbv


Jim,

> I would be curious to know how the filter command works with your particular
> data set.  One of the speed difference factors I find is the exact
> configuration of the data.
>
> The filter command works fastest if the 'target' string in the first part of
> a the line, and repeat for each seems to be much more consistent.
>
> filter myVar with (tab & "*" & tab & "*" & "39900")
> if myVar is not empty
> --I know this does not solve your particular problem, but I am curious how
> your data set performs.

filter is even slower than lineoffset : 260 ms
Besides I can't use filter in my case, since I need to replace values in the 1st
and 2nd items of the found lines, and filter just picks the line and separates 
it
from the context...

>
> By the way, the verbosity of Transcript and the many lines of code are
> deceptive, since the compiled code is amazingly compact and efficient.

yep, actually I guess that lineoffset and filter, once compiled, use rather
complex routines, while "repeat for each line" remains much closer to raw
and efficient C code...

JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


lineoffset slower than "repeat for each line j" ?

2008-05-29 Thread jbv
Hi list,

Please excuse the remark, but I'd like to share something I just noticed

and that surprised me a bit...

I have a file loaded into a variable, which is about 8 Mb and consists
in
about 4 lines of 3 items each (itemdel is tab).

I need to know which line contains a certain value as 3rd item.

Fist I used the following :
get lineoffset(tab & "39900",myVar)

which happens to take 200 ms when the found line is near the end.


Then I tried this :
put 0 into x
repeat for each line j in myVar
add 1 to x
if last item of j = "39900" then
put x into tResult
exit repeat
end if
end repeat

Surprisingly, this takes only 106 ms !!!
If anyone asked me beforehand, I would have sweared that a built-in Rev
function would run faster than a bunch of transcript lines of code...

I'm using Rev cgi 2.5 on a Linux server.

JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: PAYPAL [was] [ANN] The reason why I was so quiet recently.

2008-05-19 Thread jbv
Hi list,

>
> > As a buyer, I have used PayPal only twice but have not gotten an
> > undue number of spam emails.
>
> But if you suddenly got lots and could figure out what it was that you
> had done to deserve them, you might stop doing the action that caused
> the spam.
>

I don't think there's any relationship between using paypal and receiving spam.

I've been using paypal for years as buyer & seller and haven't got many emails
from them (nor phishing emails counterfeiting paypal emails), while I know at
least 2 ppl who don't have any paypal account and receive numerous (most of
them fake) emails from paypal...

Actually, I think that spammers send regulary fake ebay & paypal emails to
thousands of email adresses, on the assumption that so many ppl use ebay &
paypal these days that they'll catch a large number of ppl in their nets 
anyway...

JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: [somewhat OT] Text processing question (sort of)

2008-05-19 Thread jbv
Hi,

Finally I implemented the option quoted below...
As the content of the data to process are in french, I had to consider
more characters (éèê etc) for the letter counts.

As data is organized as lines with 3 items in each, I ended up with
4 lines, each featuring also 3 items, each item containing the
letters counts for a, b, c, d... separated by spaces.

Then I sorted lines as follows :

 repeat with j=3 down to 1
  repeat with i=charsNumber down to 1
   sort lines of myLetterCounts ascending numeric by word i of item j of each
  end repeat
 end repeat

Then, I automated the duplicates detections as follows :

 get line 1 of myLetterCounts
 delete line 1 of myLetterCounts

 put "" into myResult
 put 5 into nCount -- used to adjust the detection threshold

 repeat for each line j in myLetterCounts
  put 0 into a
  put 0 into b
  put item 1 of j into c
  put item 2 of j into d
  repeat with w=1 to nST
   add abs(word w of item 1 of it - word w of c) to a
   add abs(word w of item 2 of it - word w of d) to b
  end repeat
  if a >0 and b > 0 and a <= nCount and b <= nCount then
   put it &cr& j &cr after myResult
   get last item of it
   get lineoffset(tab & last item of it &cr,ListRef)
   if it>0 then
put line it of ListRef & cr after myResult
   end if
   get lineoffset(tab & last item of j &cr,ListRef)
   if it>0 then
put line it of ListRef & cr after myResult
   end if
  end if
  get j
 end repeat

At first glance, I don't think many duplicates escaped the detection...

The 4 lines were processed in about 7 minutes on an old Mac G3...

Thanks again for the tip,
JB

> Interesting problem.
>
> if you are looking for typos, here are my thoughts.
>
> What are the probable errors? Seems to me you have:
> 1. Typos in individual words
> 2. Extra spaces in individual words (so that you end up with two words
> instead of one)
> 3. Punctuation differences
> 4. Perhaps words such as; "the", "and", "an" missing from titles.
>
> I think I would generate a letter count for each quotation.
>
> For your example:
> "God bless America"George W BushHouston, March 18 2005
> "Godi bless America"George W BushHuston, March 18 2005
>
> The quotation letter counts are
> 2 1 1 0 2 0 1 0 1 0 0 1 1 0 1 0 0 1 2 0 0 0 0 0 0 0 for "God bless
> America" (2 a's, 1 b, 1 c ...)
> and
> 2 1 1 0 2 0 1 0 2 0 0 1 1 0 1 0 0 1 2 0 0 0 0 0 0 0 for "Godi bless
> America"
>
> Then if you sort by these number sets and compare to see how similar
> each count is, you;ll get potential matches that you should eyeball.
> For example, These two strings have all but one count exactly the
> same. I'd go through this process multiple times by rotating the first
> count to the rear and re-sorting.
>
> 1 1 0 2 0 1 0 1 0 0 1 1 0 1 0 0 1 2 0 0 0 0 0 0 0 2
> 1 1 0 2 0 1 0 2 0 0 1 1 0 1 0 0 1 2 0 0 0 0 0 0 0 2
>
> and just keep doing that until every letter has had a chance to be the
> first in the sort.
>
> Basically The thing I'd have it do is find pairs of quotes that appear
> to be very similar. Then once you have a huge list of potential pairs,
> have something that displays them to you in pairs so that you can
> quickly tell the interface to delete one or to skip it.
>
> I really do think you are going to want to make no changes to the data
> unless you look at the matches with your eyeballs. You could very
> easily end up with two completely different quotes that are extremely
> similar, just because person B was playing with a famous quote from
> person A.
>
> So long story short, slice and dice the quotes to collect a set of
> pairs that appear to be similar. Then build a flashcard kind of
> interface in RunRev that allows you the human to read the two similar
> quotes and decide whether to delete one or not.
>
> I'd combine brute force with human visuals. 4 lines seems like a
> small data set for brute force.
>
> Kee Nethery
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: [somewhat OT] Text processing question (sort of)

2008-05-18 Thread jbv

if anyone is interested, while trying to find the fastest way to compare
each line of a list with every other line, I found the following technique
quite fast :

-- myData contains the 4 lines to chack
-- myData1 is a duplicate of myData

put myData into myData1

 repeat for each line j in myData
  delete line 1 of myData1
  repeat for each line i in myData1
  end repeat
 end repeat


> Hi list,
>
> I've been asked to do some "cleaning" in a client's data, and am trying
> to figure out some simple and fast algorithm to do the job in Rev, but
> haven't got much success so far...
>
> Here's the problem : the data consists in a collection of quotations by
> various writers, politicians, etc. The data is organized in lines of 3
> items :
> the quote, the author, the place & date
> The cleaning job consists in finding duplicates caused by typos.
>
> Here's an (imaginary) example :
> "God bless America"George W BushHouston, March 18 2005
> "Godi bless America"George W BushHuston, March 18 2005
>
> Typos can occur in any of the 3 items, and sometimes even in 2 or 3
> items of the same line...
> Last but not least, the data consists in about 4 lines...
>
> The first idea that comes to mind is a kind of brute force approach :
> to compare each line, item by item, with each of the other lines,
> compute
> a ratio of identical words, and keep only lines where the ratio found
> for
> each item is above a certain threshold (say 80%)... The problem with
> such
> huge set of data, is that it might take forever...
>
> I've also tried to sort lines and compare each line with the previous
> one only,
> but if the typo occurs in the first char of any item of a line,
> duplicates might be
> far away from each other after the sort... so it won't work...
>
> Any idea ?
>
> thanks in advance,
> JB
>
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


[somewhat OT] Text processing question (sort of)

2008-05-18 Thread jbv
Hi list,

I've been asked to do some "cleaning" in a client's data, and am trying
to figure out some simple and fast algorithm to do the job in Rev, but
haven't got much success so far...

Here's the problem : the data consists in a collection of quotations by
various writers, politicians, etc. The data is organized in lines of 3
items :
the quote, the author, the place & date
The cleaning job consists in finding duplicates caused by typos.

Here's an (imaginary) example :
"God bless America"George W BushHouston, March 18 2005
"Godi bless America"George W BushHuston, March 18 2005

Typos can occur in any of the 3 items, and sometimes even in 2 or 3
items of the same line...
Last but not least, the data consists in about 4 lines...

The first idea that comes to mind is a kind of brute force approach :
to compare each line, item by item, with each of the other lines,
compute
a ratio of identical words, and keep only lines where the ratio found
for
each item is above a certain threshold (say 80%)... The problem with
such
huge set of data, is that it might take forever...

I've also tried to sort lines and compare each line with the previous
one only,
but if the typo occurs in the first char of any item of a line,
duplicates might be
far away from each other after the sort... so it won't work...

Any idea ?

thanks in advance,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


regex question

2008-05-18 Thread jbv
Hi list,

Does anyone have a regex to remove any text between parenthesis
(including the
parenthesis) ?

I've tried many options, but none seems to work perfectly...

For instance :
"\(\)"removes only parenthesis with no text inside

I've also tried this : "\([a-z 0-9 ]+\)", but no luck...

Thanks,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: One more question about Rev cgi & binary data

2008-04-27 Thread jbv


Dave,

Thanks for the code; I'll try that as well, although the problem is not
to parse data from multipart encoded forms, but to keep binary data
consistent inside Rev variables...
I'm probably doing something wrong, but as soon as I use "line" or
"lineoffset" in a script, or even try to count the number of chars,
binary data seem to get corrupted... Probably because the "return" char
is part of the binary data...

JB


>
>
> I've done this before with jpeg files uploaded as binary data. I can't
> find the script I used, but I think the handler below is what I used
> to parse the form data. It's based on a libCGI script that Jacqueline
> Gay used to distribute. It will handle standard and multipart forms.
>
> If you need to find out how the data was encoded (e.g. whether base64
> or binary) then I think you'll need to look for a "Content-transfer-
> encoding:" header somewhere below the boundary for the file part.
>
> Cheers
> Dave
>
> ##
>
> //assumes sPostdata already contains the entire posted data
> // watch for wrapping in the email
>
> local sCGIData, sPostdata
>
> on parsePostData
> if sPostdata is empty then exit parsePostData
> if matchText($CONTENT_TYPE,"multipart/form-data;
> *boundary=(.*)",tMimeBoundary) then
> stripQuotes tMimeBoundary
>
> put lineOffset(tMimeBoundary,sPostdata) into tStartLine
> if tStartLine = 0 then exit parsePostdata
> repeat forever
> put lineOffset(tMimeBoundary,sPostdata, tStartLine + 1) +
> (tStartLine + 1) into tEndline
> if tEndline < 1 then exit repeat
> if matchText(line tStartLine to tEndLine of 
> sPostdata,"Content-
> Disposition: +form-data; +name=""e&"([^""e&"]+)",tName) then
> put lineOffset(CRLF & CRLF, line tStartLine 
> to tEndLine of
> sPostdata) + tStartLine + 1 into tDataOffset
>
> put line tDataOffset to tEndLine - 1 of 
> sPostdata into tValue
> rStripCR tValue
> put tValue into sCGIData[tName]
> put tEndLine into tStartLine
> else
> exit repeat
> end if
> end repeat
>  else  ##assume www form urlencoded
> if sPostdata <> empty then split sPostdata  by "&" and "="
> repeat for each line tKey in the keys of sPostData
> put URLDecode(sPostData[tKey]) into sCGIData[tKey]
> end repeat
> end if
> end parsePostData
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: One more question about Rev cgi & binary data

2008-04-26 Thread jbv


Richard,

I see...

One more question about the incoming data stream : is the jpeg data raw
data (as uploaded by a type=file element in an html form for instance) or
is base64encoded ?

Thanks,
JB

> JB,
>
> I've found a stack script more flexible that a text script, and it
> takes only a few minutes to convert from text to stack.
>
> Best,
> Richard
>
> On Apr 26, 2008, at 12:56 PM, jbv wrote:
>
> >
> >
> > Richard,
> >
> > Thank for the script, but your method implies the use of a cgi
> > stack... what if a plain text script is used ?
> > Actually, I'm looking towards a php solution right now...
> >
> > Best,
> > JB
> >
> >> JB,
> >>
> >> Here's the solution which works for me. I know it seems a bit
> >> bizarre. It took many attempts to figure out how to get it to work
> >> reliably. But this works all the time.
> >>
> >> Best,
> >> Richard Miller
> >>
> >> ---
> >>   -- buffer has the incoming data stream
> >>put buffer into temp
> >>put empty into pictfile
> >>put offset("image/jpeg",temp) into xx
> >>if xx <> 0 then
> >>  put xx+14 into xx
> >>  put char xx to (the length of temp) of temp into pictdata
> >>  put char 1 to xx-1 of temp into tdata
> >>  repeat with i = the length of pictdata down to 1
> >>if chartonum(char i of pictdata) is 0 then
> >>  put i into holdit
> >>  exit repeat
> >>end if
> >>  end repeat
> >>  delete char (holdit+1) to the length of pictdata of pictdata
> >>  put "binfile:TempPict_" & the milliseconds & ".jpg" into
> >> PictFile
> >> -- these next steps are critical. It doesn't work otherwise.
> >> Field "temp2" is just an empty text field on the cgi stack
> >>  put pictdata into url PictFile
> >>  put url PictFile into pictdata
> >>  put pictdata into fld "temp2"
> >>  put fld "temp2" into url PictFile
> >>
> >> The file PictFile will now be a regular jpeg file you can read and
> >> manipulate as you would any jpeg file
> >
> > ___
> > use-revolution mailing list
> > use-revolution@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-revolution
>
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: One more question about Rev cgi & binary data

2008-04-26 Thread jbv


Richard,

Thank for the script, but your method implies the use of a cgi
stack... what if a plain text script is used ?
Actually, I'm looking towards a php solution right now...

Best,
JB

> JB,
>
> Here's the solution which works for me. I know it seems a bit
> bizarre. It took many attempts to figure out how to get it to work
> reliably. But this works all the time.
>
> Best,
> Richard Miller
>
> ---
>   -- buffer has the incoming data stream
>put buffer into temp
>put empty into pictfile
>put offset("image/jpeg",temp) into xx
>if xx <> 0 then
>  put xx+14 into xx
>  put char xx to (the length of temp) of temp into pictdata
>  put char 1 to xx-1 of temp into tdata
>  repeat with i = the length of pictdata down to 1
>if chartonum(char i of pictdata) is 0 then
>  put i into holdit
>  exit repeat
>end if
>  end repeat
>  delete char (holdit+1) to the length of pictdata of pictdata
>  put "binfile:TempPict_" & the milliseconds & ".jpg" into PictFile
> -- these next steps are critical. It doesn't work otherwise.
> Field "temp2" is just an empty text field on the cgi stack
>  put pictdata into url PictFile
>  put url PictFile into pictdata
>  put pictdata into fld "temp2"
>  put fld "temp2" into url PictFile
>
> The file PictFile will now be a regular jpeg file you can read and
> manipulate as you would any jpeg file

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: One more question about Rev cgi & binary data

2008-04-25 Thread jbv


Mark ,

> JB, you may need to base64 encode the binary data.

you mean in the html form, before uploading ?

JB


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


One more question about Rev cgi & binary data

2008-04-25 Thread jbv
Hi guys,

Has anyone already tried to parse data from a multipart/form-data html
form
(that contains a type=file element) with Rev cgi ?
I've done it successfully in the past with ascii data, but now I'm
trying to post
jpeg data along with other parameters (height & with of the pic, session
#...)
in the same form, and obviously the jpeg binary data get corrupted in
the process...

Any idea ? Or will I have to use php again (sigh) ?

Best,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: [slightly OT] XML & special character question

2008-04-18 Thread jbv


Colin Holgate a *crit :

> The normal solution is to write it as &
>

that's what I do for names (and it works), but for http links, no luck...

JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


[slightly OT] XML & special character question

2008-04-18 Thread jbv
Hi list,

How do you guys handle the "&" character in xml ?
Actually I need to pass html links as node values in xml (from a rev cgi

script to the browser) and those links contain "&"...
I managed to solve the problem with "&" inside names (smith & weston)
but as for html links, no luck... it just scares the parser...

Thanks,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: [somewhat OT] dumb html / cgi question

2008-04-13 Thread jbv
Björnke

Thanks for the reply, but I don't think it answers my question...

I know what anchors are and how they work, but my problem remains :
how to specify an anchor when the url of my page is :
http://www.myDomain.com/myPage.cgi?a=1&b=2

IOW how to have this page opened straight to a specific section of the
html code ?

Thanks,
JB

> Anchors are not fetched from the server, but navigated to on the same
> page, so the browser does everything itself. Just use an anchored link
> as specified in the html source of your choice (mine is: 
> http://w3schools.com/html/html_links.asp
>   ), and the browser of your users will handle the rest.
>
> have fun
> Björnke

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


[somewhat OT] dumb html / cgi question

2008-04-13 Thread jbv
Hi list,

In html, anchors are used to lead endusers to specific sections
of webpages. Anchors are included in tags and added to the
link in the form :
http://www.myDomain.com/myPage.html#anchor-name

But what if the html content is generated by a cgi script ?

The only way I can see to lead users to a specific section of
the page, is to define each section inside a  with an ID :


and then scroll to that section when the page opens, with a
short script on the  tag :


Or am I missing something ?

Thanks,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: how to work with binary data inside a Rev cgi script ?

2008-04-08 Thread jbv


Mark,

well, it can mean a lot of things... Presently, as I'm building pdf code
with data from various sources, basically I need to merge binary with
ascii data, and then make decisions according to the content of those
various data (after merging).
As long as I simply replace a keyword in the ascii data with a portion
of binary data, the binary data remains untouched... But if I need to
process the binary data before merging it (like removing some lines
or changing a single char in it) then it gets corrupted...
As said in my previous post, I bypassed the problem by making all
necessary processing in php, but that's a bit frustrating...

> What do you mean by "handle"? What is it you need to do with the
> binary data?
>
> Best,
>
> Mark
>
> On 7 Apr 2008, at 20:21, jbv wrote:
>
> > although I'm still not
> > sure how to handle binary data inside a Rev cgi script...
> >
> > Anyone with an elegant solution is welcomed.

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: how to work with binary data inside a Rev cgi script ?

2008-04-07 Thread jbv
Hi again,

For those interested (if any), I finally succeeded in merging pdf code
from a Rev cgi with binary pdf code from a php script...
Actually, I used a tradeoff : I modified the php code so that the binary
code doesn't need any further processing when imported inside the cgi script.

It works, which is the most important for me right now, although I'm still not
sure how to handle binary data inside a Rev cgi script...

Anyone with an elegant solution is welcomed.

Best,
JB

> Björnke,
>
> The way I merge (or try to merge) the date from the cgi and the php
> is pretty straightforward : I have a file that contains some pdf code
> and a few keywords. Some keywords are replaced with pdf code
> generated inside the cgi, and some other keywords are replaced by
> code generated by the php. (a simple keyword can be replaced by
> large portions of code).
>
> The code from the php is simply called via the shell :
> get shell("/usr/bin/php4 myPHP.php ")
> replace myKeyword with it in myPDF
>
> Finally the header is set in the Rev cgi. I'm certain that the header is
> set correctly, because I tried to ouput the code from the php without
> trying to merge it with something else, and it displays perfectly.
>
> I also tried to use "binfile:" & thePath when reading my file at the 
> beginning,
> but no luck.
> As for using put url ("binfile:" & thePath)", I'm not sure how it can fit into
> my script...
>
> JB
>
> > A few things that can go wrong:
> >
> > How do you merge the data from the cgi, and the one from the php?
> > Do you perchance use "put url ("file:" & thePath) instead of "put url
> > ("binfile:" & thePath)"?
> > Do you set the header in the cgi correctly, assuring the browser/pdf
> > reader knows that you're sending binary, and not textual data?
> > Are you sure all binary data uses the correct byte order?
> > etc.
> >
> > You might be sure there is no problem, but that's no guarantee that it
> > actually all works without error ;-)
> >
> > Have fun
> > Björnke
> >
>
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: how to work with binary data inside a Rev cgi script ?

2008-04-07 Thread jbv
Björnke,

The way I merge (or try to merge) the date from the cgi and the php
is pretty straightforward : I have a file that contains some pdf code
and a few keywords. Some keywords are replaced with pdf code
generated inside the cgi, and some other keywords are replaced by
code generated by the php. (a simple keyword can be replaced by
large portions of code).

The code from the php is simply called via the shell :
get shell("/usr/bin/php4 myPHP.php ")
replace myKeyword with it in myPDF

Finally the header is set in the Rev cgi. I'm certain that the header is
set correctly, because I tried to ouput the code from the php without
trying to merge it with something else, and it displays perfectly.

I also tried to use "binfile:" & thePath when reading my file at the beginning,
but no luck.
As for using put url ("binfile:" & thePath)", I'm not sure how it can fit into
my script...

JB


> A few things that can go wrong:
>
> How do you merge the data from the cgi, and the one from the php?
> Do you perchance use "put url ("file:" & thePath) instead of "put url
> ("binfile:" & thePath)"?
> Do you set the header in the cgi correctly, assuring the browser/pdf
> reader knows that you're sending binary, and not textual data?
> Are you sure all binary data uses the correct byte order?
> etc.
>
> You might be sure there is no problem, but that's no guarantee that it
> actually all works without error ;-)
>
> Have fun
> Björnke
>

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


how to work with binary data inside a Rev cgi script ?

2008-04-07 Thread jbv
Hi folks,

I'm trying to insert binary data (generated by a php script via a shell
call)
on the fly into some other data generated by my Rev cgi script to form a

pdf file.
I'm 100% sure that the binary data from php isn't corrupted, but once it

gets inserted in the other data, then I get an error when attempting to
read
the pdf code in the acrobat plugin of my browser... And I'm also sure
that
the pdf code generated inside the Rev cgi is correct...
Hence my question : how to work with binary data inside a cgi script
without
corrupting it ?

I'm on a Linux server with Rev cgi 2.5.

thanks,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Rev cgi question

2008-04-02 Thread jbv


Richard ,

I have done that dozens of time, mostly on linux & windoze servers...
So I'm not sure about OSX settings, but one thing I'd check first is the
spelling of the folder's name... it might sound silly, but many times
I have been blocked by spelling problems (or case sensitive spelling)
when referring to folders & files...

JB

> I don't understand what is happening with this. This is on a MacMini
> server.
>
> I ask a Rev cgi script the following:
>
>  put (there is a folder "/users/myusername/desktop") into buffer
>
> It returns TRUE.
>
> I then ask the following:
>
> put (there is a folder "/users/myusername/desktop/foldername")
> into buffer
>
> (foldername = any folder sitting on the desktop)
>
> It returns FALSE.
>
> Does this have something to do with some setting I need to change on
> the server?... or am I asking for information which is not accessible
> from a Rev cgi script located inside the CGI-Executables folder?
>
> What I ultimately want to do is have the Rev cgi script delete a
> folder sitting elsewhere on the server. Is there a reason this can't
> be done?
>
> Thanks.
> Richard Miller
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Somewhat [OT] : cgi, XML and Excel files

2008-03-30 Thread jbv
Hi folks,

I've just finished a Rev cgi script that outputs sophisticated
Excel files (with layout, styles and stuff) using the MS XML
format.
On my Mac and my PC everything works fine, but I'm using
openOffice instead of excel.
I've asked a few potential users to test it, and some of them
meet various problems, like the XML code being opened in
Word instead of excel, or excel displaying just crap...
As often, I don't have access to all kinds of potential users,
as they are spread all over the country, only through a few
managers who don't know a bit about technology and have
no idea what versions of excel and windoze end users may
have on their laptops...

So here's my question : does anyone have a clear idea of
which versions of excel support that MS XML format ?
The various infos I grabbed on the web aren't clear : it looks
like XML became available with Excel 2003, but is it ONLY
Excel 2003 or any version SINCE Excel 2003 ?
Any additional info will be apreciated too...

Thanks for your help.
Don't hesitate to reply off-list if you think this is OT...

Best,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: CGI-Scale photos without GUI

2008-03-25 Thread jbv


Josh,

That's what I mentioned in my previous post : those libs can be used via
dhell calls...

JB

> There are image processing libraries, like ImageMagick and GD, that
> can live on a Linux server, and it probably wouldn't be too hard for a
> genius like André  or others to figure out how to pass image location
> and parameters to...

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: CGI-Scale photos without GUI

2008-03-24 Thread jbv


Sivakatirswami,

I'm about to do something similar with Rev cgi, and am planing to use a
php graphic lib via shell calls..

JB

> I would be interested in a runtime web app that takes incoming hi res
> photos and generates a small version. Does anyone know if references
> like the following will work in a CGI?

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: OOP in Rev...

2008-03-19 Thread jbv


Len Morgan a *crit :

>
> I suppose this could be done with a group (just about all of the
> required pieces are there and could be manipulated with xTalk) but I
> don't know of an easy way to store that "object" in such a way that I
> could drop it on to a card.  Perhaps a future enhancement might be
> "stack format" that could save just an object in it (.obj or .wid?).  I
> don't think that would be too big a stretch.

what hinders you from having a function "crateFader" that would dynamically
build a group with all the required components ? No need to "store" any
object, just call the function as many times as needed...

Best,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Learn Guitar in 1 Day

2008-03-15 Thread jbv


Bill Marriott a *crit :

> The members of this segment are "casual programmers" for whom coding is not
> a primary job responsibility. They are enterpreneurs, consultants, managers,
> teachers, scientists, and creative people. Nevertheless they recognize the
> value of being able to streamline business processes, integrate disparate
> business systems, create multimedia software etc. They are curious about
> technology, and aspire to have greater control over their computers.
>
> We know exactly what percentage of our users fall into these groups, as well
> as how many are professional programmers developing commercial applications.
>



OK then, I guess you guys know exactly what you're doing by promoting
Rev  to "casual programmers" as a quick & easy way to build databases
front-ends...

Tomorrow I'll attend a conference named "Learn guitar in 1 day" and I'll be
happy
to end up knowing 3 chords, enough to play a few Ramones songs with closed
friends at the local ballroom once in a while...



Have a nice week-end,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Learn Programming in 1 Day

2008-03-15 Thread jbv
actually we understand it too well : like a headline or advertising, it
deals with the positionning of a product among the community of
experienced users and newbies as well...  And like an ad that misses
its target, it might keep newbies away (because they'll realize it's still
about programming) and will confort experienced programmers in
their view of Rev as a cheap toy for beginners (just like "plug & play"
kept legions of ppl away from the Mac for years).
It probably worked for you coz you're already convinced of the
advantages of using Rev...

JB

> Enough.  This is advertising, guys.  Like a headline, it is meant to
> catch your eye and get you to read on.  There's nothing sinister (or
> insulting) at all about it.  And, in fact, it did exactly what it was
> designed to do, at least in my case.
>
> Do you guys get this hot and bothered about books that tell you you
> will learn to program in C in 24 hours (Sam's guides, if memory
> serves)?  Of course not.

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Learn Programming in 1 Day

2008-03-15 Thread jbv


Richmond,

sorry to be so abrasive, but IMHO none of these titles makes
any sense...
The 1st one has been already discussed. As for the 2nd one,
what exactly is a "functioning Program" ?
put 1 + 1 into a
is a functionning program, as well as
echo "hello world";
and both can be built in a large number of languages in less
than a minute...

Furthermore, I don't think this topic has anything to do with
semantics, but rather with the ergonomics of coding...

Therefore, I'd prefer "Learn how to produce a functionning
piece of software that will boost your (or your client's )productivity
and that isn't already available as freeware, shareware or commercial
app in 1 day"...

Or, as suggested in earlier posts, much better :

"Learn how to code as you think in 1 day"
"Kill your fear of programming in 1 day"

Best,
JB

> Semantics time:
>
> There is a huge difference between "Learn Programming
> in 1 Day"
>
> and "Learn How to Produce Functioning Programs in 1
> Day".
>
> The first title, which ever way you cut it, is fairly
> nonsensical;
>
> HOWEVER, the second makes perfect sense with regard to
> Runtime Revolution.
>
> sincerely, Richmond Mathewson.
>
> 
>
> A Thorn in the flesh is better than a failed Systems Development Life Cycle.
> 
>
>   ___
> Rise to the challenge for Sport Relief with Yahoo! For Good
>
> http://uk.promotions.yahoo.com/forgood/
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Learn Programming in 1 Day

2008-03-14 Thread jbv


"Marian Petrides, MD" a *crit :

> Now, I'm planning on
> attending the full conference + pre conference

and what about post - conference ?

sorry... couldn't resist...

JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Learn Programming in 1 Day

2008-03-14 Thread jbv


Richard Gaskin a *crit :

>
> But my first experience with an xTalk (after deciding computers were
> boring back in high school from having learned BASIC on a Wang) was the
> exhilarating feeling that comes with making a button and scripting simply:
>
>on mouseUp
>  go next
>end mouseUp
>
> In that instant I was hooked!

so why not say "Get hooked in 1 day" ?;-)

Seriously, I guess you already know from my contrbutions to this list during
the past few years that, although I've used different prog. languages, xTalk
remains my favorite.
But I'm afraid that claims such as "learn programming in 1 day" will keep
most serious programmers away from Rev for a long time, as they'll keep
seeing it as a funny toy for beginners...
How many times have we seen claims such as "do your own magazine in no
time" in the desktop publishing era, or "build your website in hours" more
recently ?

Besides, any seriously motivated person can learn the basics of programming
with various languages in short time... Yes, it'll be less fun and it'll take a 
load
more of motivation but nevertheless it can be done. I for one learned 
programming
in Fortran and PDP11 assembler, and believe me in short time I was hooked.
The truth is that "programmability is an addiction" per se. And of course, the 
more
ergonomic, the more addictive it gets...

What makes HC offspring so unique (and attractive) is the combination of the
stack/card paradigm with the possibility to code in (almost) fluent english...
And again, sorry for repeating myself (yes I'm aging), but "code as you think"
is better IMHO... May be it's been used already...

Best,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Learn Programming in 1 Day

2008-03-14 Thread jbv


Heather,

>
> JB: I imagine you could probably learn quite a bit of Flash in one
> day. Since Rev is enormously better than Flash*** its certainly
> possible to learn to do useful work with it in one day.

I've been using Xtalk since 1987 and still discover tricks and new &
more efficient ways to achieve tasks with it So I agree with you :
it's no doubt possible to learn/teach the basics of Rev in 1 day, but that's a
completely different thing than "learning programming in 1 day".
Besides, what ppl evaluate as "useful things" is often determined by
their own level of programming skills. A complete newbie will be thrilled
to be able to build an adress book with a search function in 1 single day
(often by reusing pieces of code from various examples), but well, who would
dare to say that he/she learned programming ?

I don't want to keep this thread running forever, but I keep thinking that
"code as you think" would have been a better claim...

Best regards,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Learn Programming in 1 Day

2008-03-14 Thread jbv


"Petrides, M.D. Marian" a *crit :

> I realize these comments are intended primarily as humor.

are they really ?

I for one have about 30 years of experience as a programmer,
and have used about 20 different languages, including such weird
things as uP / uC assembler or MIDI programming language like
MAX, and still am reluctant to claim to be a programmer since
almost everyday I come across pieces of code much smarter than
what I could write, or need to post questions to this list from time
to time...

I think a better approach could have been : "code as you think"...

JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Learn Programming in 1 Day

2008-03-14 Thread jbv
Depends on what you mean by "programming"...
I've often met graphic designers using Flash who
write scripts with a complexity equivalent to
"go prev / go next", or who copy/paste some scripts
they grabbed on the web and in which they change
1 or 2 parameters, and then claim to be "graphic
designers AND programmers"...
In that case, I guess 1 day is enough...

JB

>
>
> > "Learn Programming in 1 Day"
> >
> > really ?
> >
> > I must be extremely stupid then.
> >
> > And, no I don't need 100 replies to confirm the
> > above:)
> >
> > love, Richmond
> >
> > __

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Extracting pitch information from sound files

2008-03-07 Thread jbv


David,

I'm not sure pitch analyzis is a job for Rev... At least Rev can be used
to build a front-end for data display, but for sound analyzis per se, you'll
be more comfortable with software built for that purpose : just off the top
of my head : some Csound functions or various phase vocoders (some
available as shareware, some for a licence fee like the IRCAM tool (I forgot
the name)... May be can you pick up some specific C/C++ libraries on the
web and use them as externals in your Rev app...

hope that helps,
JB

> The subject line pretty much says it all, but more specifically I
> want to statistically analyse change in pitch, not play it, save it
> as sound or relate it directly to any musical system.  So any kind of
> rational number would be fine, and I would then chuck away
> the .wav .aiff or whatever.
>
> 1/  How hard would it be to parse sound files recorded in Rev and
> extract just the chunks of data relating to pitch ?
>
> 2/  Does it make any difference if the sound is complex (like an
> animal call) or simple like a signal from a tone generator?
>
> 3/  Are any of the formats offered by Rev easier to handle in this
> respect?
>
> 4/  Assuming standard bit rates, how much pitch data would be
> generated by, say a ten second recording?
>
> 5/  I have settled for post hoc parsing rather than 'on the fly'
> processing because I assumed the overhead would be too great for the
> latter to work.  Is that right?
>
> 5/ Are there any other sensible questions I should be asking?
>
> Best Wishes,
>
> David Glasgow
> Carlton Glasgow Partnership
>
> http://www.i-psych.co.uk
>
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Anyone interested in learning more about Rev on Rockets?

2008-02-21 Thread jbv


Chipp,

>
> So, if you're interested, holler at me or Andre, or just respond here. If
> there are enough folks, we'll create a few free ROR tutes. Just let us know!

of course I am interested, although I've got accustomed to my own Revcgi
development tools I've developped over the years...
I've heard of ROR but never found the time to take a close look at it, and
therefore have a question : does it include fast cgi or just "regular" Rev cgi
stuff (1 instance of Rev cgi launched every time a request reaches the server),
and which platforms does it support ?

thanks,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Rev & php script question

2008-02-15 Thread jbv


Andres,

I already tried : same problem.

Thanks anyway.

> Hello JB
>
> I use "print" instead of "echo" and it works fine.
>
> Please try it.

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Rev & php script question

2008-02-15 Thread jbv
Hi there,

I'm using "post myvar to url "" in a stack to access data stored in
mysql
via a php script. The php script ends with "echo $myvar;" and the
strange thing
is that it returns 2 empty lines before the value of $myvar ONLY when I
access
mysql in the script... when I post a similar content to a php script
that doesn't
connect to mysql, the value returned is "clean" (no empty lines).
I've tested the script on 2 different servers running 2 different
versions of Linux,
Apache, php and mysql.

is there a way to bypass this problem ? may be by changing settings of
the http header
in the php script ?

Thanks in advance,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


[OT] Rev cgi vs php - another (practical) question

2008-02-11 Thread jbv
Hi list,

I'm in the process of translating a few Rev cgi scripts into php.

In those Rev scripts, I'm using a very handy feature : some data
is structured as lines of items and store as such in mySQL cells
configured as "text" for further processing..
I was wondering how to implement something similar to lines &
items in php... Obviously I could parse the strings and build arrays
(using my own parser or the explode() function)...

But is there any better / simpler solution ?

thanks in advance,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


slightly [OT] : online DB protection question

2008-02-11 Thread jbv
Hi list,

I'm working on a promotional online B-to-B web game for a client, using
Rev as cgi engine.
In a few words here's how it works : players have to register first and
then need
to find several clues in successive images. Finding those clues is
pretty easy and
we expect the number of winners to be pretty large; therefore a limited
set of
winners will finally be randomly choosen among those who found all the
clues.

Here's my question : in order to prevent ppl to register hundreds of
times automatically,
or simply to hinder hackers to send large amounts of automatic cgi
requests and to
clutter mySQL tables with useless registrations, I've been asked to
think about some
protection.

So far, the best idea I came with is to deny access to mySQL to more
than 10 requests
from the same IP within the last minute (several ppl in a same
corporation can play
simultaneously and thus will be viewed as the same ip by the server, and
of course none of
them should be denied access to the game).
This can be easily done and won't slow down the scripts at all. Of
course, both "10 requests"
and "last minute" can be adjusted...

I was wondering what you guys are thinking of this approach, and if
anyone has managed
to develop a more efficient strategy in a similar context...

Thanks in advance for your suggestions,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Rev cgi vs. php

2008-01-30 Thread jbv

Hi,

> What advantages does Rev cgi have over PHP? Since I know Rev and
> don't know PHP, it certainly has advantages for me. But how might I
> argue this point to others who are familiar with PHP but not Rev?
>

Rev cgi is perfect for web sites with low traffic but with complex things
to do for every server request. Rev cgi is also much faster than php, and
(imho) easier to debug and to read.
The downside is that every server request launches a new Rev instance,
and I've seen project directors refusing the use of Rev cgi because of that.
The connection between Rev cgi and databases can also bring heavy
headaches, since the last compiled version available is getting quite old
(AFAIK). In a recent project on a Linux server, we had to spend 2 days
reinstalling libraries in order to link Rev cgi with mySQL. In another
project on a Win2K server, I never managed to link rev cgi with mySQL
and had to write 2 small php routines, which of course really slowed down
my scripts...
But I've recently heard that the upcoming new Rev cgi engine would be less
dependent of environment libs...

JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Testing conformity of xml data

2008-01-27 Thread jbv


Andre,

Thanks a lot for the cool tip.
However, one detail I forgot to mention in my previous post : my Rev cgi script
will run on a win 2K server...

JB

> Jbv,
>
> check "tidy" unix program. Tidy is a popular unix tool that every host
> out there will have installed. Even your MacOS X bundles it. It is
> used by a lot of toolkits. You can use a combination of tidy and
> shell() call to test your XML.
>
> Andre
>
> On 1/27/08, jbv <[EMAIL PROTECTED]> wrote:
> > Hi folks,
> >
> > Is there a function somewhere that could help me test conformity
> > of xml data (basically finding and removing unclosed tags, or tags
> > being closed without being opened) by a Rev cgi script before it's
> > sent back to the end-user browser for heavy xml processing via js
> > functions ?
> > I'm using Rev cgi 2.5.
> >
> > Thanks in advance,
> > JB
> >
> > ___
> > use-revolution mailing list
> > use-revolution@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your 
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-revolution
> >
>
> --
> http://www.andregarzia.com All We Do Is Code.
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: another question about finding duplicates

2008-01-27 Thread jbv


Peter,

I've tried that approach and found that in case of huge amount of data,
it can beslower (because of the sort function) that the method posted
before, the one including 2 loops and the use of arrays.

JB


> There's a file which goes roughly:
>
> 1   anything
> 2   anything
> 3   anything
> 4   anything
>
> etc
>
> It can always be sorted by the first item.  Sometimes a duplicate entry will
> creep in, so the file will look
>
> 1   anything
> 2   anything
> 2   anything
> 3   anything
> 4   anything
>
> or perhaps
>
> 1   anything
> 2   anything
> 3   anything
> 3   anything
> 4   anything
>
> What's the quickest way of checking for this condition  - when the two items 1
> of any two adjacent lines are identical?  I have found a brute force way to
> do it using filter, but it is really clunky and slow.
>
> Cheers
>
> Peter
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Testing conformity of xml data

2008-01-27 Thread jbv
Hi folks,

Is there a function somewhere that could help me test conformity
of xml data (basically finding and removing unclosed tags, or tags
being closed without being opened) by a Rev cgi script before it's
sent back to the end-user browser for heavy xml processing via js
functions ?
I'm using Rev cgi 2.5.

Thanks in advance,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: [semi OT] encryption of pdf files

2008-01-10 Thread jbv
François,

>
>
> Hi from Paris
>
> Acrobat (the application, not the reader) offers three levels of
> protection by encryption+password
> 1) permission to open
> 2) permission to open and to print
> 3) permission to open, print and modify in Acrobat
> I guess what you need is option 2

yep... but is there any way to use a third party software to apply
that kind of protection to pdf files generated on the fly by Rev
cgi scripts on a Linux server, or do I have to tweek my Rev / pdf
code by myself ?

Thanks,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


[semi OT] encryption of pdf files

2008-01-10 Thread jbv
Hi list,

I have several Rev cgi scripts that output pdf files with sophisticated
layout
and sensible content. I'm using my own libraries to build those pdf
files.

I was wondering if anyone had already tried to encrypt such homemade
files
so that users can still open them with Acrobat, but can't edit the
content...

I know that there are several solutions out there on the web that use
built-in
functions of the most recent versions of pdf, but most of them are
included in
complete software packages and I would be more interested in a limited
encryption function for already existing files...

Thanks on advance,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Finding duplicates in a list

2008-01-09 Thread jbv
Hi,

the following runs in 105 msec on my old G3 300 Mhz Mac,
and must be pretty fast on the latest machines...
It finds 442 duplicates.

JB



on mouseUp
  set cursor to watch
  lock screen
  put fld 1 into a-- fld 1 contains the 8708 lines of your list
  put "" into T
  put the milliseconds into m
  repeat for each line j in a
add 1 to T[j]
  end repeat
  put "" into a
  repeat for each line j in the keys of T
if T[j] > 1 then
  put j & cr after a
end if
  end repeat
  put the milliseconds - m &cr&cr& a
end mouseUp

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


more Rev cgi headaches on Linux server

2007-12-05 Thread jbv
Hi list,

Again fighting with Rev cgi problems... my ISP needs to know
how to modify Apache settings on a Linux server to allow
Rev cgi to launch... so far, every attempt to launch the engine
fails because of some missing libraries, but I have the same
engine running ok on some other Linux servers...
The Apache version is 1.3.37 with PHP 4.4.4

Thanks,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Rev and video compression

2007-11-26 Thread jbv


Jack,

it's probably me who was not clear : basically, the idea is to have a small
app available for download on a webpage, and with that app, users (no
matter which platform they use, Win, Mac of Linux) should be able to
upload their won video files to a server, and the app should be able to
automatically compress the video using some codec before uploading...

Thanks for your help anyway.

Jb

> JB:
>
> Maybe I'm not understanding your problem/need very well. Do you want
> the end user, the person downloading your app, to be able to use your
> app to import some video and then be able to export it into some other
> format?  If that is the case I have NO idea what to suggest in a non-QT
> world. The cool thing (okay, one of many cool things) about Trevor's
> external is that you don't need QT PRO. That saves my users $29. All
> they need to do is install the latest/greatest version of QT.
>
> Sorry - wish I had a better answer.
>
> Jack Rarick
> Braintree Athletics

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Rev and video compression

2007-11-26 Thread jbv


Jack,

Thanks for the reply.
I guess it means that the solution works only with QT installed on the user's
computer... which isn't always the case when the goal to achieve is to offer a
small app to download from a website...
Any other solution ?

Thanks,
JB

> Yes.  We convert clips from iMovie (DV streams) to any format our user
> chooses. We have had a lot of success with the H.264 Codec. This is all
> based of course on the use of Trevors Quicktime External. It is
> absolutely the coolest rev/media tool we have seen. Keep in mind however
> that the size of your file, regardless of your compression choice, will
> be based on the size of the window that you set your initial video to. A
> full sized window with H.264 will be much larger than a 400X300 window
> with H.264.

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Rev and video compression

2007-11-26 Thread jbv
Hi list,

Has anyone tried to access QT (or any other) codecs to compress
video files on the fly with Rev before uploading the compressed
file to a server ?

Thanks,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Rev cgi on Win 2K server, anyone ?

2007-11-10 Thread jbv


Mark,

the version() function returns 2.6.1
so I put revdb.dll into
C:\cgi-bin\components\global environment\
and the dbmysql.dll driver in the same folder cgi-bin as
the Rev cgi exe.

when using try / catch I get the floowing :

219,15,8,revOpenDatabase
223,15,1

and line 15 of my script contains

get revOpenDatabase("mysql","localhost", etc

I don't know if that means anything to anybody...
btw, is there any errors list available somewhere ?

Meanwhile I've got an answer from runrev support, saying
that from version 2.5 devDB and revXML libs were included
in the engine, at least for Linux... but I don't know if that's
also valid for windows versions...

Thanks,
JB

> jbv-
>
> Thursday, November 8, 2007, 1:28:54 PM, you wrote:
>
> > I did that, but no luck. my scripts keep crashing with revdb commands.
> > All the rest works fine.
>
> Can you go over to the win2k3 server box and use rev with the db
> library locally? Was rev installed onto the server or just copied into
> the cgi directory? Possibly the revdb.dll library isn't in the proper
> place in the directory structure? I have revolution.exe installed into
> C:\cgi-bin: based on that, I'd guess that revdb.dll would go into
> C:\cgi-bin\components\global environment\ if this is 2.6.1 or
> C:\cgi-bin\Runtime\Windows\x86-32\Externals\ if it's newer.
>

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Rev cgi on Win 2K server, anyone ?

2007-11-08 Thread jbv


Mark,

>
> My guess is that you need revdb.dll installed along with the rev engine.
> It's a separate file and not part of the engine itself, so if you haven't
> put it on the win server the database calls aren't going to work.

I did that, but no luck. my scripts keep crashing with revdb commands.
All the rest works fine.

Any suggestion welcomed...

Best,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Rev cgi on Win 2K server, anyone ?

2007-11-07 Thread jbv


Mark ,

Thanks again for kindly answering my post.

actually I have good news : I now have Rev cgi running on my client's
Win 2003 server !!!  I pointed the guy in charge of the server to your
earlier post from 18 months ago, and 20 mins later the thing was up and running
!
those young guys can be impressive...

but now I have another problem : I just can't connect to mySQL 5.0.22...

I'm using Rev 2.6.2 (I grabbed that engine on the runrev ftp server),
and have placed the dbmysql.dll driver that comes with Rev 2.5 in
the same folder as the engine (privileges 777).

I get a huge CGI error (not the usual refdeb error) when using
"get revOpenDatabase" so I'm wondering if the engine includes the
revDB library... actually, the 2.5 I've been using on Linux for years
does include revDB, so I guess the 2.6.2 does too...
Is there a way to know it for sure ? Or perhaps am I using a wrong
DB driver version ? Or perhaps should I put revDB in a stack and
include "start using stack..." in my scripts ?

well, it's late... I'll try again tomorrow. But any smart advice is
welcome, of course.

Thank you and good night.
JB

> JB-
>
> > servers. Last but not least, the whole thing must be up and running by
> > next monday...
>
> !!!
>
> > what I'm more concerned with, is to find a Rev cgi engine that runs
> > on a Win2K server. Your above mentioned post to the list featured
> > a link to a Rev engine for Win... do you know which version it is
> > (at least 2.5 I hope), if there's no problem with it (such as missing
> > C libraries) and if it includes the revdb library (I will need to access
> > mySQL 5) ?
>
> I'm not at that machine at the moment, but I'll check it this evening when I
> get to it. IIRC I used 2.6.1. I don't recall using the db library with the
> cgi setup: I was particularly interested at the time in using ajax and css
> in conjunction with script-generated html files. That part all worked out
> fine. And there's no specialized cgi engine for Windows - I just grabbed the
> rev engine and installed it in the IIS cgi directory. (and fiddled with IIS
> permissions and config files, etc until it worked).
>
> >> ...and remember, of course, that the line endings are annoyingly
> >> different on Windows cgi scripts...
> >
> > that's not a problem, as I'm using BBEdit on Mac as a script
> > editor...
>
>  you're in good shape, then. But I still think it's a pain to have to
> remember to fix the line endings each time you move a file over to the
> Windows server. And the error message you get when you haven't fixed them is
> quite misleading.
>
> --
>  Mark Wieder
>  [EMAIL PROTECTED]
>
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Rev cgi on Win 2K server, anyone ?

2007-11-07 Thread jbv


Andre,

thanks for the offer, but I've also been using rev cgi on Linux since
2001 (MC cgi actually)...
but this is the first time on a windows server...

JB

> Hey JBV,
>
> I don't do windows, but if you ever get this running, I can try to
> help with the cgi part... I been using rev cgi under linux for some
> time!

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Rev cgi on Win 2K server, anyone ?

2007-11-07 Thread jbv


Mark,

thanks for the reply.

> jbv-
>
> Monday, November 5, 2007, 2:34:28 PM, you wrote:
>
> > I've found some advices / tutorials in the list archives, but most
> > of them are at least 18 months old...
>
> Hmmm... 18 months sounds like you're looking at my posting of
> instructions on how to do this in IIS.

yes indeed.

> I undertook that when I was
> working on my rev-to-web converter, and running the whole thing under
> Windows server was just one more part of that masochistic process. The
> instructions still work with the latest IIS.
>
> But my advice, having been through this once, would be to ignore my
> previous instructions (!) and install Apache. Forget you ever heard of
> IIS, disable the service, and just let Apache take over the web server
> tasks. You'll make your life much simpler, the server will be more
> stable and easier to manage, and you may be able to reuse most of the
> configuration files you have set up on your linux server.

well, unfortunately I have no choice. My client is a company that sells
high end services based around Win servers, Blackberries and other similar
devices for which they developped custom apps..
They're too busy to take care of their own website, so a friend of mine
reshaped their website and I was asked to install some online tools for
updating web pages content that I had built around Rev cgi on Linux
servers. Last but not least, the whole thing must be up and running by
next monday... so I have no other choice than to make everything work
under Windows asap... the other option would be to re-write all my
scripts in php, but I will lack time and frankly, I don't really like php...

fortunately, that company is packed with engineers specialists of the
windows world; they even have a commercial / technical partnership
with MS AFAIK. so I'm not too worried about their abilities to
configure IIS...
what I'm more concerned with, is to find a Rev cgi engine that runs
on a Win2K server. Your above mentioned post to the list featured
a link to a Rev engine for Win... do you know which version it is
(at least 2.5 I hope), if there's no problem with it (such as missing
C libraries) and if it includes the revdb library (I will need to access
mySQL 5) ?

>
>
> ...and remember, of course, that the line endings are annoyingly
> different on Windows cgi scripts...

that's not a problem, as I'm using BBEdit on Mac as a script
editor...

Best,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


where to download an old Rev cgi engine for Windows ?

2007-11-06 Thread jbv
Hi,

Does anyone know where to download an old Rev cgi engine
for Windows (like 2.5) ?

thanks,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Rev cgi on Win 2K server, anyone ?

2007-11-05 Thread jbv
Hi list,

I need to install Rev cgi on a Win 2003 server, with connections
to mySQL 5+.
I'm doing this because I want to reuse some older scripts and
lack the time (and motivation) to rewrite everything in php.

I've found some advices / tutorials in the list archives, but most
of them are at least 18 months old...
I was wondering if anyone had a more recent experience and
was willing to share it with someone who has always used Rev
cgi under Linux so far...

Thanks in advance,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


The formattedwidth and italic fonts

2007-10-30 Thread jbv
Hi list,

the following command :

set width of fld 1 to the formattedwidth of fld 1

truncates a few pixels on the right when the font is italic...

Is there a way to bypass this problem ?

I'm using Rev 2.5 on Mac Classic, and need to know
precisely the width of large characters (100 pixels size).

thanks,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Rev cgi 2.5 on Linux Ubuntu 7.04 ?

2007-10-26 Thread jbv
Hi list,

Is anyone using Rev cgi 2.5 (or other) on Linux server with
Ubuntu 7.04 ?
Any specific thing to know or to take care of ?
I'm asking because so far I've only used it on RedHat...

Thanks,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Faking A Real Table Object

2007-10-22 Thread jbv


Len ,

just curious : why faking a table object ? Why not use a "real" table
object instead ?

JB

> I'm trying to create a group that will act like a "real" table object
> should.  In other words, I want to be able to align each column
> individually.
>
> I've created 5 fields each the width needed for a column and then
> grouped them together.  Since the columns (as originally drawn) we
> longer than the group, I get a scrollbar for the group but it only
> scrolls to the height of the fields.  Since the number of lines in the
> fields can vary from 2 to 200, I don't want to put 2 lines of data and
> 198 CRs in each field.
>
> I know someone has done this before where they attach a scroll bar to
> the right most column and then somehow get the other columns to move
> when it's scrollbar is moved.
>
> Is there a better way to accomplish what I'm trying to do?  If the group
> w/ scrollbar is the way to go, how can I dynamically expand the length
> of the columns (as the number of records varies) without moving the top
> of the field around on the card?

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Rawkeydown and the mouse wheel

2007-09-29 Thread jbv
Hi list,

are the rawkeydown key codes 65308 / 65309 similar on Mac and XP ?
(I don't have any mousewheel to test on Mac).

Thanks,
JB


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: cgi + mySQL "revdberr,invalid database type"

2007-09-28 Thread jbv


Claude,

you need to install the Rev mySQL drivers along with the cgi engine.

JB

> I have on a linux web server a MySQL database created and managed from my
> desktop Windows computer by a Revolution stack (Vista + revolution/windows
> 2.81) ; it works ok.
>
> On the same web server i installed revolution/linux 2.51 as a cgi
> application and it works ok for producing web pages.
>
> Now i try to have my cgi scripts fetching data from my mySQL database.
>
> If i try
> put revOpenDatabase("MySQL",myURL,myBase,myName,myPassword,0) into
> databaseID
> i am answered "revdberr,invalid database type"
>
> For the param myURL, i tried the URL of my site, the IP of my site,
> "localhost" and "", but no one works.
>
> I am sure that the params myBase,myName,myPassword are OK because they
> open succesfully the database from my desktop stack.
>
> I guess that something is wrong in the installation of Revolution on the
> linux server. i CHMODed all revolution files to 755
>
> Was someone successfull in managing a mySQL database from revolution as
> cgi ?
>
> TIA
>
> Claude

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Why isn't this a date?

2007-09-24 Thread jbv


Mikey,

I just made the test with Rev 2.5 on XP and in both cases I get true.

did you check the dateformat ?

JB

> If I
> put "07/01/77" into thisCrap
> put thisCrap is a date
>
> I get false
>
> put "07/01/1977" into thisCrap
> put thisCrap is a date
>
> I get false
>
> Indeed there are no date operators that seem to work on thisCrap.
> This is at least a little annoying as it means I have to manually
> massage all the dates I extract from a file I'm working on.
>
> Yes, I chose the name so we can have a good laugh about how there are
> lot of things that don't work on thisCrap.
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: strange nested groups behaviour

2007-09-11 Thread jbv


Mark,

I'm aware of that and usually name my objects with french words.
In my previous posts I used "date" and "day" for the only purpose
of my demonstration for an english-speaking audience.

Best,
JB

> jbv-
>
> In addition to the above weirdnesses with the owner of a group, I think it's
> also bad form to use a keyword as the name of an object. You'll probably
> stay out of trouble more if you name it something like "grpDate". YMMV.
>

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: strange nested groups behaviour

2007-09-10 Thread jbv


Jan,

it's me again... I'm afraid your solution doesn't work
with more than 2 levels of nested groups with similar names

>
> The solution is to work with the long ID of the object
> itself. The long ID of the owner is then word 4 to -1
> of this long ID.
> This trick resolves the name ambiguity.

Here's the situation :

I have
group "search1" (id 1021)
which contains group "date" (id 1038)
which contains field "day" (id 1029)

and
group "search2" (id 4334)
which contains group "date" (id 4335)
which contains field "day" (id 4336)

if I type in the msg box :
put the long id of owner of fld id 4336

it returns :
group id 1038 of group id 1021 of card id 1002 of stack ...


But
put the long id of the owner of grp id 4335
returns
group id 4334 of card id 1002 of stack ...

Conclusion, I need to rename my groups "date" to "date1",
"date2" etc.


Best,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: strange nested groups behaviour

2007-09-10 Thread jbv


Jan,

Nevertheless I think it can be considered as a bug, or at least
as a serious limitation of the engine.

The Rev doc for "owner" says "Reports which object is next
in the object hierarchy", and since xml is now widespread, one
can expect "owner" to behave somehow like "parentNode"...

JB

>
> As you concluded, "the owner of me" returns a short
> reference to the group, which can of course be
> ambiguous. If you have multiple groups with the same
> name on your card, Revolution will then grab the first
> group it can find.
>
> The solution is to work with the long ID of the object
> itself. The long ID of the owner is then word 4 to -1
> of this long ID.
> This trick resolves the name ambiguity.

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: strange nested groups behaviour

2007-09-10 Thread jbv
well, I just found the explanation. "the owner of me" returns
"group date" (for instance), and since each of my groups "search"
contains the same kind of objects with the same names, Rev
checks some lookup table for a group "date" and the first one it finds
is group "date" in group "search1"...

I've been deeply into xml lately and I thought that "the owner of me"
would return some kind of unique object identifier... next time I'll
think twice before coding blindly...

Best,
JB

> Hi list,
>
> I'm facing a strange behaviour regarding nested groups.
>
> I have a substack that contains 12 groups named "search1" to
> "search12". Each group contains various objects (exactly the
> same kind of objects in the same order with the same names),
> among which is a group "date" that contains 3 fields named
> "day", "month" and "year".
>
> Here the strange behaviour : if I put in grp "date" of any grp
> "search" the script line :
> put the owner of me
> it always returns the right group name ("search1", "search2" etc)
>
> BUT when I put the following script line in each field of groups
> "date"
> put the owner of the owner of me
> it always returns group "search1" 
>
> Any idea of what's happening ?
>
> Thanks in advance,
> JB
>
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


strange nested groups behaviour

2007-09-10 Thread jbv
Hi list,

I'm facing a strange behaviour regarding nested groups.

I have a substack that contains 12 groups named "search1" to
"search12". Each group contains various objects (exactly the
same kind of objects in the same order with the same names),
among which is a group "date" that contains 3 fields named
"day", "month" and "year".

Here the strange behaviour : if I put in grp "date" of any grp
"search" the script line :
put the owner of me
it always returns the right group name ("search1", "search2" etc)

BUT when I put the following script line in each field of groups
"date"
put the owner of the owner of me
it always returns group "search1" 

Any idea of what's happening ?

Thanks in advance,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Rev cgi, PHP & XML

2007-08-22 Thread jbv
Hi folks,

It's me again with another weird question... this time for php
experts...

I have a Rev cgi script that returns some xml data to a client browser.
In order to speed up downloading, I'm trying to compress the data
using gzip via some php functions (such as gzencode or gzcompress).
I had to use that technique because Rev compress() function doesn't
output code suitable for browsers...

Anyway, here's my code :

- in Rev cgi script

get shell("/usr/local/bin/php /home/httpd/html/cgi-bin/gzcompress.php "
& myXMLdata)


- in php




This works fine for any non-XML data. As soon as I try to pass XML data
to the php script,
I get this error :
/bin/sh: line 1: syntax error near unexpected token `<'

Could someone be kind enough to tell me what I'm doing wrong ?
Is there any specific gzlib function for xml data ? I haven't found
anything like that in php doc...

Any help greatly apreciated.  Thanks in advance,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


[sightly OT] XMLhttprequest + Rev cgi problem : xml data truncated

2007-08-21 Thread jbv
Hi folks,

I'm trying to work with XMLhttprequest and Rev cgi and am encountering
a problem : the response from the cgi script is truncated on the browser
client
side when its length > 50 Kb...

I know that my code is 100% correct (both on server and client sides)
since
everything works fine as long as the xml code generated by the cgi < 50
Kb...

What I'm trying to do is to generate a complex TABLE object from
elements
of a DB with the cgi and put it inside a DIV in my webpage. Again this
works
when the size of data downloaded < 50 Kb.

I'm using a POST request with XMLhttprequest, but the truncation happens

only in the output, so it has nothing to do with any limitation of the
POST
parameters (besides I've check my cgi scrpt and all request data are
received OK).

I've also tried to set Content-Length to the size of my data in the cgi
script,
but to no effect : the xml data is still truncated and I get an error
message about
missing tags.

Hours of google searches brought several posts on various forums by ppl
who
seemed to face the same problem and asked about it, but none seemed able
to
give an adequate answer...
Some ppl mention that problems appear only with FF which seems to chop
every string longer than 4Kb in successive childnodes of 4 Kb...
But my problem appears with FF and IE as well...

And of course I haven't found this problem documented anywhere in FF or
IE docs...

So, if anyone on this list has already worked with XMLhttprequest and
large
amount of xml data, please let me know if you encountered the same
problem
and how you solved it...

Thanks in advance,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: revdb_execute problem

2007-08-17 Thread jbv


Ken ,

>
> > I'm trying to squeeze more than one SQL commands into 1 single
> > revdb_execute request in a Rev cgi script.
>
> I've never done that, but I would assume that revdb_execute is limited
> to only one command because it needs to return a result back to Rev; if
> it could support more than one command, there would have to be special
> handling to get the results of multiple commands back (even if it's
> just a simple "empty/error" result for each).

Mmmh... things aren't clear...
Take a look at the revExecuteSQL command (equivalent to revdb_execute)
in the doc (Rev 2.5); it says :

The SQLStatement is a string in Structured Query Language. (Do not include 
a semicolon
at the end of the SQLStatement.)

Note:  Some database implementations, such as Oracle, are capable of 
handling a
multiple-line SQL statement.

First, it's not clear if each line of a multiple-line SQL statement should not 
be terminated
by a semicolon
or only the final one... Second, it sounds like multiple-line statements are 
allowed if the
DB implementation
accepts them... And according to various webpages, mySQL 4 does accept it...

>
>
> I'd break it into two separate revdb_execute statements instead.
>

that's what I've done, but I was actually trying to speed up some cgi scripts 
that feature
large numbers of mySQL queries by using multiple-line statements when queries 
are
similar...

Best,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


revdb_execute problem

2007-08-17 Thread jbv
Hi list,

I'm trying to squeeze more than one SQL commands into 1 single
revdb_execute
request in a Rev cgi script.
For instance :

UPDATE myTable SET N = N + 1 WHERE id = 1 LIMIT 1 ; UPDATE myTable
SET N = N + 1 WHERE id = 2 LIMIT 1 ;

I've tried all possible ways, like this one :

   put "UPDATE myTable SET N = N + 1 WHERE id = 1 LIMIT 1 ; " into
myREQUEST
   put "UPDATE myTable SET N = N + 1 WHERE id = 2 LIMIT 1 ;" after
myREQUEST
   put revdb_execute(theID, myREQUEST) into tQueryResult

The first SQL command executes fine, but I get a syntax error message
from mySQL regarding the
2nd SQL command.

But when I paste the same set of 2 SQL commands into phpMyAdmin, then it
works !!!

Any idea of what I could be missing ?
The doc doesn't mention any limitation regarding the SQLQuery parameter
of revdb_execute...

I'm using Rev cgi 2.5, mySQL 4.0.15 and phpMyAdmin 2.6.0

Thanks,
JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Standalones as CGI

2007-08-15 Thread jbv


Jan,

>
> Apart from the obvious one: I can make those things in
> Rev already, I don't know PHP and don't want to learn
> something that looks like C ?

with the librairies I had in mind, you don't need to know
anything about php : you just install the php files on your
server, and call various functions with the right parameters
from your cgi script... about the same as calling an external
in a regular Rev stack...

JB

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


  1   2   3   4   5   6   7   >