high-order

Client Side MD5 Hash with Time Salt

I want to salt a hashed username and password (submitted via http POST) in JS on the client-side with a higher-order time value (< 1 minute resolution) to avoid sending the username and password hash as a constant value that could be used for a log-in attempt via POST fabrication by an unauthorized user (i.e. a sniffer). This will impos...

Doing a N-dimensional walk in pure functional ML ?

The idea is to walk over multiple dimensions, each one defined as a range (* lower_bound, upper_bound, number_of_steps *) type range = real * real * int so functions like fun foo y x or fun foo z y x could be applied to the whole square X*Y or cube X*Y*Z. SML/NJ doesn't like my implementation below : test2.sml:7.5-22.6 Error: right-...

Is there a standard name for this function?

What would you name a function that takes a list and a function, and returns True if applying the function to all elements gives the same result? def identical_results(l, func): if len(l) <= 1: return True result = func(l[0]) for el in l[1:]: if func(el) != result: return False return True Is there ...