What’s the difference between a module and package in Python?

Any Python file is a module, its name being the file’s base name without the .py extension. A package is a collection of Python modules: while a module is a single Python file, a package is a directory of Python modules containing an additional __init__.py file, to distinguish a package from a directory that just … Read more

What does “semantically correct” mean?

Labeling correctly It means that you’re calling something what it actually is. The classic example is that if something is a table, it should contain rows and columns of data. To use that for layout is semantically incorrect – you’re saying “this is a table” when it’s not. Another example: a list (<ul> or <ol>) … Read more

What is a multibyte character set?

The term is ambiguous, but in my internationalization work, we typically avoided the term “multibyte character sets” to refer to Unicode-based encodings. Generally, we used the term only for legacy encoding schemes that had one or more bytes to define each character (excluding encodings that require only one byte per character). Shift-jis, jis, euc-jp, euc-kr, … Read more

How do you read !important in CSS? [duplicate]

an “!important” declaration (the delimiter token “!” and keyword “important” follow the declaration) takes precedence over a normal declaration. http://www.w3.org/TR/CSS2/cascade.html#important-rules Basically, where two style rules are the same… it gives the one marked !important greater importance and will apply those styles. Example div{ opacity:0 !important; } div.jason{ opacity:1; } The first rule would be applied … Read more

What is the difference between the kernel space and the user space?

The really simplified answer is that the kernel runs in kernel space, and normal programs run in user space. User space is basically a form of sand-boxing — it restricts user programs so they can’t mess with memory (and other resources) owned by other programs or by the OS kernel. This limits (but usually doesn’t … Read more

What does it mean by buffer?

Imagine that you’re eating candy out of a bowl. You take one piece regularly. To prevent the bowl from running out, someone might refill the bowl before it gets empty, so that when you want to take another piece, there’s candy in the bowl. The bowl acts as a buffer between you and the candy … Read more