How stacks work in mtg(can this scenario happen)

Question: A friend of mine and I are playing mtg when he tried to counter my Crystaline Sliver with Final Reward. Is this a legal move?
Comment: Are you talking about the video game version, or just playing with cards?  If cards, I would suggest asking this at [Board & Card Games](https://boardgames.stackexchange.com/).  Here, we only deal with video games, I'm afraid.
Answer: I assume your Sliver is already on the board.
Final Reward needs to target a creature on the board.
Crystaline Sliver's shroud ability makes it that your Slivers can't be targeted.
So because you can't target Slivers, you can't remove it with Final Reward.
If you want to remove the Sliver, you would need something that doesn't target (like a Wrath of God) or something that would target the player and force him to sacrifice something (like Diabolic Edict)
Comment: Thats what i thought as well. He played it as a counter and i didn't believe it was a legal move
Comment: Oh ... so the Sliver was still on the stack ?
Then it doesn't work because it's not a creature YET, but a creature spell.

This difference is important because many blue counterspells have clauses that makes them usable only in certain cases.

See :  [Essence Scatter](https://img.scryfall.com/cards/large/en/m19/54.jpg?1531451298) and [Negate](http://mtgbarato.com/images/cartas/El%20juramento%20de%20los%20Guardianes/NEGATE.full.jpg)


Tensor product of quantum systems

Question: If $H_A$ and $H_B$ are Hilbert spaces corresponding to two systems $A$ and $B$, then the Hilbert space for the combined system is given by the tensor product of $H_A$ and $H_B$. Does this hold irrespective of whether $A$ and $B$ are interacting or not?
Answer: The Hilbert space of a composite system is a closed subspace of the Hilbert tensor product of the Hilbert spaces of the constituents. If the system consists of identical particles then it is either the symmetric subspace (bosons) or the anti-symmetric subspace (fermions). If none of the particles are identical then it is simply the whole Hilbert tensor product.
The Hilbert tensor product is the completion of the tensor product with respect to the norm induced by the natural scalar product on the tensor product and not just the algebraic tensor product, because the algebraic tensor product is in general not a Hilbert space.
The only thing that changes if interactions are allowed is the form of the Hamiltonian. The Hamiltonian is then not just the tensor product of the individual Hamiltonians, but can have extra terms that model the interaction of the subsystems.
Answer: Yes, the combined space of two systems is always the tensor product $\mathcal{H}_A\otimes \mathcal{H}_B$ of the individual state spaces $\mathcal{H}_A$ and $\mathcal{H}_B$, see also this question and its answers.
However, for non-interacting systems, the Hamiltonian is the sum of the two individual Hamiltonians $H_A$ and $H_B$, $H = H_A \otimes \mathbf{1}_B + \mathbf{1}_A\otimes H_B$.
This means that if you start with a non-entangled state $\psi = \psi_A\otimes \psi_B\in \mathcal{H}_A\otimes \mathcal{H}_B$, the time evolution of this state will forever remain non-entangled as
$$\mathrm{e}^{\mathrm{i}Ht}\psi = \left(\mathrm{e}^{\mathrm{i}H_At}\psi_A\right)\otimes\left(\mathrm{e}^{\mathrm{i}H_Bt}\psi_B\right),$$
so effectively you can describe the state of the system by pairs $(\psi_A,\psi_B)$ from the direct sum $\mathcal{H}_A\oplus\mathcal{H}_B$ since they can never become entangled.
However, there's rarely a reason to do this: If the two systems don't interact, why would you want to model them as subsystem of a combined system and not just as two separate system?
Answer: If the states you want to describe are either states of $A$ or states of $B$, its Hilbert space will be the direct sum $H_A\oplus H_B$. This is the case when considering non-interacting particles, e.g. spinless fermions
$$H_A = \sum_{i,j} h_{ij}^{A} c_i^\dagger c_j^{\phantom{\dagger}},$$
$$H_B = \sum_{i,j} h_{ij}^{B} d_i^\dagger d_j^{\phantom{\dagger}},$$
$$H_{AB} = \sum_{i,j} h_{ij}^{AB} c_i^\dagger d_j^{\phantom{\dagger}}.$$
The Hamiltonians $H_A,H_B$ and $H_{AB}$ are quadratic in creation and annihilation operators, and thus the systems $A$, $B$, and also the combined one $AB$, are non-interacting (even though $A$ and $B$ are in "contact" with each other through $H_{AB}$). States of the combined system can be constructed by taking direct sums of states in the corresponding subsystems $\vert i_A\rangle \oplus \vert j_B\rangle$.
If we have a physical system whose states are states of $A$ and states of $B$, its Hilbert space will be the tensor product $H_A \otimes H_B$. For example, taking $H_A$ and $H_B$ as in the example above, but including interactions between particles of $A$ and $B$
$$H_{AB} = \sum_{i,j} h_{ij}^{AB} c_i^\dagger c_i^{\phantom{\dagger}} d_j^{\dagger} d_j^{\phantom{\dagger}}$$
which would correspond to a Hubbard-type interaction. In this particular case, one cannot describe the system $AB$ by states of $A$ or $B$ alone, hence the states of the combined system are constructed by taking the tensor product of states of the corresponding subsystem, $\vert i_A\rangle \otimes \vert j_B\rangle$.

Tensor product of quantum systems


Facebook calendar not displaying properly

Question: I have a Facebook calendar on my Google Calendar. While my other calendars display by name this one displays by its Calendar ID (a string of numbers and characters). Furthermore, the events do not appear. I know that my phone (HTC Legend) already had a Facebook calendar set up, but this calendar displayed birthdays as well and so I didn't want to use it. I have tried adding and removing the calendar on my phone, but nothing has changed. Does anyone have any suggestions on making the calendar display properly?
Answer: I'm not sure about facebook events here because I have very few events ever listed in my facebook calendar. But if you sync your phone with Facebook (Settings > Accounts & sync) and have it sync live feeds, it should display calendar items in your calendar. I know I have birthdays in my calendar that show up and that is how I have facebook sync setup.
If you are setup the same way, try removing facebook sync, clear cache and data from the app (Settings > Applications > Manage application > All, then find facebook and click on it. There should be an option to clear cache and data. Reboot. Then recreate the account and sync.
Not sure if this will help but usually solves most issues...
Comment: I am trying to get my phone with a calendar in Google calendar that is already synced with my Facebook, not use the HTC calendar
Comment: So I still have no idea what you are trying to do. Are you trying to sync your google calendar your facebook calendar?
Comment: My Google Calendar is synced with my Facebook calendar. All my calendars except for my Facebook (on Google Calendar) calendar work. The HTC Facebook calendar works
Comment: This worked eventually. I guess I just needed more patience (Google Calendar tends to sync slowly)


Are the first and second forms of the categorical imperative actually equivalent?

Question: I will put aside any question of possible imprecision of the formulations, I will assume that the Kant's intentions can be understood intuitively reasonably precisely.
Kant gives two forms of the categorical imperative:

Behave in such a way that a reasonable generalization of your action to a universal rule will lead to a benefit to a generic person under this universal rule.
Always treat others as ends and not means.

Kant then claims that 1 is equivalent to 2. Is this correct?
Suppose there were a class of people who liked to be ends. Suppose these people, under certain special circumstances, would like to be treated as objects, for example, as tables. They enjoy being tables, and have tablecloths and wine glasses put on their backs, it does them no harm, and they enjoy the experience, and talk about the experience with joy and regard.
Under these circumstances, knowing that you too might want to be a table at some point, would it be ok to treat these people as means and not ends, at least temporarily?
Is there a precise sense in which 1 and 2 are equivalent, as they seem completely different to me.
Perhaps the answer is that by respecting the wish to be means, not ends, you are treating the people as ends, not means. But then it becomes very difficult to actually determine when you are acting correctly according to imperative 2.
To give a more realistic precise examples, here are some things that are ok under 1 and not ok under 2:

purchasing blood plasma from a poor, willing donor.
lying to someone about something painful (like whether this person has cancer, or whether she is attractive in that dress, etc).
prostitution, dwarf tossing, and other superficially exploitative professions.

In general, I find that formulation 2 is the ethical intuition people are comfortable with (seeing as all three points above are objectionable to a lot of people), and the claim that formulation 2 is equivalent to formulation 1 I think is essentially unfounded.
Can someone who knows Kant better explain?
Answer: There's quite a bit of scholarly debate concerning what Kant means when he insists on the unity of the various formulations of the categorical imperative; the general consensus seems to be that they all would generate the same duties.
It's worth remembering that Kant does not say that we should only treat people as ends, and not as means—rather, we should not treat them as mere means.
The secondary literature on Kant's moral system is enormous, and ever-growing; Derek Parfit's On What Matters is perhaps the most significant and recent development.  A good starting point, however, would probably be the relevant Stanford Encyclopedia of Philosophy article.
Comment: The second paragraph is a *really* important thing to emphasize. Lots of people misunderstand this when reading Kant.
Comment: @RonMaimon: As the SEP article points out, Kant doesn't really make an argument that the two forms are equivalent-- he merely *claims* that they are.  There are, as I pointed out, various ways to interpret the claim (and its validity), but none (that I know of) are syllogistic.
Comment: I was wondering if someone could analyze Kant's argument and see whether it is cogent, in particular concerning the apparent counterexamples I gave. Thanks for the SEP link, there is something there about this, but it does not analyze specific cases like those in the question.
Comment: I'll accept this, if you put the comment in the answer, and if it is actually true--- I had to read Kant regarding this twenty years ago (as part of the required moral philosophy course they made me take as an undergrad, my only philosophy course), and I remember he had an A implies B implies C implies D implies A argument, which is syllogistic, but informal, and I didn't buy it.
Answer: I think there is a point or two to pull out of the original question and supporting expansion of the question.   First, you state, 'suppose there are people who like...' If we take part 1 of Kant and apply a universal rule evaluation, we could say it is good to give people what they like.  So satisfying part 1 eliminates the negative of part 2.   In other words you are not treating those people like 'means', your treating them like ends.    Second, 'treating someone' like a mean versus and end is a rather complicated by the more imprtant fact of allowing the other party to participate in the decision.
Sadly, I am not more well schooled in Kant, but I do enjoy pondering his universal rule.
Answer: As to the example about people who like to be tables - well, as this is their life choice, then treating them as tables is exactly who and what they are by their own admission, therefore we are doing what they want and like.....  there would be no real gain for us, except perhaps the convenience of having an extra table to hand, but really the gain is for them.
So we are not treating them as 'means'.  We are in fact behaving in a way that promotes their desired goals, i.e. to be 'used' as tables, thus we are meeting their ends.
Moreover, it would fit with the first CI, that the action must be one to which universality can be applied, in that we all have ways in which we like to be treated, even if it is not to be used as a table!  Thus we can claim that we are behaving in a way that satisfied the way in which one group of people prefers to be treated, which in itself is subsumed under the universal rule that we take note of everyone's preference/s.
Comment: As already pointed out by @MichaelDorfman in his answer, it is not about not treating persons as means, but not treating them ***merely** as means, not ends in themselves*


Why do some people say the world is overpopulated?

Question: Many times I read or hear that the world is overpopulated. The first thing that springs up in my mind then is "Then kill yourself!". It seems an attitude that shows little value for human life. And mostly, the people who tell us live in a very good situation, away from places where people live like in the favelas or the small alleys of a big city (like Naples).
Why do people say that? Every person has about 0,025 square kilometers to live on (about 150x150 meters). There is a lot of food growing for them. So why say that?
Comment: Because they think that the world's population is too big compared to world's resources. See [Human overpopulation](https://en.wikipedia.org/wiki/Human_overpopulation)
Comment: But why not put it the other way round? Why are resources more important than people?
Comment: Not more important, nut needed... For what I know, the issue is debated: what is the "maximum number" of humans that the world can support? But the answer (if any) must be based on data (approximated).
Answer: Because they don't understand the importance of the demographic transition in birth rates, and this variation in consumption:

Have a look at: Are there philosophically serious moral arguments against eugenics? for an example of reply to someone fearmongering about overpopulation. Anytime this comes up, is an opportunity to hammer home that a demographic transition is about reducing infant mortality, universal education, and access to family planning support. Supporting those in Subsaharan Africa could reduce the point human population peaks by a billion people, and be the best moral & ethical thing, and prevent climate change and help save biodiversity.
As to why people focus on population rather than consumption, I'd say it's about blaming someone else, rather than taking responsibility for how our communities consume. The 'Look at China!' argument to avoid action on climate change in the USA, even though the climate impact per person in China is way lower.
Sunlight, and readily available minerals, can grow us everything we need, regeneratively. The problem is only one of organisation.
Answer:
It seems an attitude that shows little value for human life.

That doesn't mean one is right in mindlessly procreating and thereby increasing population. A new human life is not commanded by God. Humans decide to have children. What's the point in having more people when you are unable to manage or provide for them? Not only we have limited resources on a global (and local) scale, but also that there are operational constraints and inefficiencies in allocating those resources (which is why poverty exists). The issue here is not philosophical or moral, but an engineering one.
Answer: It's all "fear mongering".
There is plenty of room for everyone.
The "food and water shortage" is the same thing.
Their are farmers who get paid not to grow crops(keeps the prices up).
Humans now have the ability to change the deserts into farm lands.
Remove the salt from the water.
Create homes cheaper and faster, and use totaly recycable materals.
Completly self sustainable energy.
Their is truly no GOOD reason why this planet is not the paradise it should be.
Nothing more than corporate controll.
Comment: I think you live in my street, so to speak!
Comment: Wouldn't you think that corporations have a massive incentive "to change the deserts into farm lands."...


Can Apple Push Notifications be used as message queues?

Question: Lets say I have a chat application and I am messaging another user (User B), our messages are being received normally using sockets, however when the User B goes offline he is disconnected from the socket server however user A is continues to text him so my server issues a push notification to User B's device for every message User A sends. My question is will APNS act as a message broker and queue all the messages until User B logs back in and receives them? Or do I have to store unreceived messages elsewhere
Answer: The answer is readily found in Apple's documentation

Apple Push Notification service includes a Quality of Service (QoS) component that performs a store-and-forward function. If APNs attempts to deliver a notification and the destination device is offline, APNs stores the notification for a limited period of time and delivers it when the device becomes available again. This component stores only the most recent notification per device and per app. If a device is offline, sending a notification request targeting that device causes the previous request to be discarded. If a device remains offline for a long time, all its stored notifications in APNs are discarded.

So, no, you can't use APN as a message broker.
You can use the push notification as a signal to wake up and sync with a server-side message queue. RabbitMQ or Kafka might be candidate brokers, and MQTT looks promising as a protocol.   You will need to work out how and when you discard the contents of message queues that are not successfully delivered to a device.
Comment: Is storing unreceived messages in RabbitMq a better approach than just putting them in a database and then selecting them once the user logs back in?
Comment: @RyanMurphy: Rather depends on scale. The approach with a database is harder to scale than a message queue.  Message queues tend to have well defined semantics about 'consuming' messages - if you make a request to a server, which subsequently gets the messages from the db, what happens if the mobile device doesn't receive the reply?   You'll need to build some kind of acknowledgement that the device actually got them before removing them.  In essence you're building a concurrent MSG Q out of a database - and it's not actually that easy.


How to find kernel and image?

Question: I have doubts on how to find the kernel and image for this linear transformation $T:\mathbb{C(R)}\rightarrow\mathbb{C(R})$ defined by: $T(f(x))=\frac{f(x)+f(-x)}{2}$, where $\mathbb{C(R)}$ represents the set of continuous functions in $\mathbb{R}$. I'm lost. Any hints?
Comment: L  It looks like T(f(x)) should be replaced with (T(f))(x).
Comment: Indeed. In fact the definition would be most explicitly written $T(f)=\left(x\mapsto\frac{f(x)+f(-x)}2\right)$.
Comment: To get an idea of what the image is, try this for a few simple polynomials of degree 2, 3, 4, 5, 6. Then you might be able to guess which polynomials are in the kernel. After that it's a straight forward generalization.
Answer: For the kernel, you want $T(f(x))=0$, so $$\frac{f(x)+f(-x)}2=0$$ so $$f(x)=-f(-x).$$ This is the exact definition of an odd function.
The image is the set of even functions, because $T(f(-x))=T(f(x))$ by a simple calculation. And reciprocally, if you take an even function, you can always put it in this form.
Comment: Like in OP, the final formula should be written $T(f)(-x)=T(f)(x)$. One cannot apply $T$ to a real number, like $f(x)$.
Comment: I couldn't agree more ! Though I used the notation of the question to avoid confusion.
Comment: And how to make the image?
Answer: For example
$$f\in\ker T\iff f(x)=-f(-x)\iff f\;\;\text{is an odd function}$$
Now continue on this path and you'll find out the image is pretty simple, too.
Answer: For $\ker(T)$ it suffices to apply the definition: the condition $T(f)=0$ means that $x\mapsto\frac{f(x)+f(-x)}2$ is the zero function, which means that $f(-x)=-f(x)$ for all $x\in\Bbb R$ (i.e., $f$ is an an odd function).
A direct computation shows that this linear transformation$~T$ satisfies $T^2=T$, so it is a projection. For a projection, being in the image is the same as being ones own image: if $f=T(g)$ for any function $g$ then one also has $f=T(T(g))=T(f)$. So the condition for $f$ being in the image of $T$ is that $0=T(f)-f=\left(x\mapsto\frac{f(x)+f(-x)}2-f(x)\right)=\left(x\mapsto\frac{-f(x)+f(-x)}2\right)$, in other words that $f(-x)=f(x)$ for all $x\in\Bbb R$ (i.e., $f$ is an an even function).
One may add, and this is true for any projection, that the whole space is the sum of the kernel and the image of $T$, since every $f$ satisfies $f=T(f)+(I-T)(f)$, where the first term is in the image of $T$ and the second term is (because of $T^2=T$) in the kernel of$~T$. Moreover this sum is direct (the decomposition of $f$ is unique), since a function $g$ cannot be simultaneously in the image of $T$ (so $T(g)=g$) and in the kernel of $T$ (so $T(g)=0$) unless $g=0$.

How to find kernel and image?


Replace product image without getting _1 in filename

Question: I'm in the process of replacing my product images with new photos with the same filename.  When I delete the old image in magento then reupload the new image, it adds _1 to the end of the filename, which makes me think it hasnt really deleted the old image.  How can I fully delete the old image via magento so when I re-upload it keeps the correct filename?
Answer: I haven't tested this myself but you could try looking at:
Mage_Adminhtml_Catalog_Product_GalleryController::uploadAction()
In particular the line $uploader->setAllowRenameFiles(true);
The PHPDoc says:

If this variable is set to TRUE, uploaded file name will be changed if some file with the same name already exists in the destination directory (if enabled).

Try setting it to false and see if images are still appended with a number.
If that doesn't work, take a look at Mage_Catalog_Model_Resource_Product_Attribute_Backend_Image::afterSave() and try the same as above.
It would be great if you could post your results so other people can know which method works.


Indexing on MongoDB UUID field

Question: I have a table in MongoDB having UUID field named artwork_id, and i need to create index on that field, which type of index will be better?
db.artwork_images.createIndex(
{
artwork_id: "text"
}
)
OR
db.artwork_images.createIndex(
{
artwork_id: 1
}
)
[Image of UUID field here][1]
[1]: https://i.stack.imgur.com/XvHsN.png
Answer: Text indexes are meant to match words inside a field without having to access to the document. In this case you have an UUID field, so you are going to match the whole string every time.

Regular indexes are useful for matching the entire value of a field. If you only want to match on a specific word in a field with a lot of text, then use a text index.

I recommend to have a look to this post Performance best practices indexing

Indexing on MongoDB UUID field


Neural Network topology

Question: I am reading about Neural Networks and I always find the same topology for the underlying network: an input layer followed by some hidden layer and then an output layer.
Why are not proposed other topologies for the network connecting neurons?
Is the standard topology a sort of a "well behaved" topology for which we can apply our learning algortihms and we are sure of convergence?
Comment: Take a look at: https://www.asimovinstitute.org/neural-network-zoo/
Answer: There are many other topologies.  What you are describing is the basic feed-forward neural network.  The feedforward topology cannot be more complex than input->hidden->output. Feed forward means that the inputs to one layer depend only on the outputs from another (or, in the case of the input layer itself, they depend on whatever the inputs to the network are).  what's missing in the FF topology is that it is possible to create a Neural network in which the inputs to some of the previous layers are the outputs of future layers.
These networks are extremely cool, but there are so many ways to to create them that you often don't see their topologies described in introductory stuff.  The big benefit of such a network is that the network can re-process old data.  This lets you do things like search for time-dependent or transient events without providing a huge vector of inputs that represents the time series of the quantity under consideration.
Perhaps the problem is that there is no such thing as a "prototypical artificial neural network".  We often begin learning about them by learning about the basic perceptron and its generalizations, but then you need to spend a lot of time studying individual network types before you understand their unique uses, advantages, and disadvantages.
To get started on learning about convolutional neural network and other more complicated structures, Wikipedia is a good resource
Answer:
You might find this paper, titled "How many hidden layers and nodes" very relevant as it addresses your question directly. http://dstath.users.uth.gr/papers/IJRS2009_Stathakis.pdf

In general,
The basic topology you describe-three layers, one hidden-is sufficient to approximate any continuous function on compact subsets of $\mathbb{R^n}$, a result which is due to Cybenko.
Cybenko opted for simplicity and generality and this architecture achives this. Adding more layers or choosing to connect neurons in a different fashion generally means better approximation but you have to take into account the particularities of the problem, the degree of approximation you wish to achieve, the computational power available. To a significant degree it's trial-and-error and experience.
On a sidenote, besides Cybenko's approximation, there is another- far stronger-result, Kolmogorov's Superposition Theorem (Or Kolmogorov-Arnold Representation) which states how a continuous multivariate function can be exactly represented. Hecht-Nielsen later showed how this can help in designing a neural network.

Neural Network topology


How do you know if an aircraft engine has a supercharger?

Question: The engine I'm specifically thinking of is for the C-130J Hercules, it's the AE-2100 D3.
Answer: As Bianfable has pointed out, the C-130 Hercules does not have a supercharger or a turbocharger. No turbine-powered aircraft have them. Turbine engines do not need these forced-induction chargers since turbine engines compress the intake air themselves. It would be impractical to design a supercharger or turbocharger for them.
The easiest way to know if a piston-engined aircraft has a supercharger or a turbocharger is to check the aircraft's POH. If one is not handy, you can look at the aircraft engine itself.
An engine with a supercharger will have an accessory belt (usually wider than the other accessory belts) attached to the crankshaft or flywheel. In older aircraft (WWII, Korean War, etc), the supercharger will be less obvious. These may even be chain or gear-driven. The application of superchargers in this case would be for large, powerful engines.
An engine with a turbocharger will have the exhaust manifolds converge down to one pipe. That pipe will feed into the exhaust turbine of the turbocharger. Although, the exhaust turbine might not be readily visible, the housing for the compressor impeller should be more obvious and may obscure the turbine. What would be more obvious would be the additional manifold piping and ducting.
If neither of the above are accessible, just look at the model name of the aircraft. Most modern small General Aviation aircraft manufacturers will want to advertise that their model is turbocharged. A manifold pressure gauge that goes beyond 30 inches of Mercury may be an indicator as well.
Comment: Thank you for all your help everyone!
Comment: Do you know if turboprop engines have a critical altitude like engines with a supercharger?
Comment: @BillShao - To be clear, there is a big difference between a turboprop engine and a turbocharged engine with a propeller. Terminology is important here. Turbine engines can be classified as turbojet, turbofan, turboprop, or turboshaft. Piston engines can be classified as naturally-aspirated, supercharged, or turbocharged with a further classification of carbureted versus fuel-injected. The term "Critical Altitude" is most commonly used with force-induction engines like ones with superchargers and turbochargers. It is generally not used with turbine engines.
Answer: Superchargers and turbochargers can be used on piston engines to increase the manifold pressure above ambient pressure, meaning more air can go into the cylinder during each stroke. This increases the power output of the engine. While superchargers were quite common in high performance aircraft of the past, they are relatively rare today. Most aircraft piston engines today are naturally aspirated or turbocharged:

Back in the mid-1900s, and especially during WWII, superchargers were usually the engine boost of choice. Their simpler operation was one of the main reasons. Another reason they were popular was a lack of metals that could handle the heat produced by turbos. Gas was also very cheap, so it wasn't that big of a deal to burn a little more gas to get the power output you wanted.
High temperature alloys, lighter weights, and better fuel efficiency have all made turbos the best choice for almost all of today's aircraft. And, with automatic waste gates on many models, they're easier (and more foolproof) to operate than ever before.

(boldmethod - What's The Difference Between Turbochargers and Superchargers?)
The Rolls-Royce AE 2100 engines used on the C-130J Hercules are turboprop engines. They don't have any pistons and therefore no super- or turbochargers. A turboprop engine looks something like this:

(Wikimedia)
The air entering the engine goes through a series of compressor stages, which increase the pressure, before going into the combustion chamber. This is more equivalent to the compression stroke of the piston engine, but like a supercharger this compressor is powered by the engine itself (it is on the same shaft as the turbine). Every turbine engine has such a compressor, but it is never called a supercharger.

To answer your title question, how do you know if an aircraft engine has a supercharger? For a piston engine, it will be specifically mentioned, since it is relatively special. But for a turbine engine: never.
Comment: Thank you for the information!
Comment: I've read that the reason for turboprop engines is that after WWII, research was done to find the optimum size of turbocharger for a piston engine.  Turned out the optimum was to delete the piston engine entirely.
Answer: As in immediate recognition, for spotters for example, the easiest way to tell the difference is by the sound they make, more specifically on take-off.
Turbines have a fairly high singing pitch, due to their rpm, whereas piston engines, making a generally much lower pitched brawling sound, only have such a high pitch added to their sound profile if they are either turbocharged or supercharged. Not a very technical answer, but if you just want to be able to tell the difference, that's a way to do it.


How to quickly compare one set of booleans to many other sets of booleans (order matters)?

Question: I'm running into a problem with a project I'm working on in my spare time.  I'm using Google App Engine (Java version), but this question is not specific to that platform, and I would consider other languages/platforms if they could solve the problem.
The following illustrates the problem:
Suppose I have a datastore with thousands of recipes, and the ingredients for each recipe.  (For the sake of this illustration, forget about measurements.)  I want to be able to enter a list of ingredients that I have on hand, and then quickly retrieve all recipes for which I have at least XX% of the ingredients (let's say 75%).  I'm willing to sacrifice some accuracy and some results for speed, but do want a certain degree of accuracy.  I can do a more thorough comparison after I get the "quick results."
My attempt at a solution:  Analyzing the database of recipes, I compile a list of, say, 200 common food ingredients (eggs, flour, salt, sugar, rosemary, etc).  Almost all the ingredients for the recipes are contained within this master list:
Common Food Ingredients: [ eggs , flour , salt , sugar , cinnamon ... ]

Then, I go through each individual recipe and compare the ingredients to this master list, and end up with a set of 200 booleans for each recipe:
Recipe #106: [ T , T , F , T , F ... ]
Recipe #107: [ F , T , T , T , F ... ]

I would store this information with the recipes.  (Up to this point, it's all data prep work, which I have all the time in the world to do.)
Now, I enter my list of ingredients on hand.  I would do the same comparison with the master list:
My ingredients on hand: [ F , F , T , T , F ... ]

And this is where I'm stuck.  How can I quickly compare this set of booleans against the sets for the recipes so I can identify recipes for which I have at least 75% of the ingredients?
Or (and this would be the holy grail), during the data preparation, instead of storing the set of booleans themselves with each recipe, is there a calculation I can perform that will give me a single value I can later filter off of?  (E.g., "SELECT * FROM recipes WHERE master_list_boolean_metric <= 29")
Or am I going about this the wrong way?  (Any guidance, general or specific, would be appreciated.)  What I want to avoid is doing a slow comparison, ingredient by ingredient, between each recipe and my list of "on-hand" ingredients.
Or... perhaps it isn't possible to do this quickly?
Answer: use BitSet.
store each ingredient as one bit, do an AND with the ingredients you have, and then filter on cardinality()
Comment: The difficulty with doing this is I would have to retrieve from the datastore the BitSet of each recipe (of which I have thousands and growing), then in a loop compare each to the BitSet of ingredients I have.  I think this could be performance intensive, depending on how many recipes I have.


Extracting IPTC/EXIF data from tif files in using Java

Question: The system I'm working on has a feature to extract metadata from JPEG files using the com.drew.metadata package. http://www.drewnoakes.com/code/exif/ However that is limited to JPEG files, and now a customer has asked about extracting IPTC from TIF, and possibly other image formats.
Does anyone know about similar APIs to Drew Noakes one, that can extract IPTC from TIF?
Ideally this would be a pure Java approach like the com.drew.metadata one.
Answer: This is an old question. Nowadays my metadata-extractor library supports TIFF files, as well as JPEG, WebP, PSD, PNG, GIF, BMP, ICO, PCX and many camera raw formats.
The project recently moved to GitHub:
https://github.com/drewnoakes/metadata-extractor
And is available via Maven:
http://search.maven.org/#search%7Cga%7C1%7Cdrewnoakes
Answer: I spent some time recently coding the metadata manipulation part of icafe Java image library and make it able to insert and extract metadata types like EXIF, IPTC, PHOTOSHOP, ICC_Profile, thumbnail etc. Some functions are better than others, but they all relatively work fine. There is a common interface for all the metadata reading shown below:
import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.Iterator;

import com.icafe4j.image.meta.Metadata;
import com.icafe4j.image.meta.MetadataEntry;
import com.icafe4j.image.meta.MetadataType;
import com.icafe4j.image.meta.iptc.IPTC;

public class ExtractIPTC {

    public static void main(String[] args) throws IOException {
        Map<MetadataType, Metadata> metadataMap = Metadata.readMetadata(args[0]);
        IPTC iptc = (IPTC)metadataMap.get(MetadataType.IPTC);

        if(iptc != null) {
            Iterator<MetadataEntry> iterator = iptc.iterator();

            while(iterator.hasNext()) {
                MetadataEntry item = iterator.next();
                printMetadata(item, "", "     ");
            }
        }
    }
    private void printMetadata(MetadataEntry entry, String indent, String increment) {
        logger.info(indent + entry.getKey() (StringUtils.isNullOrEmpty(entry.getValue())? "" : ": " + entry.getValue()));
        if(entry.isMetadataEntryGroup()) {
             indent += increment;
             Collection<MetadataEntry> entries = entry.getMetadataEntries();
             for(MetadataEntry e : entries) {
                printMetadata(e, indent, increment);
             }
        }
    }
}

If we pass the image "iptc.tif" from the "images" directory of the project as the argument, we will get the following information:
Record number 2: Application Record
Dataset name: Keywords
Dataset tag: 25[0x0019]
Dataset size: 6
Dataset value: Bayern
Record number 2: Application Record
Dataset name: Keywords
Dataset tag: 25[0x0019]
Dataset size: 11
Dataset value: Deckelstein
Record number 2: Application Record
Dataset name: Keywords
Dataset tag: 25[0x0019]
Dataset size: 7
Dataset value: Germany
Record number 2: Application Record
Dataset name: Keywords
Dataset tag: 25[0x0019]
Dataset size: 10
Dataset value: Nittendorf

The above code works for JPEG and TIFF alike. It automatically detects the image type and delegate to corresponding code to do the work.
NOTE: there could be more than one places in a TIFF file which contains IPTC data. One is RichTiffIPTC tag, the other is buried inside a Photoshop tag. Currently, icafe only keeps one IPTC data. If both Photoshop tag with IPTC data and a RichTiffIPTC tag exist, it will keep the RichTiffIPTC data. Otherwise, whichever tag exists, it will keep IPTC data from that tag. There is no problem keeping data from both places. Current implementation using a map mapping a metadata type key to a unique metadata. So it only keeps one unique metadata instance.
Update: icafe can now combine IPTC data from both RichTiffIPTC and Photoshop IRB and remove duplicates.
Update2: The base class of all the metadata types in ICAFE - Metadata now implements Iterable interface so the user can now iterate through a collection of MetadataEntry. MetadataEntry itself is created using composite pattern so a MetadataEntry can contain a collection of other MetadataEntry. Each MetadataEntry contains a key and a value pair. This design allow for a tree structure traversal of the metadata entries.
Answer: There's a good example here of using the imageio lib to access IPTC here
http://www.barregren.se/blog/how-read-exif-and-iptc-java-image-i-o-api
Unfortunately, you'll still have to handle some of the work yourself.
Comment: The link is broken :(
Answer: If you cannot find a pure Java implementation, you could consider using the Java bindings to ImageMagick (JMagick). That would allow for a plethora of different possible output formats.


Where can I find a full language specification of Salesforce Apex?

Question: I am considering building an IntelliJ IDEA plugin for Salesforce Apex & Visualforce. To do so I need to find the Salesforce Apex language specification. I read other posts on the internet of similar requests of a couple of years old, but they don't include a satisfying answer. Things might have changed since then. Does anybody know I such a language specification is available. If so, where can I acquire it? Thanks so much!
Comment: http://www.salesforce.com/us/developer/docs/apexcode/index.htm
Comment: If you start the project - i would join!
Answer: There is no formal specification of the compiler since it is cloud native:

When a developer writes and saves Apex code to the platform, the platform application server first compiles the code into an abstract set of instructions that can be understood by the Apex runtime interpreter, and then saves those instructions as metadata.
When an end user triggers the execution of Apex, perhaps by clicking a button or accessing a Visualforce page, the platform application server retrieves the compiled instructions from the metadata and sends them through the runtime interpreter before returning the result. The end user observes no differences in execution time from standard platform requests.

There is documentation for specific source code limits:

Description  							  Limit
Maximum number of characters for a class 			1 million
Maximum number of characters for a trigger 			1 million
Maximum amount of code used by all Apex code in an org 		 6 MB
Method size limit 						65,535 bytecode
instructions in compiled form

As well as definitions of the different execution contexts:

A class is a template or blueprint from which Apex objects are created. Classes consist of other classes, user-defined methods, variables, exception types, and static initialization code. From Setup, enter Apex Classes in the Quick Find box, then select Apex Classes.
A trigger is Apex code that executes before or after specific data manipulation language (DML) events occur, such as before object records are inserted into the database, or after records have been deleted. Triggers are stored as metadata in Salesforce. A list of all triggers in your organization is located on the Apex Triggers page in Setup.

And deployment strategies:

Starting in Summer '18, each org's Apex code is now automatically recompiled in production when completing a metadata deploy, package install, or package upgrade. This change in behavior improves performance following metadata deploys and package updates. Previously, a deploy, install, or upgrade could leave an org with invalidated code, causing reduced performance while Apex was recompiled. This feature causes deployments to the org to invoke the Apex compiler and save the resulting bytecode as part of the deployment. A minimal increase in deployment times can occur, but Apex doesn't need to be recompiled on first run. So the slight increase in deployment time can prevent performance issues on first run.
However, if you see a lot of classes that need to be recompiled, you definitely want to make sure that deployment happens in off-hours!

As far as an IDE plugin, a similar question may be helpful.
References

How Does Apex Work? | Apex Developer Guide | Salesforce Developers

Apex Code Overview

Keep Your Org in Tip-Top Shape with Deployment Best Practices | Developer Force Blog

Salesforce Developer Limits and Allocations Quick Reference (pdf)

Salesforce Summer '18 Release Notes: Compile on Deploy Generally Available

salesforcedx-vscode Issue #648: Syntax highlight doesn't understand Apex Switch statements


Where can I find a computational fluid dynamics model of a full quadcopter or multirotor?

Question: I have searched for any computerized graphics visualization of a quadcopter or other multirotor and all I am able to find are a very few models of a single propeller. (Simscale has an example of a single quad arm and rotor here:) Has anyone seen a full multirotors visualizations produced by computational fluid dynamics (CFD)? NOTE: I am not looking for a schematic animation. Those are abundant.
Comment: I've not seen anything like that. I'm sure it exists in some limited fashion (DJI internal docs certainly, and maybe drone racing?), but multirotors are pretty uninteresting when it comes to flight dynamics. Basically, they ain't got none. They're literally the real-world manifestation of "you can make a barn door fly if you put on a big enough engine". They're comedically draggy and have odd regimes of flight. They're also indestructible, which is why we love them. But IMO from a scientific perspective their interest is for their motion dynamics, not in their aerodynamics. Hope you get lucky!
Comment: @KennSebesta I may need to make my own luck. I am looking at SimScale and there are a very limited number of studies of propellers. And a couple of studies of rotors on arms similar to how we typically see drones built today. So, it might turn out I may be the first to attempt it.
Answer: You can make your own using free software.
Let's take Fusion 360 as an example, in its simulation suite it has a Computational Fluid Dynamics study option.
If you're willing to design an accurate-ish model of the aircraft you want, or pay someone to design one for you, you can run the CFD simulation and get the results for yourself.
This is obviously CPU intensive so there is an option to run it in the cloud on Autodesk's servers.
Comment: Thanks @Drones-and-Whatnot I have used Fusion 360 in the past and just recently noticed that it has this feature, but I must be really bad at finding the free demo version of the CFD feature. I will return to it and give it my best effort.
Comment: All evidence I find is that a subscription is required to use the CFD feature of Fusion 360, It is not available in the free version. ~~ I am open to correction if anyone finds otherwise.
Answer: Thats definetely a late response but in case anyone is interested in the same topic, I found SimScale platform quite handy when trying to test a couple of CFD and FEA models.
With respect to drones, they provide this public (and free) Quadcopter Drone CFD simulation model.
If you are new to simulation, it might definetely be a good starting point.
Good luck!


Identifying PLA/PETG or ABS

Question: I received a roll of Black filament as a present, and struggled to print with it, experiencing extreme under-extrusion (and slippage of the hobbed gear). Higher temperatures seemed to work better, particularly in freeing up the extrude rate.
The filament is advertised as PLA, but without any temperature recommendations that I can find on the vendor's website (or the amazon listing). Amazon reviews have a fairly wide range of temperatures, but the listing aggregates several colours. There is a suggestion that the filament may be PETG, or ABS.
I have tried using acetone, and it dissolves roughly the same as some ABS I have, my PLA shows some weakening but doesn't dissolve.
Below about 215°C, extrusion is borderline non-existent. I printed at 225°C with a fan, and it extruded kind of OK, but adhesion was poor. 240° without a fan seems a bit on the hot side (see photo). Even 255°C seems to extrude OK without burning. There is no smell I can observe (but I have a cold). It burns with a small blue flame, and minimal smell (kind of like natural gas).
One factor against it being ABS is that with the bed at 60°C, printing both a benchy and the heat tower below, there was no warping. Bed adhesion remained good.
Is there anything I can do to better identify this filament and decide the best combination of fan/temperature without wasting too much time?
255° to 225° heat tower, seems different to the ABS i've used:
Answer: There is a trick. However I would like to mention that chances are that the random spool you pickup from most stores, especially no name brands, are either completely lying to you about its material or is mixed / cut with cheaper fillers. All about finding a good brand. Course rarely does one actually need pure PLA, a mixed material will often perform as well without you even noticing. Aside from the temp difference. Not to say it is right.
Now the trick is this. While I don't advise ever breathing in potentially carcinogenic plastic smoke. You take a lighter. Burn it. If it smells sweet it is PLA.
From this link from digital trends about PLA VS ABS you can see why it has this smell.

The thermoplastic is also more pleasant on the nose, as the sugar-based material smells slightly sweet when heated opposed to the harsh smell often associated with ABS. However, while PLA might seem like a better overall choice at first glance, it features a far lower melting point than ABS.

Also not responsible if you burn yourself or your property. At your own risk.
Just warming it with lighter might work too. But just burning a small section. It will be real clear.
Or you could just drop a bit into aceton and see if it melts. PLA will mostly just look like crud after being treated is aceton. ABS is 100% dissolve.
We see from these forums that PETG does not dissolve via Aceton. So you can test you material. If it does disolve it is ABS. If it smells sweet when burned it is PLA. If it melts at 240 and does not dissolve it is likely PETG.

Solid forums
3d printboard

We are a bit lost on a test for PETG. However we do know its melting point. Which is 240-260c. I would say it is likely you have ABS

Once we know the material we can get to the meat of your question.
Best way to proceed is to start with simple calibration prints. The thin wall. Cube, and part fitting. Once those pass you are good to go. Other than buying simplify3d I do not know of any short cuts. Back when I used slic3r I kept a spread sheet. I would change a temp by 5 degrees and give it a quality score. Repeat with speeds. Far as fan, I would expect that it wont effect much. Maybe need to calibrate your PIDs.
Once you have it dialed in, all you will need to do is calibrate the temp when switching materials. Remember you need to calibrate even between different colors (okay its best to.. I often skip) I usually do the temp adjustments live on the printer. Increase and degrease a few degrees. For me the goal is to have the plastic as cool as possible. That allows for highest quality prints (ie less oozing and such)
Comment: Pla melts at 175ish so I am sure you do not have PLA
Comment: At 190 I can barely push it through the extruder at all. 210-215 seems to be where it starts to flow.
Comment: I use a hot solder iron. Lower temperature than a lighter and still releases the PLA smell.
Comment: Well your thermal couple / thermizistor might be over reporting. Updating answer.
Comment: I assume you mean ABS in the middle of the answer? How about PETG? Is that eliminated?
Comment: @SeanHoulihane I am afraid I do not understand your comment about ABS. No I do not say PLA and meant ABS in my answer. We have ID it as PLA from to the smell. Again not to say it is pure or of good quality. Here is more on PETG https://www.reddit.com/r/3Dprinting/comments/3mef9i/so_tell_me_about_petg/
Comment: There is no pla smell...
Comment: Its also very flexible (at least in a single layer), which doesn't seem to point to PLA.
Comment: Yeah but you didn't actually burn it.. but if you burn it and it does not smell sweet the. No it won't be pla. Anything is flexible at 1 layer.
Comment: "I have tried using acetone, and it dissolves roughly the same as some ABS I have" ----

Well this is the answer: If it dissolves completely in acetone then it's ABS. Neither PLA nor PETG dissolve in acetone. Some ABS brands have reduced styrene content to reduce the smell, also ABS doesn't smell much at lower temperatures. It takes 250C to make some of my filaments to **really** stink.

Identifying PLA/PETG or ABS


Whose password should I enter?

Question:
Authentication is required to perform this action.

Whose password should I enter? Mine? Root's? I can never tell.

Answer: Yours. What you are looking at is a gksudo window. It is the same thing as sudo, a program that allows you to run things with root privileges by entering your password.
Comment: @ColonelPanic on most systems (at least debian ones) `gksudo` is actually a link to `gksu`. Anyway, if you're asked for root's password that will be made clear to you. If you are asked for a password with no more info, then 99% of the times, you should enter you user's password.
Comment: I understand the rules "if you ran `su` then type root's password" and 'if you ran `sudo` then type your own password' but I didn't [explicitly] run either! I just tried to open something from the menu. How can you tell `gksudo` apart from its twin `gksu`?
Answer: In Fedora, chances are that the password this dialog is asking for is indeed your own user password. However, in the ecosystem of Linux and Unix, this is not always true.
gksu and gksudo are a GUI front-end to sudo, which in turn pays attention to /etc/sudoers. Adding rootpw as a parameter to a user, group, or a default definition in /etc/sudoers will require the root password entered for that user, group, or by default in all of the above sudo's, unless otherwise overridden. See https://superuser.com/questions/161593/how-do-i-make-sudo-ask-for-the-root-password for more info.
While this is not the default for most Linux distributions (I can't speak for Unix much), I seem to remember that it was at least, for a time, the default in OpenSuSE. This was one of the very first things I disabled when doing a new install.

Whose password should I enter?


how to find out Schedulable class is already scheduled or not?

Question: I have a apex class which implements Schedulable interface, I want to find out whether this class is already scheduled or not? Please help me with SOQL query to find out this.
Answer: To find out if a given class is scheduled use an SOQL query like:
SELECT Id, CreatedById, CreatedDate, Status, CompletedDate
    FROM AsyncApexJob
    WHERE ApexClass.NamespacePrefix = :namespace
            AND ApexClass.Name = :className

Where namespace is your namespace (leave out if you are not in a package) and className is the class name string, such as "MyExampleSchedulable".
Answer: Best place to start is the Monitor Asynchronous Apex trailheal module.  Gives nice SOQL queries, like:
AsyncApexJob jobInfo = [SELECT Status, NumberOfErrors
    FROM AsyncApexJob WHERE Id = :jobID];

Comment: I don't know jobID, I have only class name or Class Id with me. How do we find out this class is already scheduled in system or not?


Why should I attack the leg of the dragon?

Question: When fighting a dragon, I can either aim for the whole dragon, or pick a specific leg to target.  What are the benefits of attacking the legs?  Does it matter which one I pick?
Comment: Maybe an arrow to the knee will help? ;)
Comment: @djsmiley2k I don't need any more city guards, especially dragon city guards :p
Comment: I would assume it would hamper their movement capacity if you got beyond some damage threshold. I started playing this game, but didn't get into fighting dragons yet.
Answer: According to this guide,

You can attack any of the dragon's limbs and his maw. It does not really matter but, if you land multiple strong strikes against one of the elements, the dragon may pause his attacks, writhing in pain.

For more clarification on what damaging the limbs does, this states

Both for dragons and giants if you inflict enough damage on the legs they end up resting on one side (dragons) or kneeling down (giants). It's very clear when that happens. They don't move in that case and you can dish out a lot of damage without fear of being attacked with the proper positioning. After a little while they go back to their normal state, so it's possible that, since dragons love to fly away and come back, the status was resetted or interrupted by such sequences

As for which to target, it doesn't seem to matter, though having a few people attack one while others attack another seems to be a common way of splitting its focus so that at least one group can take out a leg.


Can I create 10VAC from 12VDC?

Question: I've got a 12VDC input thats being used to create 5V to run a AVR and 8V to run 8DC motors. I need 10VAC as well to run some accessories. Basically they are just switches controlled with a solenoid. So the draw on the 10VAC will be minimal.
Comment: (1) Have you opened one of these switches?  What's inside of it?  Are you sure that you need AC?  If there is a rectifier, then there is a chance that DC could work.  (2) Solenoids are current-controlled In my experience, "*solenoid*" usually doesn't spell "*current draw will be minimal [as minimal comes]*".  Then again, it could be a very small solenoid.
Comment: Yes you can. Look into inverters.
Comment: Pretty sure you could just use an H-bridge to drive it from 12V. By tweaking the high and low times you could approximate 10V of AC. As Jasen says in an answer.
Answer: It seems to me you could produce an approximation of 10V AC from your 12V input if you can drive an H-bridge with the right timings.
see "modified sine wave"
Answer: It can be done.  There are two divergent paths -- the first:  If you have plenty of excess 12V capacity (more than a few amperes worth), you could simply buy a small inverter at an auto jobber, and power a garden variety Märklin compatible accessory transformer.  This will be horribly inefficient, but requires no designing or construction.
The second, much more complex path, would be to design a custom inverter.
Something that would take 12V and regulate it down to 10V, and feed that into a transistor array called an "H-Bridge" to generate 10Vrms (more or less) AC.
Comment: Adding a separate inverter to pre-regulate the 12V down to 10V prior to the H-bridge seems like an un-necessary step.  I built a 600W sine-wave generator and I just used a 40kHz PWM and an LC post filter to make a nice smooth sinewave of any amplitude less than the supply.

Can I create 10VAC from 12VDC?


How do 1s and 2p orbitals overlap?

Question: In the following figure
we can see that the p-orbitals overlap 1s orbital (though relatively very little). How can an electron in p-orbital, be simultaneously in the 1s orbital at any given point in space and time?
Answer: The question is interesting, but slightly ill-defined.
If you take s and p orbitals as a solution of Schrodinger equation of hydrogen-like atom, then they are eigenfunctions of Hamiltonian, therefore are orthogonal. That means - no overlap. Do not be misled by the figure, if you do the math properly, $\langle1s|2p\rangle = 0$.
If you speak of just one electron, the solution is reasonably simple as stated in the article and the electron does not simultaneously reside in both orbitals. Even if you would think of interaction with excited states, it would not help, as single excitations do not interact with ground state. You can of course excite it, but than it is not "simultaneous".
In many-electron system, the picture gets more complicated, but this was not a question.
Answer: It is important to know that the overlap must be performed with the wave functions $\psi_j(\vec{r})$, not the density, $\rho_j(\vec{r}) = \psi_j(\vec{r})^* \psi_j(\vec{r})$. Wave functions have signs; they oscillate, as these oscillations encode the momentum distribution $\rho_j(\vec{p})$.
When you calculate the overlap between $\psi_s(\vec{r})$ and $\psi_p(\vec{r})$, $\int_V \psi_s(\vec{r}) \psi_p(\vec{r}) dV$ ($V$ is the volume) you should remember that the lobes of the "p" wave function have different signs, while the spherical $s$ wave function keeps the same sign over the surface of the sphere. Therefore, the integral has two identical but opposite (different sign) contributions that cancel the overlap.
Answer: Remember that the orbitals are really just approximations showing the most likely places for an electron with a given set of quantum numbers to be. If you don't apply a cutoff (like less than a 1/1000000 chance), all orbitals would encompass the entire universe. We just make pictures like this by identifying the places that an electron could be within some margin of probability.

How do 1s and 2p orbitals overlap?


What could be expressed by "Ja, klar" in different situations?

Question: If I say "Ja klar", What are the different meanings expressed by this expression?
Comment: Depending on context and tone this can mean everything from "I agree and understand" over "I know and don't care" to "I don't believe you"...
Comment: exactly, I would like to understand it's meaning assuming different contexts and mood of person. Can you please elaborate it and add it as answer. thanks.
Answer: I think that there are three main meanings for this expression.

First and more literal one is one you want to say that you agree with what the other people just said.
When you want to say that what the other people said is obvious and unnecessary.
In a sarcastic way when you want to say what the other people said is just no sense.
Answer: The meanings are quite the same as of its verbatim translation

Yes, of course.

As in English, it depends on the context if it should be interpreted literally or ironic. And as in English, if you hear this answer, there are situations where you can't be shure if it is meant literally or ironic.
Comment: Ja, klar.
Answer: It means "But of course..." and then the speaker says more on the subject. It is usually in response to a question requiring a confirmation.
Comment: First of all, *But of course* isn't necessarily followed by any further context. Secondly, this expression - afaik - doesn't have any additional negative expression as *Ja, klar*, thus I consider *But of course* equally to the German *Aber natürlich* or *Aber selbstverständlich*. But of course it can also be used to introduce any obvious opposite as in this sentence.


SharePoint New/Edit Form Separator

Question: I would like to have some headlines/separators between columns in the New/Edit form in a SharePoint List. Basically, I would like to have a separator in between the categories to which the columns apply. I attached a picture with a structure of what I would like to achieve. Anyone has any thoughts/experience on how this can be achieved?
Comment: OP wants (at least as far as I understood the question) to group fields together by arbitrary categories in the New and Edit forms of the list.  In his image, his list has seven fields.  He has them split into three categories.  The New/Edit form should group those fields by category, separated from each other and headlined.  I hope this helps whoever thought the question was unclear.  OP, let me know if I got it wrong.
Comment: Yes, that is exactly what I want. I've seen many examples of this being done in InfoPath, but I have no experience with it, so I was wondering if it can be done in another way.
Answer: You will need to create custom forms for your requirement. The most popular ways to create custom forms are:
SharePoint Designer:
Creating a custom form in SharePoint Designer is relatively easy. You take an existing SharePoint list and use Designer to create a new .aspx page which renders and controls the form. There are files used by a list to create forms, one each to add, edit and view. These are located in the same folder as their associated SharePoint list. With Designer you can show or hide fields based on certain criteria, change the layout, use various types of data controls, add rich text and graphics, and if needed work with the code used by the form.
Refer this article for more information.
InfoPath
InfoPath is Microsoft's dedicated form creation and editing tool. With little or no coding, you can use it to build complex forms that can access many data sources to add, edit and delete. You can create multiple views within a form and choose which one is displayed when the form is opened. InfoPath requires Forms Services though, which only comes with SharePoint Enterprise. If you are using the Standard edition or WSS you need to upgrade or purchase the separate Forms Server product.
Unlike SharePoint Designer, InfoPath is only a forms editing tool and does not provide additional web page editing features. It's not very intuitive to use and you are limited to the functionality it offers, which covers most business needs though.
InfoPath works well with structured data, and can handle large text fields, calculations, business logic, and integrated workflows. You can only edit one item at a time though.
Visual Studio:
Visual Studio is Microsoft's integrated development environment and can be used to develop anything, from Windows Mobile apps to websites. It is a software developers tool and is well beyond the reach of a non-programmer. Like SharePoint Designer, it can be used to extend the functionality and layout of SharePoint's default list forms, plus it can be used to extend InfoPath solutions.
The sky is the limit though when it comes to possibilities. Any limitations you've encountered with other form tools can be addressed with Visual Studio. A skilled software developer will be able to create any functionality you have seen on any website or application.
For other alternatives refer below article:
Reference:Seven Ways to Create a Form in SharePoint
Answer: This is easily achievable using SharePoint Designer. Create a custom form New and Edit which is available on a click of button. then arrange your fields under a group as you like and provide label with the heading.
Download SP Designer.. its very simple.

SharePoint New/Edit Form Separator


Do serial numbers for X.509 certs need to be strictly sequential or can they be timestamps?

Question: Serial numbers need to be unique for X.509 certs. But do they need to be strictly sequential or is making them equal to the time that the cert was generated sufficient?
Answer: They do not have to be sequential. Furthermore, there are some issues with using predictable serial numbers, as described in this post:
https://crypto.stackexchange.com/questions/257/unpredictability-of-x-509-serial-numbers
Comment: When using unpredictable serial number, there is a danger of collisions. The integers should be large enough to reduce the chance of collisions. One person in the post that I linked in my answer is suggesting 128 or 160 bits, but thatch just a suggestion. There is no official recommendation. It probably also depends on how many certificates you plan to generate.
Comment: There _is_ an official recommendation: for backward compatibility with some deployed implementations, the serial number encoded value should fit in 20 bytes -- thus you can use integers up to 2^159 (DER encoding of an INTEGER is signed, so there must be room for a sign bit).
Comment: That kinda makes me wonder what the integer length should be. Normally integers are 32-bits but in the case of X.509 / ASN.1 the sky is the limit. Heck - you have the integer type used for RSA keys with 2048-bit "integers".
Answer: Just look at CA/Browser Forum Baseline Requirements v1.3.0, 7.1. Certificate Profile:

CAs SHOULD generate non‐sequential Certificate serial numbers that exhibit at least 20 bits of entropy.

and you will know the answer.
Answer: I am looking at the specification and it states that it has to be UNIQUE. It doesn't state it should be sequential or otherwise. Also the value is an "integer".

220.127.116.11  Serial number
The serial number is an integer assigned by the CA to each
  certificate.  It MUST be unique for each certificate issued by a
  given CA (i.e., the issuer name and serial number identify a unique
  certificate).

Edit,

I agree with @pineappleman - while the specs don't spell it out - it
makes sense to not have predictability in the serial numbers.
Also an issue with timestamp is you will have to somehow ensure that 2 Certs
requested at the same time do not get the same serial number.


how to config color when i use iterm2 ssh linux server

Question: I use Mac
and use iterm2 ssh login linux Server
.
but when exec ls
the terminal is Black and White
how to config then like  mac colors
Answer: The default TERM type iTerm reports is xterm and that should be sufficient from your Mac's end of things to see colours. The problem is there are two things in play here: your local iTerm terminal and the remote machine and it's shell configuration. If you haven't setup your shell to show colour, it doesn't matter what your iTerm is reporting for TERM.
It sounds like the problem is on the remote end and that you haven't configured ls on your Linux system to output colours.
Try setting LS_COLORS in your environment after you ssh in to your Linux machine. Here is one way to do it:
export LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32'

That should give you a fairly good chance of ensuring you see colours when you run ls on any directory. If you like the settings, make them permanent by adding that line to your ~/.bash_profile file on the Linux machine.
You can also use the newer, more generic, COLORS environment variable and point it to the /etc/DIR_COLORS file that should exist on most modern Linux installations. More tools will key off this than just ls so you'll see colour in tools like grep too. Add the following to your ~/.bash_profile:
export COLORS=/etc/DIR_COLORS

to add colours to more tools.
Answer: Set the Report Terminal Type value to
xterm-color


Firefox Browser on Android Has Grey Highlighting on Links

Question: I am having issues trying to modify the grey highlight colour of links when viewing in a Firefox Browser on Android Phones.
So say I have a button that is an  tag such as: nav and the button is round. So when I click on it there is a grey highlight colour that is square which makes it look like a mistake.
I've tried using: -webkit-tap-highlight-color: rgba(29, 30, 32, 1); but of course that only works for Chrome and I can't seem to find a Firefox equivalent.
This only happens on  tags.
Does anyone have any ideas?
Thanks!
Answer: Set
a:active{background:transparent}
PS. For Safari, you'll need to set ontouchstart="return true" on  for that to work too.


How to close an opened serial port?

Question: suppose an application (not me!) has opened a Serial port (COM1) , and i do not have access to it's handle (or something like that) and i don't know...
now, how can i close and release it by C# or C++?
thanks.
Answer: This will be like trying to force close a file that another application has opened. It is generally not a good thing to do, as the other application that had opened the port will stop working.
There is a tool called Process Explorer that can do what you are trying to achieve, so I guess that this is feasible. However, you should forget managed code and probably need to look at very low-lever API to do it.
Answer: There's a Windows API function called CloseHandle(HANDLE hObject). if we have the handle of file / port opened , then we can close it. thanks everyone...

How to close an opened serial port?


How do the correlations between Big 5 personality change in studies examining "faking bad"?

Question: I have conducted several studies that get participants to complete the IPIP personality test while role play going for a job. A common finding is that the average correlation (i.e., $\bar{r}$ between big 5 personality scales increases the more you ask people to fake.
For example, the rough pattern in the data is:

Get participants to complete a personality test honesty ($\bar{r} = .25$)
Get participants to complete do a job applicant role-play ($\bar{r} = .40$)
Get participants to complete a job applicant role-play and explicitly tell then to fake it ($\bar{r} = .60$)

Thus, increasing the amount of faking, increases the average intercorrelation.
I'm interested in what happens when participants "fake bad" (e.g., specifically try to present a negative impression such as depressed, disturbed, or socially undesirable).

What have previous studies found to be the effect of "faking bad" on the average scale intercorrelations of Big 5 personality?
Have any researchers offered theoretical explanations for any observed effect of faking bad on such changes average scale intercorrelations?
Answer: I don't know any actual "faking bad" studies or theories involving the Big Five, but there are some theories about the Big Five's general factor that can both explain the common finding you mention and inform a hypothesis about potential results from a study that would address your questions. I don't expect this will be a very satisfying answer, because I'm offering it in a bit of a hurry and referencing your own questions (and answer) to provide referential substance, but here it is anyway.
As your question and answer point out, there is a general factor underlying the Big Five, an even bigger "Big One." It partly reflects social desirability, as you know from your other question, and partly reflects people's efforts to align their personalities (or at least their opinions about their own personalities) toward those more desirable poles of the dimensions. It may even reflect some adaptive advantage to being slightly toward the desirable side of average (though probably not all the way to the extreme end of that side). Whether people succeed at being these desirable, maybe better-adjusted versions of themselves in the long term is immaterial. They try in the short term, and tell themselves it's working for various reasons, including self-serving bias and self-perceptive processes in identity (that inform judgments with recent behaviors).
People have some intuitive sense of the desirability of being sociable, stable, friendly, responsible, and curious (not to mention other aspects of each trait). If asked to act like a professionally desirable (i.e., hire-worthy) applicant, they will bias their answers in these socially desirable directions. These biases (whether intentionally deceptive or unconsciously ego-defensive) partly overlay some of the natural, independent variation with an internally consistent personality profile that suits the social consensus of what is desirable. Therefore people seem more uniform and correlations strengthen. Maybe you know other explanations of this finding as well; this may be one explanation, but I doubt it's the only.
I think this explanation could apply equally well if people were asked to "fake bad." Again, a socially undesirable personality profile is socially salient and consensual enough to overlay natural, independent variation with a relatively uniform pattern of bias. Most people know you're probably less likely to get hired if you act shy, edgy, hostile, impulsive, and stubborn (again, among other things that generally point in the same overall directions more often than not). Therefore I'd expect increased correlations in the "faking bad" scenario too.
Not a well-researched theory here I'm afraid; just a hypothesis or half-educated guess. I hope it's helpful nonetheless, and would be happy to look further into it and edit if anyone's interested enough to comment on a pseudo-answer that's nine months late. I can definitely offer some references for at least some of the instrumental points of theory I offer here without explicit support if that's socially desirable enough!


What can I do with extra food once a planet is fully populated?

Question: My home planet has been totally colonized.  Buildings are on every square, upgraded as far as they can go.  It's now producing an extra bit of food.  Can I push this food off-planet to encourage faster growth elsewhere?  Or does this additional food just get wasted, now that I can no longer use it to grow my population?  If so, I'd prefer to replace the farms with more long-term productive buildings.  Which will happen eventually, but I can always bootstrap another colony before that comes about.
Comment: I fully expect this to be part of some future Trade update. But for now, Vyndicu is correct.
Answer: You could keep a little extra food in case your population move offworld to another colony to speed up the growth as opposite to slow growth at just "one" food.
As far I am aware you can't share food off world. So go ahead switch to long-term production building.
Comment: Don't know why this was downvoted, probably before the edit. But it's correct, you can't share food, so once you reached the population limit, feel free to replace farms with other buildings, while trying to keep food production at 0 or above.
Answer: Upgrade your farms and replace some of the old farms with more useful buildings!
You can't currently export the food so unless your population drops and you want to grow the pop back it's wasted.
Answer: In patch 1.5, food was converted into an empire-wide resource much like minerals and energy. Thus, having a planet generating extra food is no longer a negative thing necessarily.
A planet that has a lot of food bonuses can help balance out other planets that are heavy with minerals, energy, or science which allows you to specialize planets (particularly those with planet-wide bonuses) a bit more if you wish. Food shortages (where you generate less food than you consume) will subtract from your pool of stored food until you run out of stockpiled food, which will trigger starvation penalties. If you cap out your food stockpile, excess generated food will contribute to population growth.
The economy page at the Stellaris Wiki has some additional details when it comes to managing food.
Answer: I like to stay at least 3+ food production on all planets even when they are full.
Do remember though that if anything, like a faction, causes your people to become unhappy at all, and just one of them starts to produce 2 food instead of 3, that now you are in a position that you might go negative which will cause more people to want to join the faction.  Spiraling down to death.


Is there a way to plot the current to charge a capacitor given that there is a max current in the circuit given by the power supply?

Question: I'm trying to determine the maximum current of a circuit while charging a capacitor but since the power supply has a maximum current of 20mA that is going to extend my charge time longer than the RC time constant suggests. I have a 235uF capacitor I'm charging to 800 VDC given 200kOhms of resistance in series to the capacitor. Does the Max current even come into play since I have so much resistance in the circuit with the capacitor?
Comment: That makes sense. Is there a formula to plot current as it charges the capacitor? I would think it should be related to the RC time constant in some way.
Answer: With a 800 Volts DC supply, and a 200 kΩ resistor in series with the capacitor, the maximum current the charging will draw is 4 mA.
How to calculate this:

Assume an ideal capacitor i.e. Zero Equivalent Series Resistance. Real capacitors and their leads can only increase this ESR.
At start of charging the current draw is maximum, as potential difference is maximum
At this time, I = V / R, V = 800 Volts and R = 200 kΩ
Thus Imax = 4 mA
As the capacitor charges up, this current will reduce further as per the normal RC curve.

As this is lower than the 20 mA supply limit, the supply-limited maximum current will not come into play at all.
EDIT: Note that the time constant of the resistor and capacitor is 47 seconds, which means that it will take that long to reach 63% of its final voltage. It will take 3× that long (2:21) to reach 95% and 5× that long (3:55) to reach 99%. You can reduce those numbers by a factor of 5 by reducing the resistor to 40KΩ, which would just touch the source limit of 20mA at the beginning of the charge cycle. If you simply charge the capacitor with a constant current of 20mA, it will take 9.4 seconds.
Comment: note that the capacitance is not relevant when calculating the maximum current!
Comment: @DaveTweed I assume that was meant to be a comment on the question not the answer? The 200k was specified in the question.
Comment: @DaveTweed Fair point... Also, the system allows you to edit an answer to incorporate inputs - answer owner can always accept or roll-back the edits. Please feel free to edit mine. :-)


Creating stripped TableTows in android

Question: I have created and dynamically added rows to my table layout in android using java. Now I would like to know if it is possible to make the rows stripped like would be done using bootstrap in web pages
i.e this is what I have

And what I want is something like this

Is this possible in android using java or is there a library I can use to achieve this?
Answer: You could just set alternating background colors on each TableRow.
Also, side not, RecyclerView is almost always the right solution instead of using TableLayout.
Comment: Any links to where I can get the steps on how to use recyckler view instead of table layout?

Creating stripped TableTows in android


Arduino and C++

Question: I am venturing into Arduino programming. I have done a lot of programming with the PIC using assembly language, but I don't know C or C++. What would be the best way to get started with learning C++? Are there tutorials geared towards micro processors or do I simply learn C++ in general. I have searched for tutorials specifically for Arduino only to find syntax examples but nothing specific to C++. Can anyone recommend a tutorial link, or their favorite book?
Answer: According to my limited knowledge (I'm neither a C- nor C++ expert), the C++ for the Arduino (aka AVR processors) is only a subset of the "normal" C++. For example, you can't create objects dynamically. Hence, the C++ for Arduino is rather a C with a few C++ goodies (e.g. structs with methods) which help to limit variable scopes.
Answer: There aren't many (official) C++ implementations for 8-bit microcontrollers; C++ is rather resource-intensive; your \$\mu\$C might not have enough Flash and/or RAM. 8-bit \$\mu\$Cs are usually programmed in plain C.
Since you know neither C nor C++, I would start with C. It's not difficult if you don't make it difficult for yourself. (It's perfectly possible to write completely unreadable code in C.)
For one project my "softie" colleagues wanted to use OOP (on an HC08), but found that indeed it didn't have enough resources. So they wrote everything in C, but in their development process they created a kind of object model which in the end looked very much like C++ :-). Result: due to ever increasing resources (esp. RAM) us hardware boys had to switch from an 8-bitter to a 32-bit ARM (LPC2148).
Comment: @stevenvh- All the examples I've seen for the Arduino are in C++. If there was an assembly language for it, I would prefer to learn it so that I don't have to deal with the timing and other things that go with higher language problems.
Comment: @Steve [this old page](http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1207370768/2) has some good info on assembly with arduino
Comment: http://www.dwelch.com/arduino/  assembler on arduino is certainly possible.
Comment: @Steve R, I find it hard to believe that all the Ardruino examples in C++. Ardruino is based upon a Atmel AVR micro, as such the language of choice is C (for high level language) and assembler (for low level language). Having said that, C++ is possible, but not as popular. I tend to agree with @stevenvh on the resource intensive nature of C++ vs C on a small micro like the Atmel AVRs.
Comment: @Steve - well, that certainly contradicts my claims :-/. Assembler on the Arduino should be possible (at least I hope I'm right on this!), GIYF.
Comment: @tehnyit: I also found it difficult to believe, but it is true: Arduino is the most famous piece of hardware that uses the Atmel AVR. People using the standard IDE for Arduino are writing C++ code that gets compiled with the standard C++ compiler, gcc. I don't know why [so many people](http://arduino.cc/forum/index.php/topic,6557.0.html) fail to recognize that the "Arduino language" is C++.
Answer: If you know Java, or any other object oriented language, you basically know C++.
I am a beginner myself, but for easy arduino projects, you pretty much only use loops and arrays.
If you want to get fancy, you can use libraries Arduino and others have created for more advanced projects
Comment: If you think knowing Java means you know C++, you don't know C++. On the other hand, the 10% of C++ used in the Arduino code is fairly simple and (despite no dynamic creation of objects - i.e. no `new` which is the only way of creating objects in Java) fairly the 'C with classes' approach which Java tried to go back to from modern C++.
Comment: @Pete - excellent comment.  There is a widespread misconception that "if you know Java, you know C++" - or "if you know C, you basically know C++" - again, untrue.  Just search for the phrase "C/C++" and you'll see how many people lump the 2 languages into the same bucket.  And now with C++0x, the languages have even less overlap.
Comment: That is interesting. I do know Visual Basic.
Comment: @Pete - Sorry, I just meant they are very similar in their syntax, and it can be easy to go from one language to the other. Didn't mean to confuse.
Comment: @Shubham, no they aren't similar on no account. C++ is a multiparadigm language above all.

Arduino and C++


Forecast time series with breakpoint using Holt-Winters (R)

Question: I have a time series dataset for forecast using Holt-winters model, but my problem is the time series contains breaks or change point,
Should we remove the first break? Or is there any other solution for managing breaks in the Holt-Winters model?
Knowing that by removing the first breaks data the error rate of my model decrease.
Comment: Is there any clarity as to what happened to cause that change? That may be useful to model
Comment: @Jon I think it implied growth of revenues
Answer: I would construct the following model:
$Y_t = \mu + \alpha t + \beta_t + \sigma$, where

$Y_t$ is the response at time t
$\mu$ is the mean level overall
$t$ is time and $\alpha$ is the slope
$\beta_t$ is an adjustment for before or after the break. E.g. if $t<22$, then subtract a constant, else add a different constant
$\sigma$ is the constant variance

Some pseudo-code in R might be
library(nlme)
model <- gls(response ~ time + adjust)

Where adjust is an indicator variable of being before or after the breakpoint.

Eyeballing your data, the model might be:
$Y_t = 0.75+0t-0.50$ if $t<22$
$Y_t = 0.75+0t+0.25$ if $t \ge 22$
Where $Y_t$ is in millions.
Comment: Thank you for the information provide @StatMan, I will test this solution.
Answer: One of the typical assumptions when doing changepoint detection is that the segments are independent.  Thus if this is the case, the data prior to the break is uninformative for the data after the break.  Thus you are safe to only use the data post-break for training a forecasting model.
Answer: The problem with the @StatMan recommendation is that it is ad hoc . If you have possible complications/opportunities such as an error process that is ARMA or there are local time trends or there are are pulses or there are time varying parameters , or time varying error variance or multiple level shifts .... them one needs to form a much more complicated structure.


I am from or I come from in Chinese

Question: What's the difference of these two and are they used only for the place you originated from?
Comment: You may want to add some more details about what you mean/what you're looking for as the question is somewhat ambiguous in its current state.
Comment: It seems this question is about the English language, not Chinese. I think this is not the appropriate place for this question.
Comment: I'm voting to close this question because it's not about the Chinese language.
Answer: Direct translation:
I (am) from -> 我從____
I am from Canada -> 我從加拿大來的
Note: "來的" has to be added at the end to show "從加拿大" is to describe where you came from, or else "我從加拿大" is an incomplete sentence in Mandarin.
I come from -> 我來自____
I came from Canada -> 我來自加拿大
I won't get into too much details on the usage of "從", as that seems to be a different topic from what you're asking.
As for the difference between the two, I can't think of any right now. Just like they both mean the same thing in English.

I am from or I come from in Chinese


Downloading large amount of data from a secure link

Question: I've received a secure link to a directory on a client's SharePoint for the purpose of sharing a non-trivial amount of data, probably about 30GB. I can download single directories and it works, but it's a chore having to click everything and I will need to do that often. I tried downloading it all by selecting every top-level directory and clicking "Download", but the file that gets downloaded is corrupted — ZIP reports missing central directory, so I assume it's truncated during download. The "Open in File Explorer" link returns Access Denied. Are there any other options for automating download of this directory?
Answer: Depending on the version of SharePoint you have you can try to sync the library using OneDrive.  If it is a option you should see a "Sync" button in the library.


Burg themes not working

Question: As soon as I updated to Natty my BURG stopped working. After a little tweaking here and there I somehow managed to get BURG install. So during the boot menu I do see the BURG menu but without the themes. Also none of the shortcuts to change resolution etc work. I have even tried using Burg Manager. Fail.
Please help. This is urgent.
Comment: Why is it urgent? By the way BURG may not have been updated to work comfortably with Ubuntu 11.04, so you may have to be patient.
Comment: I updated to Natty, too, and BURG works as usual (it was installed in 10.10). No need in another PPA.
Answer: SourcesList.eu today have reported that there is now a Burg PPA.
Before I continue - Remember BURG changes your Boot Loader.  Getting this wrong will stop Ubuntu from booting!
I've reproduced the relevant part of the article below to complete the answer:
sudo add-apt-repository ppa:n-muench/burg

Then if you want to install burg execute:
sudo apt-get update && sudo apt-get install

sudo apt-get install burg burg-common burg-emu burg-pc burg-themes burg-themes-common

Then (supposing that you wannt to install burg into MBR relative to hard disk named sda) execute:
sudo burg-install /dev/sda && sudo update-burg

Now you can use burg-manager to install new themes and to configure it.

Burg themes not working


What is a common triad?

Question: I have seen in some music theory books triads are called common triads or sometimes I see common chords. What does common exactly point to? Does common chord mean a complete chord? in that case do we have incomplete triads? if not what does "common" exactly mean for a triad?
Comment: When you say music theory books are these books related to a particular instrument (piano, guitar) or just music theory in general.  To me a common chord in piano would be different than a common chord in guitar because some chords are very difficult to play on guitar but are easy on piano.  Fingering on guitar varies greatly between chords where on piano the same basic hand position can play all of the major chords, all of the minor chords, all of the etc. chords just by moving the basic hand position to a different place on the keyboard.
Comment: @RockinCowboy, in this context, the meaning of common is not "commonplace."
Answer: Common here means most used. A triad consists of three notes (tri) and the common ones use root, third and fifth. In C, it's C E G; in Cm it's C Eb G. Another way to look at it is a pile of thirds - C>E is a third, and E>G is too.
There are other three note chords, such as sus chords, as in C sus 4, where the 3rd is replaced by a 4th. Not so common, and not 'stacked thirds'.
Can't imagine what an 'incomplete triad' might be! Possibly what guitarists call a power chord (5th)..?!
EDIT: Checking in my 'bible', the following is stated: triad= 3 note chord with root, third and fifth. Common chord = triad with perfect fifth. Major common chord = common chord with maj.3rd. Minor common chord = common chord with min.3rd. Aug.triad = 1, M3,#5, Dim. triad = 1, M3, b5.Those last two don't particularly apply to the question, but are still triads. No mention of 'common triads'...
Comment: In one text the writer puts common triads against the dim and aug triads. Refering to your bible common triad must have a perfect fifth, so aug and dim can not be a common triad, and because aug and dim are not used as much as others maybe common means "usual" or "ordinary" triads, that's how I understood so far.
Comment: Let's have the publication that quotes this, and we'll do a bit more research.
Comment: The book "Harmony for computer musicians" by Micheal Hewitt, uses common triads frequently. About common chords, I've seen it mostly on online texts, I don't remember a special book to refer.
Answer: Your book may use 'common' to simply mean 'basic'.   Maybe as a synonym for 'Primary triads', I IV and V, the 'three chord trick'.  But 'common' is also used to describe chords that appear in two different keys.   F major chord is 'common' to C major and Bb major.  It can therefore be used as a stepping-stone when modulating from C major to Bb major.
Comment: Excellent point about potential different meanings of "common chord" Laurence.  We don't know which "music theory books" the OP is referring to.
Comment: That book uses common triads when it's not a dim or aug triad. But still some online theory texts use common chord.
Answer: There are three possible meanings. One is more colloquial (the one mentioned by Tim) and another is more technical (pointed out by Laurence).
The third meaning--which I think is most likely--hasn't been mentioned yet, so I'll put them all together in one place. In general, a "common chord" could mean:

a commonly-used chord (given that the context is a music theory book, this usage seems unlikely)
a chord that is shared between two different keys (Laurence gives a great example)
a chord with a defined chord quality (major, minor, etc.)

To understand #3, we must look at the word chord itself. In one sense, a chord is any two notes played simultaneously. But in another sense, a chord is three notes with a defined chord quality (major, minor, etc.). This second term is also called a definite chord, a common chord, or even triad. The modification common triad is a bit redundant, since any triad will have a defined chord quality. However, the author is likely simply calling attention to the fact that any triad has a defined chord quality.
I don't know of a term for the "opposite" of this, but we might call it an indefinite chord: for example, a chord with only two notes does not have a defined quality (major, minor, etc.).
Comment: Whilst convinced that two notes constitute a chord, two notes can produce a major or minor sound. Trouble is, those two which produce a minor sound could be construed to be part of a dominant seventh chord ! Do you agree that a common chord triad must have 'stacked thirds' to comply? And something like a sus chord - still a three note chord - isn't called a triad?
Comment: @Tim, yes! Everything you've written is exactly as I understand it too!

What is a common triad?


When inserting a record with name which is already existing in record of custom setting, It gives an error that name already exist?

Question: I have custom setting with three records there is four fields name, price, sales, active. I want to insert a new record with same name but different others field values.I have a VF page there is a picklist with three values which will be the name of the custom setting, When I select a picklist it will be the record of custom setting with four fields, When there is no any record with the name, it is inserted but when already that name there it is giving an error that name already existed.
 I want new record to insert with same name, Is there any solution to achieve this?
Answer: Basically the custom setting data is retrieved by name. so the name field must be unique. so that the user can retrieve a single custom setting record. you must insert your new record with different name.


Is there any index which relates population growth rate with food production growth rate?

Question: I would like to know if there is an index which shows if food production growth is keeping pace with population growth worldwide. I know there are population growth rates available, for example for population there is a figure of 30% population growth rate for the period 1990-2010 worldwide from UN. Food production is harder to find , so I'm not sure if they are well known. I found here
Food production growth that USDA economists estimate global agricultural TFP growth averaged 1.4 percent per year between 2000 and 2007, but that doesn't help to compare it with the 1990-2010 period of population growth. So, is there any organization which keeps track of both figures or makes an index to compare both food production growth worldwide with population growth worldwide?
Answer: Here there is a very good summary of existing information. Key variables are daily intake of calories/proteins/fat per person (so it is not so much about tons of food but their nutrient content). An example:

Notice that most of the data is taken from the FAO, which is available online here.
Answer: You can examine the components of Global Food Security Index. If I'm not mistaken, you can actually download the data free online from the same website. It covers a large set of countries globally.


Hypersurfaces in P^n: Always One Polynomial?

Question: If we define a "hypersurface in $\mathbb{P}^n_k$" ($k$ algebraically closed) to be an effective Cartier divisor - i.e. a locally principal closed subscheme - hence permitting NONreduced components, is it still true that the (saturated) homogeneous ideal in $k[x_0,...,x_n]$ of a hypersurface in $\mathbb{P}^n_k$ can always be generated by a single element?
Answer: Yes. In fact, even when we are defining a hypersurface of degree $r$ in the naive way, we are saying that it is the zero set of a homogeneous polynomial $f$ of degree $r$. But homogeneous polynomials of degree $r$ are not functions on projective space. They are sections of the line bundle $\mathcal{O}(r)$. Thus, even under the usual naive definition, a hypersurface is exactly the Cartier divisor corresponding to section of a line bundle. On $\mathbb{P}^n$, all Cartier divisors come up this way and all line bundles are of the form $\mathcal{O}(r)$. From this we see that every effective Cartier divisor is is the zero set of some homogeneous degree $r$ polynomial, specifically the corresponding section of the line bundle.
When the hypersurface is reduced, we don't have to use the machinery about line bundles or divisors. let $Z$ be the closed subscheme corresponding to a reduced Cartier divisor. Then for each irreducible component $Z_i$, we have a homogeneous prime ideal $\mathfrak{p}_i$. Since $Z_i$ are codimension 1, $\mathfrak{p}_i$ are height one, so applying Hauptidealsatz, we see that $\mathfrak{p}_i = (f_i)$ for some homogeneous polynomial $f_i$. Then $Z$ is cut out by the product $f = \prod_i f_i$.
Comment: I agree with your first paragraph (at least upon a first read) and after another read will accept your answer. However, the second paragraph I'm a bit unsure of. If Z is not reduced, how do you break it up into irreducible components? It seems to me that you would have to take the reduction of Z first, which would mean in the end you have a different scheme.
Comment: Hmm, I'm assuming when you said permitting $Z$ reduced, you meant $Z$ non-reduced?
Comment: Ugh, yes. Thank you.
Comment: Ok yeah then I don't think my argument in the second paragraph works in the nonreduced case, but I'll think about it and edit it when I know for sure. The first argument goes through in general though.
Comment: Yes it indeed doesn't work for non-reduced. I edited it.