terminology

Making a system call that returns the stdout output as a string

谁都会走 提交于 2019-11-26 18:51:00
Perl and PHP do this with backticks. For example, $output = `ls`; Returns a directory listing. A similar function, system("foo") , returns the operating system return code for the given command foo. I'm talking about a variant that returns whatever foo prints to stdout. How do other languages do this? Is there a canonical name for this function? (I'm going with "backtick"; though maybe I could coin "syslurp".) J.F. Sebastian Python from subprocess import check_output as qx output = qx(['ls', '-lt']) Python < 2.7 or < 3.1 Extract subprocess.check_output() from subprocess.py or adapt something

Difference between framework vs Library vs IDE vs API vs SDK vs Toolkits? [closed]

牧云@^-^@ 提交于 2019-11-26 18:42:15
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . I want some examples. I always get confused, so with some examples I might be able to figure it out better. Also: Is Eclipse an API or IDE? 回答1: An IDE is an integrated development environment - a suped-up text editor with additional support for developing (such as forms designers

What is a “tight loop”?

若如初见. 提交于 2019-11-26 18:13:01
问题 I've heard that phrase a lot. What does it mean? An example would help. 回答1: From Wiktionary: (computing) In assembly languages, a loop which contains few instructions and iterates many times. (computing) Such a loop which heavily uses I/O or processing resources, failing to adequately share them with other programs running in the operating system. For case 1 it is probably like for (unsigned int i = 0; i < 0xffffffff; ++ i) {} 回答2: I think the phrase is generally used to designate a loop

The differences between initialize, define, declare a variable

梦想与她 提交于 2019-11-26 18:12:57
After reading the question , I know the differences between declaration and definition. So does it mean definition equals declaration plus initialization? Declaration Declaration, generally, refers to the introduction of a new name in the program. For example, you can declare a new function by describing it's "signature": void xyz(); or declare an incomplete type: class klass; struct ztruct; and last but not least, to declare an object: int x; It is described, in the C++ standard, at §3.1/1 as: A declaration (Clause 7) may introduce one or more names into a translation unit or redeclare names

The History Behind the Definition of a 'String'

强颜欢笑 提交于 2019-11-26 18:07:06
问题 I have never thought about until recently, but I'm not sure why we call strings strings . I am a .NET programmer, but I believe the concept of strings exist in virtually every programming language. Outside of programming, I don't believe I've heard the word string used to describe words or letters. A quick Google of, 'Define: string' yields a bunch of definitions that have nothing to do with the concept of letters, words, or anything of the nature associated to programming. My guess of it, is

What does “semantically correct” mean?

北战南征 提交于 2019-11-26 18:05:59
问题 I have seen it a lot in css talk. What does semantically correct mean? 回答1: 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> ) should generally be used to group similar items ( <li> ). You could use a div for the group and a <span>

What is the difference between Bitmap and Drawable in Android?

假装没事ソ 提交于 2019-11-26 17:59:28
问题 I googled but i couldn't find any article to describe about the difference between Bitmap and Drawable in Android. 回答1: A Bitmap is a representation of a bitmap image (something like java.awt.Image). A Drawable is an abstraction of "something that can be drawn". It could be a Bitmap (wrapped up as a BitmapDrawable ), but it could also be a solid color, a collection of other Drawable objects, or any number of other structures. Most of the Android UI framework likes to work with Drawable

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

久未见 提交于 2019-11-26 17:48:46
问题 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? 回答1: 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'

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

◇◆丶佛笑我妖孽 提交于 2019-11-26 17:47:23
问题 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? 回答1: 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

Java versioning and terminology, 1.6 vs 6.0 OpenJDK vs Sun

…衆ロ難τιáo~ 提交于 2019-11-26 17:46:51
问题 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. 回答1: The versioning is