background preloader

Pusher - Realtime client push powered by HTML5 websockets, beyond AJAX

Pusher - Realtime client push powered by HTML5 websockets, beyond AJAX

http://pusher.com/

Start Using HTML5 WebSockets Today One of the coolest new features of HTML5 is WebSockets, which let us talk to the server without using AJAX requests. In this tutorial, we'll review the process of running a WebSocket server in PHP, and then building a client to send and receive messages to it over the WebSocket protocol. What are WebSockets? WebSockets is a technique for two-way communication over one (TCP) socket, a type of PUSH technology. At the moment, it's still being standardized by the W3C; however, the latest versions of Chrome and Safari have support for WebSockets. Efficient substring searching There are many times when programmers need to search for a substring, for example when parsing text. This is commonly referred to as searching for a needle (substring) in a haystack (the string to search in). The most straightforward way to do this is by using search functions that your language provides: C: strchr()/memchr(), strstr()/memmem()C++: string::find()Ruby: String#index or regular expressionsPython: string.find() or regular expressions However those functions are usually implemented in a naive way. They usually go through every index in the haystack and try to compare the substring at that index with the given needle.

Khan Academy API · Khan/khan-api Wiki The Khan Academy API gives developers access to nearly all types of Khan Academy data via a RESTful API that outputs easy-to-parse JSON. Overview At the highest levels, the API will give you information about Every Playlist. You can use the titles of each playlist to discover the videos within individual playlists (i.e. 5lide: HTML5-based Slides Maker At last week's GTUG campout, a 3-day long HTML5 hackathon, I signed up to be a TA for the weekend. That meant I spent most of my time wandering around answering random questions and helping developers debug their hacks. But, I can't be surrounded by a bunch of people hacking on cool shit and not join in myself -- it's just way too tempting. So, on Friday night, after coming home from the pitches and discovering that drinking 2 Dr.

Create UML diagrams online in seconds, no special tools needed. Actor Actor and Use Case Notes Developer Docs Authentication All Clever API calls must be authenticated using API tokens. Specifically, OAuth 2.0 bearer tokens. API Tokens Clever uses token-based authentication because it offers numerous benefits over key-based authentication. Ordering CSS3 Properties When writing CSS3 properties, the modern wisdom is to list the "real" property last and the vendor prefixes first: Why is this method of ordering properties so commonly taught? Here is what it would look like "the wrong way": Even doing it "the wrong way", won't the border radius be the same no matter what, forever?

Software Development AntiPatterns Good software structure is essential for system extension and maintenance. Software development is a chaotic activity, therefore the implemented structure of systems tends to stray from the planned structure as determined by architecture, analysis, and design. Software refactoring is an effective approach for improving software structure. The resulting structure does not have to resemble the original planned structure. The structure changes because programmers learn constraints and approaches that alter the context of the coded solutions.

Sample Source Code Sample source code to find LBS parameters Find LBS Information - To find a location of the mobile device without GPS, you only need the following four parameters from your mobile device MCC - Mobile Country Code MNC - Mobile Network Code LAC - Locale Area Code Cell ID - Value of the Cell ID Your mobile application can easily obtain this information from the mobile device using well-documented APIs published by respective device manufacturers. location.hash is dead. Long live HTML5 pushState! For a long time, location.hash was a way for AJAX applications to get back button and bookmarking support, and libraries like jQuery BBQ from Ben Alman made dealing with it cross browser a cinch. Now, with HTML5 coming of age, there is a new feature that aims to replace the use of location.hash with a better solution: pushState. Over on the Spoiled Milk blog, Jamie Appleseed describes the API as “a way to change the URL displayed in the browser through JavaScript without reloading the page.” It works on the history object like this: window.history.pushState(data, "Title", "/new-url");

Related:  Backend Svcs