What is the significance of Maxwell's equations being invariant under the Lorentz transformation?

Question: It seems maybe this has something to do with an overarching notion in Physics that things that are symmetrical look nice but I need to be educated on a deeper level about how this impacts the outcome of whether a theory is right or wrong. I have taken an undergraduate EM course and recently started reading special relativity on my own. Nowhere in the course did it mention transformations. So I'm still trying to wrap my head around the popular statement that Maxwell's equations are invariant under the Lorentz transformation. What does this mean and are there any examples in daily life that this can be applied to? More generally, why do we like transformations that don't change the physical laws? Is it a problem if a transformation does change the laws? Does the fact that the equations are invariant under Lorentz make Lorentz a "correct" transformation in the sense that makes it wrong to say that if someone is moving at 100 and I'm moving at 90 in the same direction then he's moving at 10? Does the Lorentz transformation have any other advantages over the Galilean other than the fact that it preserves the speed of light? Please do not judge the phrasing of my questions too harshly. I hope you get  the gist of the matter. I just mean to know why we said that phrase in the first place and how it makes physics tick.
Comment: Possible duplicate: http://physics.stackexchange.com/q/36027/50583
Comment: *"something to do with an overarching notion in Physics that things that are symmetrical look nice"* Emmy Noether showed that the importance of symmetry goes *much* deeper than mere aesthetics.
Answer: It's not really a matter of symmetry groups of equations. A simple model of waves on water is $\frac{\partial^2 u}{\partial t^2}-\frac{\partial^2 u}{\partial x^2}=0$, and this is invariant under Lorentz transformations with speed of light $1$ (for the same reason $dt^2-dx^2$ is invariant under Lorentz transformations with speed of light $1$). The invariance of the simple wave equation didn't have any significance for physics.
The idea, thinking as a physicist in the year 1900 or earlier, is that either Galilean invariance is wrong or Maxwell's equations are wrong.
Possibility one: there is a privileged reference frame in which Maxwell's equations hold, possibly complicated by a "luminiferous ether" which might be "dragged along" by Earth like a fluid. The fundamental laws would obey Galilean invariance, but Maxwell's equations hold in the frame in which the "luminiferous ether" is at rest. No one ever got anywhere or did any useful physics with this approach.
Possibility two: Maxwell's equations hold in all inertial reference frames, and Galilean relativity is simply wrong. This seemed untenable to all but Einstein, because it implied no notion of simultaneity can exist, that time passes differently for different inertial observers, and all other weird special relativistic phenomena. However, it has provided countless experimentally confirmed predictions; it's how nature works.
Answer:
More generally, why do we like transformations that don't change the physical laws?

It's not so much that, or at least it wasn't at that time.
The problem was that we knew that normal Newtonian mechanics was invariant via the Galilean transform. That means that non-accelerated frames have similar physics. However, there was no analog of this in Maxwell's equations.
If you throw a ball from A to B in an inertial frame then the results are the same if that frame is at rest or moving. And we're happy with this, because the person that's tossing the ball and the person that's catching it are still at rest relative to each other, which just "makes sense" (although they didn't always think that of course). The results are not the same if I throw the ball between the frames, because then there's relative motion. In that case we have a transformation we apply, the relative speeds of the frames cause additional terms to appear.
So now here's the problem - what if instead of a ball, I toss some radio waves? At first glance it might appear that the same thing should apply, because the transmitter is moving in the same frame as the receiver, so the waves naturally have a relationship to each other at either end of the experiment. But in that case, we would also naturally expect that waves moving between frames would not maintain their relationship. And that's the rub...
If this is true, it would be immediately visible - the color of planets would change as they moved around the solar system, for instance. Look as they might, no one was able to find such a thing. It appeared that light was not following the Galilean transform. Quite the opposite, every experiment showed no transform at all, all light was emitted in a single universal frame that had nothing to do with matter.
And that's bad. Because we also knew that light did interact with materials - you can shine light on a piece of metal to heat it up, for instance. Well if light is in a fixed frame, then what happens when I put a light bulb on a cart beside a sheet of metal? Wouldn't it heat up faster or slower depending on which way I push it? And if the fuel for the light is on the cart, then don't I create free energy if I push it in the right direction?
That would be bad. Like universe exploding bad.
So it's not that people "like transformations that don't change the physical laws", it's that we already had one transform. Either light also had some sort of transform that made things work out again, or we had to throw everything in the trash and start over.
And thus Lorentz. His transform magically makes light work in Galilean frames, which is the very reason he did it.
Answer: Einstein may not have developed the theory of Special Relativity if the Maxwell Equations are not invariant, as they led him to believe that the notion of absolute space and absolute time (everybody everywhere will agree on the same measurement) was wrong. He had to decide who was right, Newton or Maxwell.
It is a problem if physical laws are not invariant, a silly  example is if we sent a spaceprobe to Mars, Pluto or Alpha Centuri and then found out the physical laws were different there.
Also, our judgements on astronomical distances, the luminosity of stars and, basically the validity of physics as an accurate description of the universe depends on the invariance of physical laws. We may learn a lot if we find that the laws are subject to change, but we have not done so to date.

Is it a problem if a transformation does change the laws?

Yes it is, because the laws must be invariant in order for them to apply to any region of spacetime. That's why, if you study SR and GR, the equations describing physical laws are written in co-ordinate free notation.
Answer: Maxwell's equations and Einstein's relativity are totally unrelated. Some relation existed when Maxwell's theory was an ether theory and accordingly assumed that the speed of light is independent of the speed of the light source (Einstein's 1905 second postulate). Nowadays the statement "Maxwell's equations are invariant under the Lorentz transformation" is not even wrong.
Comment: Linear transformations which preserve Maxwell's equations $\cong$ the Lorentz group $\cong$ special relativity. This answer is flat-out wrong.


Drupal Pay user for X amount by Admin

Question: I have this project that an agent(user) is having a commission on every product that they are selling. The admin should pay the commission through the back end side by using the payment information (paypal email or any) provided by the agent.
What module should I use on this one?
Answer: Checkout the Commerce Affiliate module that is used with Drupal Commerce (or UC Affiliate if you're using Ubercart).

Drupal Pay user for X amount by Admin


When would I use a voltage regulator vs a voltage divider?

Question: When would you use a voltage regulator vs a resistor voltage divider?  Are there any uses for which a resistor divider is particularly bad?
Comment: Divider output is not "stiff" as it varies in output by Reffective x Iout which changes as current changes. It also dissipates significant energy in most cases. An alternative is a resistor plus zener which is a regulator of sorts, more still, and with same dissipation issues.
Answer: These two circuits types have very different applications.
A resistor divider is generally used to scale a voltage so that it can be sensed/detected/analysed more easily.
For example, say you want to monitor a battery voltage.  The voltage may go as high as 15V.  You are using a microcontroller's analog-to-digital converter ("ADC"), which is using 3.3V for its reference.  In this case, you may choose to divide the voltage by 5, which will give you up to 3.0V at the input of the ADC.
There are a couple of drawbacks.  One is that there is always current flowing through the resistors.  This is important in power-constrained (battery powered) circuits.  The second problem is that the divider can't source any significant current.  If you start drawing current, it changes the divider ratio, and things don't go as planned :)  So, it's really only used to drive high-impedance connections.
A voltage regulator, on the other hand, is designed to provide a fixed voltage regardless of its input.  This is what you want to use to provide power to other circuitry.
As far as creating multiple voltage rails: For this example, let's assume that you are using switching regulators that are 80% efficient.  Say that you have 9V, and want to produce 5V and 3.3V.  If you use the regulators in parallel, hooking each one up to 9V, then both rails will be 80% efficient.  If, however, you create 5V and then use that to create 3.3V, then your 3.3V efficiency is (0.8 * 0.8) = only 64% efficient.  Topology matters!
Linear regulators, on the other hand, are assessed differently. They simply lower the output voltage, for any given current. The power difference is wasted as heat. If you have 10V in, and 5V out, then they are 50% efficient.
They have their benefits, though! They are smaller, less expensive, and less complicated.  They're electrically quiet, and create a smooth output voltage. And, if there isn't much difference between the input and output voltages, then the efficiency can top a switching supply.
There are ICs which provide multiple regulators.  Linear Tech, Maxim Integrated, Texas Instruments, all have a good selection.  The LTC3553, for example, provides a combination of a Lithium battery charger, a switching buck regulator, and a linear regulator.  They have  flavors with or without the charger, some with two switchers and no linears, some with multiple linears...
One of my current products uses a 3.7V battery, and needs 3.3V and 2.5V.  It was most efficient for me to a linear for the 3.3V, and a switcher for the 2.5V (fed by the battery, not the 3.3V rail).  I used the LTC3553.
You'll want to spend some time on their respective website's product selector tools.
Good luck!
Comment: @kmort Imagine you are dividing 10V down to 5V.  You use two 500-Ohm resistors to do the division.  So, now, you have 10(V)/1000(Ohm) = 10mA flowing through the divider.  Now, add your load.  This load goes in parallel with the bottom resistor, which skews the resistor divider calculations, and changes the voltage ratio.  If your load is fixed, then you can calc the adjusted divider values.  A good rule of thumb is to draw less than 10% from the divider's center node, so you don't perturb the ratio very much.  But now, you are using 10x your required current just through the divider!
Comment: I think it's worth mentioning that your discussion of efficiency with multiple supply rails applies only to switching regulators and not to linear regulators.
Comment: *"the divider can't source any significant current"*  Why is this the case?
Comment: @bitsmack Yes, makes great sense. I should have thought about that a bit more. Thanks for your help. :-)
Comment: @kmort Glad to help :)
Comment: Be aware that "3.7V" is only a nominal voltage, if you use a LDO to go from a 3.7V cell to 3.3V your regulator is likely to start to drop out long before the battery is fully discharged.
Comment: Thanks @PeterGreen, that's true. If I remember correctly, that LDO had ~200mV dropout. I had the system enter a low-power mode at Vbat = ~3.5V...
Answer: Since a voltage divider does not regulate, one would not want to use a voltage divider when one wants a regulated voltage.
A voltage regulator will, within its limits, maintain the output voltage at a fixed value even as the input voltage and load current varies.
A voltage divider will not do this.  Consider the voltage divider equation:
$$v_{OUT} = v_{IN}\frac{R_2}{R_1 + R_2} - i_{OUT}\cdot R_1||R_2$$
which is manifestly dependent on \$v_{IN}\$ and  \$i_{OUT}\$ so a voltage divider is not a voltage regulator.
There are, however, plenty of applications for voltage dividers, e.g., attenuation, but voltage regulation is not one of them.
Answer: A voltage divider is particularly bad at providing a fixed voltage to a variable or low-impedance load. Variable loads are quite common, and include most digital circuits on the planet.
Fixed, high-impedance loads can have a voltage divider in front of them. This is the case when using an ADC to measure or a comparator to fence a much larger voltage, or in the sense input of a voltage regulator.
Comment: [Nope.](http://webench.ti.com/webench5/power/webench5.cgi?app=powerarchitect⟨_chosen=en_US)
Comment: So if I have a board where I need to power both 5v and 3.3v logic it is probably better to just have two regulators one for each voltage instead of trying to power the 3.3v off a resistor voltage divider?
Comment: Ideally you would have one voltage regulator that would provide both voltages, but having two regulators is better than having any number of voltage dividers to do the same task.
Comment: Do you have an example of a part number off hand that can provide dual voltages?
Comment: @Pete Ha! Just in case you didn't notice, Ignacio's "Nope" is a link to TI's product finder :)
Comment: Power supply design tool, actually.
Comment: As you say... :)
Answer: Voltage dividers are not usually used to generate supply voltages because they provide no regulation. Many loads will alter their output voltage anyway, for example a resistive load to ground is essentially in parallel with R2.
Voltage dividers are usually used to provide a voltage to a high impedance input. In this case you can think of impedance as being basically the same as resistance. Having a 10M resistor in parallel with R2 won't affect it much, as long as R2 is itself orders of magnitude lower like say 10k. Of course, using low value resistors for the divider also increases the current flow through it, so cause issues for battery powered devices.
A common example of a voltage divider into a high impedance input is to divide down a high voltage to a range that an ADC can measure. Say your ADC has a 1V reference and you want to measure a 3.6V battery with it. You might use a 4:1 divider to scale that down so it is less than 1V and measurable by the ADC.
Another common example is to provide a secondary reference voltage. Say you have a 3.6V supply and need a 1.8V reference (half the supply voltage, e.g. for biasing an AC signal with a DC offset). Rather than bothering with an expensive voltage reference IC you could simply use a voltage divider to halve the supply voltage and feed that to an op-amp buffer. The op-amp has a high impedance input, and the output can be used for biasing.
A regulator can provide a certain amount of current into a load, with the voltage controlled as best it can be, so is suitable for supply voltages and the like.
Comment: Great explanation. Found this article that explains the basics on voltage regulators, see here https://www.derf.com/an-overview-on-voltage-regulators/ . What I don't understand is the difference between Step Up and Step Down regulators. Thought you might know since you clearly are experienced with them / knowledgeable on the subject.
Comment: @JacobGoona Those terms have to do with the relative input and output voltages of switching regulators. Step-down regulators (also called "buck" regulators) means that the output voltage is less than the input voltage. Step-up regulators (also called "boost" regulators) means the opposite! There are also "buck-boost" regulators which can provide a fixed output voltage regardless of the input voltage (within spec, of course). As you explore the options, be aware that "regulator" and "converter" are often used interchangeably.
Answer: In general avoid the use of voltage dividers to power your circuits. But, even voltage regulators may be a bad choice in many cases.
Voltage regulators change the voltage level by dissipating the excess power as heat.
Example: You have a 9v input and you are using a regulator to change it to 5v. Consider you circuit requires 1A of current.
Now, in voltage regulators, the input current is slightly higher than the output. But it is small enough to be ignored for calculations. So, we have 1A of current as output and 1A of current as input.
Output power = 1A x 5v = 5W
Input power = 1A x 9v = 9W
There is a difference of 4W between the output and input. This power difference is dissipated as heat that is why often a heat sink is required. This also means that the power is getting wasted. This is a huge issue for power conscious applications such as those battery powered.
Here comes the buck converters to the rescue. For a buck converter, the output and input powers are equal if you consider 100% efficiency. However, they are generally 80-90% efficient. That means for an output of 5W, the input will be 5/0.9 (90% efficiency) = 5.55W
This is a difference of 3.45W.
Similarly, boost converters step up the output DC voltage.
Answer: A voltage divider is only useful when the supply and all the loads will ALL be used at all times, and none of them has a varying load.
You must only have One switch, that switches on the power, or the AC supply to the power supply. If you install other switches to turn on or off any of the various branches of the system of circuits it will fail to maintain the desired voltages you planned to provide to the remaining circuits under power.
Regulation ensures maximum voltages arent exceeded, but do not ensure the current requirement unless the supply is capable of providing an amount equal to or greater than all the possible loads.
Regulation comes in two forms, linear, where a regulator provides a buffer between a somewhat higher voltage potential and a specified design voltage that is lower. The wasted potential voltage produces heat in the linear regulator which must be dissipated via convection to air or a liquid, infrared radiation to surrounding objects, or conduction to attached larger objects. A Heatsink or Heatsink And Fan causes the heat to conduct, convect, and radiate all at the same time.
A switching power supply senses your current needs magically, sipping juice directly from the AC / Mains at a very high frequency, ensuring you dont fry something sensitive. Typically they are designed with a regulated Voltage and adjust the current needs to maintain the voltage within a small amount of the voltage setpoint. It IS possible to have a regulated Current supply, adjusting the voltage to maintain a certain amount of current, such as a battery charger, a wire EDM spark generator, an electroplating bath, an electric chair/bbq grille, or whatever dynamic voltage activity that requires a stablised current.
Switching regulators are capable of using inductors to boost or buck, that is to say they increase or decrease a voltage, and various combinations of regulation. The design parameters are Where the switch is placed in a tank circuit, whether it uses inductors or capacitors or both, the allowable input voltage types AC or DC or both, the input voltage range and the desired output types and current and voltage levels.
It is amazing to me now that devices now come with a free wall adapter that functions with 110VAV or 240VAC and also use either 50hz or 60Hz AC. This is Only possible because of switching regulators.
Linear regulators are old school, waste energy, warm to hot, and very easy to design a DC voltage regulator.
Start with a Line filter to reduce any propogated line noise from passing to your circuit. Add an AC transformer, a full wave bridge rectifier, A filter capacitor or two - one to reduce ripple another to buffer power, maybe a resistor or two in there and maybe a single inductor to help filter the DC headed towards your linear regulator. The LM317 and its negative voltage cousin the LM319 can regulate a voltage of your choice (within reason, see the data sheets) that is defined by choosing two resistors, or one fixed resistor and a variable one. The LM705, LM708, LM712 etc types regulate DC power using metal tabbed TO-220 or other package sizes both larger and smaller.
LM7805 regulates 5 volt positive.
LM7809 regulates 9 volts positive.
LM7812 gives you 12 volts positive.
Positive linear regulators regulate a supply above ground, and negative regulators regulate power voltages below ground.
Sometimes a person might use a center tapped 24VAC transformer to make two separate 10 to 3 volt DC supplies, and they might not have both a positive and a negative regulator. They simply rectify, filter and regulate two separate supplies and use the center tap as ground for the postive supply, and one leg as the ground for the other. This works as long as the two commons are not connected accidentally when using a single heatsink. One can use insulated mounts for TO-220 case devices but then the electrical insulation limits the heat flow. Using two separated heatsinks with caution, as they are at at two different potentials. Its best to use a positive and a negative regulator when you want a +/- supply from a center tapped transformer.
Comment: That is an excellent analogy.
Comment: Welcome to SE EE! Linear regulators are like gasoline versus electric motors - imperfect but still we continue to use them :-)
Comment: This looks like AI generated text: long-winded and off-point
Comment: Its not AI generated. I had brain surgery. Be nice, ok?


Anti aliasing problem

Question: I am auditioning fonts on google web fonts and one that I was discounting was Ubuntu because it looked a bit jagged ( screenshot below taken straight from google); however afterward I read an article where it was mentioned as a good choice, and there was a screenshot where it looked really good ( to me anyway ). I am using windows 7 and have tried looking at it in chrome and firefox. I notice the same thing with some other fonts but this one is a good example because it looks perfect in the screenshot but not so good when I look at it on their site. I know this essentially is a question about setting my computer, but I thought that this would be the best place to pose the question: Is there something wrong with the settings on my machine seeing as it's obviously not showing the font the same on my computer as it did when the article writer downloaded it and used it in an image.

The screenshot from Google ...

The screenshot from the article above ...
Answer: I have spent a few hours on this as well, and yes, check your fonts on Windows Firefox. On my setup (FF 13, Windows XP) every Google font seems aliased - must be the ClearType thing, but some fonts are a lot better than others.  Compare Chau Philomene One
to Francois On -
http://clients.idea-bureau.com/font3.gif
and Francois One actually looks decent at smaller sizes.
I found that Vernon Adams' (designer of Francois One) fonts generally look ok and Open Sans looks practically perfect. I guess they did whatever they needed to do for the fonts to look good on Windows.
Comment: http://somadesign.ca/demos/better-google-fonts/ -  links to both fonts in my screenshot
Answer: Try out different Rendering Modes
http://trentwalton.com/2010/06/29/css-text-rendering/
http://blog.typekit.com/2011/01/26/css-properties-that-affect-type-rendering/
edit: one more real good one for great justice : https://developer.mozilla.org/en/CSS/text-rendering
Comment: I did try that but I don't think text-rendering makes any claims on anti-aliasing, does it. I thought it was mainly to do with kerning and ligatures and geometric precision. https://developer.mozilla.org/en/CSS/text-rendering. Also I am thinking ( perhaps incorrectly ) that this is to do with the settings on my computer because I would have thought that Google would have the fonts displaying as best as they possibly could on Google Web Fonts
Comment: http://font.ubuntu.com/     - How does that perform? In chrome I am seeing a very smooth font @ size 48. As well as the Ubuntu font via the link & google, also appear very smooth for me in Chrome.
Comment: The more I study/experiment with this the stranger it gets. It seems it's a browser/os issue in any case. Anyway, css text-rendering seems to have no effect that I can see on either FF or Ch, but I think maybe text-rendering and font-smoothing may have no effect on windows m/cs. Also I could be wrong but it seems that lately both have been improving with FF initially better, but the reverse being true at the moment. At least when I google it I find a while back the comments were more positive about FF but on my machine now chrome works better .. strange thing is that 49px is good but 48 is not
Comment: http://stackoverflow.com/questions/8519768/does-webkit-font-smoothing-only-work-on-mac-browsers-not-windows
Answer: I have spend a good few hours looking at this and I thought I would share my findings. I can't guarantee these points are correct but it's the way it appears to me so I would appreciate corrections/additions to this in the comments if anyone thinks they know better.

The font in question looked perfect in GIMP so the issue must be a browser
issue.
The browser issue seems to only occur noticeably in "Windows" ( and maybe "Linux" ) machines. Browser font rendering is at the mercy of the operating system and OSx apparently does a much better job at this than anything else.
Firefox has made some attempts to help/override "Windows", though I
think it may still be not so good, even though it seemingly was an improvement at the time.
No browser on "Windows" renders fonts as well as GIMP - I presume PS
does better again
Chrome renders these much better than FF - Lots of information on
the web suggests that Chrome is terrible but I think that must be
referring to an older (ie pre 2011) version of Chrome or something as I have loaded the same font in both browsers side by side and Chrome is noticeably better.
IE9 renders better than FF but not as well as Chrome ( current versions )
Below 49 pixels Chrome's rendering is not exactly awesome either,
this is at it's worst in the 20-48 pixel range. To my eye rendering above 48px is nearly perfect
Css3's font-smoothing has no effect on windows machines.
There is a text-shadow hack out there but I think it too has no
effect on windows machines, though I think this may be something to
do with browser versions
There doesn't seem to be a huge awareness of how badly some fonts display on windows machines among the design community who often are mac users
Certain web-fonts deal with windows better than others, explained below by Tim Brown, quote take from this website

TrueType instructions are an expensive, time-consuming effort that requires specific knowledge, patience, and technical and aesthetic aptitudes. Web fonts that have TrueType instructions tend to look very good on Windows; those without often do not.

Taking the above into account my own plan will be to select (or at least check) my fonts using FF on a Windows machine rather than on Chrome or on a Mac. For headlines it seems to be much better to go to >48px if the design allows.

Anti aliasing problem


How does the US justify its relationship with Saudi Arabia?

Question: How does the US justify its relationship with Saudi Arabia when half its population is, in essence, property i.e., slaves (women)? Besides the oil, and if that is all, how do we in the US reconcile our condemnation of Boko Haram, the Taliban, and so forth?
Comment: It's not only Saudi Arabia, but all the extreme dictatures of the thirld world that have any natural ressources have extremely good relationship with US (and all other occidental powers). They prefer to lick the ass to dictators and complain about political asylum refugee from those countries that fleds the persecution, rather than finind a real solution to the problem, because they want the natural ressorces and lots of income for short term profit.
Comment: US gov policies have many more inconsistencies. This is reflection of the fact the gov is not about to be consistent in their behavior rather than about some individuals choices and beliefs.
Comment: Please watch [Bitter Lake](https://en.wikipedia.org/wiki/Bitter_Lake_%28film%29) by Adam Curtis.
Comment: No, the US does not rely on Saudi oil, but to maintain its influence and to ensure it is freely available for the rest of the world.
Comment: Whilst women in Saudi do not have the same legal rights as men, they are far from being slaves.
Answer: Saudi Arabia is one of the few stable governments in the Middle East. Ultimately, stability is desirable- it allows those involved to produce more and consume less foreign aid and, of course, more stability means they can secure the area and avoid allowing extremist groups like Islamic State and al-Qaeda to grow. While it's true that many of their policies are seen as oppressive, this has to be taken in context with the surrounding area. Israel is another instance of a country that is supported by the US despite questionable actions- again, they exist in a volatile area and serve to stabilise it. The growth of stable, non-hostile states is a good thing in any unstable area, but especially in the Middle East.
It's also worth mentioning that there is an ultra-conservative element in Saudi Arabia, Wahhabism, which is kept from doing any real damage. The country was essentially founded that way- a deal between the Saudis and the Wahhabi. It is worth helping the Saudi Arabian government simply so they can keep a check on them and avoid them causing trouble, or even better, use their fanaticism to our advantage.
Another note is that Saudi Arabia are good trading partners. Besides the fact that stability and military ability help with this, if they keep their deals and don't default on their debts, that encourages you to keep dealing with them. So, deal-to-deal, it just makes sense.
Morality doesn't come into it that much. It never does. While we often go up against states that abuse human rights, they are also often belligerent. Morality might help some justify government action, but in reality, it's never going to be the primary motivator behind anything, especially not business.
Btw, it's important to note that the biggest arms deal in history was between the UK and Saudi Arabia, so it's hardly just the US.
Comment: One fact your are neglecting to mention is that the vast majority of violent fanatics come out of SA. How is that considered stabilty?
Comment: "t's also worth mentioning that there is an ultra-conservative element in SA, Wahhabiism, which is kept from doing any real damage." - please explain Bin Laden, who was a product of this Wahhabiism. And you might want to watch "[Bitter Lake](https://en.wikipedia.org/wiki/Bitter_Lake_%28film%29)" by Adam Curtis.
Comment: That's still stable. The governments of the world don't care as much about ideologies such as Wahhabiism compared to more overtly violent ones like what IS preaches. That's to their detriment, of course, because it's allowed some toxic ideas to grow in the middle east, but that's how it is. So they don't mind SA exporting ideas like that, because they're not directly, immediately threatening.
Comment: It's only stable in the short term.
Comment: @Joze Yeah, I've rewritten it because that bit didn't really make sense.
Comment: @Bregalad, that's better than most thereabouts. Short-term stability and not thinking of the US as the devil is good enough.
Comment: All this is, is an explanation for why western governments support them. Bin Laden was a rogue element, not an agent of their government (as far as we know, anyway). So long as the SA government doesn't actually support such things, it's not officially an issue. And when you get right down to it, they can't stop the society from producing such individuals.
Comment: "Say/do stupid things" that is an unnecessary value judgement that really doesn't contribute to an overall good answer, it makes it more partialized. I would be a good idea to replace it with "have opposing views".
Comment: Did you actually just compare Israel to Saudi Arabia?
Comment: Syria was stable as well, but did not fall in line with TPTB. So it is more than stability. It is stability and vassal status.
Comment: @paulj "Vassal status" is a very formal way of putting it. It rarely is as simple as vassal/nonvassal. Often states will be varying levels of aligned, stable and other attributes.
Answer: People forget that the United States is a global superpower that wants influence over the Middle East and proxies like Saudi Arabia can help with that. There is a Second Cold War proxy conflict between Saudi Arabia and Iran with the US supporting Saudi Arabia and Russia supporting Iran. Saudi Arabia helps the United States through proxy get back at Russia (and North Korea and the current Iraqi government who are supporting Iranian in this conflict) and fight against Iranian influence in the region that reduces the influence over the region for the United States & allies like Israel. It is basically similar to when the United States once supported the Taliban/Mujahideen to make sure the USSR did not win Afghanistan.
This is important because I am pretty sure this is how politicians and people in the US government justify giving Saudi Arabia money to themselves despite the human rights violations: internally, they justify it by saying the ends justify the means and how you don't want Iran and North Korea and Iraq to 'win', similar to how the government during the Cold War justified supported the Taliban by portraying it as heroic freedom fighting to prevent the Soviet Union from 'winning' in the region.
Comment: The question is how the US justifies it, not about the realpolitik reasons for the alliance.
Comment: @StuartF Ok should add to it, but I think that is part of it internally - they justify it by saying the ends justify the means and how you don't want Iran and North Korea and Iraq to 'win'
Comment: "It is basically similar to when the United States once supported the Taliban" The US didn't support the Taliban. They supported the Mujahideen, and some members of the Mujahideen joined/formed the Taliban. That's like saying that Turkey supported the Nazis because they were Germany's ally in WWI, and many of those Germans then became Nazis.
Answer:
Besides the oil, and if that is all ...

You are underestimating Saudi Arabia's power.
Saudi Arabia is probably one of the most (if not the most) important allies of the USA in the world.
First of all, Saudi Arabia keeps the USD most powerful currency in the world through Petro-dollar system.
Saudi Arabia is the world's largest oil exporter, and oil is priced and traded in US dollars. This means that countries that want to purchase oil from Saudi Arabia must first acquire US dollars, which helps to increase demand for the US dollar and thus strengthens its position as the dominant global currency.
Saudi Arabia has the world's most valuable corporation called Saudi ARAMCO. This company has a market capitalization of $2 trillion USD. This company controls the world's oil price.
Secondly, The Saudi Arabian riyal has been pegged to the US dollar at a fixed exchange rate since the 1980s. This means that the Saudi Arabian Monetary Authority (SAMA), the country's central bank, maintains the exchange rate between the Saudi riyal and the US dollar by buying or selling US dollars in the foreign exchange market.
By pegging its currency to the US dollar, Saudi Arabia effectively outsources its monetary policy to the US Federal Reserve. This means that Saudi Arabia's monetary policy is closely tied to that of the United States, which helps to promote stability in the global financial system. It also makes it easier for international trade and investment to take place, as businesses can transact in US dollars without having to worry about fluctuations in the exchange rate between their own currency and the US dollar.
Thirdly, Petrodollar Recycling refers to the process by which countries that export oil, such as Saudi Arabia, invest their earnings from oil exports back into the global economy, often by purchasing goods and services or by investing in financial assets denominated in US dollars.
Petrodollar recycling helps the US economy by providing a source of foreign investment that can be used to finance government debt, support economic growth, and create jobs. As Saudi Arabia earns US dollars from their oil exports, they often choose to invest these dollars in US Treasury bonds or other financial assets denominated in US dollars. This provides the US government with a source of funding for its operations and allows US businesses to access capital at lower interest rates. Additionally, petrodollar investments can create demand for US goods and services, which can help to support economic growth and job creation.
Fourthly, The Saudi PIF (Public Investment Fund)'s assets in the United States are not publicly known. However, it is estimated that the PIF has invested billions of dollars (if not trillions) in the US market. The PIF has invested in a wide range of sectors, including technology, healthcare, and real estate.
Also, Saudi Arabian private investors from the royal family hold significant stakes in US companies and real estate worth billions of dollars.
According to the US Treasury Department, Saudi Arabia held $115.8 billion in US Treasury securities as of March 2023. This makes Saudi Arabia the 10th largest holder of US Treasury securities.
So, you have to give Saudi Arabia its due share of respect.

How does the US justify its relationship with Saudi Arabia when half its population is in essence property i.e. slaves (women)?

This information isn't based on any evidence.

Besides the oil, and if that is all how do we in the US reconcile our condemnation of Boka Haron, the Taliban, and so forth?

What do you mean by "we" - Are you talking about the US population or the US government?
If you are talking about the US government, then the answer is already given above.
If you are talking about the US people, then you have to take into account the allies of the USA as the USA cannot stay as a superpower without its allies.
Comment: This doesn't answer the question!
Comment: @StuartF, Sure, it does.


Rust macros: how to create a derived identifier?

Question: It looks like for identifiers I can either use an existing token of ident kind, or create a fixed / literal identifier.
But how to create a "derived" identifier? Meaning, having an existing token $id, I want to create some derived identifier like $id_suffix - exact name doesn't matter, really - as long as it's a new one, and deterministically derived from $id.
Comment: How do you want to use that derived identifier? If you want to use it outside the macro, then it is impossible by design). If you want to use it inside the macro, then you probably don't need to derive it from the existing token, because the macro system ensures that there will be no collisions. Can you show us some code for how you would use a hypothetical `derive!` operation?
Comment: @Boiethios That question is itself a duplicate.
Comment: @SebastianRedl I know, but I'm not satisfied with the answer you linked: `concat_idents` is a nightly feature that is not intended to be stabilized. The answer should begin with: "No, because that's unhygienic".
Comment: The first two duplicates show a workaround by using the mashup crate.
Answer: You can't. It's a limitation of the macro system.
There's a special macro that lets you create an identifier, but you can't use it in useful locations like the name of a new variable.
Comment: Hmm, sound like a serious deficiency. Is this deliberate?
Comment: The first two duplicates show a workaround by using the mashup crate.
Comment: Actually, I figured out a possible solution - at least, for my use case. I can create an inner module, named after an identifier, passed into the macro - $id:ident - and then put any number of "derived" types in it. Already tested it, seems to be working.


Is an AI improving itself count as a Halting Problem paradox?

Question: I am writing a story for school about a human level AI. I want to have him be able to optimize and improve upon its own AI, but does this breach the Halting Problem? Thanks in advance.
Answer: No, it is not the Halting Problem.  The halting problem is very specific and tied to the exacting specifications of the Turing machine.
The halting problem states that it is impossible to write a program which can determine if any other program will eventually halt or reach an infinite loop.
There could easily be an issue if the AI first had to prove that a change was an improvement before going forward with the change.  Such a proof could easily require solving a halting problem for many definitions of "an improvement."  However, the AI is under no such obligation.  In fact, one of the major points of AIs is their ability to find solutions without needing to have hard proofs in place first, just as we can pioneer without proofs that our pioneering will eventually pay off.
Comment: Also, the "problem" in the Halting Problem is the **any** part of "determine if any other program will eventually halt". For certain programs, it's trivially easy to tell if they halt or not. In fact, for most practical programs it should be possible to automatically determine if they halt. The Halting Problem only says you're not able to get 100% accuracy on the task. It says nothing about getting 99% accuracy and mislabeling 1%, or being perfectly accurate on 95% of the case and 5% of the time returning "not able to process".
Comment: Cort has the right idea here, and it is the fundamental problem of AI research -- how do you define when an AI has learned something well enough that it can now be on its own? Of course, that's the same problem we have with raising human children. Sometimes, the only way to learn is on-the-job training. ;-)
Answer: Remember, the AI doesn't want to halt!  If it halted, it would be dead!
There are halting problems for the AI itself - in that as it attempts to optimise and self-improve, if it makes a mistake (puts in a bug) it may actually 'lobotimise itself' or do more damage than good. This is only true if it doesn't have the ability to fork or clone. But it's not just the halting problem - it's the general class of optimisation problems and, mainly, a decision problem (how do I know that this specific revision is better than the current revision?). Halting problems are a subset of decision problems.
If the AI can fork, then it can test multiple hypotheses without much damage to itself (although there are resource costs), and as long as it has some ability to measure self-improvement (decision problem: How can I measure if this specific hypothesis is better than the current one), and know what self-improvement is (optimisation problem: what does 'self-improve' actually mean to the AI? More knowledge? Swifter reflexes? Better ability to problem solve? Can subsequently revised AI's change the definition? If so, how do I know I'm not heading down an optimising cul-de-sac?) then it can hand the 'reins over' to the best result(s).
This is (roughly) how Genetic Programming / Genetic Algorithms work, and it would most likely one of the central strategies for how an AI would self-optimise.
Philosophically, what does individuality mean to an AI? Spawning a million genetically related offspring, testing them, and then selecting the most optimal to carry on the next generation isn't really the behaviour of an individual so much as some sort of virtual community. But to risk operating directly on one's own brain is something that an AI would not choose to do, as it is so much more able to clone/fork and modify.
So halting problems are just one of the many pitfalls that the AI must have to contend with. They aren't the largest problem - and there are ways around it, such as just killing off possible mutation forks that don't resolve within some metric.
Comment: This was great!  This solves so many problems and gives me a lot of ideas.
Answer: The halting problem is "whether the program will finish running or continue to run forever." (https://en.wikipedia.org/wiki/Halting_problem)
I think it could get to a point where it can't improve anymore (which would take a very long time). But, it would keep changing since, there is no way for it to tell if it has reached its max, so it would keep going and changing stuff. Like people don't know if they have made something the best it could be so they keep changing stuff (if you believe the human brain is a Turing machine since it's based on the same physics).
So, I don't think it will stop, it just might un-improve (not sure if that's a word) or just keep going up and down forever. This would make it not be a paradox since even if it's not effectively changing it is still changing which means it won't stop running.


Are Samvada sooktham and aikyamathya sooktham the same?

Question: What is the difference between Samvada sooktha and Aikyamathya sooktha?
Answer: 'Samvāda' (संवादः) means conversation. In the Rig Veda samhitā, there are around 4 or 5 famous long conversations. Examples are:

Yama and Yami (RV 10.10) starting with "ओ चित्सखायं सख्या ववृत्यां"
Urvashi and Pururavā (RV 10.95) starting with "हये जाये मनसा तिष्ठ घोरे"
Devas and Agni (RV 10.51) starting with "महत्तदुल्बं स्थविरं तदासीत्"
Saramā (the female dog of the Devas) and Paṇis (RV 10.108) starting with "किमिच्छन्ती सरमा प्रेदमानट्"

'Aikamatya' (ऐकमत्य) means 'unity of thought'. In Rig Veda, typically the last suktam RV 10.191 is called the 'Sāmmanasya' (सांमनस्य) suktam, because it talks about having a consensus and unity in thought, intention, word and action.
It begins with "सं समिद्युवसे वृषन्नग्ने". The central mantras for unity are the second onwards:

सं गच्छध्वं सं वदध्वं सं वो मनांसि जानताम् । देवा भागं यथा पूर्वे संजानाना उपासते ॥
Move in unity, speak in unity, fully know each other's minds (i.e. be of one mind). Just as the Devas in ancient times being of one mind, obtained their share of the yajna.
Comment: here The meaning of Sam bliss that is apt.. because  unity is apparent or literal meaning.. if you replace bliss instead of unity you will get beutiful meaning. Lets move in bliss, speak out of bliss, let our mind stay in bliss. Like the gods who had obtained their bliss after doing required upsena.. there is no mention of share of yajna as you had stated is available in the verse
Comment: @PrasannaR The prefix 'sam' does not have the meaning of bliss, precisely because it is a prefix. It is attached to the verbs in the mantra (संगच्छध्वं, संवदध्वं, संजानतां). You cannot just dump random meanings on mantras as you like. It has the meaning of 'together' or 'collected'. I have strictly given Sayanacharya's explanation. He says, for example, परस्परं विरोधं परित्यज्य एकविधमेव वाक्यं ब्रूत for 'सं वदध्वं'. And for 'देवा भागं' he says, यथा पुरातनाः देवा ऐकमत्यं प्राप्ता **हविर्भागं** उपासते यथास्वं स्वीकुर्वन्ति । No word in the entire suktam has any meaning of "bliss".
Comment: let me take the second part devas with one mind got their individual havirbhagam.. statement.. how does it relate samanya mansya living with unity of mind.. now unity of mind in getting havisu.. kriya.. unity of mind of people where no action is invovled.. what does it convey There is no relation between the two statment one is describing unity of devas act of receiving, does it mean to convey samnya mansu should be united in mind like devas while getting the  dana.. that is not coming out clearly from literal meaning of syanaacharya
Comment: @PrasannaR It is an analogy. The mantra is using the analogy of Devas being of one mind to successfully obtain their fruits of the yajna, to say that if we are also united we will be successful.


Enchanting with the Black Star

Question: Can the Black Star be used repeatedly to enchant items? Assuming of course that it is re-filled with a soul between applying enchantments.
Answer: Yes. Yes it can.
That's kind of the point.
Comment: Yeah, that makes it awesome. Alternatively it could have only been useable for recharging enchanted weapons, in which case it is still useful, but much less so.
Comment: That's actually a great way to raise the Enchanting skill, if you use soul trap enchanted weapons to kill things and refill the weapon used after every kill/soul trapped in the Black Star. That's if you don't have the unofficial patch, which "fixes" the Black Star. It helps of course when raising Enchanting to have the Mage Stone active and at least a  simple rested bonus. It makes this method considerably faster.

Enchanting with the Black Star


Keeping constant shapefile symbols

Question: I am using ArcGIS 10.1, I am just wondering if there is a way to maintain constant the selected symbols for some shapefile. The scope is to use the same shapefile with the same chosen symbols also in other map projects avoiding to select every time again the symbols.
Answer: To preserve symbology you can right click on the layer in ArcMap and Save as a Layer. This creates a lyr file that references the source shapefile. This file needs to go with the shapefile, but it can be loaded in different map documents. You can change the source of the layer in the layer properties to switch different shapefiles if you need to.
http://desktop.arcgis.com/en/arcmap/10.3/analyze/modelbuilder/creating-a-layer-symbology-file.htm
Answer: I love Layer Files and Packages, but I usually reserve their use for Layer Groups and not individual Layers (barring some situations with extensive labeling sub-classes). A Quick simple way to add a new layer to the map with pre-defined symbology ...

Open a blank Map
Add the data you want to symbolize
Double Click the symbol in the Table of Contents and modify to your liking
Before Closing the 'Symbol Selector' Click 'Save As' and name the symbol EXACTLY as the layer name appears in the Table of Contents.
Close the map without saving.
Open a new map and add the previous data.

If the feature class being added to any map has a Layer Name name that matches a pre-defined style ... that layer will be added to the map using that pre-defined style.
Some may argue that this isn't portable and I'm not sure if that was a requirement. But, if you need portability, look into 'Exporting Map Styles' to take your pre-defined symbolgy with you wherever you go.

Keeping constant shapefile symbols


sonar for .net 4 in ccnet

Question: hi all
does sonar support .net 4?
if so how can i integrate sonar with cruisecontrol.net (ccnet) with out using maven o anything else.just sonar and ccnet..
thanx
Answer: Take a look at the wiki page mentioned before and if you encounter any trouble, feel free to register to the user mailing list and ask for help (see http://www.sonarsource.org/support/support/).
For now, even if sonar 2.6 may use ant or a simple command line to trigger the analysis on a java project, maven is mandatory for a .net project. This will change pretty soon. I am working with the guys from sonarsource to give birth to a new "C# plugin"... First version probably at the beginning of this summer.
For now, only solution I see to integrate sonar with ccnet is to launch a maven command line from ccnet.
Answer: I documented my experience setting up Sonar with my C# projects.  I used TeamCity instead of CCNet, but that's a small portion of the overall setup, so should be straightforward to configure.  http://www.wrightfully.com/setting-up-sonar-analysis-for-c-projects/

sonar for .net 4 in ccnet


How to prove the language L that contains all Turing machines M where L(M) is recognizable is decidable?

Question: How to prove that $L$, where
$$L = \{\langle M\rangle: L(M)\text{ is recognizable}\}$$
is decidable? What about $\bar{L}$?
Answer: I claim that $L$ is decidable and I will construct a Turing machine to decide $L$.
Let $M$="on input $\langle M' \rangle$
$\quad ACCEPT$ "
Why does $M$ decide $L$? $M$ takes a description of a Turing machine as input and accepts, that is $L(M)=\{ \langle T \rangle \mid T \text{ is a Turing machine}\}$. If the input is not a description of a Turing machine, $M$ rejects. That is, $M$ always halts*.
Now $L=\{ \langle M \rangle \mid L(M) \text{ is recognizable}\}$, but by definition a language is recognizable if there is a Turing machine that recognizes it. Hence $L$ is also the language of all descriptions of Turing machines. Since $M$ always halts and $L(M)=L$, $M$ decides $L$, so $L$ is decidable.
Since $L$ is decidable, $\bar{L}$ is certainly decidable too (on any input we can run $M$ and invert the output, we accept if $M$ rejects and reject if $M$ accepts.

*Note we implicitly assume that a Turing machine can determine if its input string is a description of a Turing machine or not. This is generally a safe assumption since we are free to choose the encoding of the Turing machine and it is certainly possible to choose an encoding such this is the case (e.g, enumerate all Turing machines $TM_1, TM_2,...$ and let $\langle TM_i \rangle=1^i$, that is a string of $i$ ones, then any string of ones can represent a Turing machine).


Ways to connect to the network

Question: I have my router setup downstairs and I have a blu ray player upstairs that I want to connect to the network.  I have read about Power over ethernet and have also thought of running a long network cable to the router but are there any other options to connect the blu ray player to my home network?
Comment: You're thinking of powerline networking, not power over ethernet (PoE). They're basically the opposite of each other.
Answer: If your downstairs router is also an 802.11 (Wi-Fi) access point, then you could get an adaptor that allows any Ethernet device to get onto a wireless network. But that's not the best choice as network architecture goes. Generally you should use wired network connections for stationary devices, and reserve your wireless bandwidth for laptops and other mobile devices. Long term, running proper Ethernet cable through the walls/floor/ceiling is the best choice.
Comment: While a powerline ethernet will work for most cases, a bluray player will more than likely choke it.  A cable is the best solution.

Ways to connect to the network


What's the difference between a שִׁפְחָ֥ה and a אָמָ֖ה?

Question: When Hagar flees before Ishmael is born, she is referred to as a שִׁפְחָ֥ה . When she and Ishmael are expelled together, she is a אָמָ֖ה.
What is the difference between these two kinds of female servant?
Answer: The first difference is the level of status and the resulting work they do. The Kesav VeHakabbalah in Parshas Mishpatim 21:7 notes:

לאמה. המשרתת תקרא אמה, והיא לרש"פ מדרגה חשובה מן השפחה, שהשפחה עלי' מוטל כל עבודות הקשות והפחותות שבבית (מאגד), והאמה אין עלי' רק עבודות הקלות וההשגחה על סדור ותקון הבית
As a maidservant - Someone in service is called a maidservant (amah) and it is a level more important than that of a shifchah, since a slave girl (i.e. a shifchah) is assigned all the difficult and menial chores in the house, whereas the maidservant (i.e. the amah) only has to do the light work and oversee the order and repair of the house.

Which in the context of your question makes sense as Hagar, the daughter of Pharoah was initially given over to Avraham as a servant following the miracles that happened for Sarah when she was in his custody. Bereishis Rabbah 45:1 famously concludes there that Pharoah reasoned:

אָמַר מוּטָב שֶׁתְּהֵא בִּתִּי שִׁפְחָה בְּבַיִת זֶה וְלֹא גְבִירָה בְּבַיִת אַחֵר
As he (Pharoah) said, "It is better that my daughter be a servant in (Avraham's) this house than a mistress in another house."

However, when she was sent away, she was Avraham's wife and so arguably, her level of work may have been lessened and therefore it is fit to call her an אמה.
Alternatively, the Netziv on Parshas Lech Lecha 16:2 writes:

בא נא אל שפחתי. לא כדבר רחל ליעקב הנה אמתי בלהה. דאמה משמע לא כשפחה ממש שהיא קניית הגוף אלא סרה למשמעתה. כמו אמה העבריה והיינו דאע״ג שלבן נתן אותה לשפחה מ״מ מאז מסרה רחל אותה ליעקב היתה בתורת אמה. משא״כ שרה התנהגה גם אח״כ בתורת שפחה כמו שיבואר
Consort with my maid - Not like Rochel said to Yaakov, "Here is my maidservant (אמתי) Bilhah". Since the implication of "Amah" is not like "Shifchah" exactly, which is the purchase of her body, but rather to turn her over for absolute obedience, like a Hebrew slave (אמה העבריה) and that's why even though Lavan gave her over as a shifchah, nevertheless from then Rochel gave her over to Yaakov with the laws of an amah. Whereas conversely, Sarah treated her (Hagar) even afterwards as a shifcha, like we explained.
Answer: אָמָה usually refers to a Jewish girl who was sold into slavery which she can only be until the age of twelve. (אָמָה הָעִבְרִיָּה)
שִׁפְחָ֥ה usually refers to a non-Jewish woman (can be any age) who in slavery (שִׁפְחָה כְּנַעֲנִית)
The Seforono says she is called שִׁפְחָ֥ה  before Ishmael is born because she had not yet been freed at that time. Possibly  she is called an אָמָה later on because she had some degree of freedom at that point in time. At least enough not to refer to her as a שִׁפְחָ֥ה anymore.
However, there must be other reasons as well because by Bilha and Zilpha the Torah also alternates between calling them שִׁפְחָ֥ה or אָמָה. They continue to be referred to as שִׁפְחָ֥ה even after being called אָמָה. (They are also referred to as wives and other titles  earlier and later on. The reasons behind the some of those varying titles have explanations given  by the basic commentaries on Chumash)
Rav Yaakov Kamenitsky who was a major expert on dikduk writes on these pesukim about Hagar  similar to what I write above that the question asked in the OP but concludes that this needs further research.  He also points out that although in the Mishna and Gemora אָמָה always means Jewish girl in slavery  and שִׁפְחָ֥ה always means non-Jewish women in slavery there is one place in Chumash  where אָמָה  refers to non-Jewish women slaves   so apparently there is further nuance in when and why  these words are used.

What's the difference between a שִׁפְחָ֥ה and a אָמָ֖ה?


Cannot add layers to map canvas from spatial queries against a PostGIS database connection in QGIS

Question: I am having trouble adding the results of spatial queries against a PostGIS connection to the map canvas in QGIS.
GIVEN:

I am able to add the results of queries against my PostgreSQL/PostGIS connection -- as long as the queries do not contain any spatial statements (e.g. ST_Union, ST_Buffer, etc.)
The "Execute SQL" dialog DOES return the correct results of the spatial query but when I load the layer to the map, there is an error ("Unavailable layer")
QGIS version = 3.30.3
PostGIS_version() =  3.2 USE_GEOS=1 USE_PROJ=1 USE_STATS=1

I've already tried making sure to include a unique key column in my query - as I thought that maybe it would be a requirement for the layer to display. This is my query:
SELECT 1 as id, ST_Union(ST_Buffer(1609*20))
FROM highways
WHERE name = 'US Route 1' AND state = 'MD';

This is what the added QueryLayer looks like when I attempt to add it:
Answer: Nevermind - it seemed that the QGIS query interface does not like the trailing ;.
Removing the semi-colon seems to resolve the issue.


Whole Brain Emulation - what is a being

Question: As we approach the age of artificial intelligence, I was curious about whole brain emulation. If a brain and consciousnesses is uploaded to a computer, is it still the same person, even if it was programmed to be the same person. I.e. if a personality is uploaded to a computer and trained to think it is the same brain, is it?
Comment: If not that question, we've got quite a few questions on uploading brains. If you're confident yours is answerable and nothing like those please comment and @virmaior me so that I can see that and re-open the question
Answer: If you copy only the person's "hard-disk", i.e. all neural nets of the brain with their current weights, the whole sensory feedback from inside and outside the body is lacking. Because this information has to be fed back in a permanent process to the brain, the clone will not have the same self-experience like the original person.
How do you consider to train the clone "to think it is the same brain"? The same brain: What does this mean and how do you represent this concept? As soon as you start the training, the clone's brain it is no longer the same brain.

Whole Brain Emulation - what is a being


Is it possible to link my Careers 2.0 account, Stack Overflow, and Programmers Stack accounts together?

Question: I believe that my SO and Programmers accounts are already as linked as they get, but the Careers one is a different thing entirely, it seems.
Comment: Are you using the same OpenID provider on Careers 2.0?
Comment: When I set up the Careers account I asked them if I could link with my existing SO account.  They said no, to create a new one, then link them after. So, that's where I'm at.  I am using a different ID since I used Google as my provider for SO and Programmers.
Answer: Fortunately, you can have 2 OpenIDs associated with your Careers account, and any number of them associated with your Stack Exchange account.
So if you're using two different IDs in two different places right now, just add them both (to your account here for sure, but slapping them both on Careers won't hurt either).


How can I revert to the old optimized battery charging regime on Sonoma?

Question: I keep my M1 Macbook laptop plugged in most of the time, and have had it set to optimized battery charging for a long time. I've noticed two versions of the optimized battery charging regime.
Regime 1: 7-10 day cycle between 81% and 76% without active use of battery
In this regime, the battery charge level cycles between 81% and 76%, starting at 81% and then gradually dropping to 76% over a period of about 7 to 10 days, without the battery actively being used to power the computer (all the computer's needs are met through the power drawn by being plugged in). This rate of power drop is comparable to what I have seen when the computer is turned off and not plugged in, so it just seems to reflect the natural rate at which batteries leak charge.
When the charge level drops to about 76%, the battery charges back up to 81%, and the cycle starts again.
Characteristics of this regime:

Maximum state of charge seen regularly: 81%
Minimum state of charge seen regularly: 76%
Average state of charge seen regularly: 78.5%
Calendar time for one charge-discharge cycle: 140 to 200 days

Regime 2: daily cycle between 100% and 80% through active battery use
In this regime, the battery charge starts at 100%, stays there for a while, then starts actively being used (even while the computer is plugged in) till it falls to 80% over a period of about 2-3 hours. Then it stays at 80% for a while, and then it starts actively being charged back up to 100% (that takes about an hour). This cycle happens about once a day, though it may be a little less frequent.
Characteristics of this regime:

Maximum state of charge seen regularly: 100%
Minimum state of charge seen regularly: 80%
Average state of charge seen regularly: around 90% (the exact value depends on how long it stays at 80% versus 100%)
Calendar time for one charge-discharge cycle: 5 days

The situation on Ventura, prior to upgrading to Sonoma
Prior to upgrading to Sonoma, I observed the following:

If I kept my computer plugged in continuously, then it would stay in regime 1.
If I unplugged and replugged my computer at least once a day, even for a few minutes (for instance, when moving it from one location to another), it would stay in regime 2 (basically every time it would unplug, it would try to charge back to 100% when next replugged, and then at least once a day it would bring the charge back down to 80%).

For the period from the end of February 2023 till I upgraded to Sonoma in the end of October 2023, I kept my computer in regime 1 by keeping it plugged in continuously (I might have unplugged in briefly once or twice when cleaning my table, but the duration of unplugging was short enough that it didn't trigger regime 2). The number of charge-discharge cycles as reported in the Power section of the System Report went up from 46 to 47 over the period -- an increase of just 1, which is as expected based on the estimated above. My OS over this whole time period was Ventura.
The situation after upgrading to Sonoma
After upgrading from Ventura to Sonoma (which I did over two months ago), even though I've kept my computer plugged in continuously, it has stayed in regime 2. Over this period, the number of charge-discharge cycles went up from 47 to 66, an increase of 19 over a period of about 67 days. This is even faster than the "one charge-discharge cycle every 5 days" would suggest, though still within range so I think that description of the regime is approximately accurate.
Is regime 1 better, and if so, how can I get back to regime 1 or something comparably good?
As of now, my battery reports being at 100% capacity and in good health.
My understanding is that regime 1 is strictly better in terms of maintaining a state of charge that is closer to 50% and also in terms of having fewer charge-discharge cycles. (If this reasoning is wrong, I'd like to know that too). So, if possible, I would like for the battery to return to regime 1, or something similar. My question is: how can this be done?
I use my laptop an average of 8-9 hours a day (estimate based on the screen time app) so actually unplugging it would use the battery much more than even regime 2 does (though it might help with keeping the average state of charge a bit lower, my understanding is that the extent to which it'll hurt charge-discharge cycles would be a bigger consideration). So I'd really like to keep it plugged in and rely on optimized battery charging, and I'm looking for ways to get back into regime 1.
Answer: If you're doing 19 cycles in 67 days, then that's 0.28 cycles per day, so you'll hit 1000 cycles in around 10 years.
In short: you're over-thinking and over-managing this.
The M-series runs much cooler and with much less power than the previous models. Heat is the biggest enemy -- much more so than any battery management regimes you may implement.
Comment: Strong agreement. I believe by not depleting your battery the OP will cause the "battery not being used" calculation to suppress charging more and more strongly irrespective to the "regimes". I wonder if Apple made this change to ensure that they can rotate different cells into lower discharge state given the small band of charging for these seldom used batteries.


Flying mosquito problem

Question: Let's say there is a car and its doors and windows are closed. Basically it is a closed space inside. There is a mosquito hovering right in the center of closed space of the car. While doing so the mosquito is not in physical contact of the car.  Now, a driver starts the car and accelerates quickly. Question is, would the mosquito smash into the rear glass or would it continie to hover at the center of the car?
Comment: Does this answer your question? [A fly in an accelerating car](https://physics.stackexchange.com/q/53475/)
Comment: You can always try an experiment with soap bubbles in the car. Kids love it!
Comment: My experience is that the mosquito will end up hovering somewhere behind my ear, yet I'm never able to swat it...
Comment: Question is, would the mosquito **want** to smash into the rear glass ? (I.e. it's not about Physics, but rather about mosquito intentions)
Answer: General idea: The air in the car accelerates with it. Air is compressible, so, during acceleration, it's denser on the rear than on the front (similarly, in a rotating cylinder, there is a radial density gradient, see this answer).
Assume constant acceleration: this is indistinguishable from a "horizontal" gravitational field (see the Equivalence Principle) that creates a stratification in density, analogous to what happens in our atmosphere, as given by hydrostatics.
The mosquito (or, for simplicity a "dust particle"), will move because the air must find a new hydrostatic equilibrium that is not just uniform density. Since air must change its density configuration, this gives rise to a transient current because of the continuity equation. The dust particle will be advected by such a current.
This effect is too small to be observed in a car but gets proportionally bigger by increasing the acceleration and/or the length of the vehicle. Details on the "accelerating" equilibrium (i.e. equilibrium in a gravitational field) are discussed here.
Rough estimate of the effect: Assume, for mere convenience, that your vehicle acceleration is $g\approx 9.8 m/s$. We know that (approximatively) air density changes by 10% in 1 km of elevation, see the Pressure-Elevation graph. Assuming ideal gas law for air (and constant temperature everywhere), the same is true also for the density (i.e. density is proportional to the pressure).
Therefore: if your vehicle is undergoing constant $1g$ acceleration and is long $1km$, the air in the front is 10% less dense than air in the rear. This assumes hydrostatic equilibrium, which is reached after an initial transient is damped (air is a bit viscous). The fine details of this transient depend on the exact dynamics: you have to solve the hydrodynamic equations for a gas in an accelerating box, for a given prescribed acceleration and shape of the box. Therefore, the transient phase depends on the jerk, namely on how you go from zero acceleration to constant finite acceleration and finally reach a new hydrostatic equilibrium.
Of course, your car is not 1km long and can not accelerate at $g$. However, you can rescale the result.
For example, let's say it's a bus and it's 10m (again, let's keel the unrealistic acceleration of $g$).
Hence, from the front to the rear density changes by $10\% \times 10m/1km = 10\%/100=0.1\%$: nearly 1 out of 1000 "air particles" that were on the front now it's on the rear (very roughly). There is a net air displacement from the initial equilibrium (uniform air density) to the "accelerating" equilibrium. Assuming that your mosquito is not a mosquito but a "dust particle", we can conclude that it has been displaced accordingly. This displacement is not noticeable because the dust particle will undergo random Brownian motion. However, the nature of such tiny displacement is not stochastic (like Brownian motion) but systematic, due to the fact that acceleration modifies the hydrostatic solution of the air in the car, which is not just uniform density. Now, by changing the acceleration to a more reasonable one, the result scales proportionally and becomes even smaller.

Flying mosquito problem


Image folder - report of color profiles

Question: I am looking for a tool to scan a folder and create a report of color profiles of each image. The report should be a list with 1st column "File Name" and 2nd column should be "Color Profile". We have a hundred thousands images in which some had been scanned and attached with a cmyk color profile which cause some problems when trying to display them in a software we're using.
Comment: Please add some more details to the question. Which operating system are you using, and Which extensions are the file names?
Answer: This can be done using a combination of ImageMagick and shell commands. I'll use Windows batch since there was no specification of an operating system, but it can be done similarily with bash. I used the .png and .jpg extensions, and you can add to the list depending on your files.

Install ImageMagick and include the directory in the Windows PATH variable
Create an empty batch file in the images directory, getColorReport.bat for example
Edit the file and paste the following lines:

@echo off
set "TAB=           "
echo File Name%TAB%Color Profile > color_report.txt
for %%f in (*.png,*.jpg) do (
echo. >> color_report.txt
<nul set /p =%%f%TAB% >> color_report.txt
identify -format %%[colorspace] %%f >> color_report.txt
)
color_report.txt

Save and run in command line. The result should look somewhat like this:

File Name           Color Profile

xx.png           sRGB
yy.png           sRGB
12345.jpg            CMYK
etc.jpg          sRGB

If you'd like to filter out the CMYK results, use the following command after the first file is generated:

findstr "CMYK" color_report.txt > cmyk_list.txt && cmyk_list.txt

Image folder - report of color profiles


reference cell value and its format

Question: I have a workbook with a "master worksheet" and 4 worksheets that reference all the information in the master.  The purpose of the master sheet requires resorting on a quarterly basis.  My issue is the format of the referenced cells on the other 4 worksheets. The resort changes the position of the referenced information but it does not pick up all the formats which leaves me with miss matched formats between the master and the other sheets.  Can I use a function to reference a cells value and its formats?
Answer: To specifically answer your last question on whether you can reference a cell's format, the answer is yes, by using the CELL function in your formula.
 =CELL("format", A1)

The values that this function returns are listed on this page:
http://www.techonthenet.com/excel/formulas/cell.php
Answer: You could try putting together a hack macro that resets your cell references.  If the position changes you'll need to get Excel to locate whatever column/row that you are interested in using some sort of search.
Another way is to leave the master spreadsheet alone and recreate the 4 other guys each time you get an updated master, all with VBA.
Answer: I think I have found a way around it --

Copy source cell
right click, paste special, use "Linked Picture"

the catch is:
the result will only show the area within the source cell. i.e if your source cell's text exceeds the width, it will only show the parts that's in the area of the source cell. just ensure that your source column is wide enough and it'll be ok
I'm using MS 2010 :)
hope this will be helpful!
Answer: This may look a little cumbersome, but it is fairly quick, especially for keyboard users. Maybe MS will come up with an option to paste links WITH formatting soon.  But this method also still allows content of formulas - NOT original text to be searchable, as well as accessible for the blind and others who use screen readers, whereas pasting as a picture does not.
First, Copy Formatting

Hold down Ctrl and press A three times (pressing A the first time selects all text; the second time it selects the entire sheet; the third time, it selects the formatting)
A. Then press Ctrl+C to copy
Paste it into the new sheet with Ctrl+V.  Although this TEMPORARILY keeps the text as-is, you have now pasted any cell-sizing, borders, fill, font preferences, and so forth.

Next, Delete Cells With Extraneous Data

Select blocks of cells that may have data unnecessary to the new sheet or workbook
Where possible, delete entire rows and columns.  One or more rows can be quickly selected by highlighting one or more cells within that block of extraneous data, then pressing Shift+Spacebar
Alternately, select a group of columns by highlighting one or more cells and pressing Ctrl+Spacebar
Delete those cells by pressing Alt, and while letters still appear along the top, press E (edit).  On newer versions of Office, a message will appear telling you to continue typing. Then press D for Delete. This is the old keyboard shortcut to delete cells, and it still works in Office 2016 (thank you, Microsoft!)

Note: If you are not deleting one or more entire rows or columns, you will be prompted to choose which direction you want to shift the remaining cells
Now Delete All Data to Make Room for Links to Original Spreadsheet

Press Ctrl+A (just once this time)
Press Delete

Finally, Select and Link Desired Data

Back to the original spreadsheet, select and copy the data you wish to link to, noting that you may be selecting blank cells in the upper left.  This is fine
Go to the first desired cell on the new sheet (remember, it may be an empty cell), and choose Home > Paste > Special and choose to Link the data
If you accidentally pasted in the wrong spot, note where the top left cell should be, then Delete or Ctrl+Z (undo), go to that cell, and Paste > Special > Link again

reference cell value and its format


In Roll for Shoes Prison Module, how much hp should each character have?

Question: The "Prison Module" module (given out free in 2020) offers a variant rule for Roll For Shoes involving wounds and scars: you take a wound when you are attacked, hit by a trap, or fail a dangerous action, and if you take a second wound in the same place, it becomes a scar that cannot be healed anymore. It says that if you take as many scars as you have HP, you die. However, I cannot find in the module anywhere how much HP you have. Should I just have them roll a d6? Do I set an HP level based on their class? Or what was the intent here?
Comment: FWIW, I can confirm that the PDF apparently doesn't say or even hint anywhere how many HP characters should have, even though the paragraph at the end of the wounds and scars rules kind of sets the expectation that it should. Maybe something got lost in the editing?
Comment: @IlmariKaronen Good to know i'm not just missing something obvious :) I am now wondering if maybe this system came from somewhere and only half of it got put in or something...
Answer: I spoke with the creator of the module on facebook; he said he'd set it to about 3 or 4, because the module is meant to be survivable easily for new players. Err on the side of 4, and there are optional bandages available later in the module that can restore a wound or two.


Example of delayed expansion in batch file

Question: Can someone give me an example of where a batch script would act differently with or without delayed expansion?  Are there any situations where you would NOT want to use delayed expansion? Thanks.
Answer: Look at the following examples...
Example 1: The following code DOESN'T use delayed expansion, so the variables in the for loop are expanded only one time. This means that %Count% will always expand to 0 in each iteration of the loop, no matter what we do to it with the set command:
@echo off
set COUNT=0

for %%v in (1 2 3 4) do (
  set /A COUNT=%COUNT% + 1
  echo Count = %COUNT%
)
pause

So this script will output:
Count = 0
Count = 0
Count = 0
Count = 0

This is not how this loop is supposed to work.
Example 2: On the other hand, if we use delayed expansion, we have the following script, which will run as expected.
setlocal ENABLEDELAYEDEXPANSION
set COUNT=0

for %%v in (1 2 3 4) do (
  set /A COUNT=!COUNT! + 1
  echo Count = !COUNT!
)

pause

and, as expected, it will output:
Count = 1
Count = 2
Count = 3
Count = 4

When you use the ENABLEDELAYEDEXPANSION, and expand a variable using ! instead of %, the variable is re-expanded each time, and everything works as it's supposed to.
Comment: Good examples. But even better would be using `set /A COUNT=COUNT + 1` or shorter `set /A COUNT+=1` to demonstrate that within an __arithmetic expression__ variables can be referenced with just their names. An __arithmetic expression__ is the string after `set /A`. The help output on running in a command prompt window `set /?` explains delayed expansion on an __IF__ and a __FOR__ example and also special variable parsing in arithmetic expressions.
Comment: It worth clarifying that the expansion happens when a line is parsed, and in the case of blocks delimited by parentheses (e.g. `if` blocks) the whole block counts as a "line" ([source](https://superuser.com/questions/78496/variables-in-batch-file-not-being-set-when-inside-if)).
Answer: I wanted to add a great example on how "EnableDelayedExpansion" (EDE) can be useful outside of the ubiquitous FOR loop examples.
Here is a line of earthquake data that I wish to parse (I call it it 1line.txt)
ak_11574812 2015.04.29.193822 62.9525    -148.8849    1.0   9.5     1   49km S of Cantwell, Alaska
The problem I ran into was that last segment of this line does not always start at the same column number. So I needed to create a flexible SET command that will accurately pluck out the last segment of this line.
ECHO OFF
setlocal enableDelayedExpansion
set where=72
set /p line=<1line.txt
set locate=!line:~%where%,28!
echo %locate%

EDE allows me to place a variable (where) inside another variable (line).  EDE will translate the variable bracketed by % first, then process the variable bracketed by ! and (in this case) push out the results into the "locate" variable.
Answer: Max's answer gives an example of where a batch script would act differently with or without delayed expansion.
For the sake of completeness, let's answer another part of the question and show a situation where you would NOT want to use delayed expansion when your data contain an exclamation mark ! (and show two ways of processing such data):
@ECHO OFF
SETLOCAL EnableExtensions DisableDelayedExpansion

  set "_auxFile=%temp%\%~n0.txt"
  rem create multiline sample file
  >"%_auxFile%" ( for /L %%G in (1,1,3) do echo line %%G is 100%% valid! Sure! Hurrah!)
  rem create one-line sample file
  >"%_auxFile%" echo this line is 100%% valid! Sure! Hurrah!

  echo(
  echo --- file content
  type "%_auxFile%"

  echo(
  SETLOCAL EnableDelayedExpansion
    echo --- enabled delayed expansion chokes down unescaped exclamation marks^^^! "^!"
    for /F "usebackq delims=" %%G in ("%_auxFile%") do (
      set "_auxLine=%%~G"
      echo loop var=%%~G
      echo _auxLine=!_auxLine!
    )
  ENDLOCAL
  echo(
  SETLOCAL DisableDelayedExpansion
    echo --- toggled delayed expansion works although might be laborious!
    for /F "usebackq delims=" %%G in ("%_auxFile%") do (
      set "_auxLine=%%G"
      echo loop var=%%G
      SETLOCAL EnableDelayedExpansion
        echo _auxLine=!_auxLine!
      ENDLOCAL
    )
  ENDLOCAL
  echo(
  SETLOCAL DisableDelayedExpansion
    echo --- keep delayed expansion DISABLED: use CALL command!
    for /F "usebackq delims=" %%G in ("%_auxFile%") do (
      set "_auxLine=%%G"
      echo loop var=%%G
      call :ProcessVar
    )
  ENDLOCAL

  rem delete the sample file
  del "%_auxFile%"
ENDLOCAL
goto :eof

:ProcessVar
  echo _auxLine=%_auxLine%
  echo WARNING: neither !_auxLine! nor %%G loop variable is available here!
goto :eof

Note that above script shows proper ways of escaping

% percent sign by %% doubling it (delayed expansion does not matter), and
! exclamation mark if delayed expansion is enabled:

"^!" if enclosed in a pair of double quotes, then use the cmd and batch-script general escape character ^ caret;
^^^! otherwise, use three ^ carets.

Output:
==> D:\bat\SO\10558316.bat

--- file content
this line is 100% valid! Sure! Hurrah!

--- enabled delayed expansion chokes down unescaped exclamation marks! "!"
loop var=this line is 100% valid Hurrah
_auxLine=this line is 100% valid Hurrah

--- toggled delayed expansion works although might be laborious!
loop var=this line is 100% valid! Sure! Hurrah!
_auxLine=this line is 100% valid! Sure! Hurrah!

--- keep delayed expansion DISABLED: use CALL command!
loop var=this line is 100% valid! Sure! Hurrah!
_auxLine=this line is 100% valid! Sure! Hurrah!
WARNING: !_auxLine! as well as %G loop variables are not available here!

==>

Answer: As pointed in the answer the main usage of the delayed expansion is the setting and accessing variables in brackets context.
Though it can be useful in another situations too.
Parametrizing substring and string substitution:
@echo off
setlocal enableDelayedExpansion

set "string=test string value"
set start=5
set get_next=6

echo #!string:~%start%,%get_next%!#

set "search_for=string"
set "replace_with=text"

echo #!string:%search_for%=%replace_with%!#

the output will be:
#string#
#test text value#

though this can be achieved with additional call this way is more performant
Using shift command within brackets parameterized argument access
@echo off

echo first attempt:
(
    echo "%~1"
    shift
    echo "%~1"
)
::now the shift command will take effect

setlocal enableDelayedExpansion
echo second attempt:

(
    set /a argument=1
    call echo %%!argument!
    shift
    call echo %%!argument!
)

the output will be:
first attempt:
"first argument"
"first argument"
second attempt:
"second argument"
"third argument"

As you can see parameterized argument access can be done only with delayed expansion.
Using for tokens (or function arguments) for parameterization
One more approach for mixing !s and %s this could be useful for nested loops:
@echo off
setlocal enabledelayedexpansion
set begin=2
set end=2
set string=12345

for /f "tokens=1,2" %%A in ("!begin! !end!") do set "string2=!string:~%%A,%%B!"
echo !string2!

endlocal

as you can see now the for command tokens are used as parameters.
Answer: Several answers here answer the "How to use delayed expansion?" question or what happen if you don't use delayed expansion. However, the second question is "Are there any situations where you would NOT want to use delayed expansion?" and a couple answers take this question as "how to avoid the problems caused by using delayed expansion?"
My answer answers the question as I understand it: "In which situations is better to NOT use delayed expansion (instead of use it)?"
If you want to exchange the contents of two variables, the simplest way to perform this is using the %standard% variable expansion:
set "var1=%var2%"  &  set "var2=%var1%"

The way that the %standard% expansion works makes possible to achieve this replacemenmt without using any auxiliary variable. As far as I know, the Batch-file "programming language" is the only one that allows to perform this exchange in this way, that is, making good use of a language "feature" (not via a specialized "exchange" instruction/statement).


How to duplicate ies light

Question: I have added an ies light. I want to duplicate the lamp with the ies light. When i select the lamp and the light and Press Shift + D to duplicate the mesh duplicate but there is no light. And i cant control the duplicate light also. Any suggestion or help.
Answer: I believe you are mistaking "lamp rig 10" for the actual light itself. This is only a mesh made of edges that acts as a parent to the light, making it easier to select. When you are duplicated the lamp, you only selected the lamp mesh and the lamp rig but not the actual light itself. Try going into wireframe mode and box-select (b) the lamp, which will include the actual light. Duplicating this should not have any problems.
Comment: It is a good practice to verify and make selections in wireframe mode.
Comment: @LeoNas Typically it's not necessary, except in situations like this where you have many overlapping objects. Then I would recommend always going into wireframe just to make sure you've selected everything you intented to select.

How to duplicate ies light


Identify new gravel road bike from photo

Question: This is a photo I came across earlier this year of a gravel bike that is gorgeous and I would love to know what brand it is.  Hopefully it i identifiable.  Thank you
Comment: Hi, welcome to bicycles. Do you have any close-up pictures of the components?  Can you at least tell us the make of the components?
Comment: I wonder if it's not sold like that. Almost any matte black frame with clean lines and internal routing, brown leather saddle and bar tape, and tan wall tyres would get the look.
Comment: Hi, I don't have any other photos unfortunately so no info on the components.
Answer: Done some searching. Looks like it's Open U.P.(P.E.R.). Even decals match.
Edit for additional info:
Groupset: probably SRAM Force eTAP AXS
Wheels: Hunt (not sure about the model)
Tires: Specialized Pathfinder Pro
Comment: The sticker where the fork meets the headtube looks very much like that.
Comment: Wow thank you for your help!  It's a nice bike.
Answer: It's not a Trek Checkpoint but it's quite similar. It might be a Chinese special like an Airwolf frame. Too many bikes have this dropped chainstay now to make it easy to identify and i'm sure the components are a shop or home build rather than a factory build.


Is triple branching necessary in making a syntax tree for 'the girl in the room waved to me'?

Question: If 'the girl in the room' is my constituent, should I use triple branching under my first N'? The two options I am considering are below. Which would be correct?
Answer: Most generative theories of syntax insist that all branching must be binary, mostly for theoretical reasons: it's taken as an axiom that syntax trees are built using the Merge operation, which combines exactly two nodes, not three. But there are some cases where this assumption starts to break down.
This is not one of those cases. Constituency tests show that "in the room" is a constituent (a prepositional phrase).
Answer: As far as I know X' typically only allows binary branching.
Regardless, in this case tree A (on the left) is definitely better than tree B (on the right) as B suggests that "in" is a constituent in its own right, something that is definitely not the case.
Answer: It is possible but not necessary. Certain trends in syntax, following Kayne's Binary Branching Constraint, only allow binary branching, so as an axiom it is never absolutely necessary to have ternary branching (you just have to devise some binary structure). There are alternative theories, such as Simpler Syntax where, as you can see on p. 109 as a first example, "give Harry a book on Tuesday" has the branching (give) (Harry) (a book) (on Tuesday). In that theory, n-ary branching is necessary.


Books showing colorful images of elementary particles....is this true?

Question: Do electrons or protons or any other elementary particle have colors of their own or do they have smell?
Comment: I'm voting to close this question as off-topic because huh?
Comment: But why do they dont have any color or smell?
Comment: Why should they have a color and a smell?!?
Comment: Books showing colorful images, using color to highlight elements in chemical formulas just want to make a visually noticeable difference between those elements, and (hopefully) don't intend on how those *things* look like. They don't have a color of their own (werrrrrl, mostly), unless  coupled with other tings.
Comment: The color is the interesting part here. They should react with photons to have any color. By molecules the chemical bonds can absorb some frequencies of the light, that why they have color. In theory a single electron or proton should be able to absorb photons too, so they might have color, but not necessary in the visual range of frequencies.
Comment: No color and no smell.
Comment: Electrons can't just be "on their own".
Comment: Isn't there a a sense of *acidity* associated with proton-donating substances? If I'm wrong, please clarify.
Comment: partial duplicate of: http://physics.stackexchange.com/questions/39076/what-color-would-a-proton-be-if-it-were-visible-to-the-human-eye
Answer: You can understand why they don't by understanding how smell and vision work
The mechanism by which we (or other animals) smell is not fully understood. But the key is that receptors in your nose are activated when certain molecules interact with them. The receptors consist of a wide variety of complex proteins with cavities of particular shapes. The cavities also have different patterns of surface structures which interact with the target molecules in a variety of ways (there might be some polar patches, patches that can hydrogen bond to another molecule and some that prefer non-polar interaction). When an appropriate target fits into the cavity, the cavity can send signals to nerves to signal that a target has been recognised. The targets can be very specific and there are a lot of different types.
Elementary particles don't (usually) exist alone but only as parts of other atoms or molecules. So they won't smell. We haven't evolved ways to detect free elementary particles. It is the 3D structure of molecules that creates smell.
The mechanism of sight is simpler. Molecules in the eye can absorb particular frequencies of light and then send a signal to the nervous system that they have detected some type of light. Light consists of photons. We see light when something emits photons, but only a narrow range of photons of about one octave. We can't see radio waves or X-rays as our eyes are not built to do detect potions of those energies. We see colour because photons of different energies can excite different receptors in the eye (human eyes have three different detectors tuned to red, green and blue light).
What creates coloured light is the either the emission of photons of the right energy or the selective absorption of light coming from another source. selective absorption happens when there is some way for the thing absorbing the light to capture the incoming photon's energy. This only happens when there is some part of the absorbing entity that can shift from one energy level to another and where that energy level matches the energy of the incoming photon. Some molecules have that property, but in many the energy levels don't match anything in visible light so they don't show colour.
Elementary particles don't have any energy levels in the appropriate range so won't be coloured. In molecules that do have energy levels absorption can happen, but this is a property of the whole molecule, not the atoms that make it up. It isn't the atoms that have colour, it's the molecule. Also atoms are about the same size as wavelengths of light, so even if you had a powerful microscope you could not see the individual components using light so the idea of them having colour makes no sense.
When presenting models of molecules, chemists often draw the atoms in different colours. But this is so they can tell them apart and in no way represents what an imaginary microscope would see. The colours are entirely arbitrary.
Answer: Electrons and protons do not have a smell because that means that they would have to reach our nose, which have molecule sized receptors, and cannot fit in the receptors.
Electrons and protons cannot have color since they sare smaller the visible light themselves! So how can they reflect something much bigger than themselves?
Comment: As far as I know, electrons are one of the most stable things in universe. And proton decay is still a matter of research.
Comment: @_TanMath *everything* can be tackled if *not in pure vacuum* and attacked with some high energy particle.
Comment: @GyroGearloose electrons would be stable in pure vacuum for sure.
Comment: So what do you reefer by "electrons and protons can be unstable by itself". I read "itself" as "not interacting with something else"
Answer: I think it is pretty clear that electrons per se have no color and are invisible . If you have a glass tube with a wire at each end and connect the ends to a high voltage power source, electrons do not flow. When you pump the air out of the tube until you have a pretty good vacuum, the electrons begin to flow and the tube emits light, due to collisions of the electrons with the atoms in the tube followed by decay of those excited atoms back to the ground state--the atoms are emitting the light, not the electrons themselves. (For example, if sodium atoms are present you get yellow light, and if mercury is present you get mostly ultraviolet light.) But - if you keep pumping on the tube until you have an almost perfect vacuum, the electrons still flow (you can measure that with an ammeter in the circuit) but there is no light. They are invisible.
If you dissolve sodium metal in liquid ammonia, you get a deep blue color. Some people would say that is the color of "solvated electrons", but they are not actually free electrons. It is believed that the result is ammonia-solvated sodium cations and ammonia-solvated ammonia radical anions. The blue color is due to absorption of visible light by the latter.
Comment: Who believes that the electron is associated with a specific ammonia molecules to form a radical anion?  Usually I see it in print as an electron sitting in a cavity between ammonia molecules.
Answer: According to Physicists find that an ultrahigh-energy proton looks like a black disk

What does a proton look like? The common answer to this question is that protons are much too small to scatter light, and since light is necessary for us to see things, protons do not "look" like anything. But in a new study, physicists have gathered sufficient evidence to show that, at least at very high energies, the proton is a black disk – sort of an elongated hockey puck.