Can a POCO contain a constructor? Could you tell me if this class is correct? I also read that a POCO must have a parameterless constructor. Is that correct and why? If I accept this parameterless constructor, I'll have a problem with my read only Id property. For me, it seems logical that if this property must be read-only, then the only way to initialize it is in the constructor.  [DataContract] public class MembershipUser {     public MembershipUser(Guid idValue)     {         this.Id = idValue;     }      [DataMember]     public virtual readonly Guid Id { get; set; }      [DataMember]     public virtual string UserName { get; set; }      [DataMember]     public virtual string Email { get; set; } }
Can someone define what exactly 'POCO' means? I am encountering the term more and more often, and I'm wondering if it is only about plain classes or it means something more?
This is a question that's been nagging me for some time. I always thought that C++ should have been designed so that the delete operator (without brackets) works even with the new[] operator.  In my opinion, writing this:  int* p = new int;   should be equivalent to allocating an array of 1 element:  int* p = new int[1];   If this was true, the delete operator could always be deleting arrays, and we wouldn't need the delete[] operator.  Is there any reason why the delete[] operator was introduced in C++?  The only reason I can think of is that allocating arrays has a small memory footprint (you have to store the array size somewhere), so that distinguishing delete vs delete[] was a small memory optimization. Java: how do I check if a Date is within a certain range? How accurate is the location detection on the iPhone's Find My iPhone app Why didn't the Ministry use Veritaserum to question criminals? The truth potion (Veritaserum) is one of the most powerful potions that forces the drinker to speak truth. Then why didn't Ministry used it in any criminal cases instead of long discussions and proceedings? I know there are antidotes to the potion (Dumbledore tells Harry in the 6th book , "Slughorn might have been carrying antidote to veritaserum ever since I asked him about the memory"), but why don't keep criminals in custody until the effect of the antidote wears out and then make them drink veritaserum. Won't that result in perfect judgement? Are console games locked to a certain region? I'm going on a vacation from Europe to the US and was planning of bringing along some Xbox360 or PS3 games, but now I'm curious if they will be compatible with my European Xbox.  In that past there would be a clear difference between NTSC and PAL games, but is this still the case with the current gen of consoles? How do I pipe terminal standard output (stdout) to the clipboard? For example,   Say I want to list the contents of a folder and directly paste them into a chat window for a friend to see.    I realize I could do ls &gt; filename.txt to create a file (filename.txt) with those contents; I'd then have to open or print the file and manually select and copy the text block (which can be annoying/tedious.)  I clearly could also select and copy the output of ls directly from within the terminal window.  It would be much faster/easier to simply pipe standard output to the clipboard.  What terminal command allows me to do this? Currently, moderators have the ability to reset a user's username and/or profile text, and propagate that to the rest of the network, resetting it everywhere. However, often, the user's stackexchange.com network profile will also need to be reset, and this is currently only possible to do by either the user in question or staff.  Instead of bothering staff every time, moderators should have something available similar to chat, where moderators can change a user's parent site and have access to a "refresh profile" button, which will fetch updated information such as username and avatar from the parent site.  Currently, the only thing that moderators can do on stackexchange.com is to see hidden accounts. It would make sense for moderators to be able to refresh profiles there, like chat, and avoid pinging CMs every time this comes up. Wrapper for package managers Show there exists $g:(0,1)\to\mathbb{R}^2$ such that $h\circ g$ constant, $g$ continuously differentiable and $g$ injective How did the DeLorean travel to 1885? At the end of Back to the Future II, a lightning bolt hits the DeLorean which sends it back to 1885.  At the time though, the DeLorean wasn't moving; it was relatively stationary hovering in the storm.  Yet, it's emphasised repeatedly that the DeLorean must reach 88 miles per hour (which becomes a key plot point in Back to the Future III).  So, considering the DeLorean wasn't traveling at 88mph when the lightning struck the DeLorean sending it to 1885, what is the in-universe explanation of how it travelled there?  Some other factors to bear in mind:   If a lightning bolt was sufficient to send the DeLorean time traveling, then the 88mph business would be irrelevant Note that there are the firey tracks left after the DeLorean time travels in the '66' shape.  The thing to note about this though is that we never see these before the DeLorean disappears.  These tracks are always appearing after the DeLorean has traveled away.  This would seem to indicate that the DeLorean did move, but following the activation of the time circuits. Bugged display in search using negation What should I do when my neural network doesn't generalize well? Mixing tenses in past tense fiction What do I need to consider to choose between dSLR, mirrorless, or a compact as my first "serious" camera? I am thinking of buying a camera to learn photography. Most of the time I'll be shooting portraits and landscapes. But I am not sure where I should start. Most of my friends tell me that I should get an entry level DSLR, but I am not sure if I have the persistence and enthusiasm to carry it all day in a backpack. But the camera on my cellphone doesn't seem to be enough to begin with.  So what I want is some expert advice (preferably with professional experience). Can most compact fixed-lens or mirrorless cameras fit the situations I mentioned? Or do I really need to go to a DSLR to get a tool to learn photography? So, for my science fair I had to test the gauge of a copper wire vs electrical resistance. What I did was I set up a series circuit involving a 6v battery, a light bulb, a multimeter, and a voltmeter. I would change out three different wires with three different gauges.   For the 4-gauge wire, I got 0.004V and 0.04A. For the 8-gauge wire, I got 0.003V and 0.04A For the 12-gauge wire, I got 0.001V and 0.04A.   In this experiment, what would the independent and dependent variables?  We also have to fill out a table like this: When to use an offset in a Poisson regression? Does anybody know why offset in a Poisson regression is used? What do you achieve by this? In Volo's Guide to Monsters, there is a race in the bestiary called Grungs. Were these created for 5e specifically?  I'm pretty sure they were created for 5e, as they have no deities listed which is always a bit suspicious, but I'm just making sure. What is exactly the density of a black hole and how can it be calculated? Can future execution start before the synchronous execution is completed Is there a way for @future annotated method to start execution before the synchronous request which invokes it has completed.  In other words, do I have some guarantees that the timing will look like this:  -start sync---call future---end sync---execute future-&gt;   instead of like this:  -start sync---call future---execute future---end sync-&gt;   I couldn't find the execution order guarantees in the documentation, although  states:     The reason why sObjects can’t be passed as arguments to future methods   is because the sObject might change between the time you call the   method and the time it executes. In this case, the future method will   get the old sObject values and might overwrite them.  To work with   sObjects that already exist in the database, pass the sObject ID   instead (or collection of IDs) and use the ID to perform a query for   the most up-to-date record.   This can be read as saying that the future is not queued at the end of the transaction, otherwise Salesforce could guarantee that the sObject sent is the most recent version. And since it's queued during the transaction, it might imply that it also might execute and complete while the synchronous transaction is still running.  On the other hand,  implies that futures are only fired after the transaction completes:     Invoking Database.rollback not only rolls back inserts, but it goes   much, much further.   [...]   It also rolls back:      Calls to @future methods. Any methods called within the rolled back part of your script will not be invoked (also why @future doesn't start until your script completes). How should spare change be exchanged? So I have about $50 in pennies, dimes and nickels.  What would you do with it?  I'm asking because I don't think spending hours rolling up the change and taking it to the bank is the best/most creative thing.  More info:  I took the change to the bank (not rolled up).  The banker asked me if I knew the exact amount... when all I had was a huge bag of change weighing like 30-40 pounds :-p  I said I didn't know the exact amount.  So the banker put all the change into a different bag, gave me a little receipt and said look for a deposit to your account in about a week.  Next time I'll just find a coinstar machine. I don't like waiting a week to have my change counted.  Also I'm sure the banker could fish out the quarters and no one would be the wiser :-)