What is meant by the term "inplace" [closed] - terminology

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I have a vague sense of the meaning of this term, usually in the context of data structures and algorithms which happen to rely upon swap variables to shuttle data around containers and what not. But I'd like to hear some richer definitions and nuances to people's knowledge of this term. Taking a shot at it myself I'd say doing something in place (interesting subquestion, what verbs can come before inplace? moving inplace? transferring inplace? copying inplace?) is to transfer elements of container data from one memory location to another without recourse to a second copy of the whole container.

"inplace" usually means "with O(1) additional space".

This term is often used to indicate an alternative to some operation that would normally involve some kind of a copying operation. The alternative achieves the same results, but avoids the copying procedure or operation, whatever the case may be.
One example comes from C++. Before the C++11 revision to the language, adding an element to a container could not avoid a copy operation of some kind, which could get expensive when the container has a non-trivial object.
If a completely new class instance is to be added to the container, it was pretty much a foregone conclusion that what ends up happening is: 1) class instance construction, 2) a copy construction, and 3) destruction of the first instance.
C++11 added certain language features that make it possible to avoid copying, with the new class instance ending up getting construct "in place", or "emplace" inside the container.

Related

Is cloud functions a valid replacement/implementation of a distributed system? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I want to process a list of data parallelly; processing of each element of the data won't affect other.
With for example google pub/sub + cloud functions, I could achieve something scalable and parallel, which looks like a distributed system.
I have little knowledge about distributed programming, and it seems that it takes a lot of time to master.
So I would like to know is this a replacement or a valid implementation of distributed system?
For the specific use case you're talking about - dividing work among function invocations to run in parallel - yes, it sounds like that would be adequate.
I would be very hesitant to call it a full "distributed system" (at least not without your very strict definition of what that really is). If you take wikipedeia's explanation of distributed computing, you might have a very basic system in place, but lack of a peer-to-peer direct messaging system probably makes it unsuitable for many of the listed applications you see on that page.
The bottom line I think you should really consider is if it satisfies the requirements of the problem at hand. Whether or not it's a "distributed system" is mostly irrelevant - either it works or it doesn't for that use case.

In this situation, Which DB should I use Redis or MongoDB? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I have to handle 12000 objects in Node.js from https://data.detroitmi.gov/Public-Safety/DPD-All-Crime-Incidents-2009-Present-Provisional-/b4hw-v6w2/data for map data. (JSON example : https://data.detroitmi.gov/resource/i9ph-uyrp.json)
I heard that Redis helps to deal with a lot of data. but my friend said that Those are not that big enough to use Redis so It would not worth to use Redis. I've only used mongo before but after I deal with those a bunch of data, I felt I can't handle with normal database. So decided to use something like Redis but not really sure. I would like to here some ideas about it!
That basically depends on what you mean by "handle".
Redis is in-memory database, so despite it has (a kind of) persistence layer implemented (regular snapshots on disk), some redundancy support (master-slave with replication), and even features for scalability (autosharding through Redis Cluster) - first and foremost, it's in-memory DB.
Which means: it's excellent in serving reads/writes for relatively small dataset (yours fits perfectly, btw) blazingly fast, putting consistency & scalability way behind (setting aside more tricky & flexible features).
If that is your purpose - go for it, but the good practice here (widespread, at least) is having a persistence layer served by another database, whether would it be more traditional ACID-type one (like, relational) or trendy distributed stuff.
PS In general, I personally better stick to first option (RDBMS) for persistence layer - they are way more mature and still outperform document-oriented even being used as advanced key-value store.
Although in real life there are no "general" cases, each is specific, so you're going to evaluate it in details.
PPS Another personal opinion: no Mongo, it's a total misadventure by itself.

Where is EXC_BAD_ACCESS documented? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
One of the more commonplace debugging errors in my own development (Mac, iOS) is EXC_BAD_ACCESS. Despite its commonness, its origin and precise meaning remain mysterious. Google lists many occurrences of the error, but the only explanation I could find is informal and incomplete.
I know that this exception (if that's the proper term for it) means that the code has attempted to access an address to which it does not have read and/or write privileges—the null address, for example, or an address outside of the process's address space. But this is an intuitive interpretation based on my prior experience with virtual memory and protected memory systems. I have never seen EXC_BAD_ACCESS documented anywhere, and indeed I'm not sure "who" is sending me this exception—the CPU, Mac OS, UNIX, the runtime, the debugger?—so I don't know who to ask (that is, what class of documentation to consult). I would like to know, for example, what the "code" that is listed with the exception means. Or another example: what other classes of similar exceptions (presumably also tagged with "EXC_") might also come from the same source?
Where can I find an explanation of EXC_BAD_ACCESS, its codes and general semantics, from an authoritative source? What is the authoritative source—who is actually detecting and throwing the exception?
The only official documentation I've been able to find for EXC_BAD_ACCESS is a Technical Q&A called Finding EXC_BAD_ACCESS bugs in a Cocoa project. It's dated and only confirms what you already know:
This kind of problem is usually the result of over-releasing an object. It can be very confusing, since the failure tends to occur well after the mistake is made. The crash can also occur while the program is deep in framework code, often with none of your own code visible in the stack.
Indeed, it can be very confusing. At least Apple acknowledges that much. :)

RFID software for windows, linux and Mac [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I want to learn how to play with RFID... Read it, write it, scan for it.
I need the software to do this as well as the hardware.
I'm not 100% sure what my end goal is. So, the more sources is get, the better. Keep the comments coming.
The actual hardware to read tags is not so complicated. You can get a reader like this one that can read tags fairly simply. The scanner just sends a unique 10 byte code every time it reads a tag, and you can handle that in just about any software fairly trivially.
I have never written tags because I have never found a need to. You can get tags for under a dollar each, and they all have a unique key. I just record them into my system and store them.
I use rfid for a basic entry control system on my front door, using an arduino controller to send the codes to my central server, and then to open an electronic lock. My setup is sort of similar to what is described here. My server allows me to remotely access it, and to set up specific time based access restrictions for individual tags. The microcontroller is not strictly required, but it allows me an easy way to interface with various hardware elements.
I think you have these options to use for your requirement:
Tikitag RFID Programming Kit http://www.jeremyperson.com/tikitag-rfid-programming-kit/ or this RFID Programming Kit http://www.phidgets.com/products.php?category=14
I hope that helps!

What is the definition of an implementation detail? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I see this term on the internet a lot (in fact, typing it on google returns a lot of results).
What is the exact definition of an "implementation detail"?
It's a behavior produced by code which may be relied on by consuming code, though that behavior is not specified by the spec the code is written to. Hence, other implementations of the same spec may not exhibit the same behavior, and will break that consuming code. That's why it's bad to rely on them.
For instance, if you were to write some code against a list interface which specified an array sort but not the algorithm it used, and you needed the sort method to be stable, and a version of your code was used with a non-stable sort algorithm, then your code would break.
I'm not aware of the exact formal definition of the term "implementation detail", it generally refers to the concrete implementation of a certain specification.
Take a List for example.
A specification of a List may say that "it is able to hold multiple values with duplicates while preserving order."
From the above, it doesn't mention what kind of backing data structure is used for the List -- for all we know, it may be an array, or a linked list. That is really an implementation detail that is really left up to the implementor of the List.
An "implementation detail" is a decision that is left to be made by the developers, and is not specified at an earlier level (such as a requirement document or, depending on context, an architectural document.)