Any reason not to start using the HTML 5 doctype?

Any reason not to start using the HTML 5 doctype?

It is supposed to be backwards compatible with HTML4 and XHTML. John Resig posted about some of the benefits.As long as we don't use any of the new and not supported yet features, would there be any d…


javascript - Safely turning a JSON string into an object

Given a string of JSON data, how can you safely turn that string into a JavaScript object? Obviously you can do this unsafely with something like... var obj=eval("("+json+')');...but that leav…


ios - What#defines are set up by Xcode when compiling for iPhone

I'm writing some semi-portable code and want to be able to detect when I'm compiling for iPhone. So I want something like#ifdef IPHONE_SDK.... Presumably Xcode defines something, but I can't see any…


java - Testing onbeforeunload events from Selenium

I'm trying to write a Selenium test for a web page that uses an onbeforeunload event to prompt the user before leaving. Selenium doesn't seem to recognize the confirmation dialog that comes up, or to…



How to JSON decode array elements in JavaScript?

I have a JavaScript array that, among others, contains a URL. If I try to simply put the URL in the page(the array is in a project involving the Yahoo! Maps API) it shows the URL as it should be. Bu…


java - Why can't I use a type argument in a type parameter with multiple bounds?

So, I understand that the following doesn't work, but why doesn't it work? interface Adapter<E>{} class Adaptulator<I>{<E, A extends I & Adapter<E>> void add(Class<E> extl, Class<A> intl){…


How can I recover files from a corrupted.tar.gz archive?

I have a large number of files in a.tar.gz archive. Checking the file type with the command file SMS.tar.gz gives the response gzip compressed data-deflate method,max compression When I try t…


php - Elegant way to search for UTF-8 files with BOM?

For debugging purposes, I need to recursively search a directory for all files which start with a UTF-8 byte order mark(BOM). My current solution is a simple shell script: find-type f | while read f…


asp.net - Sys.WebForms.PageRequestManagerServerErrorException 12031

I'm occasionaly getting the following popup from an AJAX.NET application Sys.WebForms.PageRequestManagerServerErrorException: An Unknown error occurred while processing the request on the server. The…


HTML 5 versus XHTML 1.0 Transitional?

It seems that HTML 5 is going to be supported(partially) by Firefox 3.1 and other browsers. It is adding support for video and audio as tags, but these are new tags that XHTML 1.0 Transitional does…




error token not the syntaxerror file how javascript for end