jim mcbeath

Java NIO for Writing

Using Java NIO non-blocking IO for writing as well as reading is almost - but not quite - straightforward. Contents Background Implementation Two Selectors Close Summary Background One of the limitations pointed out in the Limitations section of the original post in this series was that we were still directly writing our output data to the socket rather than using non-blocking IO and continuations as we were doing when reading...

sitepoint.com sitepoint.com

Easy Ajax with jQuery

This article was written in 2011 and remains one of our most popular posts. If you’re keen to learn more about jQuery, you may find this recent article on jQuery 1.9 of great interest. Ajax is changing web applications, giving them a responsiveness that’s unheard of beyond the desktop. But behind all the hype, there’s not much to Ajax — HTML, JavaScript, and XML are nothing new, and in this tutorial, I’ll...

sitepoint.com sitepoint.com

JavaScript Detect Mobile Browser Type

JavaScript code snippet to detect if a user is viewing the website using a mobile device and what mobile browser they are using. It’s helpful to detect browser version as there are hundreds of mobile devices out there but not as many browsers. Here is a JavaScript function that may help you. // Browser Detection Javascript function whichBrs() { var agt=navigator.userAgent.toLowerCase(); if (agt.indexOf("opera") != -1) return...

jaxenter.com jaxenter.com

Twitter Switch from Ruby-on-Rails to Java

PLUS, GNOME 3.0 is here, and GlassFish kick off version 3.2. Apache Tomcat 7.0.12 Adds Windows Authentication Support Version 7.0.12 of Apache Tomcat has been released, with initial support for Windows authentication. Optional support for pre-emptive authentication has also been added, and Tomcat 7.0.12 provides a configuration option for defining a close method to call on a JNDI resource when it’s no...

blog.cloudflare.com blog.cloudflare.com

The CloudFlare Drupal Extension

A Drupal developer, Brian Stevenson, recently created a CloudFlare Drupal extension that will help Drupal site owners get the original visitor IP at the Drupal level. Some common FAQs about the CloudFlare Drupal Extension: What does the Drupal extension do? The extension restores the original visitor IP at the Drupal level. Before the extension was available, your logs would reflect CloudFlare's proxy IP addresses. Where can I find...