terminology

What is a loop invariant?

隐身守侯 提交于 2019-11-27 02:28:47
I'm reading "Introduction to Algorithm" by CLRS. In chapter 2, the authors mention "loop invariants". What is a loop invariant? Tomas Petricek In simple words, a loop invariant is some predicate (condition) that holds for every iteration of the loop. For example, let's look at a simple for loop that looks like this: int j = 9; for(int i=0; i<10; i++) j--; In this example it is true (for every iteration) that i + j == 9 . A weaker invariant that is also true is that i >= 0 && i <= 10 . TNi I like this very simple definition: ( source ) A loop invariant is a condition [among program variables]

difference between forwarding and redirection [duplicate]

末鹿安然 提交于 2019-11-27 02:26:27
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: difference between jsp forward and redirect Does anyone knows the differences between forwarding and redirection in Http servlets and the impact of these differences on browser refreshes? 回答1: forwarding is done without letting client know that, It is used to do internal communication at server, while in redirecting we are asking client go back and ask it over here. Real life example Forwarding You went to

Difference between “anonymous function” and “function literal” in JavaScript?

自作多情 提交于 2019-11-27 02:21:28
问题 The book Learning JavaScript defines anonymous functions as follows... Functions are objects. As such, you can create them - just like a String or Array or other type - by using a constructor and assigning the function to a variable. In the following code, a new function is created using the Function constructor, with the function body and argument passed in as arguments: var sayHi = new Function("toWhom", "alert('Hi' + toWhom);"); This type of function is often referred to as an anonymous

Epoch vs Iteration when training neural networks

杀马特。学长 韩版系。学妹 提交于 2019-11-27 02:20:19
What is the difference between epoch and iteration when training a multi-layer perceptron? In the neural network terminology: one epoch = one forward pass and one backward pass of all the training examples batch size = the number of training examples in one forward/backward pass. The higher the batch size, the more memory space you'll need. number of iterations = number of passes, each pass using [batch size] number of examples. To be clear, one pass = one forward pass + one backward pass (we do not count the forward pass and backward pass as two different passes). Example: if you have 1000

The difference between a destructor and a finalizer?

北城余情 提交于 2019-11-27 01:34:34
问题 Please Note: This question is about the difference in terminology between the words "destructor" and "finalizer" and their correct usage. I have merely provided examples of their use in C# and C++/CLI to demonstrate why I am asking the question. I am well aware of how it is implemented in both C# and the CLR, but I am asking about the correct use of terminology. In the C# world the terms "destructor" and "finalizer" seem to be used pretty much interchangeably, which I suspect is because the C

crawler vs scraper

倾然丶 夕夏残阳落幕 提交于 2019-11-27 00:50:38
问题 Can somebody distinguish between a crawler and scraper in terms of scope and functionality. 回答1: A crawler gets web pages -- i.e., given a starting address (or set of starting addresses) and some conditions (e.g., how many links deep to go, types of files to ignore) it downloads whatever is linked to from the starting point(s). A scraper takes pages that have been downloaded or, in a more general sense, data that's formatted for display, and (attempts to) extract data from those pages, so

What is an “operator int” function?

前提是你 提交于 2019-11-27 00:35:19
问题 What is the "operator int" function below? What does it do? class INT { int a; public: INT(int ix = 0) { a = ix; } /* Starting here: */ operator int() { return a; } /* End */ INT operator ++(int) { return a++; } }; 回答1: The bolded code is a conversion operator. (AKA cast operator) It gives you a way to convert from your custom INT type to another type (in this case, int ) without having to call a special conversion function explicitly. For example, with the convert operator, this code will

What's the term for the part of the URL after the question mark?

流过昼夜 提交于 2019-11-27 00:21:17
问题 http://www.example.com?foo What's the term for the foo part of the URL? 回答1: Its the query, or sometimes the query string. To pinch a useful diagram from the URI RFC: foo://example.com:8042/over/there?name=ferret#nose \_/ \______________/\_________/ \_________/ \__/ | | | | | scheme authority path query fragment 回答2: It's called "query string" as you can see in wikipedia. 回答3: The "foo" part of the URL, as you put is, is referred to as the query. source: http://tools.ietf.org/html/rfc3986

Normalization in plain English

巧了我就是萌 提交于 2019-11-27 00:14:43
I understand the concept of database normalization, but always have a hard time explaining it in plain English - especially for a job interview. I have read the wikipedia post, but still find it hard to explain the concept to non-developers. "Design a database in a way not to get duplicated data" is the first thing that comes to mind. Does anyone has a nice way to explain the concept of database normalization in plain English? And what are some nice examples to show the differences between first, second and third normal forms? Say you go to a job interview and the person asks: Explain the

What's the differences between stored procedures, functions and routines?

我们两清 提交于 2019-11-27 00:11:35
问题 In MySQL database context, what is the difference among these 3 terms: stored procedure stored function stored routine Also the build-in functions like those date time functions (e.g. WEEKDAY() etc) are considered as what? 回答1: Google is your friend. The first match for "mysql routine function procedure" is this: http://dev.mysql.com/doc/refman/5.0/en/stored-routines-syntax.html A quick summary: A stored routine is either a procedure or a function. A procedure is invoked using a CALL