|
Treytor posted:Wow, that was easy. Thank you sir!
|
# ¿ Mar 25, 2008 04:16 |
|
|
# ¿ Apr 29, 2024 17:39 |
|
drcru posted:Does anyone have any idea on how to efficiently create a random maze via PHP? A much faster maze generation algorithm is Eller's algorithm. The mazes might not be quite as pretty or have as nice properties, but it is perfect, and it's easy to do efficiently-- I used it to do maze generation in TI-89 BASIC, using only a few single-dimensional arrays and integers. The idea is that you generate and output the maze one line at a time-- there's a good summary at http://www.astrolog.org/labyrnth/algrithm.htm (Ctrl-F Eller) The mazes are pretty good if you tweak it properly. Scaevolus fucked around with this message at 08:49 on Jul 18, 2008 |
# ¿ Jul 18, 2008 08:45 |
|
duz posted:How would you do it otherwise? Python handles this nicely. I think there was a hack somewhere that did reflection to let php do keyword arguments with defaults.
|
# ¿ Aug 15, 2008 21:49 |
|
duz posted:MD5 is very broken, SHA1 is only kind of broken. Are collisions really that big of a problem with password hashing?
|
# ¿ Aug 22, 2008 00:03 |
|
drcru posted:So would you add a salt before and after? If you want to be paranoid-- generate ~16 random bytes for salt hash salt . password do another ~100 rounds of hashing on the result store the salt + hash in the database This will make bruteforcing really slow, and rainbow tables impractical.
|
# ¿ Aug 22, 2008 00:10 |
|
|
# ¿ Apr 29, 2024 17:39 |
|
IT Guy posted:Am I doing this wrong? If you're okay with XHTML instead of HTML, use XMLWriter instead. It's stream-based, so your code ends up looking a lot nicer: php:<? $w=new XMLWriter(); $w->openMemory(); $w->startDocument('1.0','UTF-8'); $w->startElement("root"); $w->writeAttribute("ah", "OK"); $w->text('Wow, it works!'); $w->endElement(); echo $w->outputMemory(true); ?>
|
# ¿ Dec 22, 2011 13:06 |