DJB hash function

When I searched for a good hash function for strings, I came across DJB
hash function and found it serving my purpose. I wanted to use that,
but I was unaware of the licensing/copyright issues. I sent a mail to
DJB reg. this, but didn't get any reply.
The info. i got is that DJB posted the hash function first to
Comp.lang.c. Please find below the mail I sent to DJB. Let me know
whether I can use it in my propreitary code.


------------------------------------------------------------------
DJB,

When I was searching for a good hash function for strings, I came to
know about djb2 hash function (written by you a long back) and used by
you in cdb. I tested it and found it has excellent distribution and
speed. I want to use it.

I couldn't find any license info. Please let me know whether I can use
the hash algorithm in proprietary code or any licensing issues
involved.

Thanks for your time.

-------------------------------------------------------------------

Thanks,

0
5/20/2005 4:31:44 AM
comp.lang.c 29938 articles. 0 followers. spinoza1111 (3247) is leader. Post Follow

1 Replies
367 Views

Similar Articles

[PageSpeed] 50
sureshjayaram@gmail.com wrote:
> When I searched for a good hash function for strings, I came across
DJB
> hash function and found it serving my purpose. I wanted to use that,
> but I was unaware of the licensing/copyright issues. I sent a mail to
> DJB reg. this, but didn't get any reply.
> The info. i got is that DJB posted the hash function first to
> Comp.lang.c. Please find below the mail I sent to DJB. Let me know
> whether I can use it in my propreitary code.
<snip>

That's between you and him.  It's offtopic in comp.lang.c.  If you need
to search comp.lang.c archives, use Google Groups.


Mark F. Haigh
mfhaigh@sbcglobal.net

0
mfhaigh (154)
5/20/2005 8:21:08 AM
Reply:
Similar Artilces:

Hyperbolic function identity
Why FullSimplify[ArcCosh[1+z^2/2]-2*ArcSinh[z/2],z>0]; does not evaluate to 0? On 28 Sep 2004, at 13:58, Carlos Felippa wrote: > Why > > FullSimplify[ArcCosh[1+z^2/2]-2*ArcSinh[z/2],z>0]; > > does not evaluate to 0? > > This works. FullSimplify[TrigToExp[ArcCosh[1 + z^2/2] - 2*ArcSinh[z/2]], z > 0] 0 I think TrigToExp is already among the functions that FullSimplify uses and indeed this does not help: FullSimplify[ArcCosh[1 + z^2/2] - 2*ArcSinh[z/2], z > 0, TransformationFunctions -> {Automatic, TrigToExp...

iMac USB not functioning
I just bought an older iMac from a thrift store and it was working when I bought it. It booted up once but one of the two USB ports is broken and the other isn't working because I can't get a response when I plug in a keyboard or mouse. I was wondering if the USB ports are easily replaceable. I can't figure out how to open up the case. Also, I was wondering if I can somehow use one of the firewire ports to use the keyboard. I don't want to spend a lot of money on this. I noticed when it first booted up, I smelled something burning on the keyboard. I hope something isn&#...

iif Function in query criteria
Built a form based on a select query with a combo box (3 choices) in the form header which will supply a value to the query. In the query's criteria I added the following expression - [Forms]![Form_1]! [Combo_1] and this works like a charm. However one of my users wanted to see all of the values before choosing one of the three selections. I added the choice "All" to my combo dropdown list and tried the following iif statement as the criteria: iff([Forms]![Form_1]![Combo_1]="All",Like "*",[Forms]![Form_1]! [Combo_1]) My original 3 choices still work but n...

Walking a hash table created by hcreate_r()/hsearch_r() ?
Any one knows how to walk or in other words print all the key/value pairs in a hash table created by hcreate_r()? I have added the elements of the hash table using the function hsearch_r(). I am not sure how to access all the elements. Thank you in advance! Andy "Andy" <a_karasaridis@hotmail.com> wrote in message news:ac0823bd.0411052100.7af2a22a@posting.google.com... > Any one knows how to walk or in other words print all > the key/value pairs in a hash table created by > hcreate_r()? I have added the elements of the hash > table using the function hsearch_r(...

PHPDev5 | Mail Function
Hi All, I am using PHPDev5 for learning php, while trying to using php mail function on local machine I could not get successful. Does it require some extra settings I am using PHPDev on Win XP Please reply. You are also requested to provide any free ebook available for php troubleshooting. Regards, Tarun Bansal > I am using PHPDev5 for learning php, while trying to using php mail > function on local machine I could not get successful. > Does it require some extra settings Please read the manual first. PHP's manual is rather a good one. If you type "mail" in the ...

Embedded Functions in MATLAB with MPC555
Hi Fellow MATLABers, In an embedded function is it possible to send an output back to its input? In the block diagram, I wired the block inchar to out_char_array. I recieve the following error at compilation.... Embedded MATLAB Interface Error: Port width mismatch. Input "inchar"(#23) expects a scalar. The signal is a one dimensional vector with 4 elements. Any help would be appreciated. Thanks, Jeff Alstadt Automotive Competence Center Heilbronn University of Applied Sciences Code- function [out_char_array,lenkwinkel_out] =3D fcn(inchar,incom_char) % This block suppor...

MATLAB 7 and IP toolbox functions
I tried to run my code in MATLAB 7 and it gives this weird errors, for e.g. >> x=imread('agr134.jpg') ??? Attempt to execute SCRIPT persistent as a function. Error in ==> imformats at 68 persistent fmts; Error in ==> imagesci/private/imftype at 33 fmt_s = imformats(extension); Error in ==> imread at 242 format = imftype(filename); Now this code works fine in 6.5, has anyone seen this with 7.0? Thanks, Pushkar "Pushkar Pradhan" <pushkar@gri.msstate.edu> wrote in message news:40E89A17.2060109@gri.msstate.edu... > I tried to run my code ...

Does Informix-SQL have Perl-like functions?
Greetings, Apologies if this has been answered before. Does Informix-SQL have functions such as Perl's 'split'. We have a field which contains data delimited by "-" (dashes); the data is of variable length so we can't use field1[x,x] types of approaches. Any help in this regard would be appreciated. Thanks in advance. Max Pyziur pyz@brama.com "Professor Bruno" <pyz@panix.com> wrote in message news:bijd3j$mh8$1@reader2.panix.com... > Greetings, > > Apologies if this has been answered before. > > Does Info...

String function to delete characters
Hi all, Do we have a string function in RUBY to delete 1st 3 characters or last 3 character or 3 characters in middle from the string. Ex: user = aaaPrasadxxxPrasadxxx from above string "user" I want to delete 1st characters "aaa" In the same way I want to delete last 3 characters "xxx" and , need to delete middle 3 characters "xxx" to delete last 3 character & 1st 3 characters, i have used code as below; user = user.chop.chop.chop user = user.reverse.chop.chop.chop.reverse Other than this do we have any other...

RE: Names for modules and functions
Jeff Wagner wrote: > This just might be the weirdest question you have heard yet=20 > but what is a good way to come up with > names for modules, function, etc.? >=20 > So, are there any guidelines? Some of the answers are in PEP 8: http://www.python.org/peps/pep-0008.html > Also, is it ok to name a module and function the same? >=20 > --- EnterName.py --- > def EnterName(): > ... > --- End --- Also in PEP 8: "Modules that export a single class (or a number of closely related classes, plus some additional support) are often named in CapWords, with ...

block returns and hash element returns
A question and a thought (or two). Is there a way to return from a block without returning from the whole method? Eg. # This behavior def double_collect( array ) array.collect { |v| v*2 } end # Nope, returns from double_collect def double_collect( array ) array.collect { |v| return v*2 } end # Nope, returns only first iteration def double_collect( array ) array.collect { |v| break v*2 } end Would something like #local_return be useful? The reason I ask is b/c I was also thinking about a possbile special form of 'return' that can handle hash assocatio...

random function
Hello, first I have to say, my english isn't very well so just try to understand it ;-). I've got a little problem with the PHP function rand(). I want to create a little programm which simulate a "roulette" game (you know this stupid game you can play in a casino :) ). But it is impossible to simulate such a game with a simple rand() function. Of course I initilize the random generator with the program start, with srand(). But fact is, that, in a roulette game, the probability for each game is the same (for example: 1/37 for a simple number like '4' or '28'...

undefined function while retrieving data with excel (in dutch and in english)
NEDERLANDS: Hallo, Ik heb eigen functies gemaakt in access, die werken perfect in de access query. Zodra ik echter vanuit excel een draaitabel maakt naar de access query (als een externe database) krijg ik de foutmelding dat er een 'ongedefinieerde functie' in de access database aanwezig is. Kan iemand mij op weg helpen dit probleem op te lossen? Alvast bedankt voor de reactie, Dick In ENGLISH: Hallo, I made some functions in Access, they work fine in Access (Query's and so on). When I want to retrieve the data with Excel in a pivot table (Access as a foreign database), I get...

Map and functional constructs to replace iterative statements
I have begun to replace Table, Do, While, or For, but in my thinking with Map, Inner, Outer and other functional programming constructs as I learn more about Mathematica. But, I'm stuck. I need to figure out how to use Map (or some related approach) when a function needs both a current value and a previous value in a time series, such as a percentage change function (or perhaps more generally stated, when I need to refer to previous values in a series or even previous calculations). But first a simple case: percentChange[currentValue_, previousValue_] := 100 * ( currentValue - prev...

class hash not available (once again)
class hash not available (once again) Yes I've read the FAQ. Time to upgrade Sendmail with the latest CERT advisory... I'm currently running 8.12.11 with no problems. It compiles with the NEWDB support. I copy over my devtools/Site/site.config.m4 from the Sendmail 8.12.11 directory to the same directory under the Sendmail 8.13.6 folder, and here it is; ==================================== dnl Berkeley DB APPENDDEF(`confENVDEF', `-DNEWDB') APPENDDEF(`confLIBS', `-lpthread -ldb') PREPENDDEF(`confINCDIRS', `-I/usr/local/BerkeleyDB....

Functions Mapping
Suppose I have a list of operators {Sin, Cos}, and a list of variables {x,y}, I want to apply {Sin,Cos} on {x,y}, and the outcome to be {{Sin[x],Sin[y]},{Cos[x],Cos[y]}} I can achieve this by using Table function with a temporary counter i. But is there any way to do this without using temporary counters? Thanks, XJ >>How about these? >>myF[x_]:={Sin[x],Cos[x]} >>Thread[myF[{x,y}]] >>or just >>{Sin[#],Cos[#]}&/@{x,y} >>which is the same as >>Map[{Cos[#],Sin[#]}&,{x,y}] Ya, it works. But can I just treat Sin,...

Is there any function for solving difference equation
Hi, May I know whether Matlab provides any functions for solving a difference equation ? Thank a lot ! -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ Yes, that is possible since basically every method of solving ODEs amounts to approximating the continuous problem by a discrete one. Could you give a simple example of what you'd like to solve? Greg Wilson wrote: > > > Hi, > May I know whether Matlab provides any functions for solving a > difference > equation ? Thank a lot ! > > -- > Using Opera's revolutionary e-mail cl...

Iterating over a hash of hash of hashes
Is there a more "rubyesque" idiom for iterating of a multi-dimensional hash other than the following: workq_dev.get_all_zapps.each do |k,v| print "#{k} ==> " v.each do |k,v| puts "#{k} ==> " puts v.class v.each { |k,v| puts "#{k} ==> #{v}" } end end thanks in advance! -- Posted via http://www.ruby-forum.com/. ...

function set packet capture promisc mode in linux?
are there one function can set packet capture to promisc mode in linux library?? how can i get current vaild NIC in c programming with linux? Xend wrote: > are there one function can set packet capture to promisc mode in linux > library?? man 7 packet tells you most of the story. > how can i get current vaild NIC in c programming with linux? If you want to get, e.g. "eth0", then parse the output of "ifconfig -s" Robert ...

Re: Holiday Fun with Functions
> From: Terjeson, Mark > Hello All, 1 Hello All, ----- 180 ERROR 180-322: Statement is not valid or it is used out of proper order. > Yes, this is a repeat performance > from the 1990's and 2002, > but a little fun shouldn't hurt. :o) you are such a geek! even when my cut&paste is too enthusiastic! Ron Fehd the cut&paste? Oh! Always! macro maven CDC Atlanta GA USA RJF2 at cdc dot gov ...

Hash tables
I dont know how can I store and recover data to/from a hash table which values are arrays. Is it OK? my %data = (); my @attributes = (); for($counter=1;$counter<@field;$counter++){ $attr = <DB>; push(@attributes, $attr); } $data{$node} = @attributes; $node = <DB>; } I cant recover the values stored in the hash table Guillermo wrote: > I dont know how can I store and recover data to/from a hash table > which values are arrays. perldoc perlreftut perldoc perlref I don't understand what the code you posted is supposed to do, but I noticed that you tr...

Sorting hash of hashes #2
I have a hash of hashes containing sales orders. The hash is structured (as below) order number -> line number -> item info. The dump of the data below is edited for brevity, there are at least half a dozen other fields at the bottom level of the hash. I'm trying to sort the orders by order number and then line number so that I can output them in the order they have been received - how our customer would expect to see them. My first sort appears to work OK, but the second level of sorting fails. I'm missing something simple here, I'm sure, can someone remind me please? ...

Sql FIRST function
Is there some sort of equivalent in proc SQL for the FIRST function? (In non-SAS SQL, this function enables you to get the first value of a variable when using a 'group by' function). Essentially, what I want to accomplish is this: Take this dataset: id vizperiod name viztotal 1 qtr1 Bob 3 1 qtr1 Robert 4 3 qtr1 Jim 2 3 qtr1 James 3 Turn in into this: 1 qtr1 Bob 7 3 qtr1 Jim 5 The ideal SQL would be something like this: proc sql; select id, vizperiod, first(name), sum(vizto...

FAQ Topic
----------------------------------------------------------------------- FAQ Topic - What is (function(){ /*...*/ })() ? ----------------------------------------------------------------------- This is an anonymous FunctionExpression that is called immediately after creation. Variables declared inside a function are not accessible from outside the function. This can be useful, for example, to hide implementation details or to avoid polluting the global scope. <URL: http://yura.thinkweb2.com/named-function-expressions/> <URL: http://jibbering.com/faq/notes/closures/> <URL: http:...

date/time functions
i have a field in my database for entering the time at which a task was undertaken. i want to set up another field within the table that automatically enters the hour value of the time. Is this possible and if so how is it done. thanks in advance for any help Stephen I recommend against doing what you ask. You can calculate the hour from the time whenever you need it in a query, form, or report. It is much easier to do this than to update the hour all of the time to make sure it stays accurate. Also, it prevents duplicate data storage (you already have the hour information in the ful...