Adding attribute in jQuery

You can add attributes using attr like so: However, for DOM properties like checked, disabled and readonly, the proper way to do this (as of JQuery 1.6) is to use prop.

What is the correct JSON content type?

For JSON text: The MIME media type for JSON text is application/json. The default encoding is UTF-8. (Source: RFC 4627) For JSONP (runnable JavaScript) with callback: Here are some blog posts that were mentioned in the relevant comments: Why you shouldn’t use text/html for JSON Internet Explorer sometimes has issues with application/json A rather complete list of Mimetypes and what to use them for … Read more

Transport endpoint is not connected

There is a segmentation fault problem which was introduced in 0.1.39. You may check my repository that fixed this one meanwhile: https://github.com/vdudouyt/mhddfs-nosegfault

ssh “permissions are too open” error

Keys need to be only readable by you: If Keys need to be read-writable by you: 600 appears to be fine as well (in fact better in most cases, because you don’t need to change file permissions later to edit it). The relevant portion from the manpage (man ssh)

C ++ error: a expected initializer before [function name]

The return type for stringThing must be either void or string, not both. You also must include <string>, if you want to use string. Since you want to output the return value of stringThing() in main, I guess it should be But then, you must also return a string from your function for example. Your parameter std::string &teststring won’t work with your const char* argument. So either declare … Read more

Why would a “java.net.ConnectException: Connection timed out” exception occur when URL is up?

Connection timeouts (assuming a local network and several client machines) typically result from a) some kind of firewall on the way that simply eats the packets without telling the sender things like “No Route to host” b) packet loss due to wrong network configuration or line overload c) too many requests overloading the server d) … Read more

Global variables in Java

To define Global Variable you can make use of static Keyword now you can access a and b from anywhere by calling