@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2



Comments:

<0> LOL
<1> ok ok, ill quite while im on top
<2> I suppose just convert everything to ascii characters and sum them and then modulus them
<1> time to do the dishes
<3> hest: #1317 (285 clicks) Tcl: 01:47
<2> ascii values rather
<0> hf hest
<0> well KuNgFo0, as previously stated, unless I can come up with a reliable algo. its easy to generate duplicates
<0> let me paste my awarded statement



<0> (th3dge) ya cuz abc will have same value as bca
<2> here's your probably, you're going to run out of possible combinations with only a 4 digit number
<0> true
<2> problem rather
<0> so I guess I will have to go with an 8 digit crc hash
<0> well 8 chars long
<0> :)
<4> crc is only meant to check if a specific file has been altered or not
<2> if you have a string of a URL, so it could contain say 26 letters, 10 numbers, / : ? and % symbols ... that's like 40 different possible values per character
<4> it's not for checking if something is unique compared to alot of other things
<2> and a 40 character string will give you 40^40 different possible combinations
<0> I see pixelz, but I think its quite reliable ain't it?
<4> not if it's supposed to protect against intentional altering
<4> hmm
<4> you could use elf32 perhaps
<4> it's only 32 bit
<0> well its only used for strings
<0> what if I just do
<0> value of ascii char + place in string
<0> that would be reliable right
<0> but I think it iwll reach at least 4 numbers
<0> on the avarage string
<0> what if I crc32 first
<0> lol
<2> what will you be using these numbers for?
<0> id's
<5> it is the nature of any hash algorithm to try to minimize collisions, i.e. same hash value for different data, but none can avoid them completely
<2> why don't you just use a simple database
<0> would I go through all this trouble if a database was an option? lol
<2> maybe?:)
<4> can't you just have a text file as a database?
<0> naw
<0> not trying to look for work-arounds
<6> mm
<6> what does
<6> wrong # args: should be "for start test next command"



<6> mean?!
<4> by the way, how does this calculated id help accessing the correct data?
<5> it should be logical that the smaller the hash value compared to the input data the more chances of collisions
<0> I know heidel
<5> if collisions arent that big a deal to you (i.e. if the information you retrieve doesnt always need to be 100% correct) or if the hashed data is very small, then yea, you could use a hash as an "identifier"
<5> it always depends on what you are going to use it for
<0> yep
<4> I don't understand how exactly having an id you can calculate really helps, you still have to store it somewhere, yes?
<4> or else you have to calculate the id of each and every whatever it is every time someone accesses the page
<4> perhaps I'm missing something
<0> yeah its runtime
<0> folder browsing
<4> then just storing it in a textfile sounds way better :p
<0> well as long as its feasable I want to do as much at runtime
<4> can't you use the filename as an identifier?
<0> naw
<4> an id is kind of useless unless you have some kind of data to go along with it..
<0> well I think I solved it
<0> calculating the ascii value of every character adding up the index of the char in the string seems to work fine :)
<0> what do you think of that method heidel
<0> I dont think it will give me lots of collisions
<0> as long as every char has a diff ascii value, and I think they do
<0> it iwll just return a very large number, if you use it on large strings .. but that wont be a problem
<0> ugh it just gave me a collision LOL
<0> fook this
<5> to be frank, i'm not a mathematician, but your algorithm seems foolish
<0> it almost worked fine
<0> blood in blood out
<7> seriously
<7> you need to lessen the use of the preteen-cs-LOL-attitude, th3dge
<0> hest get back to the dishes, your not slacking are you?
<7> im all done
<7> effective
<0> you need to lessen your habit of breathing
<7> and im not having fun no more
<1> upvar ?
<3> upvar -> http://Tcl.Tk/man/tcl8.5/TclCmd/upvar.htm
<8> upvar -> http://www.tcl.tk/man/tcl8.4/TclCmd/upvar.htm
<0> upskirt ?
<0> oops
<1> ;>


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #tcl
or
Go to some related logs:

lawn morde
#beginner
Shay Bekman
rascal999
#politics
dhcpd.conf expecting a declaration host
#windowsxp
#hardware
#windows
#politics



Home  |  disclaimer  |  contact  |  submit quotes