• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

AltME groups: search

Help · search scripts · search articles · search mailing list

results summary

worldhits
r4wp5907
r3wp58701
total:64608

results window for this page: [start: 9401 end: 9500]

world-name: r3wp

Group: MySQL ... [web-public]
Volker:
9-Jan-2006
do you have a long password in the db?
Volker:
9-Jan-2006
The client now sends a request
Pekr:
9-Jan-2006
although - I just try to connect to /mysql table ... but passwd is 
user dependant, and as a root, I can see, it is long already :-)
Volker:
9-Jan-2006
we get a little score for the first round? :)
Volker:
9-Jan-2006
the demo has a lot of 0 before the real password. maybe that helps 
adjusting.
Volker:
9-Jan-2006
what happens if you simply expect it is a long password? For a first 
working version? At least people can connect.
Pekr:
9-Jan-2006
and thanks a lot ....
Pekr:
9-Jan-2006
uh, there is a bug on first line of my func above - hash-stage1: 
checksum/method pass 'sha1 .... but it does not work anyway ...
Dockimbel:
9-Jan-2006
I have a couple of hours to hack someething for MySQL v5 support.
Pekr:
9-Jan-2006
yes, in cores - try help checksum ... wait a bit ...
Pekr:
9-Jan-2006
>> help checksum
USAGE:

    CHECKSUM data /tcp /secure /hash size /method word /key key-value

DESCRIPTION:
     Returns a CRC or other type of checksum.
     CHECKSUM is a native value.

ARGUMENTS:
     data -- Data to checksum (Type: any-string)

REFINEMENTS:
     /tcp -- Returns an Internet TCP 16-bit checksum.
     /secure -- Returns a cryptographically secure checksum.
     /hash -- Returns a hash value
         size -- Size of the hash table (Type: integer)
     /method -- Method to use
         word -- Method: SHA1 MD5 (Type: word)
     /key -- Returns keyed HMAC value
         key-value -- Key to use (Type: any-string)
Volker:
9-Jan-2006
sha_input: http://www.distlab.dk/mysql-4.1/html/mysys_2sha1_8c-source.html#l00179

Seems the two inputs are like a join. Usefull this way if one hashes 
files withput loading everything in memory.
Volker:
9-Jan-2006
Is the above your code?
  (checksum/secure port/locals/long-seed hash-stage2) 
->
  (  (checksum/secure port/locals/long-seed)  (hash-stage2) )
did you forget a join or something?
Volker:
9-Jan-2006
And you are a master librarian :)
Volker:
9-Jan-2006
Somehow a good feeling. Specially imaging Pekr dancing around. Yes 
yes yes yes :))
Volker:
9-Jan-2006
Not such a big one.
Dockimbel:
9-Jan-2006
it seems that there is a license issue with the new MySQL version 
:
Dockimbel:
9-Jan-2006
/*

  This file is the net layer API for the MySQL client/server protocol,

  which is a tightly coupled, proprietary protocol owned by MySQL AB.
  Any re-implementations of this protocol must also be under GPL
  unless one has got an license from MySQL AB stating otherwise.
*/
Pekr:
9-Jan-2006
I can imagine I put some efrort to some sw creation, requiring everybody 
who uses it to release it, so that 3rd party using it and their competitors 
can see, what do they use. But surely not forcing them to release 
whole app as a GPL?
JaimeVargas:
9-Jan-2006
If you do reverse engineering of a protocol in a clean lab environment. 
Then you are protected.
JaimeVargas:
9-Jan-2006
If you do a clean-lab implementation your code doesn't need to be 
GPL(ed).
Dockimbel:
9-Jan-2006
I can retrieve the result of a query. The colums and row formats 
have changed
Pekr:
9-Jan-2006
wait a sec, just retrying here at home ... latest version here ...
Pekr:
9-Jan-2006
I should change my password now :-) well, behind firewall, running 
only local connections as a root, so ... :-)
Dockimbel:
9-Jan-2006
I'll check that tomorrow, have to go. Thanks a lot for your good 
work ;-)
Dockimbel:
10-Jan-2006
MySQL server protocol has changed since 4.1.0 (with a big evolution 
starting from 4.1.1) and is not compatible with the older protocol. 
Strangely, server v5 allow clients to connect with the older (pre-4.1) 
protocol providing the good flags...(that's odd). Need more investigation 
to see if the old driver can still be used reliably with v5.
Pekr:
10-Jan-2006
maybe better as a refinement of scramble itself ...
Dockimbel:
10-Jan-2006
From 4.1.1, there's a lot of changes in the protocol, mainly a lot 
of new fields.
Dockimbel:
10-Jan-2006
no, it wasn't 'sha1, it was a "poor man" hashing method.
Dockimbel:
10-Jan-2006
This is a beta release, please report here any bugs.
Dockimbel:
11-Jan-2006
Softinnov.org was down for a couple of hours for server PSU replacement. 
The download link works now again.
Coccinelle:
12-Jan-2006
Dock, if you publish a new version of mysql-protocol.r, it's time 
to make the correction of the bug in the init function, the longlong 
conversion and in the data reading initialization.
Coccinelle:
12-Jan-2006
And the last bug is that the "byte" word is not initialized to none 
and this cause a problem but I don't remember the effect :
;------ Data reading ------


;	b0: b1: b2: b3: int: int24: long: string: field: len: none	; Removed

 b0: b1: b2: b3: int: int24: long: byte: string: field: len: none	; 
 Added
Dockimbel:
12-Jan-2006
Longlong conversion: I don't agree with you. The server returns a 
64-bits integer that you're casting to 32-bits integer, so your losing 
half of the data. Btw, even casting it to decimal! which is 64-bits 
wide won't be accurate because of the integer to floating point conversion 
issues. That's why I've left it to none (means keep it in raw string! 
format) and let each user decide how to process it. (The driver provides 
the 'change-type-handler global function to change that easily)
Dockimbel:
12-Jan-2006
If anyone has some other patches, let publish it here. I'll wait 
a few more days before closing the beta state and declaring this 
version the new stable one.
Dockimbel:
13-Jan-2006
You already can have several connections opened at the same time 
with the current driver. I don't see the benefits of the /Command 
way. If you really need to have exactly the same behaviour, I guess 
that you have to overload the 'first function in my code and return 
a new port! using  the connection port  as 'sub-port.
Dockimbel:
14-Jan-2006
Guys, I keep been amazed how libmysql using C poorly performs against 
a direct TCP approach using REBOL.
Dockimbel:
14-Jan-2006
I have plans for a version 2 of this driver including a full code 
rewritting for much cleaner design, speed improvements, optional 
async API, support more protocol features (like LOAD DATA), implement 
the v5 protocol, improved user API (e.g.: select column in a record 
by field name), etc...
Robert:
14-Jan-2006
Exists a "standalone" mysql version? Or a standalone database that 
is mysql compatible?
Robert:
14-Jan-2006
So, no big installation. Like a DLL or  just an EXE that's started.
Gabriele:
14-Jan-2006
there is an embeddable version of mysql as a dll
Robert:
14-Jan-2006
well using a DLL won't make the rest GPL.
Robert:
14-Jan-2006
I need one that's integrated into Rebol. Didn't took a look at it. 
Just thought it makes sense to have a protocol like DocKimbel's and 
re-use it with different databases (R-ODBC)
Ammon:
17-Jan-2006
Doc,  I'm not sure if you've got this yet or not,  but we found a 
bug where the 'read-packet function's buffer was not getting expanded 
properly which was causing it to truncate some of our data.  To fix 
this problem then we added a local variable and added these lines:

tmp: pl/cache
pl/cache: make binary! pl/buf-size
system/words/insert tail pl/cache tmp

after this line:

pl/buffer: make binary! pl/buf-size: packet-len
Dockimbel:
24-Jan-2006
Ok, I've found a workaround for this problem. I still have a 1045 
User deny random error to fix (almost done) and make a new release 
tomorrow. 1.0 official release is now very close.
Dockimbel:
25-Jan-2006
The v3.xx protocol is flawed. The scrambled password is sent to the 
server as a zero terminated string. But the scrambling method, sometimes 
contains a 00 byte. The server then, cuts the password prematuraly 
(error 1043) or if the zero is at the beginning of the string, considers 
that the user didn't provide any password (error 1045).
Dockimbel:
25-Jan-2006
I agree, I never use this approach when I design a new protocol. 
It leads to error and it's harder to handle on the receiver side 
because you don't know how much data you're waiting for.
Pekr:
25-Jan-2006
So v 1.0 will have to live with those occassional errors? If so, 
we should go for 1.0 and claim it is a feature, not a bug :-)
Ammon:
22-Feb-2006
Apparently MySQL 5 has a datatype that isn't defined in the protocol, 
adding this line seems to work just fine:

defs/types 246 decimal
Henrik:
5-Mar-2006
I get a strange bug where I, every time I do a query, some old data 
is sent back to me
Henrik:
10-Mar-2006
I'm not sure how to do that... I 'insert a query to a port and 'copy 
the result back out from that port... I can't control that, can I?
Henrik:
11-Mar-2006
fixed it! I'm not sure exactly how it works, because I do really 
copy the value to 'result like you describe, but the variable is 
local to a function. a CLEAR RESULT after RESULT: COPY PORT solved 
it

thanks for the tip :-)
Group: XML ... xml related conversations [web-public]
Graham:
24-Jun-2009
a: do mold pharmacy ;
Graham:
24-Jun-2009
This solution seems a little tortued :)
Sunanda:
24-Jun-2009
Do has some dangers if you do not trust the code involved. This works 
for me, and keeps the load/all (but not the self).....Even more tortured:
   a: first reduce load/all mold pharmacy
Maxim:
24-Jun-2009
if the db returns lists of varying length and types... you're better 
off creating a structured approach to a recursive initialisation.
Sunanda:
24-Jun-2009
You may have some other issues to consider as part of building/loading 
the data structures.

For example, Version2 of the application adds some fields  not present 
in V1.

To avoid a one-off bulk conversion exercise, the load process needs 
to check each object and add missing fields with default values.
Sunanda:
24-Jun-2009
That makes life a bit simpler.....Objects with year-long lifespans 
can be harder to manage :)
Sunanda:
24-Jun-2009
We have similar issues at REBOL.org where just about everything [scripts, 
Ml posts, internal data structures, etc] is objects, or blocks of 
objects.

Data sanitisation and object upgrading is a major part of the gig.
Graham:
24-Jun-2009
I'm pretty sure rebol.org doesn't use a db backend.
Graham:
28-Jun-2009
has anyone got a working copy of parse-xml.r from the library?
Graham:
28-Jun-2009
Got a working example of their use?
Graham:
28-Jun-2009
creates a value element for each value :(
Graham:
28-Jun-2009
I've also noticed that xml-to-object has to be run on a copy .... 
it must alter the original data block it is fed
Graham:
28-Jun-2009
Anyway this is looking promising.  I can take an xml message, construct 
a rebol object from it ... rearrange bits to create a new object 
and then create a reply xml message.
Gabriele:
29-Jun-2009
i see, your problem was that next first o is a block. if you also 
want to make sure there's nothing else in the object (but then... 
why is it an object?), you could check [value?] = next first o   
or [self value?] = first o
Graham:
5-Jul-2009
If xml-to-object meets a xml file with a number of elements with 
the same name, it creates a block of objects.
CharlesW:
1-Aug-2009
Folks, I have gone through this forum with the hopes that I woul''nt 
bother you with a newb style question. I have been trying all sorts 
of different xml libraries (rebelxml.r, xml-parse.r, xml-object.r) 
 as well as a few others I found. No matter what I do, I can't seem 
to pull the values I need.
CharlesW:
1-Aug-2009
Using rebelxml.r I have tried: get-xml-data/content/with-attribute 
 'xts:sports-content-set/sports-content/sports-metadata/sports-content-codes 
'/sports-content-code/code-type "sport" and many variations of this 
statement.  Using:  obj-xml  I have tried variations of obj-xml/document/xts-sports-content-set/sports-content/sports-metadata/sports-content-codes/sports-content-code/value?



As an example I tried to pull out the league information but could 
not, However I was able to pull out the TITLE using obj-xml/document/xts-sports-content-set/sports-content/sports-metadata/
sports-title/value? 


Obviously, I am clueless, so if anyone can point me in the right 
direction for a well document library (Hopefully with examples) that 
would be great. Otherwise if there is something glaring that I am 
doing wrong, please let me know.

Thanks,
Charlie
CharlesW:
1-Aug-2009
Is there a more sutiable language for parsing the XML?
CharlesW:
2-Aug-2009
It reads and parses ok. I get the block object but my problem is 
trying to access the individual elements. When venturing into some 
of the nested attributes, I just can't seem to get it returning a 
result.. Can you post an example on how you would retrieve the "hits" 
for <player id="b.11965"> or get the league info from sports-content-code 
code-type="league"
Graham:
2-Aug-2009
>> do %xml-parse.r

Script: "A more XML 1.0 compliant set of XML parsing tools." (4-Dec-2001)
>> do %xml-object.r

Script: {Convert an XML-derived block structure into objects.} (29-Sep-2001)
>> obj: first reduce xml-to-object parse-xml+ read %test.xml
>> data: second obj
== [make object! [
        xts:sports-content-set: make object! [
            sports-content: make object! [
                sports...
>> type? data
== block!
>> probe data/2/sports-content/sports-event/team/1/player/1
make object! [
    player-metadata: make object! [
        name: make object! [
            value?: ""
            first: "Matt"
            last: "Kemp"
        ]
        position-event: "8"
        player-key: "l.mlb.com-p.11965"
        status: "starter"
    ]
    player-stats: make object! [
        player-stats-baseball: make object! [
            stats-baseball-offensive: make object! [
                value?: ""
                runs-scored: "0"
                at-bats: "4"
                hits: "1"
                rbi: "2"
                bases-on-balls: "0"
                strikeouts: "0"
                singles: "1"
                doubles: "0"
                triples: "0"
                home-runs: "0"
                grand-slams: "0"
                sac-flies: "0"
                sacrifices: "0"
                grounded-into-double-play: "0"
                stolen-bases: "0"
                stolen-bases-caught: "1"
                hit-by-pitch: "0"
                average: ".271"
            ]
            stats-baseball-defensive: make object! [
                value?: ""
                errors: "0"
                errors-passed-ball: "0"
            ]
        ]
    ]
    id: "b.11965"
]
Graham:
2-Aug-2009
It should be easy enough to write a recurseive function that descends 
thru the object looking for some text, and then to print out the 
full path for you as in the recursive examples I posted above.
CharlesW:
2-Aug-2009
Thank you so much Graham, I will give it a try as you have indicated 
and will alsodownload anamonitor300.r
Graham:
14-Aug-2009
Given some xml like this which is a list of documents http://code.google.com/apis/documents/docs/2.0/developers_guide_protocol.html#ListDocs

how would your parser extract the <gd:resourceid> and text associated 
with these tags?
Graham:
15-Aug-2009
There's a rebzip script which has recently been updated on rebol.org 
which I guess can be used to open up docx
Janko:
2-Jan-2010
I will need a xml parser .. I was thinkinf something fast and quick 
like sax style .. I found this one http://www.rebol.org/view-script.r?script=xml-parse.r
but by looking of it it seems to offer a lot of things I don't need. 
Has anyone used it for "serrious" xml parsing with it. I am thinking 
of making my own simple minimal event based xml parser.
Graham:
2-Jan-2010
You can turn the xml file into a rebol object with it
Graham:
2-Jan-2010
Mine is a desktop application .. your needs for a web service differ 
..
Janko:
2-Jan-2010
yes, I get a big xml made by "official" BLOATED standard for invoices 
.. I want to parse it as quick as possible and that's all
Robert:
2-Jan-2010
Wouldn't it make a lot more sense to use a C based XML parser, construct 
a Rebol data-structure/string and return that to Rebol?
Geomol:
2-Jan-2010
Janko, rebxml is a rebol version of xml. It can do the same things, 
but without the bad implementation, xml suffers from. The idea behind 
xml is ok, it's just not implemented well. Much of that is solved 
with the rebxml format.
Gregg:
2-Jan-2010
I believe Maarten has done a SAX style parser.  I've used parse-xml 
in the past, sometimes post-processing the output to a different 
REBOL form, but my needs were simple.


Janko, have you tested any of the existing soluitions, with test 
input on target hardware, and found them to be too slow? If so, what 
were the results, and how fast do you need it to be?
Janko:
3-Jan-2010
Robert: it's a good idea but not for my case. I don't want the data 
strucure from whole xml , I want to stream it through parser and 
collect out the data. 

Geomol: I will look at it but probably not what I want in this particular 
case for the reason above

Gregg: I haven't tested any yet, I googled and found that xml-parse.r 
above , which has sax style of work but seems huge. I only care to 
support the simplified subset of xml, xml with all the variants is 
a total bloat so I believe it can be that complex (and it doesn't 
support 100% of it also).  Thats why I am considering writing a simple 
sax liek parser, I wrote it in c once and it was small (but it parsed 
even smaller subset of xml)
Pekr:
4-Jan-2010
I like SAX model, because IIRC it allows to work on things in a "streamed" 
way, whereas DOM requires you load everything in memory? Sorry if 
I oversimpilifed it :-) IIRC Doc used such aproach in his Postgress 
SQL driver, in opposite to his mySQL one ...
Dockimbel:
4-Jan-2010
It's a matter of tradeoff, if you only need fast XML document reading, 
SAX is the winner. If you need to modify the document, you need DOM 
(with or without SAX).
james_nak:
11-Oct-2010
Does anyone know if there is a rebol object to xml script. I've got 
xml to rebol objects but now I want to change it back to xml. (and 
I'm lazy)
GrahamC:
11-Oct-2010
Lazy evaluation is useful.. a lazy programmer not so!
Maxim:
12-Oct-2010
I use blocks, although a bit slower to access, they are faster for 
big loads cause thery require less ram and do not required binding 
which is a big issue on large XML blocks.
Maxim:
12-Oct-2010
thx it will improve about once a week.
GrahamC:
13-Oct-2010
this is something I wrote a couple of years back ... maybe it will 
help

obj2xml: func [obj [object!] out [string!]
	/local o
] [
	foreach element next first obj [
		if all [ not function? o: get in obj element o] [
                        ; not a none tag
				repend out [to-tag element]
				either object? o [
					obj2xml o out
				] [
					repend out any [o copy ""]
				]
				repend out [to-tag join "/" element]
		]
	]
	out
]
GrahamC:
13-Oct-2010
If there's a function in the object, it drops it.
GrahamC:
3-Nov-2010
Is John's the only rebol utility that turns a rebol representation 
back into an xml document with attributes?
Maxim:
10-Nov-2010
A question for XML users related to namespaces.


is it possible for a tag's attributes to originate from two different 
namespaces?

ex:
<tag  ns1:attr="data" ns2:other-attr="data">

or even worse:
<tag  ns1:attr="data" ns2:attr="data">


my gut tells me no, but I've been wrong before in this delightfull 
world of XML spec overcomplexification .
Maxim:
10-Nov-2010
FYI, I've just discovered that yes... you can have the same attribute 
several times in a tag so long as the namespace is different.

XML is ... so ... much ... fun....


NOT!
Maxim:
10-Nov-2010
yes, its just pretty complicated to manage two attributes of a tag 
which come from different namespaces... so in the end, what does 
the attribute really mean.
Maxim:
10-Nov-2010
hehe, yes it is similar to advanced word usage in REBOL.  but xml 
isn't really a language in my understanding (interpretation) of the 
word.
Steeve:
10-Nov-2010
just a dialect with a bad messy syntax...
Chris:
23-Nov-2010
Graham, AltXML dom objects have a 'flatten function that renders 
xml.  It preserves namespaces but not whitespace or cdata as cdata 
(though I may do a strict version that does both).
onetom:
30-Apr-2011
just an interesing fact: the Relax NG Compact schema description 
language is a Rebol dialect if i remove the commas from it.
9401 / 6460812345...9394[95] 9697...643644645646647