input() error – NameError: name ‘…’ is not defined

TL;DR input function in Python 2.7, evaluates whatever your enter, as a Python expression. If you simply want to read strings, then use raw_input function in Python 2.7, which will not evaluate the read strings. If you are using Python 3.x, raw_input has been renamed to input. Quoting the Python 3.0 release notes, raw_input() was renamed to input(). That is, the new input() function reads a … Read more

curl: (60) Peer’s Certificate issuer is not recognized.

Finally fixed it. Post the answer here as reference. Export company trusted root certificate with .cer extension. Somthing naming external root certificate Convert the ca file to .pem file using openssl x509 -in xxx.cer -inform der -outform pem -out xxx.pem Then on the centos 7 os: Install the ca-certificates package: yum install ca-certificates Enable the dynamic … Read more

$(document).ready(function() is not working

Did you load jQuery in head section? Did you load it correctly? This code assumes jquery.js is in scripts directory. (You can change file name if you like) You can also use jQuery as hosted by Google: As per your comment: Apparently, your web server is not configured to return jQuery-1.6.1.js on requesting /webProject/jquery-1.6.1.js. There may be numerous reasons for this, such as wrong file … Read more

Code to clear all plots in RStudio

dev.off() closes the current graphical device. This clears all of the plots for me in RStudio as long as I don’t have a different graphical device open at the moment. If you do have other graphical devices open then you can use dev.list() to figure out which graphical device is RStudio’s. The following should do that but I haven’t tested … Read more

mysqldump data only

Also you may use: –skip-triggers: if you are using triggers –no-create-db: if you are using –databases … option –compact: if you want to get rid of extra comments

Does java have “get line”?

Being new to Java, one of the resources you need to have on hand is the Oracle documentation pages, for example: https://docs.oracle.com/javase/7/docs/api/java/util/Scanner.html That will guide you on what a Scanner can do. Specifically, you should look for .nextLine()

Display text on MouseOver for image in html

You can use title attribute. You can change the source of image as you want. And as @Gray commented: You can also use the title on other things like <a … anchors, <p>, <div>, <input>, etc. See: this

What is the best regular expression to check if a string is a valid URL?

I wrote my URL (actually IRI, internationalized) pattern to comply with RFC 3987 (http://www.faqs.org/rfcs/rfc3987.html). These are in PCRE syntax. For absolute IRIs (internationalized): To also allow relative IRIs: How they were compiled (in PHP): Edit 7 March 2011: Because of the way PHP handles backslashes in quoted strings, these are unusable by default. You’ll need … Read more