terminology

What does “Container” mean in the context of programming?

孤者浪人 提交于 2019-11-30 12:08:54
I am learning Spring and the term "Spring Container" frequently shows up in the text. However, I know "container" is not used only in Spring (EJB container etc) so what does it mean when used in the context of programming? The container is something that contains something else. In spring : Spring container contains beans (Java objects that are subject to dependency-injection ) Servlet containers contain servlets, filters, listeners, etc. and manages their state and lifecycle. There are also similar portlet containers EJB containers contain EJBs (stateless, stateful, message-driven) and, as

What's the difference between groups and roles?

橙三吉。 提交于 2019-11-30 12:07:40
问题 A lot of identity management implementations use roles in addition to groups. How are they different? So far I haven't found a compelling use case for separating the two. All the explanations I've read are vague and hand-wavey. Can you give a good example where having roles and groups are necessary? 回答1: Person - Group - Roles A person is a member of one or more groups. A group is assigned multiple roles. Example: Two roles exist in a system stock_purchaser , timecard_supervisor . Two groups

In Ruby what does the “receiver” refer to?

别来无恙 提交于 2019-11-30 10:59:39
I'm reading a document that talks about a method having a receiver. What's a receiver? In Ruby (and other languages that take inspiration from SmallTalk) objects are thought of as sending and receiving 'messages'. In Ruby, Object, the base class of everything, has a send method: Object.send For example: class Klass def hello "Hello!" end end k = Klass.new k.send :hello #=> "Hello" k.hello #=> "Hello" In both of these cases k is the receiver of the 'hello' message. In the original Smalltalk terminology, methods on "objects" were instead refered to as messages to objects (i.e. you didn't call a

Is parallel programming == multithread programming?

点点圈 提交于 2019-11-30 10:56:56
问题 Is parallel programming == multithread programming? 回答1: Multithreaded programming is parallel, but parallel programming is not necessarily multithreaded. Unless the multithreading occurs on a single core, in which case it is only concurrent. 回答2: Not necessarily . You can distribute jobs between multiple processes and even multiple machines - I wouldn't class that as "multi-threaded" programming as each process may only use a single thread, but it's certainly parallel programming. Admittedly

Definition of “synchronization primitive”

别说谁变了你拦得住时间么 提交于 2019-11-30 10:26:33
问题 What exactly does the term synchronization primitive mean? For example: mutex, critical section, waitable timer, event, monitor, conditional variable, semaphore. Are all of them synchronization primitives? Are there any other synchronization primitives I have not listed? And are these a valid questions? 回答1: Synchronization primitives are simple software mechanisms provided by a platform (e.g. operating system) to its users for the purposes of supporting thread or process synchronization.

What is it called when a block returns a value?

人走茶凉 提交于 2019-11-30 08:36:59
问题 I came across this code recently, which doesn't look legal to me (but gcc compiles it). I don't so much mind the construction as want a name for it: #define MAX(a,b) \ ({ \ typeof(a) _a = (a); \ typeof(b) _b = (b); \ (_a > _b) ? (_a) : (_b); \ }) Apparently, the last statement's value is being returned as the "value" of the expression bounded by the namespace. Edit: Thanks for the answers guys. Turns out this is an extension to plain C called Statement Expressions. 回答1: It is not a namespace

What is the difference between a port number and a protocol number? [closed]

大憨熊 提交于 2019-11-30 08:03:57
What is the difference between a port number and a protocol number? You can think of a port as a phone extension, with the computer's IP address being like its phone number. You can call the number (IP address) to talk to the computer, then dial the extension (port) to talk to a specific application. An application needs to be listening on a port in order to communicate. A protocol is just the language that the two applications on either end of a conversation agree to speak in. If your application is sending streams of bytes to my application, my application needs to know how to interpret

What is SUT and where did it come from?

醉酒当歌 提交于 2019-11-30 07:44:58
问题 I see many people talking about the term SUT, but do not understand why they use that term. SUT is what you want to test? Where does this term come from and what does it mean? For example in this test, what is my SUT? [TestMethod] public void UsersAction_should_return_IndexAction() { const long id = 1; UsersViewModel viewModel = new UsersViewModel() { SelectedUsers = new long[] { 1, 2, 3, 4 } }; ActionResult result = _controller.Users(id, viewModel); result.AssertActionRedirect().ToAction(

Terminology: What is a “glitch” in Functional Reactive Programming / RX?

末鹿安然 提交于 2019-11-30 06:50:18
What is the definition of a "glitch" in the context of Functional Reactive Programming? I know that in some FRP frameworks "glitches" can occur while in others not. For example RX is not glitch free while ReactFX is glitch free [ 1 ]. Could someone give a very simple example demonstrating how and when glitches can occur when using RX and show on the same example how and why the corresponding ReactFX solution is glitch free. Thanks for reading. Definition My (own) favorite definition: A glitch is a temporary inconsistency in the observable state. Definition from Scala.Rx : In the context of FRP

What makes the Spring framework a lightweight container?

放肆的年华 提交于 2019-11-30 06:44:18
When people mention that Spring is a lightweight containter compared to other frameworks, do they mean? That it occupies less memory in the system or it does not have the operations like start stop that we have for EJB containers and it doesn't use a special container? What makes Spring a lightweight container? Whether it is "lightweight" or "heavyweight", it is all about comparison. We consider Spring to be lightweight when we are comparing to normal J2EE container. It is lightweight in the sense of extra memory footprint for the facilities provided (e.g. Transaction Control, Life Cycle,