What are the dependent and independent variables in Ohm's law?

Question: I can't quite wrap my head around Ohm's law. The relationship itself is quite intuitive to me. What I don't understand is when a system has dynamic voltages, currents, and resistances. I don't quite understand which variables are dependent and which are independent. For example, one could take multiple 9V batteries, connect them, and get a larger potential difference between the positive and negative terminal. If we assume the resistance didn't change between the terminals, that would imply there must be a higher current between the terminals. This example leads me to believe that voltage and resistances and independent variables, and current is dependent on those two variables. But, if we had a circuit with multiple resisters in parallel, then there would be voltage drops between them, making voltage dependent on resistance. I appreciate all help.
Comment: Are you familiar with Kirchoff's laws?
Comment: I suspect that your problem is not with choosing the dependent variable.  You seem to be confused regarding how to apply Ohm's Law to series vs. parallel circuits.  Is that correct?
Answer: First off, Ohm's law is not the equation $V = IR$ alone. Instead, $V = IR$ is significant in at least two different ways, only one of which is properly called as "Ohm's law":

One of these is that it is a definition of "resistance" as a physical quantity. In that case, it would perhaps better be written as
$$R := \frac{V}{I}$$
. In this sense, the equation is analogous to the definition of capacitance:
$$C := \frac{Q}{V}$$
The reason this is not a "law" is because a "law" in scientific parlance means a rule that describes an observed relationship between certain quantities or effects - basically, it's a . A definition, on the other hand, synthesizes a  new quantity, so that the relationship is effectively trivial because it's created by fiat.
The other, however, is what is properly called "Ohm's law", and it refers to a property of materials, the "law" being that they generally follow it: a material that behaves in accordance with Ohm's law (often only approximately) is called an "ohmic" material, and Ohm's law here says that the voltage-current relationship looks like
$$V = IR$$
for a constant value of $R$. Note that in the definition sense, there is no reason at all that $R$ needs to be a constant. In this sense, though, Ohm's law should be understood perhaps as analogous to the idea of modelling friction in elementary mechanics by
$$F_\mathrm{fric} = \mu F_N$$
giving a linear dependence between the friction and the normal force $F_N$ through the coefficient of friction $\mu$. (Once more, though, you can also take this as a definition of a CoF - the "law" part is in that $\mu$ is constant so the linear relationship holds.)

And so I presume that your question is asking about the first sense: if we consider $V = IR$ just a defining relation between three quantities, which one is the "dependent" and which is the "independent" quantity? The answer is that this is not a really good question given the parameters. The terms "dependent" and "independent" quantities are kind of an old-fashioned terminology from the less-rigorous earlier days of maths that keeps getting knocked around in not-so-great school texts, and relate to functions: if we have a function $f$ with one variable $x$, which in a fully modern understanding would be called the function's argument or input, then in the specific case where we bind (i.e. mandate it has the same value as) another variable $y$, to have the value of the function in question, so that $y = f(x)$ following the binding, then $y$ is called as the dependent variable, and $x$ the independent variable.
To see why that doesn't work so well in this case, note the logical structure of the above statement: the givens, argument, and conclusions. We are given a function $f$, then we create a binding between a variable $y$ and the value $f(x)$ of the function, then finally, we name the two. But in the case of "$V = IR$", we are simply giving this relationship; there is no "function" here of any type, much less being employed in this very specific manner.
(What do I mean by "binding"? Well, that's what the symbol $:=$ earlier means: to bind variable $y$ to some expression means that we are to declare that $y$ now can only be substituted for the expression given, and not something else, at least within a particular context. Writing $y := \mathrm{(expr)}$ means $y$ is bound to expression $\mathrm{(expr)}$.)
And this is also why I say it is "old-fashioned" from a modern point of view - in modern usage functions are far more general and flexible than they used to be, and a modern point of view is that an expression like
$$x + y > \cos(xy)$$
is in fact entirely built from functions: not only $\cos$ but the multiplication $\cdot$ (here suppressed in favor of juxtaposition) and addition $+$ but also interestingly, the symbol $>$ itself: that is a special kind of function called a "Boolean function" or a relation, which asserts that something is true or false about the arguments you put into it. When you say that an "equation holds", you mean the Boolean function $=$ evaluates to "True".
Likewise, in modern usage, the terminology of "dependent" and "independent" variables really is more at home in a scientific/empirical context: in conducting an experiment, the independent variable is the one we modify, while the dependent variable is the one we seek to analyze with regard to if and how it responds to changes in the independent variable. In the case of an experiment involving electric circuits, any of the three variables here may serve those roles (yes, even $R$ - think about swapping resistors, or using a variable resistor, and for $R$ as dependent variable, think about heating up a resistor with suitably high current, causing its resistance to change [i.e. behave non-ohmically]).
That said, if we are going to really insist on sticking to this regardless, I'd say that in most cases, we would want to say that the current is the dependent variable, the other two are independent variables. This is because we can typically control voltage and resistance much more easily, and we think of voltage as the "causative" element in the situation. Hence, in light of our previous discussion, we take $I$ to be a function of $V$ and $R$:
$$I(V, R) := \frac{V}{R}$$
and note that $V = IR$ then holds.
Comment: Your suggestion that the terminology of "dependent" and "independent" variables really is more at home in a scientific/empirical context seems to be historically incorrect. The distinction seems to have originated in mathematical textbooks, such as "A course of mathematics" (1837): "In an equation of two variables, that which may be determined at pleasure is called the independent of primitive variable, and the other, whose value must afterwards be found in the given equation is called the dependent variable."  [link](https://preview.tinyurl.com/ycpzcur4)
Comment: @jkien : Reworked it now.
Answer: In school I "learnt" that Ohm's law consists of three equations
\begin{align}
U &= R \cdot I \tag1 \\
R &= U / I \tag2 \\
I &= U / R \tag3
\end{align}
In the eq.(1) the independent variables are $(R, I)$,
in eq.(2) the independent variables are $(U, I)$,  and
in eq.(3) the independent variables are $(U, R)$.
Once we learn how to manipulate relationships Ohm's law reduces to a single relationship -- each of the three equations will do. Each equation has two input variables (=know values, which are also called independent variables) and only one output variable  (=unknown value, which is also called dependent variable).  There exist no unique way to define dependent/independent variables, because these "names" depend on the used equation.
Answer: I think it's a matter of personal preference, or the situation at hand.
We usually think of resistances as fixed values for a device.  Like a resistor.   And voltage sources are more common than current sources.   So in my head I tend to think of current as the dependent variable.   But current sources do exist, and resistances can vary, so in some other situation I might think of voltage as dependent.
Answer: tl;dr–  Probably best to forget about independent-vs.-dependent variables in Ohm's law; they're all just variables.  Generally, independent-vs.-dependent is a conceptual framework for dealing with incomplete models in experimental contexts before reference-classes are worked out; you don't need to worry about it when it comes to textbook physical relationships like Ohm's law.

Forget independent-vs.-dependent variables.
The variables are just variables.  That's it.
Independent-vs.-dependent is more of an experimental concept: independent variables are controlled and dependent variables are observed.  Once the abstract-model, e.g. Ohm's law, is worked out, then we don't talk about independent-vs.-dependent variables anymore.

Thought experiment: Sale at the grocery store.
A grocery store wonders how many new customers come into the store when they have a sale on apples.  So, they do an experiment, then create a correlation that describes their results.
Turns out 10 more people come in when there's a sale on apples,
$$
{
\left[\text{number of customers}\right]
~=~
\underbrace{100}_{\begin{array}{c}\text{normal} \\[-25px] \text{number}\end{array}}
+
\underbrace{10 \, \delta_{\text{sale}}}_{\begin{array}{c}\text{extra if} \\[-25px] \text{there's a sale}\end{array}}
}_{\large{,}}
$$
so we can increase the $\left[\text{number of customers}\right]$ by modifying if there's a sale, $\delta_{\text{sale}} .$
But, say that we found 10 more people and shoved them into the store.. would that cause apples to go on sale?
Since the model doesn't work in reverse, one might describe $\left[\text{number of customers}\right]$ as a "dependent variable" since we can't change it without breaking the model.
This is sort of an intellectual retreat, though.  The fuller issue can be addressed by appropriately working out the reference classes.  For example, we can be more precise and say that a sale-on-apples doesn't directly increase the number of people in the store, but rather increases the number of people in the store who wouldn't have otherwise come if not for the sale on apples.  Once the various reference-classes are appropriately modeled, then we can drop the whole independent-vs.-dependent thing since all of the variables ought to be sufficiently well-defined that the model'll just generally hold, e.g. as Ohm's law is meant to.

Reference-class issues can happen with electric-resistance, too.
When there's resistance that obeys Ohm's law, we can describe it "Ohmic resistance".  However, a circuit might have non-Ohmic resistances, too.
When a situation gets more involved like that, it's important to not confuse the variables.  For example, you don't want to just use $R$ for everything, including the Ohmic-contribution, non-Ohmic-contribution, and total-resistance, as, obviously, it can get all distorted if those variables are mixed up.
But as long as you keep everything straight in a known-abstract-model context, then there's no need to worry about independent-vs.-dependent variables.
Answer: The decision of dependent versus independent variables depends on the situation.
In most circuits you will face there will be components which are better at fixing one of the variables.  For example, a AA battery is very good at fixing the voltage between its ends at 1.5V.  Other elements are usually designed to have some flexibility.  A resistor, for example, is designed to have a very fixed resistance but is happy to have the voltage depend on current.
As a general principle, "sources" will fix a voltage or current, so you can rely on them to start the process of selecting which variables are dependent or independent.
Later, this will get more murky.  For example, a AA battery outputs 1.5V, until I bridge it with a very small resistor (like a 10ohm resistor).  Then we start to get into the limits of the chemical reactions in the battery and voltages get messy fast.  However, in introductory work, you will typically not be given these cases.  The problems should always tell you which things should be fixed, and which should be solved for.
Answer: Physical equations are always created in order to describe a class of "systems" that have certain properties. Specifically, Ohm's law is used to describe systems which are called ohmic resistances.
Regarding electric circuits, the two main quantities that are observed, which means measured, are voltage and current. In contrast to these two, the resistance is not observed directly, instead, it is always measured by measuring both voltage and current at the same time. That said, one may think of the resistance as a quantity that is a property of an ohmic resistance. Which means it is independent in the scope of Ohm's law.
In practice, that means that the resistance is assumed to be constant (in the ohmic case), and it describes the response of a system to an applied current or voltage. So, one can calculate either

the voltage $U$ that drops across the resistance if a current $I$ flows through it: $U = R \cdot I$. In this case, $U$ is the dependent variable one may measure, while $R$ is determined by the characteristics of the system, i.e. the resistance and $I$ is given by the corresponding experimental setup, i.e. the source of current.
the current $I$ that flows through the resistance if a voltage $U$ (which is a difference in potential) is applied across the resistance: $I = U/R$. Now it is the other way round: $I$ is the dependent variable, and $U$ is given by the voltage source.

But this is only one half of the story. As it is the case with all physical theories (which equations like Ohm's law are, in the end), they have a limited scope which one has to be aware of.
In other cases than the ohmic case, the resistance can be dependent on other parameters, for example:

the temperature $\theta$ of the resistor (using a thermistor in a resistance thermometer)
the frequency $f$ of an applied alternating voltage (using a capacitor)
the voltage itself, which is the case in semiconductors or even for the resistance of the human body, for example (it is also highly dependent on other factors, see here)

In these cases the resistance is no longer an independent quantity, so the system you are confronted with is not very well described using the resistance. Quantities that are more suitable for describing the system are for the examples mentioned are

the temperature coefficient $\alpha$ of the thermistor, in many of those cases the resistance can be approximated by $R(\theta) = \alpha\cdot\theta$
the capacity $C$ of the capacitor. More things happen when applying an alternating current to a capacitor, since one needs to talk about impedance and reactance instead of resistance here. Have a look at the corresponding Wikipedia articles for further information on this topic, since it is out of the scope of this question. For our concerns, it is enough to realize that Ohm's law can not simply be applied here.
in the case of the resistance being dependent on the voltage, one needs to look at the relation $R(U)$ for finding independent quantities. If it were possible to approximate things with $R(U) = a_1 \cdot U + a_2 \cdot U^2$, then $a_1$ and $a_2$ would be the independent variables you are looking for.

Still, resistance can be a valid quantity to do calculations with, since its the nature of physical theories that theories like Ohm's law are limit cases of "larger" theories. Here, "Larger" means for example that the theory may describe things happening in other orders of magnitude (like in the case of a thermistor if the linear approximation made above is no longer valid for very high or low temperatures) or when things are getting time-dependent (like in the case of an alternating voltage).
Naturally, more mathematics are required to describe these more complex cases, but if you are looking at the limit cases, "smaller" theories still have to hold. In fact, when physicists are looking for new theories to describe new phenomena they observed, one crucial criterion for their ideas is that old, well-proven theories (like Ohm's law) are contained in limit cases.
Answer: Here's what it comes down to. You have three quantities: voltage $U$, current $I$, and resistance $R$. Without any more information or physical laws, all are free to be any value (and you perhaps want to pick each one).
Ohm's law, however, gives you more information, and restricts the possible values $(U,I,R)$ in an ohmic circuit that way. It says: you can vary each one of $U$, $I$, and $R$, but at the end of the day, the circuit will always satisfy $RI=U$. That means you can pick two of the three in an experiment without Ohm stopping you, and he will dictate the third.
When you have a fixed-resistance resistor, or a fixed-voltage battery, what you are doing is exactly that: picking $R$ and/or picking $U$, and if you've picked two, Ohm's law allows you to calculate the third, because it holds.
Answer: When first introduced to Ohm's law, the canonical example is a battery with a resistor across it. In this case, one builds up an intuition that voltages are somehow "fixed" or "independent", from which currents are to be inferred. However, this is a misconception.
V=IR is a (mostly) true expression relating the voltage drop across a resistor to the current passing through it, but one must know what the resistor is a connected to in order to determine actual values for these variables. An ideal voltage source defines the voltage across it to be fixed at some $V$, and is taken to instantaneously adjust the current it supplies to maintain a fixed $V$ across its terminals. An equally reasonable object is the ideal current source, which can produce any voltage to maintain a fixed $I$ through it.
For low currents, a battery may be modeled as an ideal voltage source of voltage $V_\text{Batt}$. In this case, for a battery connected to a resistor of resistance $R$, the current in the loop is $I=V_\text{Batt}/R$. If the resistor were instead connected to a constant current $I_{CC}$, it would remain to determine the voltage drop across the resistor, $V_R = I_{CC} R$.


Windows 7 boot from USB

Question: I have working installation of OEM windows on 2.5" drive.
I did change my drive for SSD and install Ubuntu as main OS.
I have ICY BOX SATA<->USB3.0 box to connect original 2.5" drive to NB.
When I try to boot original Windows 7 via USB3.0, it doesn't work (error 0x000007b).
Is it possible to boot Windows 7 from USB3.0 ?
I do not want to reinstall windows (original OEM).
I can connect Windows drive to NB via SATA(to boot), so I can change any file on windows.
I did some research, and if I add USB drivers to Windows boot sequence it should work, but I don't have much experience with windows, so I have no idea how to do it.
NB is Lenovo ThinkPad L450
Answer: This is possible if:
a) The machine you're using does not have BIOS that insists on handling boot order in a legacy way. You'll need either an up to date BIOS (exact details vary from machine to machine) or an EFI capable machine AND
b) Windows 7 installed on a GPT disk, not an MBR disk. GPT and MBR are different types of partition table. A GUID Partition Table disk allows partitions and disks to be more portable, whereas as Master Boot Record disk includes some interpartition relationship information in the partition map to provide legacy support. If your current windows install is on an MBR partition table disk then you will need to reformat and reinstall specifying GPT this time (sorry!).
You should get this option when formatting the disk using Windows 7 and above using Disk Management.
Note: MBR and GPT are partition table formats, not partition formats. Partition formats such as NTFS or FAT32 can exist on either an MBR or GPT partition table disk.

Windows 7 boot from USB


memoir class: vertically locate side panel text to marker in main text

Question: I'm using memoir to write verse. In side-panels I put quotes or images that relate to specific places in the verse. Ideally I'd like to put a marker in the verse  which would locate where, in the side-panel, the quotes or images should appear (eg, the vertical location from the header). The side-panel on a recto page is on the right side; on a verso page it is one the left side. So for a long poem the marker would need allow for this. Any ideas or pointers to related ideas would be much appreciated. Thank you. ... Gary
Comment: (1) welcome, (2) you are much more likely to get help if you provide a full, but minimal example, such that others have something to work with
Comment: By "side panel" do you mean the marginpar area?  Alternatively, you can use paracol (and geometry) to create a synchronized two-column page.
Comment: Take a look at the `marginnote` package (if I understood your question correctly, it should do exactly what you want).
Comment: I'm not sure what you want. Do you want to print a marker in the verse and a matching one in the margin?  `memoir` provides for a range of side notes with varying default positions (current position with or without overlap; starting at the top or bottom of the page). It seems to me that it would be very hard, and of limited use, to produce something where you could specify the exact location of a side note from the regular text, where you would have to determine the position of the marker in the text and then ensure the note is positioned vertically accordingly.
Comment: Thanks to all who replied. I will take a look at the paracol and marginnote packages. As for terminology, yes, I was using "side-panel" for margin notes. I had in mind something like \footnote, except a \marginnote. You'd mark the verse with \marginnote and then the note would be put into the margin directly horizontal to where \marginnote appeared in the verse. The verse I write uses the margin notes to provide images or quotations that bear on specific words in the verse.
Answer: Following from your comment and noting that you use memoir then use \footnote for your notes after having first specified \footnotesinmargin which puts footnotes into the margin instead of at the bottom of the page. To revert to footnotes at the bottom use \footnotesatfoot. See the manual (> texdoc memoir) Chapter 12 for more information on this and other marginal note styles.
\documentclass{memoir}
\begin{document}

\footnotesinmargin

A verse line\footnote{A footnote in the margin}

\footnotesatfoot

Regular text with a footnote\footnote{At bottom}.
\end{document}

You may want to increase the size of the font used for footnotes in your particular case which is covered in Chapter 12.


What happens to a photon when it enters a black hole?

Question: The photon has a mass of 0, but it has energy because of its motion. When it is sucked into the black hole and becomes a singularity, it loses its energy because it is no longer moving. It is not possible for something to be sucked out of a black hole, so it has no potential energy that the kinetic energy could have been transformed into. If I haven't missed a point, then energy has just been destroyed. Everyone knows that it isn't possible for energy to be destroyed because of the first law of thermodynamics a.k.a. the conservation law of energy. Therefore I must have missed a point, because I am not ready to criticize famous scientists that have indefinitely more knowledge then I do. Please tell me what I did wrong :)
Comment: The photon adds to the black hole's energy. The black hole is then subtly more massive (its rest mass rises by $E/c^2$) than it was before absorption, and its Schwartzschild radius ever-so-slightly bigger.
Comment: Possible duplicates: http://physics.stackexchange.com/q/19750/2451 and links therein.
Answer: There are a couple of issues you might want to consider.
Firstly there is the slightly boring one that we physicists measuring the mass of the black hole are outside it, and from this position the photon never reaches the event horizon let alone crosses it. I don't want to go into this here since the subject has been flogged to death in numerous questions on this site, however from the perspective of an observer outside the black hole infalling matter takes an infinite time to reach the event horizon. Once the photon has passed by us, its gravity is added to the black hole gravity and the total attraction we feel to the black hole has increased by one photon's worth - it doesn't matter that the photon is stalled just outside the event horizon.
Secondly, you say When it is sucked into the black hole and becomes a singularity, it loses its energy because it is no longer moving. It's certainly true that photons can't be stationary, but there are two things to consider. Photons are readily converted to other particles, e.g. an electron-positron pair, so a photon doesn't have to just disappear when it stops. It can convert to other massive particles that can come to a halt. The other thing to mention is that we simply don't know what happens when matter hits the singularity. It's a singularity precisely because there is no way to calculate what happens at it. So you can't say the photon loses its energy at the singularity because we can't say anything about what happens to the photon at the singularity.
Answer:
Please tell me what I did wrong

It takes General Relativity (GR) to describe black holes and, in GR, energy conservation is, well, subtle.
From John Baez's Relativity FAQ "Is Energy Conserved in General Relativity?":

In special cases, yes.  In general — it depends on what you mean by
  "energy", and what you mean by "conserved".

So, in general, one must reason very carefully about energy conservation when the context is relativistic and, certainly, black holes and photons are relativistic.
However, it is the case that photons falling through the event horizon increase the mass, and thus, energy of the black hole.  See this related question:  Why do photons add mass to a black hole?
Comment: The special case of an electromagnetic wave that goes to zero at infinity sufficiently quickly interacting with a black hole is one of the cases where you have energy conservation in general relativity.
Comment: @Alfred is there a non-ASCII-art-integrals version of that FAQ?


Energy Chamber and Armageddon Clock

Question: Can Energy Chamber be used with Armageddon Clock? I.e. are the counters on Armageddon Clock "charge counters"?
Answer: No, putting counters on Armageddon Clock with Energy Chamber will not allow you to deal damage with Armageddon Clock.
Energy Chamber's ability places "Charge Counters" onto Artifacts, whereas Armageddon Clock's ability instructs you to deal damage equal to the number of "Doom Counters" on it. While you can combine counters with the same name, counters of different names are not interchangeable.

121.1. A counter is a marker placed on an object or player that modifies its characteristics and/or interacts with a rule, ability, or effect. Counters are not objects and have no characteristics. Notably, a counter is not a token, and a token is not a counter. Counters with the same name or description are interchangeable.
Answer: As mentioned in the other answers, Armageddon Clock's abilities refer to doom counters, not charge counters, so Energy Chamber won't help with it.  However, here are some cards that will:

Doubling Season
Clockspinning (provided the clock has at least one doom counter)
Gilder Bairn (provided the clock has at least one doom counter)
Vorel of the Hull Clade (provided the clock has at least one doom counter)
Anything with Proliferate (provided the clock has at least one doom counter)
Eye Of Doom (can add a doom counter every time it enters the battlefield; just don't activate it's ability unless the clock has no counters)
Imminent Doom + Opalescence + March of the Machines + Fate Transfer (okay, this one is a bit impractical)
Giant Fan and Everythingamajig (not legal in most formats)
Comment: And, of course, Doubling Season.
Comment: @Zags anything with proliferate like Atraxa...
Answer: No. Energy Chamber refers to "charge counters"; Armageddon Clock works with "doom counters". On some forms of the card, like the autolinked one, you can't see that since it just referred to "counters". Later printings, such as the Fourth Edition one, do indicate the difference. As always, the Gatherer will tell you the current Oracle ("official") text:

At the beginning of your upkeep, put a doom counter on Armageddon Clock.
At the beginning of your draw step, Armageddon Clock deals damage equal to the number of doom counters on it to each player.
{4}: Remove a doom counter from Armageddon Clock. Any player may activate this ability but only during any upkeep step.

Of course, you can put a charge counter on Armageddon Clock with Energy Chamber; it just won't have the effect you probably want it to have.

Energy Chamber and Armageddon Clock


guitar tablature question for song

Question: guitar tablature question for song, the imgur is a screen shot of it.
do I hammer onto the 12 then pull off to the 8.
or am i not even close?
http://imgur.com/5LrBPO1
Answer: This can easily be executed by playing the 5th fret note, right hand hammer on 12th fret, followed by a pull off with the right hand to a fretted 8th fret note.
Comment: I suppose you are right.  I have never considered using the picking hand to hammer on and pull off.  I am not quite sure about the "easily executed"  part but with practice, it can in fact be done.  Thanks for the suggestion.  I might have to incorporate some right hand hammer on's and pull offs into my playing.
Comment: After you made me aware of the possibility of executing a hammer on from the 5th to 12th fret by using both hands on the fretboard, I edited my answer to improve the quality of the content on Stack Exchange.  Thanks for your enlightenment!
Answer: The symbol pictured which is sometimes referred to as a slur in music notation (curved line that forms an arc connecting two notes) in the image is often used to denote a hammer on in tablature.  A slide is usually indicated by a diagonal line / or \ depending if it's an ascending or descending slide.
But I don't see how you can be playing a note while fretting the string on the 5th fret and then hammer on to the 12th fret unless you execute the hammer on and pull off with your picking hand as Tim suggests in his answer.  That is a more advanced technique that is not commonly used -  so I can't discount the possibility that the tab author might be trying to indicate a slide from the 5th fret to the 12th fret and then back to the 8th fret.
If you can listen to a recording of the song, you should be able to determine if the guitarist in the recording is executing a slide or hammer on/pull off.
If that is not possible, you might try contacting the tab author and ask.
Good luck.
Answer: In my opinion it is a tapping technique using the a finger from the picking hand. You would hammer-on the 12 fret with the right hand finger then pull-off to the 8th fret.
A lot of rock and metal players play like this. Looks like the tab is showing arpeggios with tapping for the 12 fret note.

guitar tablature question for song


Do I need to prepare my boiler for the water being shut off at mains?

Question: We have a brand new boiler and hot water heater.  The city is turning our water off at the main for approximately 6+ hours for maintenance.  Do I have to do anything?  They're both run on natural gas.  Thanks
Answer: Yes, I think it would be a good idea to shut the main water supply valve off to the hot water heating system during that time.  You are likely to loose water pressure to the house during that time.  The heat system should work fine during that time.  Then when you know that water pressure has been reestablished, open several of he faucets throughout the house, allow them to run long enough to dispel all of the air from the house piping, 2 to 3 minutes, then reopen the valve to the heating system. For the water heater I would shut that off as well.  You will have to open this valve again before doing the air flush.  Happy heating, P.


Example or explanation of Core Data Migration with multiple passes?

Question: My iPhone app needs to migrate its core data store, and some of the databases are quite large. Apple's documentation suggests using "multiple passes" to migrate data to reduce memory use. However, the documentation is very limited and doesn't explain very well how to actually do this. Can someone either point me towards a good example, or explain in detail the process of how to actually pull this off?
Comment: did you run in memory problems actually? Is your migration leightweight or do want to use a NSMigrationManager?
Comment: Yes, the GDB console showed that there were memory warnings, and then the app crashes due to limited memory. I have tried both lightweight migration and NSMigrationManager, but right now I am trying to use NSMigrationManager.
Comment: ok, can you go a bit more into detail what have changed?
Comment: finally, I've found out, read my answer.
Comment: Hello Jason, could you fix the like in the question?
Answer: I've figured out what Apple hints in their documentation. It's actually very easy but a long way to go before it's obvious. I'll illustrate the explanation with an example. The initial situation is this:
Data Model Version 1

It's the model you get when you create a project with the "navigation based app with core data storage" template. I compiled it and did some hard hitting with some help of a for loop to create around 2k entries all with some different values. There we go 2.000 events with an NSDate value.
Now we add a second version of the data model, which looks like this:

Data Model Version 2
The difference is: The Event entity is gone, and we've got two new ones. One which stores a timestamp as a double and the second one which should store a date as NSString.
The goal is to transfer all Version 1 Events to the two new entities and convert the values along the migration. This results in twice the values each as a different type in a separate entity.
To migrate, we choose migration by hand and this we do with mapping models. This is also the first part of the answer to your question. We will do the migration in two steps, because it's taking long to migrate 2k entries and we like to keep the memory footprint low.
You could even go ahead and split these mapping models further to migrate only ranges of the entities. Say we got one million records, this may crash the whole process. It's possible to narrow the fetched entities down with a Filter predicate.
Back to our two mapping models.
We create the first mapping model like this:
1. New File -> Resource -> Mapping Model

2. Choose a name, I chose StepOne
3. Set source and destination data model

Mapping Model Step One

The multi pass migration doesn't need custom entity migration policies, however we will do it to get a bit more detail for this example. So we add a custom policy to the entity. This is always a subclass of NSEntityMigrationPolicy.

This policy class implements some methods to make our migration happen. However it's simple in this case so we will have to implement only one method: createDestinationInstancesForSourceInstance:entityMapping:manager:error:.
The implementation will look like this:
StepOneEntityMigrationPolicy.m
#import "StepOneEntityMigrationPolicy.h"

@implementation StepOneEntityMigrationPolicy

- (BOOL)createDestinationInstancesForSourceInstance:(NSManagedObject *)sInstance
                                      entityMapping:(NSEntityMapping *)mapping
                                            manager:(NSMigrationManager *)manager
                                              error:(NSError **)error
{
    // Create a new object for the model context
    NSManagedObject *newObject =
        [NSEntityDescription insertNewObjectForEntityForName:[mapping destinationEntityName]
                                      inManagedObjectContext:[manager destinationContext]];

    // do our transfer of nsdate to nsstring
    NSDate *date = [sInstance valueForKey:@"timeStamp"];
    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
    [dateFormatter setTimeStyle:NSDateFormatterMediumStyle];
    [dateFormatter setDateStyle:NSDateFormatterMediumStyle];

    // set the value for our new object
    [newObject setValue:[dateFormatter stringFromDate:date] forKey:@"printedDate"];
    [dateFormatter release];

    // do the coupling of old and new
    [manager associateSourceInstance:sInstance withDestinationInstance:newObject forEntityMapping:mapping];

    return YES;
}

Final step: the migration itself
I'll skip the part for setting up the second mapping model which is almost identical, just a timeIntervalSince1970 used to convert the NSDate to a double.
Finally we need to trigger the migration. I'll skip the boilerplate code for now. If you need it, I'll post here. It can be found at Customizing the Migration Process it's just a merge of the first two code examples. The third and last part will be modified as follows: Instead of using the class method of the NSMappingModel class mappingModelFromBundles:forSourceModel:destinationModel: we will use the initWithContentsOfURL: because the class method will return only one, maybe the first, found mapping model in the bundle.
Now we've got the two mapping models which can be used in every pass of the loop and send the migrate method to the migration manager. That's it.
NSArray *mappingModelNames = [NSArray arrayWithObjects:@"StepOne", @"StepTwo", nil];
NSDictionary *sourceStoreOptions = nil;

NSURL *destinationStoreURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"CoreDataMigrationNew.sqlite"];

NSString *destinationStoreType = NSSQLiteStoreType;

NSDictionary *destinationStoreOptions = nil;

for (NSString *mappingModelName in mappingModelNames) {
    NSURL *fileURL = [[NSBundle mainBundle] URLForResource:mappingModelName withExtension:@"cdm"];

    NSMappingModel *mappingModel = [[NSMappingModel alloc] initWithContentsOfURL:fileURL];

    BOOL ok = [migrationManager migrateStoreFromURL:sourceStoreURL
                                               type:sourceStoreType
                                            options:sourceStoreOptions
                                   withMappingModel:mappingModel
                                   toDestinationURL:destinationStoreURL
                                    destinationType:destinationStoreType
                                 destinationOptions:destinationStoreOptions
                                              error:&error2];
    [mappingModel release];
}

Notes

A mapping model ends in cdm in the bundle.
The destination store has to be provided and should not be the source store. You can after successful migration delete the old and rename the new one.
I did some changes to the data model after the creation of the mapping models, this resulted in some compatibility errors, which I could only solve with recreating the mapping models.
Comment: Bloody hell that's complicated.  What was Apple thinking?
Comment: I don't know, but whenever I think core data is a good idea I try hard to find a simpler and more maintainable solution.
Comment: Thanks!  This is a superb answer. It seems complicated, but it's not that bad once you learn the steps.  The biggest problem is documentation doesn't spell it out for you like this.
Comment: Here's the updated link to Customizing the Migration Process.  It has moved since this post was written.  https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/CoreDataVersioning/Articles/vmCustomizing.html#//apple_ref/doc/uid/TP40004399-CH8-SW1
Comment: @NickWeaver how are you determining destinationStoreURL? Are you creating it or it gets created by core data system during migration process????
Comment: Hi @NickWeaver, could you please have a look at the following post. It's regarding this post which I tried to follow but was not able to get the remaining steps. http://stackoverflow.com/questions/25370222/core-data-migrating-after-changing-entity-attribute-with-maping-model
Comment: "because the class method will return only one, maybe the first, found mapping model in the bundle" I am very unsure about this statement. The logic of this method implies that it finds across all of the available data models in the specified bundles the one that suits metadata from the given store. This is a performant version of NSPersistentStoreCoordinator.addPersistentStore failing with an error. Migration will work w/o iterating through mapping models, you can test this if you want
Answer: These questions are related:
Memory issues migrating large CoreData datastores on iPhone
Multiple Pass Core Data Migration In Chunks With iOS
To quote the first link:

This is discussed in the official
  documentation in the "Multiple Passes"
  section, however it looks like their
  suggested approach is to divide up
  your migration by entity type, i.e.
  make multiple mapping models, each of
  which migrate a subset of the entity
  types from the complete data model.
Comment: Thanks for the links. The problem is that no one actually explains in detail *how* to set it up in multiple passes. How should I set up multiple mapping models so that it will work effectively?
Answer: Suppose your database schema has 5 entities, e.g. person, student, course, class, and registration to use the standard kind of example, where student subclasses person, class implements course, and registration joins class and student. If you have made changes to all these table definitions, you have to start at the base classes, and work your way up. So, you cannot start with converting registrations, because each registration record depends on having class and students there. So, you would start with migrating only the Person table, copying existing rows into the new table, and filling in whatever new fields are there (if possible) and discarding the removed columns. Do each migration inside an autorelease pool, so that once it is done, your memory is back to start.
Once the Person table is done, then you can convert the student table over. Then hop over to Course and then Class, and the finally the Registration table.
The other consideration is the number of records, if like Person had a thousand rows, you would have to, every 100 or so, execute the NSManagedObject equivalent of a release, which is to tell the managed object context [moc refreshObject:ob mergeChanges:NO];
Also set your stale data timer way low, so that memory is flushed often.
Comment: So are you essentially suggesting to have a new core data schema which is not part of the old schema, and copy the data to the new schema by hand?
Comment: -1 Manually mapping your database is not necessary.  You can migrate deployed databases using lightweight migration or with explicit MappingModels.


What advantage to I have if I use 64bit libraries?

Question: I see many people go crazy about 64bit libraries,
and preferring them in general to the 32bit counter parts.
I realise there is a lot of talk that gets lost in translation, and that the 64bit can be often over-valued.

The setting is libraries that are called on web application, I'm aware that a new instance of the web app is generated for each hit. Therefore I'm thinking that 64bit is not necessary as the instances in no way surpass 2Gb of RAM usage.

Help would be much appreciated! :)
Answer: You're right - in general you don't need to worry about 64-bit libraries or executables unless you either (a) need a large address space (say > 2 GB) or (b) you have a performance-critical application (x86-64 has twice as many registers available as x86 and code typically runs around 30% faster).
Comment: 30% at the most.
Comment: @Hello71: the most depends on application, may not be 30% if you look at the benchmark below
Answer: x86_64 has double register number, SSE2/NX and many other newer features by default which may improve performance and reliability.

What are the performance characteristics of 64-bit versus 32-bit VMs?
Generally, the benefits of being able to address larger amounts of memory come with a small performance loss in 64-bit VMs versus running the same application on a 32-bit VM. This is due to the fact that every native pointer in the system takes up 8 bytes instead of 4. The loading of this extra data has an impact on memory usage which translates to slightly slower execution depending on how many pointers get loaded during the execution of your Java program. The good news is that with AMD64 and EM64T platforms running in 64-bit mode, the Java VM gets some additional registers which it can use to generate more efficient native instruction sequences. These extra registers increase performance to the point where there is often no performance loss at all when comparing 32 to 64-bit execution speed.
The performance difference comparing an application running on a 64-bit platform versus a 32-bit platform on SPARC is on the order of 10-20% degradation when you move to a 64-bit VM. On AMD64 and EM64T platforms this difference ranges from 0-15% depending on the amount of pointer accessing your application performs.

You can see many benchmarks here: Ubuntu 32-bit, 32-bit PAE, 64-bit Kernel Benchmarks. In general performance increase would be about 0-15%, but results may vastly varied, esp. on some apps which use register/calculation (esp. 64 bit maths) extensively


what is the file path to the photos app via terminal

Question: I had a quick question regarding the file path of photos app. I am trying to run a bash/AppleScript script that accesses my photos app via terminal and uses the ls command to print all the file names to a .txt document though I can't seem to find the right file path chatgpt keeps giving me the following "/Users/alekburt/Pictures/Photos Library.photoslibrary/Masters" but that doesn't seemed to be recognized any help is appreciated
Comment: With recent versions of Photos, pictures are indeed not stored using their name. What do you want to do with the text file once you have it generated?
Comment: Do you me$an the path to the app or to the actual photos which is the data the App uses? If the latter then in the app goto Settings and the first entry is Library Location.
Comment: hmm good question I don't really know which ever would allow me to print all the filenames to a .txt document which I would assume would be the latter?
Comment: Also know that chatGPT does not give accurate answers
Comment: Probaly then ~/Pictures/Photos Library.photoslibrary - but they are all stored in a hased database so not much use.
Comment: STart with not how to do something but explain what you are trying to do
Comment: noted, ill give that a shot.
Comment: "but they are all stored in a hased database so not much use." are you saying this isn't really possible?
Comment: Welcome to Ask Different. We're set up for the case where  a quick question often is precisely the opposite!
Answer: Welcome to Ask Different. You may be asking the wrong question so I'll put up an answer in hopes it helps you with an answer. This whole topic might belong on meta since you're asking what appears to be an XY question.
Rather than describe what you want to do - perhaps you wish to iterate over photos to gather statistics on which are new or perhaps perform some action on some or all of them. Instead of that you are asking about the first step you think will help you solve it - "can I enumerate the photos on the filesystem using ls"?
But - let's get you an answer. The Photos app uses a somewhat complicated database schema to store the filesystem locations (and names of images, faces, metadata, etc...) of photos and identify them. You will need the sqlite3 command and to de-obfuscate the hashes and table structure for most recent versions of the app.
The database is stored in ~/Pictures/Photos\ Library.photoslibrary but using those database files is not easy (to me at least).
Also, images are stored in multiple resolutions with machine-generated names - not picture0001.heic or whatever you might expect when you export an image. The "one image" has multiple manifestations - thumbnails, edited, original, limited resolution, full resolution - so your process/tool/script will need to contemplate and decide which if any of these are needed. Not all photos will be resident locally as well if you are using iCloud to host the authoritative copy of the pictures.
So, your problem might be solved much easier if you used a tool like Automator to export the photos to the filesystem and then use tools like ls to do your operations.
Comment: @AlekNaomieBurtPilon you are missing the point - the solution might not be complex - but please explain what you are trying to do from first principles as if to someone who just uses Photos and has no idea about anything except the app.
Comment: okay, wow I wasn't aware of the intricacies of this, ill re-evaluate my approach do you think AppleScript alone would be a better option?
Comment: im trying to get a .txt list of every file name currently in my photos app
Comment: @AlekNaomieBurtPilon We understand that. What do you intend to do with the list afterwards (there might be other ways to accomplish this, without creating a list first)?
Comment: No @AlekNaomieBurtPilon You will want to get the photos out of Photos app entirely unless you are up for a very large programming challenge.


grub on a bootable UEFI usb stick to start ubuntu on hdd

Question: I have a UEFI netbook with an installed Lubuntu 20.04 where I can't install grub on the hard disk (strange problem with the UEFI/BIOS system). But I can launch it with supergrub2. It finds the hd partition and launches it.
Now I would like to create a bootable usb stick (the netbook looks for a usb stick by default) which contains the EFI partition and grub which then starts the ubuntu on the hard disk.
How can I do that?
Thanks!
Comment: You need the ESP on flash drive and if you can boot Ubuntu, you just install the UEFI version of grub to flash drive with removable parameter. You will probably have to add your own grub boot stanza, but may be able to configfile boot into grub in your install. It could be just '`sudo grub-install --removable /dev/sdX`. Where sdX is your flash drive. But before I had to create & mount ESP & /boot and use those in command. Post label of flash drive.  `lsblk -f` Also: https://askubuntu.com/questions/344125/how-to-add-a-grub2-menu-entry-for-booting-installed-ubuntu-on-a-usb-drive
Answer: thanks for your ideas.
I think starting from usb doesn't work as well because of UEFI/BIOS bugs. But I found a solution:

get Ubuntu 20.04 mini.iso (see post 'Installing GRUB onto a USB stick (Server 20.04)'
burn iso to a usb stick
append the menu entry found in /boot/grub/grub.cfg on my hdd to the one on the usb stick (I had to change hdb2 to hda2 and hd1 to hd0 for some reason).
Comment: +1; Thanks for sharing your solution :-) It would be nice if you also provide a link to download the current 20.04 `mini.iso`,
Answer: You can try the following method:

Put an installed Ubuntu system into a USB drive (size >= 16 GB) by extracting/cloning from a compressed image file. Use the method described in the following link,
If you need not encrypt the drive, there is an easy alternative

Boot into the Ubuntu system in a USB drive.

Run the following command line (in a terminal window)
sudo update-grub

Reboot

If there is a good Ubuntu system in the internal drive, it should be recognized by update-grub, and a grub menuentry should be created, so that you can boot into the Ubuntu system in the internal drive.


On Basis and Dimension

Question: Say there are two independent vectors in R3, to be specific we can assume the vectors to be [1 0 0] & [0 1 0]. I'm confused what will be the span of these vector and what will be its dimension?
actually my doubt arises from the link https://www.youtube.com/watch?v=AqXOYgpbMBM
in this video there are 4 vectors in R4 but only 3 of them are linearly independent therefore it spans R3 and not R4. So my question is, is it possible to span lower dimension when there are higher number of components in a vector?
I'm not able to visualize it
Please help!
Answer: Yes, of course. A plane has two dimensions even if the coordinate are three. In a cartesian plane a straight line has 1 dimension but its points have 2 coordinates. A point alone has zero dimension whatever is the dimension of the space it is in.
Hope this helps
Comment: I totally gt your point, but I have also learnt that Any basis in Fn must have exactly n vectors in it. And if the no. of vectors is less than n then the basis doesnot span the space. S, does both the things go hand in hand. I read it in the answer of this link -: https://math.stackexchange.com/questions/1992386/why-a-basis-of-rn-consists-of-n-vectors
Answer: I think you misunderstood the assertion. A set of vectors in $\mathbf R^n$ cannot possibly generate  $\mathbf R^p$ if $p < n$, ut it can generate a subspace of dimension $p$, i.e. a subspace isomorphic to  $\mathbf R^p$.

On Basis and Dimension


D-Link DSL-2740R Routing only from internal IP?

Question: I have the router listed in the title which I bought for a wireless network at work. It's a modem/router but I only want it for routing. D-Link's support tell me I can't do this.
I've had it working with the incoming internet (supplied by the offices we are in, we are given an IP) into one of the LAN ports and a laptop plugged into another. It successfully routes through, but this causes the router (192.168.1.1) to be un-pingable. Also, the setup utility won't allow me the required IP (invalid IP address) 172.16.244.0
Am I fighting a lost cause?
Answer: Give the router an IP on the same range as your LAN for a start, that should let you access the web interface.


How do you put a link to another question?

Question: How do you put a link to another question, I have seen them, but I don't know how to do it.
Comment: Are you asking [how to put a link in a post?](http://stackoverflow.com/editing-help#links)
Answer: Click the "Share" link under the question (or answer) and you will be presented with a modal dialog box containing a link to the post.

Include that link in your question (or answer) and the site will automatically handle the title formatting for you: How do you put a link to another question?
Or you can link to it using the markdown link syntax: <code>[link title](URL)</code>, like this.
More details can be found in our formatting help page.

Note that you should also use this link when sharing a question outside of the site. It includes your user ID, so you get credit for sharing the question.
This leads to the Announcer, Booster, and Publicist badges.
Comment: Can I cheat the system by add my UserID to the link *inside* this site?


Can the definition of continuity be said both of these ways?

Question: So if the definition of continuity is: $\forall$ $\epsilon \gt 0$ $\exists$ $\delta \gt 0:|x-t|\lt \delta \implies |f(x)-f(t)|\lt \epsilon$. However, I get confused when I think of it this way because it's first talking about the $\epsilon$ and then it talks of the $\delta$ condition. Would it be equivalent to say: $\forall$ $\delta \gt 0$ $\exists$ $\epsilon \gt0$ $:|x-t|\lt \delta \implies|f(x)-f(t)|\lt \epsilon$. I guess what I'm asking is whether there is a certain order proofs or more formal statements need to follow. I know I only changed the place where I said there is a $\delta$ but is that permissable in a "formal" way of writing?
Answer: Let
$$f(x) := \begin{cases} 1, & x\in \mathbb{Q} \\ 0, & x\in \mathbb{R} - \mathbb{Q}, \\ \end{cases}$$
a very discontinuous function. Then $\epsilon := 2$ will do, for any $x, t, \delta >0$ you choose. So this cannot be equivalent.
Comment: I assume you meant $\Bbb R\smallsetminus\Bbb Q$, or something like that, rather than $\Bbb R$.
Comment: @CameronBuie: Thanks for catching the typo!
Answer: It's already been shown how your definition fails but I'll try to explain why it is the way it is. What the definition tries to get at is basically "You can get as close as you want to the limit." $\epsilon$ represents the any closeness to the limit you want to achieve. and the $\delta$ tells you how to achieve it. In other words, if you're less than $\delta$ distance away from $t$, you'll be less than $\epsilon$ distance from the limit.
Clearly, you need to know how close you want to get at first, that is why $\epsilon$ is chosen first. Hope that helps.
Comment: E.g. $f$ is continuous at $1$ if $\forall \epsilon \exists \delta >0  : |x-1|<\delta \implies |f(x)-f(1)|<\epsilon$.
Comment: Perfect I had actually just deduced that exact reasoning myself and was going to ask if that was the reason that's how it is. So as I'm sure you noticed that, that was the definition of uniform continuity, so then for non uniform continuity it's a matter of rearranging where I put each word/symbol/statement? Because we specified that $\epsilon$ was a under a certain condition that implies the uniformness? Does that make sense?
Comment: You'd just have to add "$f$ is continuous at $t$ if..." before your given definition. Then everything mentioned in the definition including the choice of $\delta$ is specific to the particular $t$.
Comment: perfect, thanks!
Answer: What you gave first is the definition of uniform continuity. You have to fix $x$ before embarking the $\forall \epsilon$ thing. That's for continuity at $x$, of course.
Now to answer your question: no, this is not legal to swap $\epsilon$ and $\delta$ like you did.
The funny condition you obtain with this swapping is satisfied by lots of non continuous functions.
For instance, any bounded function satisfies it.
Answer: Let's translate it into words, to see how they compare. Continuity at a given point (in this context) means that if we want to keep the $y$-coordinate within a certain interval (no matter how small), then all we have to do is keep the $x$-coordinate from straying too far. (You actually gave the definition for uniform continuity, as it turns out.)
If we simply swap "$\delta>0$" for "$\epsilon>0$" in the definition of continuity, then it means that no matter how far we let the $x$-coordinate stray, the $y$-coordinate will at least manage to stay within some interval (which could be arbitrarily large).
Do you see how (perhaps surprisingly) substantially different the two are?


What is the direction of negative reactive power

Question: In a R+1/(jwC) load (AC)voltage lags current with θ degrees. Reactive power Q is negative because sin(θ) is negative. My question is how can a capacitive load deliver power to the source wich is supposed to supply the power? Im sure I do not completely understand the subject, can someone explain my faults? Thank you for your help, Nick.
Comment: Do you mean \$j\omega L\$ or \$\frac{1}{j\omega C}\$?
Comment: Yes I meant 1/(jwC)
Answer: It is a common misunderstanding that a voltage source must also be a power source. That's not true, an ideal voltage source merely constrains the voltage between two points in a circuit. Current may flow in either direction through the source, causing it to consume power or provide power. Think about a rechargeable battery, for example. If you have some kind of standby power supply, the battery will be charging (consuming power) part of the time and supply power part of the time.
Comment: A capacitive circuit still needs to be charged. This would mean the average power consumption would be zero in an ideal circuit right? Is +- in reactive power just an indicator for phasor angle?
Comment: Power must be conserved in a circuit, so the average power supplied must equal the average power consumed. I'm not sure what you mean by "+-" but think you are correct, it is just an indication of the phase angle.
Answer: I found a good explanation of what I am trying to ask, I will post the link for anyone else who is interested.
What does it mean for reactive power to be delivered or consumed


Is it common for much longer sets to be done using Dumbbells than would be done with barbells?

Question: I feel like I often see much longer sets in the sense of each set having many more reps done on the dumbbell area of the gym while I've often heard people recommend sets of a few as 3 reps each on the barbells. Is this so? And if yes, why?
Answer: The most likely reason you perceive this is because strength training is mostly done exclusively on barbells while hypertrophy training is done on both barbells and dumbbells. So what you see is almost nobody doing high-intensity, low-rep workouts on dumbbells.
There's no inherent reason for this other than that strength sports almost exclusively use barbells (powerlifting and Olympic weightlifting mostly). People who are training for these sports generally don't have a need to use dumbbells because all their training is focused on lifting barbells as heavily as they can. The rep ranges for this style of training is also much more intense with fewer reps. Barbell exercises like squats, deadlifts, cleans, and snatches are far more taxing on the body which also encourages more low-rep training.
Bodybuilders and people looking to build mass use both barbells and dumbbells. Hypertrophy training is more focused on lifting to muscular failure, so rep ranges are much higher with more sets. A lot of dumbbell exercises are more isolated and lighter which makes them less taxing on the body, so people are able to do more with them. However, people in fact do high-rep workouts with barbells all the time, including squats, deadlifts, cleans, and snatches. You just probably haven't noticed.
Comment: Perhaps worth pointing out as well that low reps implies high weight and sufficiently heavy dumbbells are quite rare and awkward. Even for non-barbell-exclusive sports like strong, barbell training predominates because it's much easier to have hundreds of pounds on a barbell than on a dumbbell


Does the redeemer have to be from a wallet address/contract?

Question: Could a contract be programmed such that the redeemer seemingly comes from nowhere from what the node / someone monitoring the blockchain could tell? I am thinking if you gave the contract some ada and had it pay fees automatically out of itself, you could run totally anonymous logic. Are there restrictions preventing you from doing this?
Comment: Welcome to Cardano SE! As a new user be sure to take the [Tour].
Answer: You seem to be misunderstanding how smart contracts work on Cardano.

Does the redeemer have to be from a wallet address(?)

Redeemers don't come from wallet address, they are included on transactions. And transactions must be created by a user off-chain.

I am thinking if you gave the contract some ada and had it pay fees automatically out of itself...

There is no such thing as automated smart contracts in Cardano. The datums at script address only change state as a result of a transaction submitted from off-chain.
Answer: I can't imagine how you'd do that.  The validation nodes control fee distribution, only relying on the TX to provide the fees, but not relying on the TX to tell them how/where to distribute them.
Comment: I was thinking since in the eUXTO model the redeemer is arbitrary, you could pass unit () as the redeemer. The validation script could be programmed to always accept () and pay a small amount of fee to the node, and the rest to some value in the datum. This is how I would do it in my head, but I don't know if Plutus actually allows this.


Some Windows 10 Apps Failing on start

Question: I just installed Windows 10 final release and noticed some apps including Store, Photos and Groove Music are not working.

After digging around the Internet I've tried addressing the problem with the following command line:
Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}

However it looks like it made it worse, and it now shows this error on the apps that aren't working:
Add-AppxPackage : Deployment failed with HRESULT: 0x80073CF6, Package could not be registered.
Merge Failure : error 0x80070003 : Cannot register the Microsoft.Windows.Photos_15.721.12350.0_x64__8wekyb3d8bbwe
package because there was a merge failure with the following file: C:\Program
Files\WindowsApps\Microsoft.Windows.Photos_15.721.12350.0_neutral_split.language-ru_8wekyb3d8bbwe\resources.pri
NOTE: For additional information, look for [ActivityId] a158907a-ceee-0007-8cba-58a1eeced001 in the Event Log or use
the command line Get-AppxLog -ActivityID a158907a-ceee-0007-8cba-58a1eeced001
At line:1 char:38
+ ...  | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.I ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (C:\Program File...ppXManifest.xml:String) [Add-AppxPackage], IOException
    + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackageCommand

I noticed the "ru" in "Microsoft.Windows.Photos_15.721.12350.0_neutral_split.language-ru_8" so I removed my Russian keyboard input to see if that could fix the problem but nothing happened. My configuration is English by default and United States is set to my location. Also I have got the latest updates.
I tried running the App Store Troubleshooter but it won't run:

Right now the affected apps are looking like this:

Finally, I haven't done anything hacky on my system, so I suspect it has to do with the language. I have Spanish, Russian, and English keyboard inputs.
Note: On fresh install account the apps work fine. But it would be to much for me to migrate everything.
Comment: When you says "On fresh install account", is that a fresh install of Windows 10 or just changing the Microsoft account? Try running [System File Checker](https://support.microsoft.com/en-us/kb/929833) `sfc/ scannow` in Command Prompt.
Comment: got the same issue, i run as english with a swedish keyboard. I can't run any windows "metro" apps. they worked fine for a day or two
Comment: I tried sfc... still nothing.
Comment: I have the same problem on a Surface Pro 3.
Answer: After some research, I found out that it may trying to merge with the wrong resource file.
First of all, open Command Prompt with admin privileges and do  chkdsk /f /r, restart so Windows can check the file system and then try to run the Add-AppxPackage command again after it is done.
If that doesn't work, I found a similar question in another forum with some things you can try, and see if any of that will work, I will quote them here:
Quote from Deason Wu's answer:

Manually deleting the app directory inside the AppData folder
Changing default owner of registry key to system
HKEY_CURRENT_USER\Software\Classes\Local
  Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Repository\Packages
Please backup these folders or registry entries before taking any
  action.

Quote from ctp Han Solo's answer:

What I'd like to add is that I belive the cause is that when
  resintalling WindowsStore
add-appxpackage -register "C:\Program
  Files\WindowsApps\Microsoft.WindowsStore_2015.25.5.0_x64__8wekyb3d8bbwe\AppxManifest.xml"
  -disabledevelopmentmode
It tries, and fails, to merge with:
C:\Program
  Files\WindowsApps\Microsoft.WindowsStore_2015.25.5.0_neutral_split.language-es_8wekyb3d8bbwe\resources.pri
Because this version doesn't exist. The one that exists is:
C:\Program
  Files\WindowsApps\Microsoft.WindowsStore_2015.7.1.0_neutral_split.language-es_8wekyb3d8bbwe

So probably it is the resource file that for some unknown reason, Windows is trying to merge with the wrong file, so deleting the app folder and try to reinstall all over again may work.
Another thing I want to add is that you tried to used the "Add-AppxPackage" command first. Try to run Remove-AppxPackage on that specific AppxPackage and then try to add again (more info here). Be sure you are running the PowerShell as Administrator for those commands.
If still doesn't fix your problem, open your command prompt with admin privs and do dism /online /cleanup-image /restorehealth. Note that it can take a lot of time to complete.
Finally, if none of that works, you can try to use that another user account, move your personal files to that account, remove the old one and link your newly created account to your Microsoft Account to use their services, or reinstall Windows using the Settings > Update & Security > Recovery > Reset this PC option. You can choose to save your files and configurations, but it will reset your Windows, so your installed softwares are going to be deleted. I searched all around for some time already and couldn't find anything more than these steps fix this issue, I will update this answer if I find anything new.

Some Windows 10 Apps Failing on start


How do I correctly display time in Drupal using the Date module?

Question: When creating a new Event on my Drupal site I set the date/time of the event to what I assume is local time. I expected the date/time in the system to be set to the value I saw on the add/edit form, but its not; it's set to UTC.
<code>Event Start (add/edit form): 2012-12-20 1:00pm EST
Event Start (database):      2012-12-20 6:00pm UTC
</code>
When I go to display this date/time using date() even after setting the default timezone to EST ("America/Toronto") the date/time is still showing 2012-12-20 6:00pm.
The problem doesn't necessarily seem to be drupal, the date/time is being displayed in the way it's being stored, but I'm thinking the problem may be the date/time entry control on the add/edit form...possible javascript time related.

The values are being posted as they're displayed: 5:00pm goes to the server as 3 distinct values: 5, 00, PM. They're being stored in the database as UTC, but not matter what I try they're always displayed as UTC. I've tried format_date, date_default_timezone_set, setting the PHP timezone in the .htaccess file...no luck :s

Hate having to do it manually, but this works:
<code>$tz = new DateTimeZone('America/Toronto');
$offset = $tz->getOffset(new DateTime($start_date));
$start_stamp = strtotime($start_date) + $offset;
</code>
Comment: Thanks for the workaround.  If you were already using DateObjects, then they work fine as an argument to DateTimeZone::getOffset.
Answer: If you have a date formatter (config page at /admin/config/regional/date-time), you can use the machine name to reuse it:
<code>$date = new DateObject($timestamp);
$value = date_format_date($date, 'my_date_string_format');
</code>
Comment: Still seems to echo a UTC time not a local time :s


Why I am getting "zend_mm_heap corrupted" when run a script to screen scrape a webpage?

Question: I am getting "zend_mm_heap corrupted" when run a script to screen scrape a webpage. Please let me know, how to fix this issue.
Answer: I will assume you are using Apache w/ mod_php for this answer.
I was getting this error when apache was spawning too many instances eating up all the RAM, and then would attempt to use the disk swap, and then responses would keep slowing down until it would eventually crash, and it would SEGFAULT. Restarting the apache service would bring everything back up, until it boiled over again minutes or hours later.
Here's an article that helped out in my situation:
https://servercheck.in/blog/3-small-tweaks-make-apache-fly
Basically, see how much each apache process is using (may be httpd or nginx on your server):
ps aux | grep 'apache' | awk '{print $6/1024 " MB";}'

Find the average MB usage per process, in my instance it was about ~40MB per process.
Next find out how much RAM you have available to your apache. My server had roughly 3.8GB of RAM available to Apache. So I took 3800 MB divided by 40 MB, and got 95. So I set my MaxClients to 95. So far I have not seen apache spin out of control on my server since I've implemented these changes. When it was 150, it was crashing ever 8 hours or so, when it was at 250 it was coming down every half an hour.
<IfModule mpm_prefork_module>
    StartServers          5
    MinSpareServers       5
    MaxSpareServers      10
    MaxClients           95
    MaxRequestsPerChild 100
</IfModule>

As suggested by other, I had tried turning up my output buffering from 4K, all the way 128K with not much improvement in the error. Also try turning down your "Timeout" parameter, if you don't have any longer running processes. In my network nothing should take more than a few seconds to process and deliver. The high (IMHO) default of 300 was reduced down to 15 seconds, this helped with any instances that got stalled as well.
Before this I'd see loads reaching close to 130 or so, which the system should be non-responsive but everything else was fine. Your issue just may be your Apache mod_php settings are simply too aggressive for your server.
Hope this helps!
Answer: Try to increase output_buffering in php.ini
Refer to this question output_buffering
Comment: thanks for your response. output_buffering didn't help to fix that issue.
Answer: 1)Can you give us some code to look at ?
2)Meaby increasing output_buffering in php.ini can do the trick and make sure You remove all unneeded references.
Comment: thanks for your response. output_buffering didn't help to fix that issue.
Comment: So without a code I can only blind guess (not an option for me).


Why does chlorine have a higher electron affinity than fluorine?

Question: Since fluorine has its valence electrons in the n=2 energy level, and since chlorine has its valence electrons in the n=3 energy level, one would initially expect that an electron rushing towards fluorine would release more energy, as it would land in the n=2 energy level, whereas in chlorine, the electron would land only in the n=3 energy level, and would then not release as much energy.  Thus, one would expect fluorine to have a greater electron affinity than chlorine.  However, why is it that chlorine has a higher electron affinity (349 kJ/mol)  than fluorine (328.165 kJ/mol)?
Answer: Fluorine, though higher than chlorine in the periodic table, has  a very small atomic size. This makes the fluoride anion so formed unstable (highly reactive) due to a very high charge/mass ratio. Also, fluorine has no d-orbitals, which limits its atomic size. As a result, fluorine has an electron affinity less than that of chlorine.
See this.
Comment: I don't think d orbitals contribute to atomic size, since they're always only populated in an internal shell. Calculated atomic radii decrease continuously across a period, and they decrease a little slower in the d-block because the inner d orbitals shield the valence s/p electrons from the nuclear charge better than adding electrons to the outer shell. If anything, the presence of a populated d subshell actually helps contract the atom, allowing it to reach a higher effective nuclear charge than expected in a period with no d subshell.
Comment: @ashu There is absolutely no reason to consider vacant d orbitals in partly filled electron shells. You don't consider f orbitals for bromine either. In fact, while this answer does start off well I have to give it a $-1$ for invoking a concept that does not help and is introduced incorrectly.
Comment: @user3932000 Chlorine have **vacant** d-orbitals. Since empty orbitals are omitted when writing electronic configuration, it is written as $1s^2 2s^2 2p^6 3s^2 3p^5$. Complete electronic configuration would be $1s^2 2s^2 2p^6 3s^2 3p^5 3d^0$.
Comment: @ashu You could say the same for fluorine and say fluorine also has vacant d-orbitals, since its configuration would then be 1s2 2s2 2p5 3s0 3p0 4s0 3d0.
Comment: ....but chlorine doesn't have any d-orbitals either?
Comment: @user3932000 Fluorine doesn't have a 3rd (M) electron shell hence no d-orbitals.
Comment: @ashu But if we're considering vacant orbitals, all atoms have an infinite number of vacant orbitals, with energy levels from 1≤n<∞?
Comment: We're considering **vacant orbitals in partially filled electron shells**, not empty electron shells.
Answer: The electron being gained by fluorine would be taken in to a much smaller 2p orbital and requires more electron coupling energy than that of much larger 3p orbital of chlorine. Therefore, energy released during the electron gaining process of fluorine is less than that of chlorine.


How to force OpenAL to mix in mono on the iPhone

Question: When I run my app with default OpenAL settings I can see that it mixes sounds at 44khz stereo, here's what I get in the console (running on an iPhone 4):
<code>AudioStreamBasicDescription:  2 ch,  44100 Hz, 'lpcm' (0x00000C2C) 8.24-bit little-endian signed integer, deinterleaved
</code>
Due to performance problems I want OpenAL to mix sound at 22khz and in mono. I'm assuming this should consume less CPU. I've managed to force OpenAL to mix at 22khz. Here's how I did it:
<code>    int params[3];
    params[0] = ALC_FREQUENCY;
    params[1] = 22000;
    params[2] = 0;
    context = alcCreateContext(device, params);
</code>
But how do I force OpenAL to mix in mono? I'm assuming "2 ch" means two channels - stereo.
Answer: You can't control how many channels OpenAL outputs, but you can simply use mono data as inputs.
In general, OpenAL shouldn't cause performance problems except on older devices, and only if you're playing 20 or more sources at a time while running a physics engine or something.


Multi Port Fibre Channel Target with qlogic qle2462 to increase speed

Question: I have a server running Nexenta with a QLogic QLE2460 in target mode.  This works great.  My problem is that with that I only get 1 port worth of speed (4gbps) to my switch.  How can I increase the speed.  Now I will point out that I am no expert on Fibre Channel, but in networking I can hold my own.  If this was networking I could team the nics and get the speed from both.  Can I do the same with the Fibre Channel cards as targets?  I did find some documentation on using QLDirect Filter to do this for the initiators, but what about the target?  Am I better off putting the LUNs on different ports and try to get better speed by segregation?
Answer:
8Gb Fibre Channel
MPIO
Enabling compression on your ZFS zvols/LUNs.

Who is consuming this data? Are you actually seeing bottlenecks?
And remember, it's not always about throughput. Have you taken time to understand your I/O patterns? The mix of read to write? The nature of the transfers?
Can you give more information about the setup?
Comment: MPIO is exactly what I needed.  On one hand you point out some great things that I should check on, however the truth is that this is a newer setup.  The servers will quickly grow to over 40 however and I suspect a 4gbps setup will not work during heavy load times.  I do have several drive controllers to spread the load, but a single port FC HBA.  I was trying to solve this problem before it became one.  I found this great article once I knew what to look for... again thanks... http://info.nexenta.com/rs/nexenta/images/doc_3.1_target-fc-and-host-multipathing.pdf


Does Zinsser BIN need to "fully" cure before painting?

Question: I have two coats of Zinsser BIN primer drying on top of a layer of cured vinyl spackle (MH Ready Patch). How long must I wait before painting? The BIN label says it can be "TOPcoated" in 45 minutes, but the TDS says it can be "REcoated" in 45 min (I waited at least that long between the coats). The TDS also says, "The primer film develops full adhesion and hardness after it cures in 1 to 3 days." Do I need to wait 1-3 days for best results? Or even longer -- I've seen cure times of up to 7 days mentioned elsewhere. Or, will it continue to cure normally even if I paint it now? At this point it's been drying for about 24 hours. I'll be painting with Benjamin Moore Advantage. Thanks!
Answer: You can paint now. There's a difference between drying and curing. The primer develops full hardness and adhesion with curing, but the 45 minutes is its drying time. Just don't drag heavy furniture across it or stuff like that until the curing time has elapsed. It can debond or scratch relatively easily before it has fully cured.


How can I get Onboard (the screen keyboard) to stop launching every time I log in?

Question: For some strange reason (i.e. I don't have a tablet computer) Onboard, the on-screen keyboard, starts every time I log in. I've checked Startup Applications, but it's not listed there. What could be making it start like this, and how can I get it to stop?
Comment: When you say that Onboard starts every time you log in, do you happen to mean it appears when you are unlocking the screen? (Because that's an issue I _have_ encountered, but it might not be what you're having).
Answer: Looks like this bug is back in precise (tried using update manager, didn't work)
This is the only solution I found:
Open a terminal window and type the following commands:
cd /etc/xdg/autostart
sudo rm onboard-autostart.desktop

Answer: It was a bug: launchpad
You can use Update Manager for fix
Answer: Let's try two things here. Open the Terminal application and type these commands:
gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled false
gsettings set apps.onboard xembed-onboard false

The first command toggles whether the screen keyboard should be visible, just to make sure it is supposed to be turned off. That is the same as the option under System Settings / Universal Access.
The second command makes sure OnBoard does not show when you unlock the screen. This is the same as opening OnBoard Preferences and finding that checkbox. Sometimes that option gets enabled and it doesn't change back.
Comment: `That is the same as the option under System Settings / Universal Access.`
This saved my brain, as I didn't want to remove onboard but just turning it off wasn't working.
Answer: On login page of ubuntu, click human icon on the top bar then uncheck onscreen keyboard.
Answer: I opened onboard only one time, and ever since then it showed up when I was unlocking no matter what settings were set to.
I ended up uninstalling, I mean, I have never needed to, nor foresee a reason that I would ever need to use it.
So if you don't think you'll use it, I would recommend uninstalling. It's not really a fix, but you won't have to deal with it.
Comment: Kopkins, for that problem, see my answer. (It's an option in Onboard Settings that gets turned on unexpectedly). Uninstalling solves it too, of course :)


Shell and applications

Question: Is it true that all commands that can run in bash are not actually part of bash? I'm gradually realizing I have been confusing the shell and the applications that can run in it.
Comment: The question is unclear. If `all` commands aren't part of bash, then there is no `rest`.
Comment: @user: The rest are those that are not commands. Such as pipe, and redirection.
Comment: The rest of what? Keywords? You think, redirection isn't part of the bash? Commands aren't? Everything, which isn't an external program in the path is part of the bash. What else?
Comment: I said the rest are part of bash. The rest also include "for", variables, expressions, ...
Answer: There isn't a sharp border between the shell and the applications.
Some of the commands that you run in a shell have to be built into the shell, because they act on the shell process. For example, cd changes the shell's working directory, and this can't be done from the outside, so cd has to be a built-in command. But this is an implementation detail. A casual user doesn't need to know that there are technical reasons that compel cd to be a built-in command.
At another extreme, there are large applications that are made by different authors, such as Firefox or Emacs. These aren't going to be built into any shell because they're too big. But this isn't a fundamental impossibility, just a matter of design. For examples, there are shells¹ that have builtins to make simple GUI applications.
In the middle, there are commands that could go either way. For example, the echo command doesn't need to be built into the shell, but almost every shell has it built in because it's very small, and is used often so should be efficient. Another example is kill, which for casual usage could be an external command, but having a built-in has several advantages: you can invoke it even if you've reached a limit on the number of processes, and you can give it a shell job number (kill %2) in lieu of a process ID. Even the [ … ] construct (which can also be written test) could, in principle, be an external command, but is built into shells for the same reason as echo.
If you're curious, you can check the status of a given command with the type command. For example, in my setup:
% type while type setenv cp emacs
while is a reserved word
type is a shell builtin
setenv is a shell function
cp is an alias for cp -i
emacs is /usr/bin/emacs

Reserved words such as while and then are part of the shell syntax. Builtins are commands that are built into the shell and don't require an external executable. Functions are compound commands that are defined and named by the user, and can be called by their name. Aliases are user-defined short names for longer commands (behaving differently from functions). The last example is an external command.
¹
dtksh. There is no free implementation.
Comment: You will notice that `/bin/[` exists, and is a hard link to `/bin/test` on most (all?) *nix boxes. It wasn't a builtin to the classic Bourne shell. There are also confusing animals such as `busybox` that implement most of core commands and a shell, deciding which they are at run time by inspecting the name used to invoke them.
Comment: For commands like `echo` which are both builtin and external, use `type -a` to show both (in order of precedence).
Answer: Try using the bash command type. type describes what a command is: if it is an shell builtin, if it's an alias, if it's another program...
Example:
[braga@coleman ~]$ type echo
echo is a shell builtin
[braga@coleman ~]$ type ls
ls is aliased to `ls --color=auto'
[braga@coleman ~]$ type usermod
usermod is /usr/sbin/usermod

Some are builtin, some are not. Use type if you want to query about a specific command. Refer to bash documentation for a list of all builtins.

What is a builtin?

Builtin commands are contained within the shell itself. When the name
  of a builtin command is used as the first word of a simple command
  , the shell executes the command directly,
  without invoking another program.

What is an alias?

Aliases allow a string to be substituted for a word when it is used as
  the first word of a simple command. The shell maintains a list of
  aliases that may be set and unset with the alias and unalias builtin
  commands.

Both quotes come from the bash mannual.
Comment: Thanks! By builtin, are they applications that are bundled with bash? Are they shell features of bash? How about alias then?
Comment: @Tim I expanded the answer to include definitions for alias and builtins.
Comment: Note that many builtins are also available as external commands, probably in `/usr/bin` or `/bin`. This is largely for historical reasons; the classic Bourne shell had far fewer builtins than bash does.
Answer:
Most commands aren't part of the shell. (Shell just runs the binary by that name.)
Shell implements cd and it's scripting language keywords (while, for, etc.)
Commands such as echo and test may or may not be implemented in shell.

Shell and applications


Skipping a Lufthansa train connection

Question: I'm traveling from Kassel to Boston. Starting at QKL (rail from Cologne then flight from Frankfurt) is MUCH cheaper than simply flying from Frankfurt. Can I use that day's Rail&Fly to go direct from Kassel to Frankfurt? Or conversely, do I have to use the rail ticket at all to not forfeit the air ticket?
Comment: if you already experienced it please let me know. I also bought ticket like that. because of 120 Eur price difference. But now i a bit excited. Thanks for your help
Answer: There are two different things that are often confused:

AIRail: This is a regular segment of your flight itinerary. All fare rules and regulations regarding flights apply. This "flight" just happens to be operated with a Siemens train instead of the more usual Airbus or Boeing plane and it never takes off the ground. But seen from a fare perspective this is a flight just like any other.
Rail&Fly This is a train ticket to/from the airport supplied by your airline and not a flight segment. If you happen to miss your plane because your train was delayed with such a ticket that is your fault and the airline will not rebook you.

Based on your description, I guess you have the first kind of ticket as this is the only one where flights actually get cheaper (as this is seen as an often undesired flight connection).
If you have a combination of both you can't use Rail&Fly to get to Frankfurt instead of Cologne as the Rail&Fly ticket has the destination "Cologne". But thankfully for you, to get from Kassel to Cologne you need to connect through Frankfurt (where you of course can just leave).
Now for forfeiting the AIRail part (QKL–FRA leg):
Technically, you would be in violation of the conditions of carriage and the whole ticket can be cancelled. In practice this doesn't happen as long as you consider the following (based on a lot of second-hand experience):

Use online check-in at least 15 minutes before the train departs from QKL and check-in for that leg
Don't talk to any staff at FRA before the train arrives
Don't tell them you haven't taken the train (and they usually won't ask)

If you have any baggage you should leave it at the AIRRail counter in the FRA train station, not the regular check-in counter.
If the QKL-FRA train is severely delayed your flights are going to be rebooked, especially if you had a short connection. Of course this is something you don't want in your situation. It is advisable to book a long connection in FRA so this doesn't happen (and you don't care for the connection time anyway). In case of delays you can tell the staff that you got to the airport in some other way. As long as this were feasible they will accommodate you (for example, if the rail line is closed on short notice there is no way you could have gotten to FRA in under 90 minutes).
The reason this works is that you can use any carriage in the QKL-FRA train but only one has Lufthansa staff in it. Deutsche Bahn staff (which works in all other carriages) should tell Lufthansa if they see your ticket but in practice this often doesn't happen and sometimes they don't check tickets at all. So they can't be sure whether you have been on the train or not.
Comment: _The former is normal flight but operated with a train instead of a plane._ This part was... slightly confusing to read. :)
Comment: "Don't talk to any staff at FRA before the train arrives": this means that if the train is sufficiently delayed, you will have to miss your flight even if you're already at the airport, doesn't it?
Comment: Thanks a lot Neo, I think you're right about the labeling. It just says "Operated by: Deutsche Bahn Ag TRS" for that segment
Comment: @Sean Yes, that's AIRRail.
Comment: @phoog Likely yes. I will ask around and then add this to the answer.

Skipping a Lufthansa train connection


Does nitrogen-rich material become carbon-rich after drying?

Question: So my compost is very nitrogen-rich since my yard is mostly lawn and grass clippings are nitrogen-heavy. I read that hay, on the other hand, is carbon-rich. Since hay is just grass dried in the sun, am I correct that nitrogen actually becomes carbon after drying? I also read that dry leaves are good source of carbon, but wet leaves are not. I'm a bit confused, please advice me.
Answer: You are missing the fact that the ratio of carbon to nitrogen in organic material is nowhere near a 50/50 split. The difference between "nitrogen rich" and "nitrogen poor" is more like the difference between 25 parts carbon to 1 part nitrogen and 30 parts carbon to 1 part nitrogen, by weight.
The most common chemical compound in plant material is cellulose, which is roughly equal parts of carbon and oxygen by weight plus a few percent of hydrogen, and contains no nitrogen at all.
Nitrogen as an element is a gas (air is about 80% nitrogen) and most simple nitrogen compounds are gases and/or soluble in water, so nitrogen can easily be "lost" when grass is dried to turn it into hay, for example. The side effect of a small (1% or 2%) loss of the mass of nitrogen from the compost is not noticeable.
Wet leaves contain just as much carbon as dry leaves. The problem with composting wet leaves (or any other wet material) is that too much water excludes air from the compost pile, which inhibits the micro-organisms which produce aerobic decomposition and generate heat to sterilize weed seeds etc.
A compost pile which is too wet decomposes slowly and anaerobically, producing a horrible-smelling slimy mess instead of compost.
Comment: Thanks for sharing your knowledge. Is it better to have too dry compost rather than too wet one? I'm trying to find a perfect balance but so far it has been either ants in the bin (too dry) or smell (too wet).
Answer: Elements like carbon don't change into other elements (like nitrogen). The carbon that remains after the nitrogen is gone was already there to begin with, and it was there when the plants were alive, too. It's possible that some of the carbon was converted into another form, and maybe some got released as gas, somehow; but you're probably not going to get more carbon in the substance without living plants.
Bacteria can potentially sequester carbon, but the majority of the carbon we're talking about was probably put there by the plant itself.
So, in summary, wet leaves should still have just as much carbon in them as dry leaves, if we're talking about a single leaf. By weight, rather than by number of leaves, dry leaves should have more carbon, though. Wet leaves have nitrogen that dry leaves lack.


What is this part called?

Question: I'm not sure this is the right place to be asking this but I'll give it a try. I have this bit of hardware from a pair of helping hands that I'd like to find more of. I'd describe it as a rod fastener of some sort. Not having any luck with those search terms however. Perhaps someone here has the proper name. Thanks in advance.
Comment: It's called [throw-it-out-and-buy-a-new-one](https://www.harborfreight.com/helping-hands-60501.html) ...
Comment: That is a non-standard part. You will not likely find an identical one.
Comment: you could make one out of this and a piece of a bolt .... https://www.homedepot.com/s/rod%2520coupling%2520nut?NCNI-5
Answer: I'd call it a cross-bored stud with retaining thumbscrew, but there's nothing official about that.
As has been stated, it's probably a proprietary part and you likely won't find a drop-in replacement. You could fabricate one from a standard stud if you have machine tools available.

What is this part called?


Device Data to Dashboard: What architecture do I use (example inside)?

Question: I want to filter my device data through a rule engine where I apply different actions to it before storing and displaying it to the user. I need to store this data into a time series database and I also need to display it in near real time. This is the data flow that I think is necessary. Anyone have an architectural example they can recommend? I am looking at ThingsBoard at the moment.
Answer: You can use TIG architecture. TIG stands for Telegraf, InfluxDB and Grafana. There are many tutorials avilable online on how to configure this architecture. You can follow this medium article.
The architecture of this looks as shown in the below image. You can have all your rules in the telegraf stack. You can also configure telegraf such a way that it can act as bridge between different protocols. In this example, I am using it as a bridge between MQTT broker and InfluxDB. You can through in a little python or shell script that can handle your rules.
Answer: Have you considered the AWS ecosystem for this ? i.e, a combination of IoT Core, kinesis,  timeseries DB, etc ?
Here's an example:
https://console.aws.amazon.com/timestream/home?region=us-east-1#tutorials/6
More at
https://console.aws.amazon.com/timestream/home?region=us-east-1#tutorials
Comment: Yes and No, We don't want a cloud-based PaaS
Comment: You could self host something from Kafka for this. See https://lenses.io/blog/2016/12/kafka-influxdb/


How do I calculate cpu and gpu performance ?

Question: I want to compare gpu's and cpu's like benchmarks. But I don't get it logic behind this. How can I calculate processing capacity about any cpu or gpu ? What I need to do ?
Answer: The performance of CPU's and GPU's are based partly in specefications (i.e. frequency, tdp, etc.) and also the architecture design. Due to different processors using different architectures, specifications won't be able to tell you which processor is faster (i.e. an AMD 4ghz cpu might be slower than an Intel 3.5ghz cpu). To solve this, both CPU's are given the same problem to work on and which ever finishes first is faster. This is a rather simplistic explanation, but it does show the general idea behind bench marking in general. Think of the two CPU's as runners. Two runners may both weigh 120lbs and be 5 foot 9 inches, but they will most likely finish the race at different times. So a benchmark is really just a race between CPU's as to which can finish faster.