Search results

  1. Magentix

    Recommended Languages for Web Development

    Ready to use: you install it and it works
  2. Magentix

    Recommended Languages for Web Development

    Why don't you use an out-of-the-box solution like phpBB?
  3. Magentix

    How to store Images in Database

    Yes that is correct. Check this for an example: http://stackoverflow.com/questions/6048600/save-image-as-a-blob-type
  4. Magentix

    How to store Images in Database

    Save it as a blob. Although the preferred way is to save it on disk and then link to that in your db.
  5. Magentix

    How to allow Unity3D to communicate with mySQL

    From what I understand, you shouldn't connect through Unity3D because people could then get hold of your DB credentials. Here's some information on how to do it more safely: http://wiki.unity3d.com/index.php?title=Server_Side_Highscores
  6. Magentix

    Weird margin due to Lists? :s

    Unordered lists have a top and bottom margin of 1em by default. Elements within the flow of a same formatting context have collapsing margins. To prevent this, you could give your header (the big blue one) a bottom border of 1px in the same color as your page background and remove the 1px...
  7. Magentix

    Lighttpd rewrite messes up template

    Exclude with the -f and -d flag so it won't rewrite URLs that actually lead to a file or directory
  8. Magentix

    can this jquery code be simplified?

    $(function(){ $(".clickables").children('li').click(function() { var that = $(this) $('.showables').children('div').hide(); $('.' + that.attr('class').substr(5)).fadeIn(); $(".clickables").children('li').css({"color":"#ffffff","background":"#333333"})...
  9. Magentix

    Greasemonkey help with remote xml using jquery

    XHRs are subject to the Same Origin-policy. Unless you enabled Cross-Origin Resource Sharing on the remote host, it's only natural you're not receiving any data.
  10. Magentix

    [Javascript]Reference/pointer/value?

    First of all: the book I referred to is considered to be the JavaScript bible by many professionals. Secondly: Not everything in JavaScript is an object. Just because you can call a method on an integer (for example), doesn't mean it's an object. All it means is that ECMAScript is smart enough...
  11. Magentix

    IP Logging

    Seems short circuiting is less lenient in PHP than in JavaScript. What I said about operator precedence remains true though: Because the '=' operator precedes 'or', you could still get nasty "bugs". A sidenote that may be interesting in this thread: Assignments in PHP "return" the truthy or...
  12. Magentix

    [Javascript]Reference/pointer/value?

    This is false. JavaScript (or ECMAScript) has Primitive Types and Reference Types. As for private properties or methods: they are supported in ECMAScript 5 but, for now, all you can do is simulate them. The reason I say simulate, is because the private/protected/public bits get complicated as...
  13. Magentix

    IP Logging

    If you're going to use 'or' like that, you may as well stick to your original if-statements.. If you want to use short-circuiting, the only sane way to do it is using '||'
  14. Magentix

    IP Logging

    || has higher precedence than 'or' and is easily interchangeable with binary operators such as 'binary or' (|). Edit: using a literal 'or' will actually result in failures, seeing as '=' has higher precedence than 'or', but not '||'.
  15. Magentix

    IP Logging

    That would, as GTU said, cause notices if the array key doesn't exist. You could, however, suppress those notices and use the code below. $ip = @$_SERVER['HTTP_CLIENT_IP'] || @$_SERVER['HTTP_X_FORWARDED_FOR'] || @$_SERVER['REMOTE_ADDR']; For more info, see...
  16. Magentix

    What's Your Favorite Editor?

    Notepad++ for local/FTP development VIM on Linux boxes that have no FTP or for editing/viewing other files such as httpd.conf, logs, ... For NPP, I use the ZenCoding and Explorer plug-ins Edit: My 1000th post :o
  17. Magentix

    Free web hosting with apache logs

    Serve a php file as an image and use a database/log for tracking?
  18. Magentix

    Dynamic File Permissions

    You could make a folder unreadable by world and use php's readfile() along with header() to output the images when someone's allowed to view them.
  19. Magentix

    Useful Links for Webmaster Help

    I use this as well. Can only recommend it for its user friendly setup and the fact that it comes with the latest Apache / MySQL / PHP releases.
  20. Magentix

    How to prevent recursiveness in a tree

    Sweet, I'll look into this tomorrow. <3
Top