H3XED
Newer   Page 2 of 5   Older
Nov 3, 2014   Programming
Here is a compact PHP function that you can use to convert two-digit country codes to their corresponding full names in English:
Oct 30, 2014   Programming
If your PHP source files only use a carriage return (\r) and not a carriage return line feed (\r\n) or line feed (\n), then you may run into this error when uploading to an Apache or Nginx server:
Oct 24, 2014   Programming
Since version 23 of Chrome, you can listen for the event onStartup, which will fire each time Chrome is started. If the user closes Chrome and quickly reopens it (before the chrome process has ended), it will still fire off this event when the Chrome window opens up.
Oct 23, 2014   Programming
Use this code to get the number of open Chrome windows. It must be used inside the extension scope, such as on a background or event page. It cannot be used in a content script (though you can pass this information via a message if needed).
Sep 22, 2014   Programming   Comments (1)
This JavaScript minifier removes all line breaks, tabs, comments, trailing semi-colons, and any unnecessary spaces. It performs no sorting or compressing, so it won't have any impact on how your JavaScript executes.
Aug 16, 2014   Programming
If you've ever tried to include an XML file using the PHP include statement, you may have ran into a compile error or it may simply not work. This is very likely because the XML file starts with the characters <? and the include statement is trying to parse it as PHP.
Aug 4, 2014   Programming
If you use Magento CE (Community Edition) M2E Pro extension to list and sync items with eBay, and your product descriptions contain HTML, you may find that it automatically adds in extra break and paragraph tags (<br /> and <p>). This can be very frustrating if you've already taken care of the breaks and paragraphs in HTML. Thankfully you can fix this functionality with a quick edit to an M2E Pro source PHP file.
Jun 20, 2014   Programming
Enter a string to generate the hash of. This will return the MD5, SHA1, SHA256, and SHA512 hashes.
May 19, 2014   Programming
Magento Community Edition does not have a convenient maintenance mode and the "maintenance.flag" file method is too heavy-handed. You may want to put the store into maintenance mode but still give yourself access. Here is a quick and dirty way to do it using PHP.
Feb 18, 2014   Programming
If your JavaScript Canvas game suffers from intermittent stuttering, it may be the result of garbage collection. A lot of games utilize particles, bullets, and other objects that are created rapidly and then discarded. Storing these unused items in a pool, and then drawing from that pool the next time you need one, is one way to reduce stuttering and improve performance.
Feb 18, 2014   Programming   Comments (2)
Firefox and Chrome use two different JavaScript events for the mouse wheel, and the delta attribute is under a different name in each. Fortunately, there is a simple work-around that will be sufficient in most situations:
Feb 16, 2014   Programming
If the user has scrolled the page that your canvas game is on, or used the browser zoom feature, it can mess up the accurate calculation of the mouse position. An easy solution is to use the getBoundingClientRect method of the canvas object. This returns a rectangle object that gives you the current offset of the canvas relative to the page.
Newer   Page 2 of 5   Older
Follow H3XED
Twitter RSS
Follow H3XED
Twitter RSS
H3XED © Nick Vogt   RSS   Policies   Twitter