Java “user.dir” property – what exactly does it mean?

It’s the directory where java was run from, where you started the JVM. Does not have to be within the user’s home directory. It can be anywhere where the user has permission to run java. So if you cd into /somedir, then run your program, user.dir will be /somedir. A different property, user.home, refers to the user directory. As in /Users/myuser or /home/myuser or C:\Users\myuser. See here for a list of … Read more

Substitution Cipher Python

Original answer below: Please show us some sample input and output for an example. Based on your code, I can come up with the following – random.shuffle shuffles everything in place and returns None, change your makeKey to: EDIT 2: For an approach without using dicts in encryption/decryption, see below: Prints: EDIT: After some spacing issues and experimentation, I … Read more

Why shouldn’t `'` be used to escape single quotes?

" is on the official list of valid HTML 4 entities, but ' is not. From C.16. The Named Character Reference ‘: The named character reference ' (the apostrophe, U+0027) was introduced in XML 1.0 but does not appear in HTML. Authors should therefore use ' instead of ' to work as expected in HTML 4 user agents.

Difference between View and table in sql

A table contains data, a view is just a SELECT statement which has been saved in the database (more or less, depending on your database). The advantage of a view is that it can join data from several tables thus creating a new view of it. Say you have a database with salaries and you need to … Read more