terminology

Converting bytes to megabytes

寵の児 提交于 2019-11-27 09:15:30
问题 I've seen three ways of doing conversion from bytes to megabytes: megabytes=bytes/1000000 megabytes=bytes/1024/1024 megabytes=bytes/1024/1000 Ok, I think #3 is totally wrong but I have seen it. I think #2 is right, but I am looking for some respected authority (like W3C, ISO, NIST, etc) to clarify which megabyte is a true megabyte. Can anyone cite a source that explicitly explains how this calculation is done? Bonus question: if #2 is a megabyte what are #1 and #3 called? BTW: Hard drive

?? Null Coalescing Operator --> What does coalescing mean?

故事扮演 提交于 2019-11-27 09:11:05
I'm tempted to lie and say that English is my second language, but the truth is that I just have no idea what 'Coalescing' means. I know what ?? 'does' in C#, but the name doesn't make sense to me. I looked up the word and I understand it to be a synonym for 'join'. 'Null Join Operator' still doesn't make sense. Can someone enlighten me? I'm tempted to lie and say that English is my second language...but the truth is that I just have no idea what 'Coalescing' means. I know what ?? 'does' in C#, but the name doesn't make sense to me. I looked up the word and I understand it to be a synonym for

What is “Orthogonality”?

孤街醉人 提交于 2019-11-27 09:00:12
问题 What does "orthogonality" mean when talking about programming languages? What are some examples of Orthogonality? 回答1: Orthogonality is the property that means "Changing A does not change B". An example of an orthogonal system would be a radio, where changing the station does not change the volume and vice-versa. A non-orthogonal system would be like a helicopter where changing the speed can change the direction. In programming languages this means that when you execute an instruction,

What's the difference between a word and byte?

只愿长相守 提交于 2019-11-27 09:00:09
问题 I've done some research. A byte is 8 bits and a word is the smallest unit that can be addressed on memory. The exact length of a word varies. What I don't understand is what's the point of having a byte? Why not say 8 bits? I asked a prof this question and he said most machines these days are byte-addressable, but what would that make a word? 回答1: Byte : Today, a byte is almost always 8 bit. However, that wasn't always the case and there's no "standard" or something that dictates this. Since

What exactly are C++ definitions, declarations and assignments?

拟墨画扇 提交于 2019-11-27 08:55:35
I tend to use the words define, declare and assign interchangeably but this seems to cause offense to some people. Is this justified? Should I only use the word declare for the first time I assign to a variable? Or is there more to it than that? Define and declare are similar but assign is very different. Here I am declaring (or defining) a variable: int x; Here I am assigning a value to that variable: x = 0; Here I am doing both in one statement: int x = 0; Note Not all languages support declaration and assignment in one statement: T-SQL declare x int; set x = 0; Some languages require that

What is half open range and off the end value

痴心易碎 提交于 2019-11-27 08:52:27
What do these terminologies mean in C++? 1. off the end value 2. half open range - [begin, off_the_end) I came across them while reading about for loops. A half-open range is one which includes the first element, but excludes the last one. The range [1,5) is half-open, and consists of the values 1, 2, 3 and 4. "off the end" or "past the end" refers to the element just after the end of a sequence, and is special in that iterators are allowed to point to it (but you may not look at the actual value, because it doesn't exist) For example, in the following code: char arr[] = {'a', 'b', 'c', 'd'};

Java versioning and terminology, 1.6 vs 6.0 OpenJDK vs Sun

我与影子孤独终老i 提交于 2019-11-27 08:50:48
I'm having problems understanding Java versioning. I'm seeing lots of versions like 1.4.2, 1.5 and 1.6, but I also stumble upon 5.0 and 6.0. I don't understand this versioning or the progression. I'm pretty new to Java, and I've read a bit about OpenJDK vs Sun, and I think I understand it. Are these versions the difference between OpenJDK and Sun? For example, OpenJDK's latest is 1.6 and Sun's is 6.0? All these versions are pretty confusing to someone new to Java. The versioning is simply a mess: Java 1.0 and 1.1 were normal Then came Java 1.2, but you were supposed to call it "Java 2, JDK 1.2

What is the origin of the term “heap” for the free store?

吃可爱长大的小学妹 提交于 2019-11-27 08:02:47
I am trying to find the official (or a good enough) reason that the free store is commonly referred to as the heap. Except for the fact that it grows from the end of the data segment, I can't really think of a good reason, especially since it has very little to do with the heap data structure. Note: Quite a few people mentioned that it's just a whole bunch of things that are kind of unorganized. But to me the term heap physically means a bunch of things that are physically dependent on one another. You pull one out from underneath, everything else collapses on it, etc. In other words, to me

What is a Value Class and what is a reference Class in C#?

↘锁芯ラ 提交于 2019-11-27 07:47:41
问题 What is the definition of a value class and reference class in C#? How does this differ from a value type and reference type ? I ask this question because I read this in the MCTS Self-Paced Training Kit (Exam 70-536). Chapter 1, Lesson 1, Lesson review 4 : You need to create a simple class or structure that contains only value types. You must create the class or structure so that it runs as efficiently as possible. You must be able to pass the class or structure to a procedure without concern

C# and Visual C#?

梦想与她 提交于 2019-11-27 06:43:38
问题 Just would like to make clear, I cannot find straight answer. C# is general specification of this language done by MS, while Visual C# is implementation of this language, again done by MS? So if we say we develop in C# (in visual studio e.g.) we develop in Visual C# actually. Is that correct? 回答1: Yes, you've pretty much got it. Most of us just refer to it as C# though, since it is after all a Microsoft thing, and their implementation of the language is what most coders use (in Visual Studio)