What distinguishes cause from effect when they are simultaneous?

Question: At a high level, distinguishing cause and effect is typically easy enough: the cause comes first. I drop a ball off a roof; therefore, it falls and hits the ground. But on a fundamental level, physics is local; thus, it seems that, as you get more fundamental, the temporal interval between cause and effect approaches zero. We say that forces cause acceleration inversely proportionate to mass, but at that level the action and reaction are simultaneous. Why (if at all) would it be wrong to say that acceleration causes forces proportionate to mass?
Comment: As time is quantized, it may approach zero, but it will never reach it. I know this kills your question and means the philosophy out of it, but that's physics for you. :-)
Comment: @Lennart: I'm afraid I'm not sure what you're talking about. Time isn't quantized (where I use quantized in the sense of there existing a smallest unit, a quanta, of time). Are you somehow suggesting that two things can never happen simultaneously?
Comment: @mixedmath: Yes, it probably is quantized: http://en.wikipedia.org/wiki/Quantum_spacetime I'm saying that the cause and effect can't happen simultaneously. It has the be at least one Planck time between. http://en.wikipedia.org/wiki/Planck_time
Comment: @Lennart: now I see the sort of quantization you mean. An effective quantization.
Comment: You question also states difference between Maths and Physics.
Comment: Hume considered this question
Comment: @LennartRegebro For all we know, time is not quantized. :-)
Comment: I'd claim the opposite. Not that it matters, because the question talks about times between cause and effect, and the planck time, being the minimum distance in time between two events, still comes into effect there.
Answer: I would suggest that one way to distinguish cause from effect when the two are simultaneous is  through material implication.
That is, if at some time two events A and B occur, the cause is that one which implies the other. So, if A being true means B must be true, then A is in some sense the cause of B (I realize that the whole correlation versus causation problem comes up here, but I am only trying to provide a rough model).
For example, suppose that at some time t we have a big spherical mass M (event A), and from a distance r away you (mass m) experience a real force equal to GMm/r^2 (event B). In this case, A implies B by Newtonian gravity. However, B does not imply A: there could instead be a number of different masses that happen to produce that force.
For your example specifically, I think it is important to flesh out the definitions. We say that real force causes acceleration inversely proportional to mass. Fictitious force, on the other hand, is caused by acceleration on a frame (which is caused by a real force or another fictitious force). So, if for that example we have a real force on an object and an acceleration in that object simultaneously, the real force implies an acceleration, but the acceleration does not imply a real force: it implies either a real force or a fictitious force. If instead we have a fictitious force on an object and an acceleration on that object's frame simultaneously, the fictitious force does not imply an acceleration on that specific frame (it could be any frame that happens to contain the object), while the acceleration on the frame does imply a fictitious force on the object. This may seem a bit picky, but pickyness can make all the difference when you're talking about simultaneous events.
I think this is the crucial difference between cause and effect: not temporal separation, but material implication. After all, that's why it's called "cause" and "effect", not "before" and "after".
Comment: I don't understand the example with gravity. There is gravitational force if and only if there is mass that generates that force, the implication goes both ways. Are now both the gravitational force and the mass both cause and effect? Rephrasing it as "mass" and "acceleration" takes out the information that the acceleration is a matter of gravitation, so that's a trick of language and not a matter of argument. Otherwise, you could say that anything experiencing force causes whatever generates the force: if there is a force, then something *must* generate it.
Answer: Nothing at all. This is the same base idea at the heart of non-inertial reference frames.
This is like Einstein's claim (at the heart of his idea that grew into relativity) that it is impossible to distinguish between an accelerating frame or reference and an inertial frame of reference in a gravitational field. That is to say that if we are in an elevator that is accelerating upwards at 2 m/s^2, or on a planet that happens to feel 12 m/s^2 of gravity (that is to say that the force or the acceleration are indistinguishable).
Comment: @Lennart: I am simply restricting myself to the classical examples employed by the physicists who developed relativity. The key fact here is that the cause in one reference would appear to be the effect in the other. And this is not a trivial distinction. It is most common for people to interpret their surroundings in a frame of reference where they are stationary, or whatever they're on is stationary - so if someone is accelerating in a rocket then their observations will fundamentally be different than someone who is stationary on Earth.
Comment: The force and acceleration may be indistinguishable, but the cause and effect isn't. Cause: Attraction of mass, effect: Acceleration.
Comment: @Lennart: This seems not so true to me. As then you would suggest that every acceleration is effected by an attraction of mass (as they are indistinguishable, it is perfectly reasonable to look at any given accelerating reference). But of course, that is not the case - an accelerating elevator is not caused, nor the force caused, by the attraction of mass.
Comment: I see what you are trying to say, You define the acceleration and gravity to be the same thing, Sure, but that doesn't remove cause and effect. It just merged two things (in effect in an attempt to not have to explain gravitation). The elevator still starts moving as an effect caused by the acceleration. And that movement causes air to be pushed out of the way, etc. It doesn't remove cause and effect, it just redefines gravity so that gravity is acceleration.
Comment: Yeah, I understand what you are saying. My previous statement stands. I don't think this removes cause and effect in general.
Answer: The finite speed of light puts the whole idea of simultaneity into question. For example consider a person A standing in a field halfway between two poles (A+B). He sees a lightning bolt hit each pole simultaneously. He thinks it's simultaneous.
Now person B is standing closer to one of the poles (B) than the other. What does he see? The lightning strikes are not simultaneous at all. Pole B is hit before pole A.
There are many other such thought experiments, but the final conclusion is this:
Fact: simultaneity is relative to the observer because of the structure of our universe. It is not an absolute that two events observed by Mr A to be simultaneous will be observed by everyone as simultaneous. There is not such thing as an absolute clock which can be used to measure these things or determine simultaneity.
Now consider causality. Einstein showed that the order of cause and effect is preserved no matter where the observer is because causes cannot propagate faster than the speed of light. This preservation of the order of cause and effect is again necessary in physics. If it were not so we could have effects occurring before causes. That is obviously nonsense. If you want more on this, look up the Minkowski Diagram.
Fact: Cause and effect order are not relative to an observer. The order holds in all frames of reference.
Therefore: It is a fundamental that simultaneous cause and effect is impossible. The relative nature of simultaneity conflicts with the fundamental requirement that effect cannot precede cause.
Comment: The two lightnings example doesn't work: @Toph is talking about locality of physics, so the two lightnings should hit the same pole. No matter where you place your observer either one lightning hits the pole before the other, or they hit it simultaneously.
Answer: Force is an auxiliary concept in Newtonian mechanics, and if you like, you can simply dispense with it. For example, rather than saying that F=GMm/r^2 acts on m, and m's resulting acceleration is a=F/m, you can eliminate F algebraically and say that a=GM/r^2.
The usual way of thinking about causality in physics these days is that you want existence and uniqueness of solutions to Cauchy problems. In other words, we don't think of forces causing accelerations, charges causing electric fields, and so on; we simply think of initial conditions causing final conditions. Re this notion of causality, you may be interested in this paper: John D. Norton, "Causation as Folk Science," 2003. It seems to have been widely discussed, but not necessarily widely accepted. You can find a lot of references by googling "norton's dome." There are good papers by Korolev and Laraudogoitia. This paper is also interesting: Z. Xia, "The Existence of Noncollision Singularities in Newtonian Systems," Annals Math. 135, 411-468, 1992. There is a good survey in Earman, A primer on determinism, 1986.
Answer: I think the biggest difference between cause and effect is that it is the cause that is taking the initiative, not the effect.
In other words, the cause can decide whether the whole cause-effect thing happen or not. Take the acceleration example, the reason you can not take the accelaration as the cause is that the acceleration can not happen on its own will - it has to depend on the force to happen, but the force can happen on its own, whether or not to cause the acceleration.
Comment: This seems tautological. He even states your answer in his question: cause comes first.

I think that the depth of this question is still largely being overlooked.
Comment: @mixedmath, his statement of "cause comes first" means he just consider as a matter of order - who comes first, but he didn't realize the meaning I stated : about who takes initiative.
Comment: @SpiritZhang is aiming in the right direction. When we say cause is prior to effect, we aren't necessarily thinking of these causes in the temporal/mechanical order. So even if they are simultaneous temporally, they aren't causally. Note that if you apply a leftward force to an antiparticle, it will move to the right. The effect precedes the cause in time. The way we know which is which is by virtue of a body of theory and the employed method which allows us to interpret these observations. How did Avicenna distinguish between existence and essence and assign one prior to the other?
Answer: You cannot have cause and effect occurring in the same place (down to less than the diameter of a proton) and at the same time. Cause and effect (the two lightnings) would be the same photon. Cause and effect would clearly be indistinguishable.
The lightning analogy is valid.
Simultaneous cause and effect is impossible in a relativistic universe.
Locality in physics is an observation that we don't have 'spooky action at a distance' as Einstein so eloquently stated. In QM we do have such spookiness, which opens up a whole 'nuther can of worms when you are talking about causality. It's also the basis for a scientific attack on the Kalam Cosmological Argument.
The whole thing is neatly wrapped up by Bell's Theorem which shows the conflict between relativity and QM.
For example of the problems with asserting laws of causality, an experiment conducted in the future can influence results you get in the present.
http://discovermagazine.com/2010/apr/01-back-from-the-future#.UNHfg299L9U
This is the basis for saying there are uncaused events in QM; the arrow of time is not in question, and all reasonable notions of causality require events occur after causes in the temporal sense. Relativity imposes the additional constraint that the time between the cause and event exceeds the distance / speed of light.
Radioactivity is the most often cited example of acausal events in physics. It caused Einstein much angst. QM however, aided by Bell's theorem seems to be winning the argument.
Answer: As I see it, the difference between cause and effect comes down to dependency. In your example, is the acceleration dependent on the force or independent, and likewise is the force dependent on the acceleration or independent? And in this case it can be shown that forces are independent and acceleration is dependent: if I stand on the floor of my house and push against the wall, I apply forces in opposite directions to the floor and the wall, but if the wall is attached firmly to the floor, they apply forces on each other as well. The overall acceleration is dependent on the sum of the independent forces. In my case, the forces sum to zero and my wall does not move - lucky for my unsuspecting family.
Other situations can be examined in similar fashion: the attraction between oppositely charged objects is an effect that depends on the charges of the objects and the laws of physics which are independent of the acceleration of the objects. You could even apply this to larger scales, though when you get into weather or economics or whatnot the number of contributing causes becomes too large to track completely in a feasible manner. But even in the philosophical sense, you could never say that a hammer strikes a nail "because" the nail is driven into the board or that the roulette wheel landed on red "because" I lost $50.
Answer: There are basically 2 types of cause and 2 types of effect, inherent cause and external cause, latent effect and manifest effect. By doing something or responding to something(external cause) you ACTIVATE the inherent cause and LODGE THE latent effect to do it again. Therefore you change karma by responding differently to things. ON a macro scale manifest change happens at the speed of light. SINCE ORIGINALLY we were all fundamental particles in a space smaller than an atom through quantum entanglement everything effects everything else simultaneously though on the macro scale because of increased entropy that they seem so removed from each other On the quantum scale energy is always being borrowed from the future ;)
Comment: There is a lot to this answer, but defining its terms would help the reader; e.g., defining the two types of causes and effects.
Answer: Physically, time is only part of our perception, time it is generated by our memory. At a fundamental level, there is no time, photons don't know space or time. Effects are related to causes but that does not imply a sequence in time. The idea of a sequence is created by our memory and our perception of reality.
a+b = c is not really a timed sequence. Both factors are related by a causal mechanism (a+b imply c; forget that c implies also a+b, that is only a mathematical property of addition).
Think of causes and consequences as a page full of related equations. They are just like photograms on a film, related by causality. It is our memory while we read (or a movie projector, in case of a film) that generates a perception of time.
You might wonder how is it possible to say that time is just a perception! What about relativity? Believe it or not, science is based on a lot of human-subjective issues. Temperature, for example, has no physical meaning. We were forced to introduce the 0th law of thermodynamics only to give a physical meaning to temperature. But in reality, there are no hot protons. Temperature is just a feeling on our skin. So are time and space. Relativity is about our perception of time and space. Not about the real nature.


Difference between the absolute thermodynamic scale and ITS-90

Question: What is the difference between the absolute thermodynamic temperature scale and the practical temperature scale: ITS-90?
Answer: The absolute thermodynamic temperature scale is a scale fixed by absolute zero and (at least for the kelvin, I'm not sure about the Rankine scale) the triple point of water, where absolute zero is defined as 0 K and the triple point of water is defined as 273.16 K. The rest of the scale is just a straight line from zero through 273.16 K off to infinity. However, this scale relies on only two defined points (only one of which can actually be measured, absolute zero being established from thermodynamic relations).
In practical use, for the purposes of calibrating thermometres and the like, this is not a great scale as the two calibration points may be far away from the temperature region one is interested in actually measuring. The usual way to deal with this is to use other reference points outside the actual definition. So that different people do this as consistently as possible, ITS-90 was created as a practical implementation of the absolute scale, setting additional reference points (all phase transitions) to defined values, interpolating between them to get other values. It's technically not a scale in itself, just a standard for calibrating temperatures that are as close to the absolute scale as possible. By making sure everyone uses the same reference points, measurements can be more consistent than if reference points are chosen arbitrarily and possibly assigned different values.
For example, if one wanted to make a thermometre for general lab use, one might pick the triple point of mercury, the triple point of water, and the melting point of gallium from the ITS-90 standard for reference points, knowing that other thermometres in this range conforming to the standard would also be calibrated this way, rather than choosing say the melting and boiling points of water, increasing the likelihood of consistent measurements with other thermometres.


Can a rocket motor be shut off after ignition?

Question: After ignition, if any problems occur such as fuel leakage, can a rocket motor can be shut off?
Comment: Example: Both the 3rd stage and the service module of the Apollo/Saturn had restartable engines. For those engines, more that one start / shut down was  part of the planned flight profile, so presumably they would also be shut down on fault conditions too, so I think the answer would be a confident "yes" (dependent upon engine design).
Comment: The thrust can be regulated through nozzle geometry - e.g. it can be made completely inefficient; same amount of fuel is burned, exhaust gas is ejected but the vectors are all off, the gas doesn't provide much significant propulsion. The fuel can be segmented, so that once a segment burns off another isn't ignited and the motor stops, then the next segment is ignited and the motor starts anew - so it can be extinguished and reignited but not at arbitrary point but in several seconds of sector burn time quanta. This **can** be done. Now **is** it done in space rockets? I don't know.
Comment: @AnthonyX The Saturn engines of Apollo were shut down on detected fault conditions. See for example the pogo issues on Apollo 13.
Answer: Liquid fueled
Most (almost all, but not all) are configured for both shut-off and restart.
Some early liquid fueled rockets could not be shut off - they were "gravity fed," and once under acceleration, could not be shut off, as the acceleration itself drove the fuel into the ongoing combustion.
Likewise, some military tactical rockets are non-stoppable liquid fuel rockets.
Solid Fueled
Most solid fuel rockets are not stoppable. This is due to the fuel mass usually being both fuel and oxidizer mixed in a stable but ignitable configuration.
A few theoretical designs use a solid oxidizer mass adjacent to a solid fuel mass, and one or the other can be ejected.
A few theoretical designs use multiple linear cells, and can have the currently burning cell ejected by a mechanical or pyrotechnic method; in theory later cells could have igniters. I've only seen this used in model rocketry; it's theoretically possible to cap an ejection charge such that it ejects motor 1 without igniting motor 2, and then have, past the cap, a remote ignition for motor 2 that, when it fires, ejects the cap. (I saw someone try to launch just such a rig; I didn't see it fly, due to engine 1 failure.)
Hybrid Motors
In hybrid motors, the fuel is usually solid, and the oxidizer is liquid. The motor is able to be shut off by stopping the oxidizer flow.
Some such motors use a hypergolic pair - that is, a pair that ignites on contact. Such motors are almost always able to be restarted.
Other motors include a re-ignition system of some kind, so that they can be restarted.
Abort Methods
Solid Rocket Boosters have often been configured such that they can be detached after ignition but before launch; generally, this is similar to a normal separation event. While this does not turn off the engine, it does allow the engine to launch without the rest of the craft, and from a payload perspective, is preferential to losing the payload as well.
Most NASA, ESA, and Russian Space Agency space launches also have charges to destroy the launch vehicle; manned launches also have an escape rocket that pulls the manned portion away prior to the rocket's destruction sequence. Again, this is not ideal, and isn't really a safe shutdown, but is used to protect downrange ground items from a failed launch.
With liquid fuel and hybrid fuel rockets, the first step of abort is to cease fuel flow; if that fails, then the payload eject and detonate protocols are invoked. With mixed launchers, both SRB detach and then escape/eject and if needed, destruction of the launcher are public listed protocols.
Answer: Once it is ignited it is impossible to shut down a solid propellent in a rocket because they have all the necessary things ( fire, oxidizer,fuel) to burn .
but in hybrid rocket is possible to have a controlled burn

When
  thrust is desired, a suitable
  ignition source is introduced in
  the combustion chamber and
  the valve is opened. The liquid
  propellant (or gas) flows into
  the combustion chamber where
  it is vaporized and then
  reacted with the solid
  propellant. Combustion occurs
  in a boundary layer diffusion
  flame adjacent to the surface
  of the solid propellant.

so in hybrid rocket burning can be controlled by controlling the valve (or) by controlling the nozzle geometry
Comment: @MagicOctopusUrn Blow-out panels in the side of the motor. They're most often used with ICBMs to shut down the thrust when the desired trajectory has been reached. I'm not sure if any orbital launchers have used the technique.
Comment: Some solid fuel rockets may be shut down by blowing a big hole into the hull. Some solid propellants need a minimum pressure to continue burning, if the pressure is to low the propellant stops burning.
Comment: @Uwe what did you mean here by "blowing a big hole into the hull", is there a fail-safe that uses this methodology? Like a giant hole-punch...?
Answer: A qualified 'Yes'.
Wikipedia on Solid fuel rockets states

More advanced solid rocket motors can not only be throttled but also be extinguished
  and then re-ignited by controlling the nozzle geometry or through the use of vent
  ports. Also, pulsed rocket motors that burn in segments and that can be ignited upon
  command are available.

Qualifier:
The page says rockets, not necessarily rockets meant for space-craft (either launch, or for use in space)
Comment: If the solid rocket is extinguished by the use of vent ports, these ports must be closed and sealed before another ignition is possible. But you can't use rubber seals for that purpose. Another ignition requires a second starting charge inside the rocket, but this charge should not be damaged or even burnt during the first burn. The second starting charge must be shielded during the first burn, but the shield should be removed before the second ignition.
Answer: Liquid rocket motors (esp. ones that use turbopumps) are usually shut down before fuel/oxidizer depletion. When a turbopump runs dry, it'll overspeed and disintegrate, and that's best avoided.
Answer: Modern solid fueled missile systems use so called "blow off ports" near the top of the motor in order to decrease the pressure of the combustion chamber and effectively "shut down" the thrust generation.
The burning rate of a solid propellant is dictated by: rate = a*P**n
So if the P (chamber pressure) could be brought to a near vacuum, the burning rate will decrease to near 0.
So yes.
Comment: However, according to [this answer](https://space.stackexchange.com/a/1578/12102) there might be a way. In that case, your answer would just be stating what's already said in that answer.
Comment: That might reduce the thrust, but it does not stop it completely, and it certainly does not stop the propellant from being used up. There would not be any propellant left to restart later. I don't think this counts as "shutting off" the engine.
Comment: The question doesn't mention restarting, so that's no reason to discount this answer.


Cost-effective ways to start a home studio with Pro Tools?

Question: What is the best way to purchase Pro tools and computer in order to run it?  I am starting up in creating my own studio and based on your advice and other positive input from many other sources I want to use pro tools and start creating my own recordings.
Comment: With what goal in mind? Are you trying to record yourself? A full band? Get people to pay you so that you can record them? I think a goal will substantially help the answers.
Answer: Sell your Pro Tools license and equipment and buy Reaper.
It's cheap, good and functional.
With whatever left of this trade off you can buy some decent recording equip.
You can also get a UAD soundcard for heavy duty processing and analog emulation.
In short: If you have a limited budget you don't need Pro Tools.
Now, the rest of it - equipment, room treatment, brand of mics and etc we will need a little bit more input.
If you are recording Grassroot Folk/Blues as a one man band, you'll just need a single mic - probably something like a Shure or a MXL, a steel string guitar, a banjo and assorted percussion.
But if you're into choirs, you'll probably want to invest on 4 or 6 microphones and NOT use your studio as a recording environment - try talking to your local church, they are usually very helpful on this.
If you are gonna record a band, you still need to think how you will be recording - everyone together? Or artist per artist? Do you have space to have separated rooms? Do you OWN the building you're installing the studio? Is this a garage thing?
There are simply too many variables.
But I do repeat.
If you have a budget you don't need Pro Tools.
In fact, I can't find good reasons for anyone wanting to use Pro Tools.
EDIT:
You might not like Reaper, but there's Cubase, Nuendo and even Ableton Live. There's Adobe Audition and many more. AVID made a good job making an awesome name for Pro Tools, but for at least 5 years they don't have any special tech that makes it attractive. And then again, Universal Audio has an awesome Plug In library.
Comment: As far as I'm concerned, you **can not** beat Reaper for value. Period. $60 for a non-commercial license is a steal.
Comment: And Reaper (AFAIK) has no timed-lockout nor feature-crippling when not unlocked, so there's zero cost for trying it out in depth before you buy the license.
Comment: When I saw the title of this question I planned to recommend Reaper, too. I haven't much worked with Pro Tools ever, but I don't think I'd find much in it that I don't have in Reaper. I _positively_ prefer it over both Cubase and Logic. — As for a UAD extension: I wouldn't recommend that to a beginner. Without some experience in sound engineering you won't be able to make proper use of such plugins anyway, in fact you're very likely to over-use them. The slim selection of plugins included in Reaper is ok for mixing for a start, and mastering should at any rate be done by someone experienced.
Answer: As mentioned above, Pro Tools is definitely not required. If you're going to be using a Mac PC, then Logic Pro X is cheaper than Pro Tools, does not require a DRM dongle and is quite welcoming.
Regardless of what and how you're going to record, some essential equipment is going to be an audio interface. If you're planning on recording live instruments or vocals, you will be able to utilize an audio interface to connect microphones or instrument cables to your pc. If you're planning on utilizing midi keyboards or controllers, there are several great audio interfaces that also have midi capabilities.
If you're on a budget, I would recommend a Focusrite Scarlett or Saffire audio interface. Depending on the number of inputs that you need, you can obtain a new Focusrite Scarlett interface for $150. If you need more inputs that price will go up. The Scarlett and Saffire are by no means pro-grade, but the preamps are functional and the quality that you can get out of one is actually pretty good, if you know how to mix well and have a good microphone/source material. The Scarlett and Saffire also have midi capabilities, so you can record microphones, instruments through quarter inch cables, and midi. They're pretty sweet devices.
If you're going to need a microphone, I suggest investing a decent amount in a microphone. In other words, do not buy a $100-$300 microphone. With microphones there is a noticeable increase in quality and clarity as you go up in price. The MikTek C1 is a great microphone for $600.00. If that is too much, then the Rode NT-1A can be had for less than half the price of the Miktek, but again there will be a noticeable dip in mic quality.
Again, there is no need for Pro Tools, other programs such as Logic Pro X are just as good and I feel are more worthy of my monies because of not having Draconian DRM policies! As Johnny mentioned above, there are countless other programs available, so do not think that Pro Tools is a must, because it is not. Also, do not think that Mac PC's are required to make music, because again they're not. Mac PC's are required for Logic Pro X though, and Logic Pro X is a wonderful and relatively simple program.


How can I extract qualitative information from EXIF files?

Question: I have bunch of EXIF files. I am looking for some heuristics to extract qualitative information such as if the picture is portrait or not, if the picture was taken in day or night, if the picture is scenary or something like that. Would you please help on how to get these kind of info from the EXIF files?
Comment: Though interesting, this question seems to have more in common with machine learning (a branch of artificial intelligence) than it does with photography. As such, I'm not sure this site will be able to provide the best answers.
Comment: Hi Alec. An important question, though: do you mean JPEG/EXIF files (which around here we normally call just "JPEG"), or do you mean files which contain just the EXIF metadata? And if you do also mean image data, do you want to do pattern recognition on the image data, or just analyze the metadata for clues?
Comment: @mattdm: I have only EXIF metadata and I am looking for heuristics to find clues such as the one I mentioned in the original question only by using EXIF meta data.
Comment: This is going to be very hard, for reasons similar to those outlined in [my answer here](http://photo.stackexchange.com/a/12968/1943). Depending on the specific camera, you may be able to tell if the camera was in some sort of special mode, but you won't be able to tell if the camera was in sports mode but used to take a picture of a tree.
Comment: @mattdm: How about picitures taken in day/or night? Is this possible?What information helps me to findout whether it is portriat or not? All in all, what sort of clues can be extracted only from EXIF meta date?
Comment: It might be helpful to know _why_ you are trying to do this.
Answer: From the EXIF metadata you can calculate the "nominal" luminance of the scene, i.e. the luminance that the camera ought to render as midtones: use this exposure equation. This luminance should provide a good heuristic about whether it is a day or a night shot. But look also at the time the picture was taken: low luminance in day time probably means the picture was taken indoors.
You should have the information about the orientation of the camera, so you know whether the picture was taken in "portrait" or "landscape" mode, although this may not be well correlated with the actual contents of the picture... If it's recorded in the EXIF, a long focusing distance may be a better indicator that the picture is a landscape.
Look also at the focal length, chances are you don't take the same kind of pictures with a long or a short lens.
In any case, you will certainly have to find your own rules, since the possible correlations between EXIF data and picture contents will likely depend on your personal shooting style.


Why tune the guitar other than standard?

Question: I have a question. How does tuning come into play in guitar songs? See, I can find the tab of a song in the guitar by ear and I was taught that in tuning standard the fifth fret of the low e string is same sounding as the open a when plucked. This means I could derive a same sounding note from one string to another, isn't this correct? So why does one need to alternate tune sometimes?
Is this because in some songs some notes go from low to very high? So that the player could easily play that song because the notes would be nearer to each other?
Comment: For some reason, there has been no mention of folk and blues here: richie haven (woodstock) played an open D tuning, and slide guitar is quite often open A or Am. The trick here is that the chord can be played with a full barre and merely slid up or down the fret board. One reason is *naivete* without the benefit of lessons, another is ease of use.
Answer: You've pretty much answered the question yourself.  Sometimes the guitarist needs access to other notes (usually lower, such as in drop-D tuning) or to take advantage of chords that would be difficult/impossible to form in standard tuning.  Two other options are wanting the change in sound (particularly with the open strings) or simply preference (preferring to play songs one way over another).  Naturally, tunings can be combined with a capo to create many variations.
Comment: @JRoq Yes, there would be, due to overtones.  A different mix of frequencies is produced by different strings playing the same note, though they share the same fundamental, due to their thickness and other physical properties.
Comment: would be worth mentioning another reason for alt tunings: slide guitar
Comment: Would it make any difference though regarding plucking the same notes but with different strings? For example, the 7th fret of the D string would sound like 2nd fret of the B string right? Would there be a noticeable change in sound? What I really mean is if you pluck the same note from the bass strings(EAD) then the higher strings(BGE), is there a difference in sound or would they really just sound the same?
Comment: Cool dude! Thanks! That's why it sounds different to me when I hit the notes at different strings but they're the same. The mystery is solved! Thanks guitar master! ^^
Answer: The change in sound is a big reason, especially in folk styles… I've learned one song that is played in DADGAD tuning for a specific type of sound, one with a lot of suspensions in most of the chords. It's simply not possible to play it in standard tuning and keep the same character of sound, and it's what makes the song what it is. However it's also used for the ease of playing specific things. It's also sometimes used as a songwriting tool, at least by some, as it lets you escape the progressions you know, and explore the ones you don't, completely by ear. I've used it on occasion, and though I'm about as far as you can get from a gifted songwriter, it has certainly helped get me out of many a rut.
In addition, some individual guitarists use alternate tunings, especially open tunings, to overcome physical difficulties. My father cut two fingers of his left hand off on a table saw, and now has only his thumb, pinkie, ring finger, and minimal use of his index finger (won't bend, so usable mostly just for barre chords). He has no middle finger any longer. He used to be a phenomenal guitarist, and although he primarily plays bass now, he does play guitar in open tunings, which help him do what he needs to.
Comment: I wonder how your father would do with my Flat Finger Tuning? G-D-d-f-g#-b [the fifth string is the lowest].  All major and minor triads and seventh chords (7/M7/m7/Mm7) can be played using two or three fingers, placing the index finger across three to six strings, and other fingers covering one to three strings.
Answer: The character of the sound, rather than ease of playing, is most often the reason seasoned guitar players use open tunings. I don't know what kind of music you anticipate playing in alternate tunings, but they are frequently used in everything from blues to country to rock. Guitarists from Mississippi John Hurt to Doc Watson to Keith Richards to Neil Young use alternate tunings.
To really answer your question, find a song you like that you know was done with an alternate tuning and try to learn it in standard tuning. You'll almost certainly succeed. Then relearn it in the alternate tuning and you'll appreciate why it was done that way.
Comment: In "Teenage Riot" it's clear that for one of the parts, the open G tuning is to make the strings ring more and to make for that kind of lazy alternating backing rhythm pattern. It could be done in standard tuning, but I'm pretty sure you will "feel" the difference in open tuning. Because open G is so different from standard, you might want to consider a different set of strings more appropriate to the pitches of the tuning if you use it much.
Comment: If you only have one, then just tune them around and see how you like the sound. If you get to playing in alternate tunings and standard tunings -- especially with others, switching will get old in a hurry and many people *do* have a guitar they leave tuned in one or another alternate tuning. D'Addario has a primer on selecting strings for this here: http://www.tothestage.com/upload/StringTension_1949.pdf. You'll be tuning *up* so unless you can fret the strings cleanly, you should be ok. A dropped tuning is more likely to generate fret buzz.
Comment: I'll be doing Sonic Youth and Pavement songs if you know them. :)
Comment: Hey, your "learn standard before learn the alternate" thing really struck a chord in me. I'll definitely do it! ^^
Comment: Different set of strings? So I need to buy a new guitar?


Preventing rust in bolt heads

Question: I have several bikes and use them more and more in bad weather. I have no problem with rust on the chain, but I am seeing little bits of rust in the various hex bolt heads on the bike. What can I use to remove this rust and how can I prevent it from happening again. Note I ride things like Ragbrai, so keeping out of the rain, or drying the bike right away is not an option.
Comment: I have a 20 year old bike that has lived outside most of it's life. There is superficial rust on the bolts (and frame and handlebars). The easiest thing is to live with it. As long as it's superficial surface rust it won't hurt.
Answer: Where possible, replace with stainless fasteners. Things like water bottle bracket bolts are readily available in stainless at a good hardware store.
But most fasteners on a good quality bike are stainless to begin with, so it may be that you're not seeing "rust" per se but rather a sort of corrosion that can form on stainless.
Comment: There are also titanium bolts, I don't think they rust, but they have other problems, first of all the prohibitive cost, compared to stainless.
Comment: Stainless steel bolts are a very poor choice. They are much less strong than steel bolts and they also have a tendency to gall and sieze. For corrosion resistance the first step is coated steel bolts with various levels of corrosion resistant coating, followed by stainless steel only in severe (i.e. salt spray) environments, where the disadvantages of stainless steel bolts finally become less bad than the rust of even coated steel. No "good quality" bike would ever come with stainless steel bolts.
Comment: An example non-stainless-steel bolt which passes ASTM 1000 hours salt spray test. $5/100.
https://www.mcmaster.com/91274A126
Comment: @BetterSense It's a bike, we are not torquing bolts to 90% of their tensile strength or whatever. Coated steel is only good because it's cheap. Proper stainless (like 304) is far more...well...stainless. Zinc corrosion looks equally bad. Galling/seizing can be mitigated with grease or antiseize compound. You're right, a "good quality" bike would have full titanium bolts instead.
Answer: After cleaning I give the bolts a small squirt of WD40 followed by a good rub down.
This leaves a very fine film of oil that won't hold dirt but is just enough to stave off the rust if done regularly.
The spray also displaces (WD, water displacement, geddit?) any water left from cleaning in any little gaps.
Answer: Little bits of rust shouldn't hurt anything, but if you're getting lots of rust or it just drives you crazy you might consider spraying them down with a wax based lubricant or dry lube. Finish Line's Teflon dry lube might be a good option because it has a tendency to build up on chains, which means it goes on thick and may act as a barrier to oxidation. Boeshield's T9 may be another option though it goes on thinner than Finish Line's product. Of course these products aren't truly "dry" and you're going to be trading rust for dirt. If you wanted to get really crazy you could pack the heads with paraffin wax, but that seems over the top to me which brings me back to my first point that you probably shouldn't worry about it.
Answer: I like using marine grease in the hex "slot" itself. Just get a mini grease gun and some tubes of marine grease (both available from automotive shops), and then you can quickly apply little blobs of grease in each bolt head.
You'll end up with some grease on the ends of your hex wrenches whenever you make adjustments, but this way you know that your bolt heads won't clog with dirt or ice (or rust, which as others have noted usually does not meet destructive levels).
A mini grease gun is also what you use for maintaining Speedplay pedals.
Comment: I think this could use one correction, replace grease with anti-seize compound, with marine grade being the best.  It is formulated to cover and prevent metals (especially dissimilar contact points) from corroding and adheres better in rain, whereas grease just covers.  Although for some bolts marine silicone adhesive (like what credit cards are glued to when they come in the mail) is a good option for when you don't want the greasy look or to get your wrenches dirty.
Answer: You may have to do some searching to find the right sizes but you could go with stainless steel hardware. Buying them in small quantities can be expensive. I have had issues with some hardware that is countersunk. Conventional allenheads won't fit in the hole. Maybe that is why they call the brand "Specialized".
Comment: Stainless can still rust, but generally only superficially.  I get stainless parts from a local boating supply shop.
Answer: They sell galvanized bolts in almost every shape and size. or find some cosmoline and thin it with mineral oil. Give them a bath after you wire brush them. They will last for years.
Comment: I'm guessing that the "think" in there is an autocorrect, but I can't figure out what it was correcting from.

Preventing rust in bolt heads


Is this PTR record / DNS set up correctly?

Question: Received the following error from a user:
WARNING: Forward-DNS does NOT match Reverse-DNS.
DNS is INCONSISTENT.

Some users are having their email marked as spam. I looked in the PTR records and found the following information:

70.63.x.34 PTR - mail.x.com
70.63.x.36 PTR - mail.x.com

x.com
A record - mail.x.com -> 70.63.x.36

I guess my question would be; Should I remove the PTR from 70.63.x.34?
Comment: Doing a dig -t mx x.com. shows that the mx record points to mail.x.com
Comment: but from which ip are you sending from?
Comment: I looked at a header from a email that a client sent me and it shows that it is coming from 70.63.x.36
Answer: Yes, If you have no A record for mail.x.com set to 70.63.x.34.  The recipient's email system likely has a spam filter that does reverse lookups on the sender's domain to help mark spam.
Answer: You haven't said how the mail server is actually configured to send mail which is the key bit.
Having an extra PTR record is not a problem.  Sending mail from that IP is.
Try this:
<code>dig -t mx x.com.
</code>
Comment: mx points to mail.x.com
Comment: Then your .34 IP is not an issue.
Answer: If you send mail from .36 you shouldn't have a problem.  If you send from .34 you will have a problem, or if you send from both, you need both addresses as A records and both as PTR records and maybe as SPF records too!
Answer: Also, what is your server configured to say for the EHLO command? If you are reporting your internal server, it will not match.
In Exchange 2007/2010, you would go to Organization Configuration>Hub Transport>Send Connectors and on the General Tab in the "Specify the FQND this connector will provide in response to HELO or EHLO" field, enter that mail.x.com.


Scala for Junior Programmers?

Question: we are considering Scala for a new Project within our company. We have some Junior Programmers with only PHP knowledge, and we are in doubt that they can handle Scala. What are your opinions? Some say: "Scala is a complicated beast!", some say: "It's easy once you got it." Maybe someone has real-world experience?
Comment: Do you doubt this because they are junior (== less experience), or because you doubt their potential (== maybe programming isn't their best long-term career choice)?  Your strategy for "I don't know anything, but I learn fast, let's go!" is very different than, "Waah, I just got sort of comfortable with this, why are you trying to confuse me?".
Comment: You can't handle this with a generalistic approach, you got to check what they know and what they don't, do they like the functional paradigm? How much time passed since they where exposed to some? Did they use only old, outdated and slightly brain damaged languages?
Answer: "My coworkers will not understand Scala" is simultaneously overstating its difficulty and insulting your coworkers.

Scala is not that difficult. It's just another programming language. Any trouble that junior programmers have with Scala is going to be more or less the same trouble they would have with any other language.
Your coworkers are smart. Of course, I don't know them, but it's a pretty safe bet unless your company is the kind of organisation that hires stupid people, in which case, you have bigger problems.

That said, at my company we have some core products developed in Scala, and we don't find that people have any more trouble with it than Java. The code is generally more clear and concise, easier to generalise and reuse, etc.
Answer: I guess Scala could be used as a "beginners" language. Even though there are tricky ideas behind it, you dont have to use/explain them in the beginning. If you explain pure OO with Scala, I would say it is straight forward and easily understandable. As Scala reduces a lot of code overhead from other languages it might even be easier to learn concepts with Scala than with Java/C++.
A major drawback I see with Scala as a beginner language is the lack of documentation. Don't get this wrong, the official Scala doc is very good and also the few books that are available are quite useful to get the details of the language, but those have not been written for beginners. For example in Java you find hundreds of books titled something like "Learning OO with Java" you wont find that for Scala which may be a show stopper.
As Hannes mentioned, only do new language introductions within research projects and not productive or even flagship projects. If you have some juniors, that makes the situation even better, take some internal tool, you always wanted and needed and let them create it during a research project. This is also a nice opportunity to experiment with different development-processes. And your juniors most probably like to be challenged and will deliver a good prototype and a very well proofed opinion if Scala can be used as a beginner language.
Comment: *Programming in Scala* is definitely written for beginners. Also, most things you learn using Java can be directly applied to Scala. Indeed, you can use all your favorite Java libraries in more or less exactly the same way.
Answer: I believe that most people moving to Scala are experienced and enthusiastic coders. I'd suggest that you get in-house experience with a Scala project with your senior programmers first before forming a strategy for mentoring your junior coders. I'd also suggest that you only involve people who are eager to join in.
Answer: I would advocate it. But with the proviso that you have clear guidelines on what language features are acceptable for your team. For example, coding primarily in an imperative style (which is familiar for Java-trained people), or perhaps limiting the employment of recursion or closures.
Also plan for seniors to mentor the juniors. This may take the form of any combination of: pair programming, code reviews, info sessions, regular discussion forums, etc.
The opportunity that scala presents for vastly improved coding on the JVM is too great to pass up. When your seniors get into it I would not be surprised if they find renewed passion for development. When your juniors get into it they will be learning best practice JVM development from the start.
Answer: If you choose to go this route, perhaps they'll find easier to use the Scalate framework than a more traditional one like Lift, since it allows mixing HTML with Scala, much in the same way as PHP works.
Answer: Scala is a very 'normal' programming language. Any programmer should be able to learn this language. The people that have difficulties learning Scala mostly are experienced with imperative languages and are surprised by the functional concepts. So unexperienced programmers may learn it even faster. In my opinion should be no problem, to assign it to juniors. From a management point of view, I would assign a junior and a senior developer as a team (or more of both, depending on the size of the project).
Answer: My initial thought would be that Scala will be too heavy for them but then I guess because Scala is an OO/Imperitave/Functional hybrid, one could introduce them to the OO/Imperative part of scala until their comfortable, but then again they will probably have bad PHP habits in Scala since scala authors mostly prefer the functional style over the imperative one.
So, it could work, but I would do it for a research project, and definately not for a flagship one.
Edit: Perhaps this should be said also: It seems that functional/OO hybrids like Scala is becoming more popular especially because of how functional languages handles parallel processing as opposed to how we know it in languages like in Java. The amount of cores found in a chip is increasing rapidly, so this is important. However, mentioning PHP, it seems that you are developing web server scripts where threading is less important. PHP doesn't even have threads.
This raises another point. Do you want to develop Scala Web applications i.e. Lift. If so then you have a doubled up learning curve which should also be considered.
Answer: I think it depends whats more importent for you. If you want to learn as possible about OO Programming and the standard stuff its a bad idea.
But what you really give them is a opportunity to learn something really cool and unique. Witch can be good motivation. Scala has many cool stuff in it. If you can handle Scala you can handle a lot of otherstuff as well.
Talk to the Programmers (all of them) and tell them why you wanne to use scala. Ask if the have to  motivation to make and learn something not everybody can do and go the extra mile?
If the are go with it!
Answer: Imagine that you would have picked Java and asked whether they could handle Java. If your answer is they could, then they can probably handle Scala.
Scala is only marginally more difficult due to:

No great IDE support. The support ranges from poor to good. Not necessarily an issue for a PHP programmer.
Documentation not as rich as Java

Both Java and Scala have new challenges for a PHP programmer (JVM, new libraries, compiled language, statically typed).
I don't think Scala is a complicated beast, but you do need to understand some of the syntactic sugar and design principles, which would be true of learning Java as well.
Answer: Yes, if...

Strategic decision has been made to go with Scala
Company can handle the hit (financial and time) that will come from the steep learning curve.

No, if...

No senior Java, C# or C++ programmers can be put on the project too
Can't find a Scala programmer to act as a lead
Programmers don't have the patience to learn Scala or deal with a language where Jars (libraries) are scattered all over the place, rather than in one or two neat packages like PHP.

*Note: if the junior programmers were C++, C#, or Java Software Engineers rather than PHP, then my answer would be different like, Go for it!
Answer: I would not recommend it. My experience of Scala is only from homebrew projects, but I would imagine the currently lousy IDE support, quite frequent API changes and a very flexible syntax (that allows one to hang himself and everybody else participating in the project) would cause a lot of problems in a bigger, more official project.
Comment: The IDEs are not lousy (try IDEA9 CE) and the language does not have "frequent API changes" unless you are using the 2.8 snapshots, which is obviously *not recommended* if you want stability. I have been using 2.7 with no API issues whatsoever!
Comment: I agree in the sense that I think any problems wouldn't come from the language itself, they'd come from contextual issues stemming from Scala being a fairly young language.
Comment: The IDEs are lousy if you don't have the luxury of changing due to bad Linux support in IDEA and the fact that I really don't want to start learning a new IDE just for Scala, luckily Vim works fine with Scala as well, but it is annoying to have to manually compile all the time to check the compiler has enough hints to know what it should do. Going from 2.6 to 2.8 there have been a lot of changes and a lot of the examples found online don't specify in which version they features are available. I like the language I really do, but it is not yet production ready in my opinion.
Comment: "Bad linux support"? I have a colleague who is using IDEA on Linux just fine
Comment: Mileage clearly varies. I haven't been able to get it to work on 64bit Linux and a friend of mine 32bit didn't work well either, but I just took his word for it. This was about two months ago so the situation might have changed of course, I'll have to look into it.
Answer: Give them IntelliJ and throw 'em in the deep end.
Answer: Here is a blog post I recently stumbled upon:
http://james-iry.blogspot.com/2008/07/java-is-too-academic.html
It shows that even Java can be too academic to be understood by programmers which have no experience in functional programming. On the other hand, Scala allows to write code the "imperative way", so you can avoid all the FP stuff if you do not understand it. In my opinion, Scala is much more concise than Java, so I guess a "junior programmer" should be able to handle it.

Scala for Junior Programmers?


Hangs after login in my DELL Laptop

Question: This is my first experience with UBUNTU .i have installed the OS yesterday with Windows 7 and The OS was working well but subsequent using the OS i felt that it was hanging frequently and i had no other option but to reboot the lappy. iam using DELL Inspiron lap.
Comment: what's your specs?
Answer: Ubuntu can theoretically hang on any hardware. I recommend running updates if you're able to use Ubuntu long enough before it freezes, that's the most important thing to do if you are able to. If it hangs immediately after login, was the install really successful in the first place? You can swap the hard drive into another computer and try booting Ubuntu off that hard drive in another machine, that will help you isolate the problem.
When it hangs, if it's from overheating, I highly recommend switching to Lubuntu, which uses LXDE as the desktop environment. I've got much more mileage with Lubuntu on laptops that overheat.
Also consider what kind of graphics card you have. Are you able to do Ctrl+Alt+F1 to swap from GUI to a CLI? This may prevent you from having to reboot your machine by allowing you to enter commands, for instance a killall on the application that might be causing the issue.

Hangs after login in my DELL Laptop


What is meant by one being in a "tax bracket"?

Question: I've always wondered but just now asking: What is meant by one being in a "tax bracket"? Does that mean only Federal, or does it include State AND Federal? For example: I (would like to) make $100K a year.  Someone tells me you're in the 38% bracket.  How do I interpret that?  Are they talking about only Federal taxes? If so, then I would also be paying a chunk to California, let's say 15%, so where am I, in the 38% or in the 53%? Thanks in advance.
Answer: Tax brackets refer to the range of taxable within which you fall. An income tax bracket usually refers to federal or state tax, not the combined rate. I have put here the tax brackets for 2016 for IRS and State of California.

https://www.irs.com/articles/2016-federal-tax-rates-personal-exemptions-and-standard-deductions

https://www.ftb.ca.gov/forms/2016-california-tax-rates-and-exemptions.shtml
According to those, a taxable income of 100,000USD would fall in the 28% bracket for the IRS and 9.30% for State of California. The combined rate is therefore 37.3%. However, this does not mean you would pay 37,300USD. First of all, your applicable tax rate applies only for each dollar in your tax bracket (e.g. 28% * 8,849USD for IRS). Therefore, to calculate your combined taxes you would need to do:

Therefore, your effective tax rate would be much lower than the combined tax rate of 37.3%.
Now do note that this is an example to illustrate tax brackets and is nowhere near the amount of taxes you would be required to pay because of various credits and deductions that you would be able to benefit from.
Edit:
As suggested in the comments, a note on marginal tax rate (referred to here as combined tax rate). This is the rate of taxes paid on an additional dollar of income. Here, every additional dollar of income would be taxed at 37.3%, leaving you with 62.7 cents.
Comment: Great answer, the only thing I would add is the term "marginal tax rate" which you've already described well. Lots of people have heard the term but don't know what it means.
Comment: I just want to emphasize to readers that **increasing gross income** (and going up a tax bracket) **will never reduce your net income**, and if you think it will, please read this answer again, more carefully.
Comment: @Walt What you say is true if you're talking _purely_ in terms of the tax table, but it's not true overall. Some credits and deductions have hard AGI eligibility limits rather than phase-outs, for example. In those cases, it's entirely possible for an extra $1 of gross income to mean paying an extra few hundred dollars or more in taxes. Not to say that it's incredibly common, but it's certainly possible and does happen, so saying that it will never reduce your net income is not accurate. Higher gross income can also reduce aid benefits from various government programs, as another example.
Comment: I rthink when talking of tax brackets in general - e.g, saying someone's in the 28% bracket - it's only Federal tax that's relevant.  Mainly because state rates range from zero to California.
Comment: @reirab, yes you are correct --- Walt's statement is overly simplistic.  A few years ago I ran into that issue with my state taxes.  As I recall, if I had earned $50 less, I would have qualified for a larger deduction and would have saved about $500 in taxes.
Comment: @jamesqf Could be worse, Oregon practically has a flat income tax: 9% for $8400-$125000, 7% for less, and 9.9% for more.
Comment: IIRC there are also cases where an increase in income can make you ineligible for EIC in ways that you end up with a reduction in net income. Some ways you lose EIC are phase-out but not all of them.
Answer: As ApplePie discusses, "tax bracket" without any modifiers refers to a single jurisdiction's marginal tax rate.  In your case, this is either your California's "tax bracket" or your Federal "tax bracket" (not including marginal Social Security and Medicare taxes).  But if someone says "combined state and federal tax bracket", they probably mean the combination of your state and federal income tax brackets (again, lot including sales taxes, business and occupational taxes, social security taxes, and medicare taxes).  The math to combine the state and federal marginal tax rates is a bit tricky, because most people can deduct either their state and local income taxes, or their state and local general sales taxes when computing their income for federal income tax purposes.  (The federal "alternative minimum tax" restricts this deduction for some people.)
For a single person earning $ 100,000 of salaries and wages in California, whose state income taxes are close to their standard deduction, the calculations for the combined marginal income tax rate look something like this:
<code>25   % Federal    income tax bracket
 9.3 % California income tax bracket
------
31.975 % = 25 % + (100 % - 25 %) * 9.3 %
         = Combined income tax bracket.
</code>
As mentioned above, this understates the tax bite on marginal "earned income".  To find the true marginal rate, we need to add in Social Security taxes, Medicare taxes, sales taxes, and business & occupation taxes.  The Social Security and Medicare taxes are sometimes called "self employment taxes".  This math omits unemployment insurance and workers' compensation insurance, because those taxes are typically capped well below $ 100,000 per year of income.  This math also omits B & O taxes, because this question is California specific.
If an employer wishes to increase an employee's pay by $ 1,076.50,
the first $ 76.50 will go to the employer's share of Social Security and Medicare taxes.  The remaining $ 1,000.00 will be subject to the combined marginal income tax rate discussed above, plus will have $ 76.50 go to the employee's share of Social Security and Medicare taxes.  The employee might buy some extra things with some of their extra money, and pay sales tax on them.
In 2016, a 9 % sales tax rate was common in California's largest cities.
The IRS estimated that (for a single person with no dependents making $ 100,000 per year who did not buy a boat, RV, motor vehicle, or major home construction), about 9 % of their marginal gross income was subject to sales tax.
<code> $ 1,076.50 Employer's increased expense
      76.50 Employer's share of Social Security and Medicare taxes
     250.00 Employee's federal tax bracket
      93.00 Employee's state tax bracket
     -23.25 Employee's savings on federal taxes because of state taxes
       8.00 Estimated extra sales taxes.
      76.50 Employee's share of Social Security and Medicare taxes
 ----------
     480.75 Total taxes on marginal income
     595.25 Net benefit to employee
 ----------
     44.7 % = 480.75 / 1076.50
            = true combined marginal tax rate.
</code>


Plone 4.0.5 and photo gallery

Question: I would like to have a photo gallery and tried "collective.plonetruegallery" which is nice. Im just curious, are there any other good alternatives that is recommended (it takes a lot of time to test all of them).
Thanks.
Nikolaj G.
Answer: I have done collective.gallery. You can find demos here:
You should try it, it is used in production, quite easy to customize (all controls are binded to css ids) It is well tested. Let me know if you have any troubles with it.
Answer: I really like to use collective.prettyphoto. Installs cleanly, works as expected and also looks nice.
Comment: Thanks zupo, Ill try it out. Nikolaj G.

Plone 4.0.5 and photo gallery


Criteria for considering new tags

Question: Where can I find information about what would make a beneficial tag on Ask Ubuntu or any other Stack Exchange site? What conditions must be satisfied before a new tag should be proposed/made? For instance, I think that Ask Ubuntu Meta should have a "Criteria" tag. This tag could be used for questions (like this question) asking about the criteria for a certain subject/topic.
Comment: What criteria do you have in mind for [meta-tag:criteria]?
Comment: @mateo, Any questions pertaining to requirements, criteria, or conditions that must be met do perform, complete, or qualify for some state. For example, if a user asks "what types of comments are not allowed", that would be tagged with criteria. Did I answer your question clearly? I do not think that I am explaining myself properly.
Comment: Moved to answer
Answer: I'd consider instead what makes bad tags to help answer that question. Ideally, tags are ways to help connect people with questions, not a way to classify the context of a question. So, for example, ubuntu-desktop was a terrible tag. No one really wants to watch the ubuntu-desktop tag. Yes ultimately questions tagged about this revolve around the ubuntu-desktop, but it's nothing pertinent to the content of the question being asked. It's simply supporting information.
In addition, the bug, crash, and error tags are horrible in that they're describing the context of the post, but no human will ever really want to follow the bug tag for one of two reasons. One, we're not a bug tracker. Two, it doesn't help convey any real meaning. So, the fact that you're saying it's a crash means nothing. The context of why you're asking the question isn't as important as to what you're having problems with.
However, things like specific software being used, wine, php, juju, ubuntu-one make more sense as there's a chance people with knowledge of that software will follow. There are also a few additional tags, like application-development which connect a subject matter (not a physical piece of software) with people who know and specifically work on application development.
Tagging isn't an easy thing, which is why it has a high reputation entry level for creating a new tag. If you're uncertain if a tag is good or not always feel free to post on meta. It's better to figure out early on if a tag is a good idea before it becomes an unruly beast
I actually re-read your question and noticed this.

For instance, I think that Ask Ubuntu Meta should have a "Criteria" tag. This tag could be used for questions (like this question) asking about the criteria for a certain subject/topic.

I would argue criteria is a "meta tag" (bad thing). It doesn't offer any additional clarity on what the question is about. The question is a discussion about tagging. The fact that you're asking for criteria is irrelevant. If we were using tags to catalog questions, then yes criteria would make an excellent tag. However, tags aren't about cataloging but for humans to use. Criteria is meta in that it only offers context of the question, but does not necessarily clarify the content. I'd consider this also to be tagged faq as it's quite a commonly asked question.
The rule of thumb I use: "Would someone ever want to follow this tag?" If I can't think of a case where someone would want to follow it, then it's probably not going to be a good tag. Even if I can, I try to argue against it until I can't think of a reason not to create the tag.

Criteria for considering new tags


installing error with a source code called Titan2d

Question: I am installing a Titan2d softawre (from Buffalo University, Geophysical Mass Flow Group) in cygwin, I make a directory titan-3.0.0 (3.0.0 is the last version), under this directory I run $ sh install-titan.sh
This script will automatically check for both MPI and HDF5 installation. If MPI is not found in its standard location, then the user will be prompted to enter its absolute path, or quit installation. If this script is unable to locate HDF5, then the user will be prompted to enter its absolute path or continue without installing HDF5.
Through the process of installetion I got this error:
$ sh install-titan.sh
/usr
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for C++ compiler default output file name... a.exe
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether /usr/local/bin/mpiCC accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of /usr/local/bin/mpiCC... gcc3
checking for gcc... /usr/local/bin/mpicc
checking whether we are using the GNU C compiler... yes
checking whether /usr/local/bin/mpicc accepts -g... yes
checking for /usr/local/bin/mpicc option to accept ANSI C... none needed
checking dependency style of /usr/local/bin/mpicc... gcc3
checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes
checking whether g77 accepts -g... yes
checking how to run the C preprocessor... /usr/local/bin/mpicc -E
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes checking whether make sets $(MAKE)... (cached) yes checking for ranlib... ranlib checking how to get verbose linking output from g77... -v checking for Fortran libraries of g77... -L/usr/lib/gcc/i686-pc-cygwin/3.4.4 -L/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../.. -lfrtbegin -lg2c -lcygwin -luser32 -lkernel32 -ladvapi32 -lshell32
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for _LARGE_FILES value needed for large files... no
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking for pthread_create in -lpthread... yes
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for MPICH2... configure: error: Package requirements (mpich2-ch3) were not met:

Variable 'exec_prefix' not defined in '/usr/local/lib/pkgconfig/mpich2-ch3.pc'

Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.

Alternatively, you may set the environment variables MPICH2_CFLAGS and MPICH2_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.

make: * No targets specified and no makefile found. Stop. make: Nothing to be done for `install'.

I have installed either the openmpi from the cygwin setup, I choose full package installation so a series of mpi packages are automatically downloaded and installed, as well as I downloaded the last release of mpich-3.0.2 and an older release mpich2-1.2.1p1 and I installed in cygwin with configure, make, make install. However, titan2d installation error tell me that the Package requirements (mpich2-ch3) were not met. I know from the titan2d user guide that "If there are multiple copies of MPI on your machine, this script will find and use the first one in your path". I do not get why my instalaltion comes with this error. Any help will be greatly appreciated
Answer: You should try exporting the env var, use export MPICH2_LIBS="/usr/lib". Sometimes in cygwin package libraries get put in /usr/lib and /usr/local/lib depending on the setup system involved. If it also runs into not finding "include" (header folder), it should tell you what to env var to set much like it did before.
You could also edit install.sh and find where it runs configure and add the following switch
--prefix=/usr
The prefix should set the bellow and more to
--libdir=/usr/lib --includedir=/usr/include --libexecdir=/usr/libexec --sbindir=/usr/sbin
Instead of being "/usr/local". However this is a more global option, so if certain files were available in /usr/local/* they might not be avail in /usr/*, so you will have reversed your problem. Better to solve individually for one or the other, seeing as /usr or /usr/local might have more packages you need. But im no expert!
so the line in install.sh should look something like ./configure --prefix=/usr
For the most part configure will send the above options as correct make flags in the Makefile.


Why is ethereum's mining function is safe as bitcoin's proof of work?

Question: bitcoin's mining time is about 15 minutes while ethereum's mining time is 10 seconds. Is not it bad for ethereum's mining time to be too short? (from security aspect). Why is it so important for ethereum's proof of work to be ASIC resistant function?
Answer:
Is not it bad for ethereum's mining time to be too short? (from security aspect)

It could have been bad for security, yes. A shorter block time means potentially less hashing power has gone into solving the proof of work for a given block, meaning less hashing power would be required to reverse the block. (By creating an alternative block with the same number.)
However, Ethereum uses uncles (see: What is an uncle/ommer block?) to help increase security by incorporating the hashing power spent on mining orphaned blocks, which are themselves more likely due to the shorter block time. (Also have a look at Ethereum's GHOST selection rule: What is GHOST and what is its relationship to Frontier and Casper?)
(It's possible there are other reasons that security is affected. I can't immediately think what they are. Others may know more.)

Why is it so important for ethereum's proof of work to be ASIC resistant function?

This is a different question. Originally ASIC-resistance was intended to level the playing field, allowing anyone with a GPU to mine, rather than skewing the advantage towards people who could afford ASICs, which in turn would lead to mining centralisation.
Is this important? That depends who you ask...
Comment: I see, and why are uncles help to the ethereum's security? (only by giving reward to miners so they will keep mining? )
Comment: When a miner adds one or more uncles to a block, the block's `difficulty` value is increased accordingly. (The `difficulty` field in the block's header is proportional to the hashing power that was used to mine the block.) If an attacker wanted to mine another version of the same block (so he could perform a double spend attack), then he'd have to expend more hashing power than the original block. So if we increase the difficulty of the original block by incorporating uncles, we make it harder to perform a double spend attack.
Answer:
Is not it bad for ethereum's mining time to be too short? (from security aspect)

In itself, yes you are right. But users can wait more blocks before considering a transaction confirmed. This will mitigate that problem. The conservative, secure option has been stated to be to wait for 6 confirmations on the Bitcoin blockchain and to wait for 12 confirmations on the Ethereum blockchain.
Some people also say 40 and some 20-25. Have a look at What number of confirmations is considered secure in Ethereum?.
Comment: Can you elaborate please why  waiting for  12 confirmations is safe?
Comment: 12 blocks is just a convention. The probability that someone can reverse the work is an exponentially falling curve as a function of the number of confirmations, so you have to put the limit somewhere.


Anonymous Buying/Selling

Question: If one person sold bitcoins to another person using a smartphone, will a record of the IP addresses of the devices they used be seen in the blockchain?
Answer: No the blockchain does not contain IP addresses.
The bitcoin node or bitcoin API server (if used) that you initially send your transaction will know the IP though and they could keep it in their own databases.
For anonymous buying/selling you can use the Tor network. You may also be interested in mixing to anonymize bitcoin address (e.g. if you bought your bitcoins from an online exchange that has your IP plus much more).

Anonymous Buying/Selling


Would a fixed or zoom telephoto lens be better for learning?

Question: My daughter has a Nikon D-90 camera body and two prime f1.4 lenses 50mm and 35mm. She is interested in learning more, and I am curious which of a zoom or fixed telephoto lens would help her best? Is getting a low f-stop lens important in a telephoto lens?
Comment: Somewhat related: [Why do people recommend 50mm or other prime lenses as starting lenses for learning photography?](http://photo.stackexchange.com/questions/8939/)
Answer: It depends on where she's feeling the limitations. I have a kit made up of 15mm, 40mm, and 70mm prime lenses (on a dSLR with the same 1.5× format as the Nikon D90), and for me, that's just about right. (I'd probably trade the 40mm for a 35mm were I starting over — tough call.) For my style, I don't miss having a zoom at all.
Since she has (and is presumably comfortable with) two prime lenses, she may feel the same way, and would just like to increase the range of focal lengths she has available. For that, another prime covering either wider-angle or more telephoto would fit nicely.
On the other hand, she might want to explore the convenience of a zoom. Having flexibility of framing can remove one-more-thing-to-worry-about from the learning process, and remove the potential need to switch lenses in the middle of the action.
Back on the first hand, though, there is a school of thought which argues that prime lenses have inherent advantages for learning composition. Mike Johnston's Case Against Zooms articulates this view well. The idea is that by learning to know a particular prime lens's inherent viewpoint, that limitation actually becomes a freedom.
Since I use my 40mm most often, I can attest to this: having used it to take thousands of photographs over the course of several years, I can know what photo my camera will make without having to actually put it to my eye. That's very useful, and helps me concentrate on taking the photographs I want to take with the view I want to have.
Comment: Johnston does admit usefulness of zoom lenses in telephoto range though.
Comment: +1 Love the point you make in the last paragraph about being able to know the probable composition without needing to bring the camera to your eye.
Comment: Yeah I don't think anyone is saying zooms are _useless_. I'm not, certainly. They just don't fit certain styles of photography, and primes do have a few advantages for learning.
Comment: By the same token, zooms also have some advantages for learning. A simple exercise such as photographing the same subject and foreground/background using a zoom set at different focal lengths from different distances to frame the subject the same size can teach a LOT about how shooting distance relates to perspective, as well as about focal length selection based on what you want the image to look like. It's much more economical to do this with a "kit" zoom than with a set of 4-5 primes.
Comment: Zooms also are an economical way to expose a beginner to using multiple focal lengths and allow them to find which ones they might desire to spend more on for a higher quality prime.
Answer: If you are interested in learning a certain type of photography such as birding, then a telephoto would be what you are looking for. If you already have general purpose prime lenses, a general purpose zoom pretty much achieves a similar goal, just with a more convenient package.
Stickily speaking, if learning is your goal, exposing yourself to as many different types of lenses as possible might be the best. You may want to try a 100mm macro, a 70-200mm zoom, or a 18-55mm zoom. These are all pretty standard and will give opportunities that your current kit does not allow.
Answer: When I was learning, I used a 50mm f/1.7 on a Minolta SLR. It was a great learning lens for so many reasons.
It helped learn composition because I had to think while I shot -- I moved closer to or away from subjects rather than simply zooming in and out.
It was bright and fast so I could shoot easily in dark locations
I was forced to concentrate on focusing, especially when shooting at wide apertures
I could invoke shallow depth of field, something hard to do on a "slower" lens
The photos always looked so sharp and contrasty, because the prime lens provided such good image quality
Now, I'm really picky about lenses, and part of it was due to my finding out how poor the quality of a large range zoom could be. I would recommend learning on a 50mm prime any day of the week.
Comment: That's nice but the person in question already has 50mm f/1.4 (and 35 f/1.4), what should she get next?
Comment: And now, on my EOS digital, I love using old Pentax lenses. My favorite is a 50mm f/1.4 Super Takumar. Lots of fun and great for learning the way "it used to be". Check out [this video](http://vimeo.com/10917206) to see how nice it can be
Comment: Modern zooms are a LOT better than their counterparts back when a 50mm f/1.8 (or 1.7) was the standard "kit" lens!
Answer:
Would a fixed or zoom telephoto lens be better for learning?

Yes.
There are lessons about perspective, field of view, narrow depth of field, framing, and composition that can best be learned by working with a prime lens and having to actively consider the best shooting position to get the shot you envision. The fixed focal length forces you to move to alter the framing of the subject, but that doesn't mean you have to or even should stop moving to alter your composition if you add a zoom lens into the mix.
There are other lessons about perspective, field of view, framing, and composition that can best be learned with a zoom lens. A zoom gives you the opportunity, for example, to explore how the same subject looks in relation to the same foreground/background when shot from different distances at different focal lengths using the same framing of the main subject. In such an exercise you are zooming with both your feet and your lens in opposite directions and comparing the results!
The advice many give to learn to "zoom with your feet" before using a zoom lens is primarily a warning not to stand in one place and stop exploring shooting angles and perspectives if you were to have a zoom lens mounted on your camera. But just because you are using a zoom lens doesn't mean you can't still alter the composition of your photographs by using your feet!
Can you learn a lot as a beginner using only primes (or only zooms)? Absolutely. But you won't be as well rounded a photographer. Ultimately, I think to be a well rounded photographer you need to have the skill sets to use both prime lenses and zoom lenses in appropriate situations as well as the ability to assess when each is the better choice. Whether shooting with prime or zoom lenses, the key is to avoid becoming stuck in a rut (or in one spot) but rather to keep exploring new ways of seeing the world through your viewfinder.


How to take photos of planets with smartphone?

Question: I'm not sure if this the right forum to post this question. I'm trying to find what is the best option to take photos of planets using smart phone. I have a Google Pixel XL, and I'm looking for a good telescopic lens that can be fitted to phone camera. Has anyone tried this before? Really appreciate any thoughts, suggestions, recommendations to get clear photos with mobile phone camera.
Comment: How much detail are you hoping to record? More than a spot of light in the sky?
Comment: "planets with smartphone" ? Hhmmm,
Comment: Step 1. call planet on its smartphone - Step 2. photograph it.
Comment: TL;DR: $20 telescopic lens attachments on a handheld device WON'T get you even close.
Answer: The best option is to attach the phone to a telescope. E.g. Jupiter with a phone and a 10" Dobsonian.
A 10" Dobsonian isn't small, you're attaching the phone to the scope rather than the other way around.

Size illustration of 8" and 12" Dobsonians vs. a 180 cm (5 feet 11") adult. Adapted from astroshop.eu.
The issue is that the angular resolution of a lens, the smallest feature (in arc seconds) the lens can resolve, scales with the aperture diameter. IMO, anything small enough for a phone attachment isn't going to give enough resolution to be worth the trouble. At best you'll get Jupiter as a bright dot and the Galilean moons as fainter dots.
A 'superzoom' bridge camera like the Nikon P900 can do better. At 357mm f/6.5 (2000mm 'equivalent' focal length) that's a 55mm (or 2") aperture, it's a start.
But honestly, you're better off with a telescope. If a Dobsonian is too big, something like a 5" Mak-Cass is fairly portable and can give better planetary pictures at less cost than a superzoom. You'll still need a tripod. The phone can be handheld close to the eyepiece, or you can use a phone adapter (example).
The best planetary pictures are from stacking a large number of individual frames. Look into stacking and editing when you're ready.
Answer: If you want to use a mobile phone camera with a telescope, you're going to be limited to what is called "afocal" photography. For this, you set the telescope as normal, with an eyepiece, just as you would for visual use. Then you hold the camera up next to the eyepiece, so that it's looking through the scope just like your eye would.
The important thing is to get the camera lens centered over the eyepiece. You can just handhold it, but it's easier to get repeatable results with some sort of holder.
You can get commercial adjustable ones that attach to the scope (often clamped to the eyepiece/focuser), or for a DIY alternative, you can glue a spare eyepiece cap (with a hole in the center)  to a cheap phone case.
For phones with both a wide angle and telephoto camera, you're more likely to fill the frame with the telephoto camera, since typical entry level eyepieces have an apparent field of view (AFOV) of around 50 degrees or so (You can get much wider AFOV eyepieces, but they're expensive).
With a bit of practice, You should probably be able to get some good moon photos this way - the moon is basically a gray rock in bright sunlight, so you don't need long exposures.
Other targets may be more of a problem - it depends what the low light performance of the camera is like. With relatively tiny pixels, that's not going to help with sensitivity or noise performance.
While you may be able to get usable images of some of the other planets (they're pretty bright too) and maybe some open star clusters, it's unlikely that you'll be able to do deep sky photos of faint nebulae and galaxies - even using a telescope at prime focus, these need very long exposures (typically lots of multi-minute shots) and a driven mount with very accurate tracking to avoid trailing as the target moves across the sky due to the earth's rotation.
Unless the target fills the frame (like the moon at higher magnifications) you'll probably also need a camera app that allows manual control - if you rely on auto-exposure, then what usually happens is that the camera sees all the black background around your target and cranks the gain/exposure time up to try and get the normal 18% gray result. This usually causes the target to be blown out and heavily overexposed,
often losing all the details.
Answer: There are adapters to fit the smartphone over the exit pupil of the eyepiece.
Just do a search for "astrophotography with smartphone" and you'll get a lot of detailed instructions.
https://search.yahoo.com/search?p=astrophotography+with+smartphone&fr=yfp-t&fp=1&toggle=1&cop=mss&ei=UTF-8


Hover vs click on mega menu

Question: Now implementing a new mega-menu. The current mega-menu's submenu options are shown on user cursor hover. Would a more explicit action like mouse click be more appropriate for this (like the example below)?
Comment: I always thought click is the best choice, even I read a lot of pro/ cons arguments about this. The natural instinct is to click the link to reveal a drop-down menu.
Answer: This is an interesting question.
TL;DR - Personally, I would go with a click because opening a "mega menu" is more of an action.
A good rule of thumb is that you want to keep the distinction between an action (which might be denoted by a mouse click) and interaction (which could be denoted by hover or the like).
Actions make something occur - whether that be changing, adding, deleting or similar.
On the other hand, interactions don't imply that something will be changed, added, deleted etc.
Relating to your question, viewing a menu is more of an interaction because you aren't initiating a navigation to anywhere.
However, there becomes a point where hovering to show a huge menu can almost be considered an action. For example, on the Microsoft website example you refer to, the menu hides the rest of the page from view - and this could be considered an action because something is being changed. (The user's view)
In conclusion, you should ask yourself whether your "mega menu" is an action or an interaction, and furthering that, whether it changes, adds, deletes or modifies the user's experience in any way. If the user will be initiating an action - use a click. If it is an interaction - use a hover.
Answer: Click
In this particular case, it would be useful to consider some cons or pitfalls of hover too:

False positives: hover actions fires every time the mouse pointer is over the menu. But very often the user does not do this intentionally. The hover area just happens to be along the path the user wants the mouse to go. As @aaron already pointed out in his answer, a mega menu obstructs the rest of the page from view.

Non-stickyness: the hover state only persists as long a the mouse is over the object. Please note that any user action with a mouse while in hover is not possible. Your design may not have relevant actions, but think about copy/ paste, screen recording, and other multitasking (eg switch to mail to read the nav path that someone suggested) the user may want to do.
False negatives: if the user moves their pointer 1 pixel too far outside the hover item, the item will collapse in. This is not so much an issue for the mega-menu, which has a large hover area when open. But some hover-menus are less forgiving. They frustrate the user with sub-sub-menus, and if the user misses the trajectory from menu to sub-menu, the hover interaction forces them to start again.

I would pose that hover is great for very light interactions, such a button ripple effect, or an animation.
For more complex interactions - such as revealing hidden navigation and click options - where the user needs to read, and pause and think, go with click.
Comment: The false negatives issue can be somewhat mitigated by putting in place a timeout so that the menu doesn't disappear immediately on mouseout.
Comment: @MikeEng, very true but don't you think that if you need to implement a fall-back solution to a problem that doesn't exist with a click then you've already answered your question?
Comment: @Aaron I'm not implying that hover is better in this case. Just wanted to point out that one issue could be mitigated.
Answer: Hover!
Hovering is a smoother action for exploring!
It is a smoother and a lighter interaction. It helps you explore and navigate the options faster. Think about it as if you are waving the mouse around to check what's there.
Compare that to clicking:

Clicking consists of two actions (hover + click).
Clicking is somehow a more assertive action compared to hovering.

Mega-menus are large panels with multiple menus and sub-menus. I would vote for the action that allows for a smoother navigation.
Answer: Both!
I would expect to have to hover to expand a menu, and to click to go to another page.
The problem with just hovering here is that the user might think they landed on a different page when they accidentally hover over the button.
The solution could possibly be a smaller hover menu which the user can expand by clicking on an "expand" label.
Answer: How would someone using the keyboard to trigger this hover?
Keyboard enablement really helps disabled people who cannot use a mouse due to  mobility or visual issues, however keyboard enablement actually benefits EVERYONE, as there will always be times when it is not possible to use a your mouse, i.e. using your laptop in a place where it is not practical to use a mouse, where your laptop's track pad doesn't give you the accuracy you need.
So always use a click event to trigger behaviour.
Comment: Couldn't the simulation of a hover be actuated with a keyboard key-press in the same way a click would be simulated?

Hover vs click on mega menu


What yard shows on scoreboard if the ball is between yard lines?

Question: If the ball is located between yard markers, which yard line is displayed on the scoreboard and is the running back credited for a yard gain or not?
Answer: There's no rule governing this, but typical practice is to use the last integer yardline that was crossed.  So if you're on your own half of the field and you're at the 42.5 yards, then you're said to be at the 42 yard line; once you cross the 50 and yard numbers decrease as you advance, then if you're at 42.5 yards you've reached the 43-yard line.
This also applies to specifying what yard line needs to be reached for a first down, which has the effect that there are "long" and "short" yards.  So, for example, the actual distance on 3rd-and-1 can be very nearly two yards, if e.g. the line to gain is at 42.9 (so 42) and you're currently at 41.1 (so 41).  Conversely, you can have two yards to go whose actual distance is closer to 1 yard, if you're at 41.9 (so 41) and you need to reach 43.1 (which is stated as 43).
Answer: Whatever the person running the scoreboard wants.   The scoreboard is not official.  The operator can choose whatever.   For instance if it is 4th and 3 inches and the first down is right at the 43, most scorekeepers will chose the 42 to signify it is not a first down, although they could do whatever they want.