@Hawkee The link to Account from within the right off canvas nav doesn't work :)
http://hawkee.com/account is a white (blank) page. Just an FYI
Below is a very simple example of how to create a basic websocket using node.js. Websockets are great for maintaining a server/client relationship without as much of the overhead of HTTP web traffic. Today, websockets are used to build a magnitude of browser-based real-time applications (live chats, multiplayer games). Basically it's a persistent connection between the server and client in which both..
Great snippet! However, I might have made this a jQuery plugin instead (since we're in the jQuery section :P). This way you could chain the element while offering other (future) parameters. Consider the following implementation:
$('element').highlightWords({
words: ['keyword1', 'keyword2'],
effect: 'fadeIn'
});
Is there a reason you decided against that route?
This is a simple example using Push and Popstate. This practice is becoming more common throughout sites such as Twitter and Facebook for changing a URL within the address bar without reloading another page. Typically this allows users to bookmark or share URLs when sites are using some type of infinite scroll.
I agree with the "over coding" statement but, this is certainly a good start. I urge looking further into the date() function (specifically the 'M' flag), as your last line could have been
date('M j, Y', $stamp);
Also your suggestion about appending 'ago' will provide undesired results after 24 hours. (ex: May 22, 2013 ago).
Sidenote: I've made a similar function some time ago here, if you'd like a friendly reference :) I hope to see more PHP contributions!
http://www.lighttable.com/ Light Table is a new interactive IDE that lets you modify running programs and embed anything from websites to games.
http://www.csstablegenerator.com/ nice little tool that produces decently written code. Nice little time saver :)
var %version = mIRC Version 7.0
hadd -m ctcp version %version
echo -ae $hget(ctcp, version)
Hash tables are easy to use. Perhaps it's something you should look at a bit more in depth. Also, it's not the compiler's full responsibility. As a developer, it's imperative that you understand the language you're developing in. :)
PS: Please excuse my horrible MSL syntax, haven't touched it in awhile.
@raccoon That's actually an excellent point. However, I would use a hash in lieu of a global variable. Not only are they automatically cleared upon exit but, they're also faster and less resource intensive.
Yup @Hawkee is right. You'll want to make use of variable functions to pull this off correctly :)
@Hawkee Agreed. Many languages are built on top of others :)
@Hawkee I'm not able to scroll to the bottom of this page in Chrome Win7.
http://www.hawkee.com/snippet/7354/
I'm with @Hawkee as well. CLI does provide far more flexibly and you remove the PHP 'middle-man' with things like large SQL files. I've actually used Navicat for years and it's been great. Not only does it provide minimal client-side GUI but, it allows for CLI access. They've had a lite version out since I can remember but, I'm having an issue finding it at the moment. It's a great tool and I would highly recommend it!
@Hawkee On an unrelated note, any update on the firefox/chrome/ie percentages a year and a half later?