Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
KaeseEs
Feb 23, 2007

by Fragmaster
e: this was some very wrong information, ignore

KaeseEs fucked around with this message at 12:22 on Mar 5, 2008

Adbot
ADBOT LOVES YOU

KaeseEs
Feb 23, 2007

by Fragmaster
No. Wolf3d used 'ray-casting' to figure out how to scale 2d sprites in a 2.5d world; this involved (very roughly) shooting one ray per horizontal pixel on the screen (on period hardware, this would be between 320 and 640 rays), seeing when it hit something, and drawing the appropriate sprite(s) at the correct scale for the depth at which the ray hit. This is nowhere near as computationally intense as real raytracing.

KaeseEs
Feb 23, 2007

by Fragmaster
POSIX defines both basic (used by grep) and extended (used by egrep) regular expressions (you can check regex(3) for the functions and regex(7) for more info, but the web is your best bet for these). As you would guess, POSIX regexes are portable to anything nixy.

Perl-compatible regular expressions, on the other hand, are the de facto standard for modern languages, and are your best bet for cross-platform portability.


A (huge) guide to regex compatability (in terms of whether things are implemented, differences are even harder to track 'well') between languages and frameworks can be found at http://www.regular-expressions.info/refflavors.html (scroll down a little for megatable).

KaeseEs
Feb 23, 2007

by Fragmaster

ryo posted:

How is PHP's security when it comes to MySQL statements?
If I have a form that has has a text field on it, and I insert the value from it into a MySQL table, is it possible for someone to add malicious things into the text or will PHP protect you from this?

Just don't rely on any sort of escaping mechanism; there's a lot of PHP tutorials out there (including those on php.net) that recommend the use of obsolete or insecure functions to prevent SQL injection. Here's a helpful list of bad ideas:
  • magic quotes [really bad]
  • addslashes()/stripslashes() [really bad]
  • mysql_escape_string() [really bad]
  • mysql_real_escape_string() [if you must use escaping do this]

What you actually want to use to prevent SQL injection is a prepared (sometimes called 'parameterized') query, which you can do by using the MySqlI ('improved') library of PHP5. There's a nice overview here, and some simple examples here.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply