terminology

Python : terminology 'class' VS 'type'

烂漫一生 提交于 2019-11-27 05:38:50
问题 Just a simple question : when should I use the term 'class', and when should I use the term 'type' in Python ? is 'class' only for user-defined types, and 'type' for built-in types ? or now that everything is a type ... should I use always 'type' even for user-defined classes ? ... ? 回答1: It is more or less historical: they used to be different a long time ago, which has no practical implications anymore. Edit: I use " class " when referring to concrete implementations and " type " in a more

What does '# noqa' mean in Python comments?

好久不见. 提交于 2019-11-27 05:33:58
问题 While searching through a Python project, I found a few lines commented with # noqa . import sys sys.path.append(r'C:\dev') import some_module # noqa What does noqa mean in Python? Is it specific to Python only? 回答1: Adding # noqa to a line indicates that the linter (a program that automatically checks code quality) should not check this line. Any warnings that code may have generated will be ignored. That line may have something that "looks bad" to the linter, but the developer understands

What is the difference between HTML tags and elements?

馋奶兔 提交于 2019-11-27 05:13:24
问题 I notice that most people use the words HTML tags and HTML elements interchangeably. But what is the difference between them? The way I see it is that tags are in the source code and elements are processed tags (by the browser) in the DOM. Am I wrong? 回答1: HTML tag is just opening or closing entity. For example: <p> and </p> are called HTML tags HTML element encompasses opening tag, closing tag, content (optional for content-less tags) Eg: <p>This is the content</p> : This complete thing is

Scalar vs. primitive data type - are they the same thing?

≡放荡痞女 提交于 2019-11-27 04:59:15
问题 In various articles I have read, there are sometimes references to primitive data types and sometimes there are references to scalars. My understanding of each is that they are data types of something simple like an int, boolean, char, etc. Is there something I am missing that means you should use particular terminology or are the terms simply interchangeable? The Wikipedia pages for each one doesn't show anything obvious. If the terms are simply interchangeable, which is the preferred one?

What does “Memory allocated at compile time” really mean?

蹲街弑〆低调 提交于 2019-11-27 04:59:13
问题 In programming languages like C and C++, people often refer to static and dynamic memory allocation. I understand the concept but the phrase "All memory was allocated (reserved) during compile time" always confuses me. Compilation, as I understand it, converts high level C/C++ code to machine language and outputs an executable file. How is memory "allocated" in a compiled file ? Isn't memory always allocated in the RAM with all the virtual memory management stuff ? Isn't memory allocation by

Difference between servlet and web service

给你一囗甜甜゛ 提交于 2019-11-27 04:59:02
问题 What is the difference between these 2? I found few results on google nothing conclusive. Here is a follow up question: Say I create spring mvc web app annotate couple of classes with @Controller annotation and create something that will successfully transfer some information from front end -> back end and vice versa and perhaps some database might be involved on the back end side. What would you call that? Rest web service or servlet or something else ? 回答1: A web service is a service that

Differences between key, superkey, minimal superkey, candidate key and primary key

删除回忆录丶 提交于 2019-11-27 04:57:18
问题 I'm new to MySQL, and I'm really confused about the different terms that I've encountered. I tried googling the answer but the results are really confusing and when I try and understand it just seems like they are the same thing. What exactly are the differences among key, superkey, minimal superkey, candidate key and primary key? 回答1: Here I copy paste some of the information that I have collected Key A key is a single or combination of multiple fields. Its purpose is to access or retrieve

What is the difference between compile code and executable code?

半世苍凉 提交于 2019-11-27 04:56:50
问题 I always use the terms compile and build interchangeably. What exactly do these terms stand for? 回答1: Compiling is the act of turning source code into object code. Linking is the act of combining object code with libraries into a raw executable. Building is the sequence composed of compiling and linking, with possibly other tasks such as installer creation. Many compilers handle the linking step automatically after compiling source code. 回答2: From wikipedia: In the field of computer software,

What is the meaning and difference between subject, user and principal?

社会主义新天地 提交于 2019-11-27 04:56:09
问题 In the context of security frameworks, a few terms commonly occur subject , user and principal , of which I have not been able to find a clear definition and the difference between them. So, what exactly do these terms mean, and why are these distinctions of subject and principal needed? 回答1: These are hierarchical in the way that genus, species and individual are hierarchical. Subject - In a security context, a subject is any entity that requests access to an object . These are generic terms

What is boilerplate code?

与世无争的帅哥 提交于 2019-11-27 04:55:48
问题 A coworker had never heard of this, and I couldn't provide a real definition. For me, it's always been an instance of 'I-know-it-when-I-see-it'. Bonus question, who originated the term? 回答1: "boilerplate code" is any seemingly repetitive code that shows up again and again in order to get some result that seems like it ought to be much simpler. It's a subjective definition. The term comes from "boilerplate" in the newspaper industry: wiki 回答2: On the etymology the term boilerplate : from http: