H3XED
Newer   Page 3 of 5   Older
Jan 13, 2014   Programming
I was inspired by this blog post by Emanuele Feronato about making a sub-2KB Roguelike Flash game. Using his game as inspiration, I decided to try it out. I used BitmapData to display the game objects instead of TextField and ended up getting it down to 1649 bytes. The game rules are very similar, though it is programmed from scratch. The result is embedded below:
Apr 17, 2013   Programming   Comments (1)
PHPRecently I was curious about the performance (in terms of access and assignment time) between class static attributes, object attributes, and array elements. Say if you're wanting to store some information that is accessed regularly, and want to know which method is the fastest.
Mar 4, 2013   Programming
PHPLogging PHP errors and warnings is important on both your production and development servers. Often times these messages go unnoticed, even if you have display_errors on.

To start logging errors, open up your php.ini file. Scroll down to or search for the line that has the error_log variable. It will probably look like one of these:
Aug 2, 2012   Programming
ActionScript 3With Flash version 10, Adobe added the Vector class, which is similar to an Array but more strict. Each Vector can only contain data of the same type and its data type must be declared during instantiation. I'm not going to go over the syntax to use Vectors in this post, but they are very similar to Arrays and have a lot of the same methods and properties.
Jul 17, 2012   Programming
ActionScript 3If you're unfamiliar with object pooling, it is a way to speed up processing time by keeping objects in memory and reusing them, instead of always instantiating new ones and garbage collecting them.

This example uses package and custom class syntax. If you are unfamiliar with these, see my introduction to package and classes post.
May 20, 2012   Programming
There are two common methods to determine if a property/attribute/variable of some object exists. Both use the property name as a string and neither rely on checking for an error report.
May 20, 2012   Programming   Comments (1)
This error is often caused by the accidental use of a colon (:) to terminate a statement instead of a semi-colon (;). The error report should give you the error location.
Apr 5, 2012   Programming
Ternary is a short way to write if/else condition checks on a single line, and allows you to perform condition checks inline with variable assignments and more.
Apr 5, 2012   Programming
The information in this post is outdated. Please use PDO with real (non-emulated) prepared statments to properly prevent MySQL injection.

Any data that comes from the client-side needs to be properly validated and escaped before using. This is extra important if you're using that data to form part of a database query. Always assume that your users will try to input incorrect information and special characters into fields, and do not rely on HTML or JavaScript to prevent this.
Apr 5, 2012   Programming
PHP is a fairly loose programming language, which causes many new developers (and experienced ones) to get lazy. If you suppress errors, you can get away with ridiculous things like using undefined variables, without anyone being the wiser. But just because you can get away with it, doesn't mean you should.
Apr 1, 2012   Programming
When comparing two values against each other, it is common to use the "equals" operator (==), and this is fine as long as you have control over the values that are being compared. But what if you're comparing user input against a value, such as in a sign-in script or captcha? Using the equals operator can potentially leave you open for security issues, since PHP handles comparisons between different data types non-intuitively.
Mar 23, 2012   Programming
Using PHP, you can change the whole site or redirect users to a different site when they browse from a mobile device, or just change the CSS.
Newer   Page 3 of 5   Older
Follow H3XED
Twitter RSS
Follow H3XED
Twitter RSS
H3XED © Nick Vogt   RSS   Policies   Twitter