Difference between "unreal" and "not real"

Question: I saw a video years ago in which the word "unreal" was used to describe a tennis legend (Roger Federer). Several tennis stars were invited to interview in the video. One of the tennis stars used the two words, "not real" instead of "unreal". I know that he tried to show his most sincere admiration for the other player. However, I then wondered, why not just use the word "unreal"? It is one word and in my opinion, "unreal" and "not real" can be used interchangeably, right?
Or maybe there's something different between them that makes them not interchageable in this context.
Comment: They are not interchangeable. "Not real" means imaginary, and "unreal" means "hard to believe" or "rare". Roger Federer does exist, but his legendary status might be hard to understand.
Comment: While this isn't the context here, *real* also has a technical meaning in mathematics "related to the set of real numbers" or "the real part of a complex number." In this context, "not real" means the opposite, and we do **not** use "unreal" in mathematics, at least not in this way.
Comment: "Not real" means ***doesn't exist*** (as it happens), and "unreal" means ***couldn't / shouldn't exist*** (because too unusual).
Comment: @Davislor to add, in this mathematical context only, it would be appropriate to say "these numbers are *[non-real](https://homework.study.com/explanation/what-is-a-non-real-complex-number.html#:~:text=A%20non%2Dreal%20number%20is,number%20i%20%3D%20%E2%88%9A%E2%88%921%20.)*."
Comment: Related: [Can I safely use "not" instead of words with negative prefixes?](https://ell.stackexchange.com/questions/296173/can-i-safely-use-not-instead-of-words-with-negative-prefixes)
Comment: Here is the video in question: https://youtu.be/T2GCufGN3zw?t=124
Comment: @DrakeP Which leads to the seemingly erroneous but actually grammatically and factually correct statement: "I is not real."  Whereas if you "corrected" the grammar to "I *am* not real", Descartes might have to disagree with you.
Answer: "Unreal" is an extreme adjective that means  "fantastic", "incredible", "unbelievable", etc. All these words can be used figuratively to mean "really good". "Unreal" literally means it's so good it must not be real. "Fantastic" literally means it's just a fantasy, something imagined. "Incredible" and "unbelievable" both literally mean it's so good nobody can believe it. But they're all used figuratively, and used so often that they no longer have the literal meaning at all.
"Not real", on the other hand, is never used figuratively. It always means the opposite of "real".
So when this tennis star described Federer as "not real" (I'm giving him the benefit of the doubt it was intentional), he was carefully choosing not to use a normal adjective that means "really good". Rather, he was using the normally literal expression "not real" in a figurative way to say that it's actually difficult for him to believe anyone can be that good at tennis.
For what it's worth, this process is where the "really good" meanings of all the words I mentioned come from. Initially, they were literal words, and when used figuratively, they were so powerful that people started using them all the time to mean "really good", and they lost both their literal meaning and their power. Whichever tennis star said this is clever with words.
Comment: "Whichever tennis star said this is clever with words" - possibly, or it's a non-native speaker who just meant "unreal".
Comment: Imagine the uninspired results of programming a game with the "**Not Real Engine**"... "Bruh, these graphics look cheap and don't resemble real life at all." "Well, yeah. It's just a computer program. It's not real. In fact, the game engine I used is called..." Whereas "**Unreal Engine**" invokes a different connotation.
Comment: @vaterherrn Better yet! I'm Spanish and I can confirm that we **do** use _no (es) real_ in a figurative "unreal" sense as well as the more literal "not real" sense. The actual Spanish word for "unreal" would be _irreal_, but that's a rather uncommon word, found mostly in literary works, not in casual conversation. In other words, _irreal_ in Spanish has not yet lost that "powerful" meaning that gotube alluded to, so we still lean to using _no es real_ ("not real") instead. Which means a Spanish speaker should translate fig. _"no real"_ as lit. "unreal" and lit. _"irreal"_ as fig. "not real"
Comment: "*he was using the normally literal expression "not real" in a figurative way*".  Wouldn't "surreal" have been more appropriate in that case? That is, something that one knows is real but find almost impossible to believe. (Note that I'm not criticising Federer's choice of words.)
Comment: @RayButterworth Using "surreal" would be using a word in its literal sense. Whoever said this (it was some other star, not Federer) used "not real" figuratively because it's almost never used figuratively, so it had more impact.
Comment: @NotThatGuy From his accent he doesn't sound like a native speaker, but I'm not good enough at recognising faces to identify who he is: https://youtu.be/T2GCufGN3zw?t=124
Comment: @NotThatGuy Or both
Comment: @gotube The guy in the video is Gulbis, a tennis player from Latvia. In Latvian, the word for "unreal" is _**nereāls**_, from _**ne-**_ "not" and _**reāls**_ "real"; literally: "not real".
Comment: @walen actually he is schwartzman, who is an argentinan tennis player.
Comment: @gotube Unless an actual Latvian says otherwise, it seems like the word for "not real" as in "false" would be _**nepareizs**_. The words _reāls_/_nereāls_ are used more in the sense of concrete/abstract; _nereāls_ especifically seems to be almost always used with the meaning of "unreal", not "not real".
Answer: As a more general answer than those that have been posted so far, note that negation of a word can have more than one meaning. A very common case is that the negation can mean the absence of the thing, or the presence of its opposite. This is certainly true in English, and I'm sure there are bound to be similar phenomena in other languages.
As such, English frequently has multiple negated forms that seem alike, but take on specific meanings.

Amoral means "without moral judgement", but immoral means "judged as morally bad".
Careless means "not taking the expected amount of care", but carefree means "not expected to take care".
And my favourite ever since I mixed them up as a kid, worthless means "having zero value", but priceless means "having a value too great to number"!

Not real and unreal are not so different as some of these, and there are some examples where either could be used ("it doesn't seem real" versus "it seems unreal") with little or no difference in meaning. There are other cases, probably the majority, where one or the other must be used to be correct.
Not real could be defined as the absence of reality, or truth, or genuineness. It's generally a bad thing, because "real" is so often a good thing. (Where "real" takes on some specialised meaning, like in mathematics, it's simply neutral. Though I'm sure many maths students would say numbers that are not real are a bad thing…)
Unreal could be defined as the presence of things that are not part of reality, as in dreams or fantasies. It can be a good or a bad thing, depending on the situation.
And finally, that means that the tennis player in question really ought to have described Federer as unreal, instead of not real—he exists, but his skills may seem like the stuff of fantasy!
Comment: +1 Fantastic that you noted "unreal" is not actually a negation. It is a *positive adjective* denotes the *presence* of something not real rather than the absence of realness.
Answer: Somtimes the word "unreal" and the phrase "not real" are interchangeable. Other times, they are not.
Ar times, people are sarcastic. At other times, people are serious. People use the word "unreal" more often when speaking sarcastically than they use the word "unreal" when being serious.
The word "Unreal" can mean the same thing as the phrase "factually true, but surprising".
For example, someone might write, "it is unreal that you did well on the last geography exam, but did poorly in chemistry".
Comment: Can you give an example sentence where "unreal" and "not real" are interchangeable without changing the meaning?
Answer: The word "unreal" is an adjective and somtimes precedes nouns.
The phrase "not real" does not precede nouns. For example, it is incorrect to talk about the "not real house" or talk about the "not real chair".
To fix this, we can change "not" to "non". The phrase "non-real" is almost the same in meaning and usage as the adjective "unreal".
"not" and "non" are subtely different.
"not real" must be preceded by the word "is", "are", or another conjugation of "to be".
You can use the phrases "is unreal" and "are unreal", but you are not required to so so.
Sometimes "unreal" is preceded by a word which is not a conjugation of "be".
Some examples of these words and phrases are shown below:

The unreal sheep danced in Joe's mind as he fell asleep (Correct)
The non-real sheep danced in Joe's mind as he fell asleep. (Correct)
The not real sheep danced in Joe's mind as he fell asleep. (In-correct)
The sheep dancing in Joe's mind were not real (correct)
The sheep dancing in Joe's mind as he fell asleep were unreal (correct)
Answer: "Not real" and "unreal" have the same formal meaning of "imaginary" or "non-existent."
However, "not real" and "unreal" have been adopted to mean "extraordinarily good" in popular American English.
I cannot agree with the comments that imply a distinction in meaning between "not real" and "unreal." I do agree that people whose English is so impoverished as to believe that "not real" is a useful synonym for "extraordinarily good" may be unaware that the word "unreal" even exists. Because of that, it may be true that even good speakers reserve "not real" for figurative speech.
Personally, I'd just avoid the now trite use of "not real" to mean "far out of the ordinary."
Answer: tl;dr–  The terms "not real" and "non-real" are basically equivalent, and they both imply a lack of being real.  By contrast, "unreal" usually refers to something that seemed real, but then that realness was somehow reversed.  Usually "unreal" applies to situations where an event that seemed real was so extreme that someone questions if it actually happened.
Some folks also use terms like "unreal" hyperbolically, where the term isn't meant literally but rather as an exaggeration.  In such scenarios, "unreal" might refer to something extreme, even if it didn't actually challenge their sense of reality.

"Not" and "non-" are logical negations; "un-" is for reversal.
In English:

the prefix "non-" implies a logical-negative;

the prefix "un-" implies reversal.

The qualifier "not" is more like the prefix "non-" than "un-".
For example, consider the difference been:

not doing, where the doing simply didn't happen;

undoing, where a doing was reversed.

Regarding the question:

If something is "not real" or "non-real", then it isn't real.

If something is "unreal", then it had a quality of realness, but that realness got reversed.

For example:

Fire-breathing dragons aren't real, so they're "not real" or "non-real".

But if someone sees a fire-breathing dragon, then they might momentarily accept its realness (because they just saw it), but then their inner scrutiny might object; for example, they might suspect some sort of trick, optical illusion, delusion, dream, etc..  So in their mind, the dragon was real in a way, but then that realness was contested (even if by their own skepticism), making it seem "unreal".

In general, the term "unreal" tends to be used in scenarios like that, where:

something is accepted (or at least suspected) to be real;

but, for whatever reason, that sense of realness is undone (even if partially), making it "unreal".

In practice, "unreal" usually refers to things that people (mostly) believe, but are so extreme that they struggle to fully accept it as reality.  For example:

Electric-lightbulbs may've seemed unreal to some folks shortly after they were invented.

If a runner beats the world-record for speed by a significant margin, beyond what one expected could be done, then the runner's performance might seem unreal.

Someone who's surprised with a huge gift might find the experience unreal.

Then when used hyperbolically (non-literally):

If a runner beats the world-record for speed by just a little bit, then a loose speaker might exaggeratingly refer to it as "unreal".

Note: On extended uses of "un-".
Sometimes "un-" might be used abstractly or loosely.
For example, consider a new door that's just been installed and isn't locked.  Strictly speaking, such a door can't be "unlocked" because it was never locked.  That said, folks might still say that it's unlocked because:

Abstractly:  They're speaking of the physical-door as an instance of an abstract-door, where the abstract-door can be considered to have been previously locked.

Idiomatically:  Folks talk about "unlocking" doors a lot, so the term "unlocked" might be preferred on an idiomatic basis over a more precise term like "not locked" or "non-locked".

For another example:

Not announced beforehand.

—"unannounced", Wiktionary.

Here, a dictionary defines "unannounced" as though "un-" were a negative.  This is a simplification – but one that might lead to confusion – so let's examine it.
First, a more robust definition might be more like:

Having reversed a presumed announcement.

For example, say you're talking to your friend and they step away for a moment to use the bathroom.  When they come back, it would be incorrect to say that they showed up "unannounced" – because merely being "not announced beforehand" isn't enough to be "unannounced".
Point being that, even if "un-"-words are sometimes described as being negations in a dictionary, usually they're better understood as reversals than negations.

Note: On extended uses of "unreal".
The term "unreal" has an extended usage as an exaggeration (hyperbole).
This is, even if something doesn't actually make someone question its realness, a loose speaker might call it "unreal" anyway.
This usually isn't good English, but still a potential usage to maybe be aware of.
Comment: I don't agree that "un-" should *always* mean reversal rather than mere absence—I think that's more true of "dis-" (e.g. "disconnected" vs "unconnected")—but where it contrasts with "not", this is generally going to be the case, so it's a good rule of thumb.
Answer: Although it's a different context than this quotation, one domain where we cannot use not real and unreal interchangeably is mathematics.  There, real has a technical meaning, "related to the set of real numbers," or "the part of an extended number system that consists of real numbers."  The opposite of this is not real, or non-real, and the non-real part of a complex number is imaginary, but we cannot say unreal in this context.


Running 60Hz 220VAC motor on 50Hz 220 VAC using VFD

Question: I have imported a hydraulic power unit from Canada. The problem is that the motor is designed for 60Hz frequency but we have 50Hz. Now when we plug in the motor it makes alot of noise and vibration. It gets heated up as well. Now I was thinking to use single phase VFD that will take input of 50Hz and will give output to 60Hz. I just want to confirm before buying VFD that can it work ? and if there would be any effect torque and efficiency. Please share experience if someone has any
Comment: An easier solution could be reducing the voltage. U/f has to remain constant. Your motor has 220V/60Hz=3.67=183V/50Hz. The torque stays the same but the drive speed is only 5/6. The power is lower because of that.
Comment: If you can find a 220:36V transformer rated for the motor current you can use it to buck the 220VAC and give you about the correct voltage, as @janka suggests. It should be about 1/5 the size of a 220:180 VAC transformer with the same current rating.
Comment: Thank you for the replies, I hope the mentioned suggestions give me desired results. Reduction in speed is not a problem for me the only concern is the power and smooth running of the motor.
Comment: I have one little question if I need to replace the capacitor as well that comes with it?
Comment: This is almost always a "consult with the factory" matter.  Is the motor a commodity, easily changed standard size?  Worth a check.  Keep in mind the machine was built for a motor spinning just shy of 1800 or 3600 RPM... and on your power,  it'll spin just shy of 1500 or 3000 RPM because of the nature of your power.   So a pulley/gearing change may be a factor.
Answer: If the motor is a single-phase motor, use with a VFD is very limited. The very few brands on the market will only work with permanent-split capacitor and shaded pole type motors. They don't provide very high starting torque and have been limited to use with fans and pumps in the past. Better capability has been recently advertised, but limitations should be carefully investigated.
VFDs with 3-phase motors can usually provide torque at any speed that is comparable to power frequency operation in most respects. Continuous operation at less than 1/2 to 3/3 speed may be limited due to motor self-cooling concerns. The waveform will reduce efficiency and increase operating temperature only slightly. With motors not rated for VFD use, voltage spikes generated by the VFD can harm insulation, but that is not usually a concern with 220 volt motors.
There is very little risk in using a transformer to reduce the voltage to the proper voltage for 50 Hz as suggested by @Janka. The only disadvantage is the 20% speed reduction from the design speed of the driven equipment.
Comment: Since you asked about a capacitor in another comment, you must have a single phase motor. The delay in applying the load will remove the starting torque concern with a single-phase output VFD. You need to make sure that the capacitor remains connected all of the time, is not disconnected when the motor reaches full speed.
Comment: Starting torque is not that much required as the delay in applying pressure can be adjusted with the hydraulic valve configuration. It can give 2-3 seconds before the motor reaches its peak torque. does it make VFD feasible then ?


SQL Server 2016 slow restore

Question: We have a 300 GB database that I am test restoring to a new SQL Server 2016 instance, on a virtual Windows 2016 server, used for testing purposes.
The VM has 32 GB RAM, running on a 1 socket CPU with 10 logical processors. (E5 - 2670 , 2,6GHz). Not sure about the power setting, will check that with the guys who set up the VM.
The first time I restored, I did it from a <code>.bak</code>- file from a 2014 instance.
The second time (still running) I did it from a backup made on the SQL Server 2016 instance.
Both times it took over an hour before the "5 percent processed" message was shown. Before that the percentage was on 0% (using a script that shows progress of restore). The restore was finished after about 2 hours the first time.
I especially wonder why it takes so long for the process indicator starts going. What is going on in when that stays on 0%?
Is this is normal on a SQL Server 2016 instance, or could something be wrong? On the production server, a restore will go much faster, but it is difficult to compare since the prod is a dedicated server with multiple spindles, while the test-server is a virtual server.
Answer: The problem was, as proposed by some in comments, that Database Instant File Initialization was not enabled on the instance. I enabled this by giving the user under which the SQL Server service was running the needed permissions, and then restarted the SQL Server Service. The steps to take can be found in the following link: Database Instant File Initialization
Thanks for all the suggestions, some of them pointed me to the solution.
Answer: Instant File Initialization (IFI) is enabled by default* in SQL Server 2016.
* The box is pre-checked on the installer (if that's the method used for installation). The installer gives you the opportunity to grant 'Perform Volume Maintenance Tasks' to the service account from the installer GUI so you don't have to go do it yourself.

Are your backups striped or a single file?
Are your backups compressed?

To answer your question - "normal" is relative to many factors. I will say, however, that SQL Server 2016 restores shouldn't take any longer than in previous versions.

SQL Server 2016 slow restore


Can I drive in the USA with a French drivers license?

Question: Question is pretty much in the title. I have a French drivers' license, and will be driving in the USA in a couple weeks. Is it accepted as-is, or must I get a translation? What preparation do I need to do?
Comment: possible duplicate of [Are international driving licences really necessary for any country?](http://travel.stackexchange.com/questions/441/are-international-driving-licences-really-necessary-for-any-country)
Answer: From USA.gov, it appears it's very much dependent on which states you plan on driving in:

If you are a visitor from outside the United States and Canada who
  plans to drive in the U.S., check with the motor vehicle department of
  each state you will drive in for its requirements.  Some of the states
  will require an International Driving Permit (IDP) in addition to a
  valid license from your own country.

That's a bit vague though, and doesn't clarify the language thing. Fortunately, justlanded.com covers this:

Tourists may drive in the US for up to a year with a foreign driving
  licence, provided the issuing country is party to the 1949 Geneva
  Convention on Road Traffic (see art. 1 and art. 25 para. 1) or to the
  Convention on the Regulation of Inter-American Automotive Traffic
  (Washington, 1943); most countries are contracting parties.

(Good news, France is party to the 1949 convention!)
They go on to say:

If your foreign licence doesn't contain a photograph or is written in
  a language other than English, it's wise (but not mandatory) to obtain
  an International Driver's Permit (IDP). Always carry your foreign
  licence as well as your IDP. Without an IDP it may be necessary to
  obtain a certified English translation of your foreign driving
  licence, usually obtainable from your country's embassy in the US.

Hope that helps clarify things.
Comment: My experience in California with Budget was that they were fine with my German licence and did not want the IDP I had with me.


Compatibility of Canon EOS 5D Mark IV with EPIC Pro V (GigaPan)

Question: Anyone Know about compatibility of Canon EOS 5D Mark IV or Canon 5Ds R with Epic Pro V (GigaPan)?
Comment: What makes you think those two cameras would have any compatibility issues with the Epic Pro V?
Comment: I checked here  http://www.gigapan.com/cms/support/camera-compatibility & didn't find both cameras.
Comment: The list appears to have not been edited since sometime around the end of 2012. No models from Canon or Nikon (or probably any of the others, but who has time to check the release dates of every maker's lineup?) released since 2012 are listed. Current Canon models use the same wired release cables as the pre-2013 models that are listed.
Comment: The copyright notice at the bottom of the compatibility page is dated 2013...
Answer: The only thing that differentiates pretty much any camera with a wired remote shutter release port from any other camera with a wired remote shutter release port is the shape of the connector. They're pretty much all incredibly simple. A ground wire and two wires that only need to complete a circuit.¹ Each wire is 1-bit. It's either on or off. There is no data communication going on. When the "half press" circuit is closed the camera behaves exactly as if the shutter button has been physically half pressed. When the "Full press" circuit is closed the camera behaves exactly as if the shutter button has been physically pressed all the way down.
The only thing you need to use the Epic Pro V with the EOS 5D Mark IV or EOS 5Ds R is a connecting cable with a Canon N3 connector to plug into the N3 port on the camera. This would be the same exact cable used for any of the Canon cameras with an N3 connector listed at the Gigapan camera compatibility page which doesn't appear to have had any models from any manufacturer listed that were introduced more recently than late 2012.
Using the Epic Pro V to control the shutter of any camera with a wired remote port is the same as using any wired remote intervalometer to control a camera. You can set the exposure times with the camera's controls for shutter times less than the camera's maximum shutter time (usually 30 seconds). The wired remote need only complete the "Shutter press" long enough to trigger an exposure. For shutter times longer than that you set the camera shutter time to "Bulb" and let the wired connection hold the shutter open for the desired length of time.
For a fuller discussion regarding the universilty of wired shutter release remotes, please this answer and comments to: Is there a good remote timer compatible with most Nikon and Canon (and Pentax and Sony) cameras?
¹Panasonic and some recent Fuji cameras do use a single wire plus ground to signal both a half and full press by placing resistors of different values in the circuit depending on the switch position. Everything you ever wanted to know about remote cable release connections: doc-diy.net/photo/remote_pinout


How can I draw 3D shiny glass balls/spheres and glass bricks?

Question: I first hoped MaterialShading was suitable for this purpose, but there is not a choice named "Glass" in the included 16 possible materials. And further I found that it conflicts with and will override other effects, like Opacity, Texture, Glow, etc.
Answer: MaterialShading is more about reflection of light from the surface. Glass implies more refraction, passing of light through. So using simple Opacity and color and  Specularity (as David G. Stork did in his answer) should be fine imitating glass. If you want to add some realism, like glass surface scratches, instead of MaterialShading use Texture - it plays well with Opacity, Glow, etc. Note, you can use different textures and it will change how objects below look and feel.
Import some surface image:
texture = Import["https://i.stack.imgur.com/UJ4xa.jpg"]

Now simply apply it to your graphics primitives:
Graphics3D[{Opacity[.3],Glow[White],Texture[texture,"Box"],#},Boxed->False]&/@
{Cube[],{Sphere[],Cube[]}}

Also, from details section of MaterialShading:

"MaterialShading will override any color, Opacity, Texture, Glow or Specularity settings."
Answer: Table[Graphics3D[{Opacity[0.3], Orange, Specularity[White, n],
   Sphere[]}], {n, {5, 20, 100}}]


What capacitance should be added over the inputs and outputs of a voltage regulator?

Question: Is there a nice rule/formula for this or do we always need to go off of the datasheet? I read today (in a datasheet, no less) that the capacitance should be customized for a given application (no further explanation provided), and I was also told that added caps are not required if the input voltage is stable.
Answer: There are basically 2 types of capacitors around a voltage regulator:

relatively small ones (order of 100's nf): These are required to get the regulator stable, to let it properly do its job, to prevent it from oscillating and are always mentioned in the datasheet.
relatively big ones (order of 100's μF): These are to reduce ripple at the input of the controller. This ripple is visualized in the image below. (Ripple@Wikipedia) Rule of thumb is 2200-4700μF per ampère output current at 50Hz. The idea of these capacitors is to prevent the rectified input voltage from the transformer to drop below the minimum input voltage of the regulator. In case of a LM78xx-like regulator input voltage must always be some 3V higher than its output voltage.

It is also good to notice that a single big electrolytic capacitor cannot replace the smaller capacitor from the datasheet (unless the datasheet states otherwise). The smaller capacitors have a much better high frequency response than the ecap and therefore you want them both.
Beware not to make output capacity too large: Most regulators don't like it when output voltage (due to a charged output capacitor) is higher than its input voltage (due to a switched off transformer). Some datasheets do mention a maximum output capacitance. This is why you sometimes see a reversed diode across the regulators in and output pins.
Comment: For the non-fuss regulators like 7805's the datasheet often mentions that that the 100nF at the input can be omitted if the buffer elco is near to the regulator, so it this case the elco *can* replace the 100nF, on the datasheets' authority.
Comment: updated my answer.
Answer: Those capacitors are part of the regulator's control loop to keep it from oscillating. You can't say what values they have to be without knowing the exact details of the regulator's internals. Just follow the advice given in the datasheet, they usually will give you a fixed value (I've never seen this being written as to be customized for the application). Not just capacitance, keep an eye on ESR (Equivalent Series Resistance) too if that's mentioned.
Even if you would use a large electrolytic capacitor on the input place the 100 nF ceramic if the datasheet says so. By the way, there's no limit to the capacitance on the input. You can feed the regulator from another regulator's output, and that's equivalent to an infinite capacitance.
Answer:
What capacitance should be added over the inputs and outputs of a voltage regulator?
  Is there a nice rule/formula for this or do we always need to go off of the datasheet?

There IS a nice rule/formula - it is that you MUST use the datasheet unless you are a Jedi Master and/or blackbelt electronicianado. The former can stop oscillations occurring by using the force. The latter has learned by heart* the characteristics of all known regulators and many unknown ones.
The reason is that regulator implementations vary and requirements vary and if you do not know the characteristics of the one you have then an answer that is ideal for one can be fatally bad for another.
Some regulators are unconditionally stable regardless of output capacitance.
 Some regulators are unconditionally stable with output capacitance above a certain value.
 Some regulators are unconditionally stable if the output capacitance is above some specific value and below some other specified value AND if output cap ESR is above a certain value and below some other specified  value.Notice how bounded this is - on an ESR - capacitance plot the safe operating area is a rectangle with unstable areas around it in every direction.
Input capacitor is usually mostly about getting a half low input impedance but lack of one or enough can lead to instability.
What sort of regulator are you using.

I read today (in a datasheet, no less) that the capacitance should be customized for a given application (no further explanation provided), and I was also told that added caps are not required if the input voltage is stable.

The latter could be correct for some regulators. The former should be qualified somewhere - ie HOW stable does it need to be.

In the good old days when the LM7805 was king the output capacitor was largely to supply fast surge current or to provide temporary peak current in excess of the regulator's capability. You could add as much more as you sensibly wanted to. Those days have largely gone. Cout is now often as much a part of loop stability as about filtering per se. There is now usually  no right limit above which all will be well  - only a right range that must be stayed within. SOME modern regulators do not have this requirement. In exchange for the tighter requirements you often get much better specs.

*- Learned by heart = English expression = knows and can recall perfectly.
Comment: >> *"What sort of regulator are you using."*

None yet, just shopping around for some cheap local regs on ebay.
Answer: Determining the stability of a linear regulator is a non-trivial task at the best of times.
You get some indication by directly scoping the output and applying a step load (looking at the response) but can you guarantee stability over all conditions?
The compensation is often internal and inaccessible, so conventional methods of stability analysis (voltage injection combined with gain/phase measurements from a frequency response analyzer) cannot be used.
The only alternative is to measure the output impedance and mathematically calculate the phase margin based on the measured group delay (from which you can derive Q, from which you can estimate phase margin to within a few percent).
If the manufacturer recommends certain values, go with them! If not, you may need to do a lot of empirical 'change-test' iterations to find something that appears stable, or bite the bullet and buy/rent some sophisticated test equipment to prove stability.


Error: On making Public Site to Online

Question: I have Public Site and when I try to make the site Online I am facing the error as below.Can any one help me how can I sove it
Answer: a) Have you renamed the site file? Modified in Visual Studio or Sharepoint Designer?
b) From the screenshot I see you have only Sharepoint Online license. Is it a new account? Is everything else correctly provisioned?
c) Have you customized your page in any way? It doesn't look like it, so can you try resetting the site to template and make it online again?
d) Have you ever been able to make it online?
e) Can you click on technical details and post the correlation id and the exact message here?

Error: On making Public Site to Online


Time Machine Backing Up Large Amounts of Data Each Time

Question: I've got 2 time machine drives. I have one at home that gets used on the weekend and another that gets backed up to during the week.  I recently replaced the one at my office.  The only thing that is weird is that it's backing up 3-4GB of data each hour. It goes super quick, so it doesn't feel like its actually backing up that much data, though. I've ran disk utility on the disk and it doesn't find anything. Any thoughts? Is it just something weird or is there a problem with the drive?
Answer: On Lion you can use tmutil to compare Time Machine backups:
sudo tmutil compare                      # compare computer to latest backup
sudo tmutil listbackups                  # list available backups
sudo tmutil compare <backup1> <backup2>  # compare two backups from backup list

This should give you a good idea about where the volume is coming from.
Answer: Also:
tmutil calculatedrift machine_directory

gives you an overview of the sizes differences between each consecutive backup.
It is useful to pinpoint when exactly that happens, and which backup you should compare with:
sudo tmutil compare <backup1> <backup2>


Do I ever run out of new recruits?

Question: Do I ever run out of new recruits if too many die, or do I have an endless supply of cannon fodder to replace their fallen comrades?
Comment: I mean, you have to hire news ones... do you mean you worry about running out of the ability to hire new recruits?
Comment: @BlackVegetable well, I havent had to hire any yet, I've had a few die or get hospital, and they have gotten replaced. I barely started playing so I don't really understand the whole mechanic yet.
Comment: @BlackVegetable Yes - or at least, that's what I'd like to know! I remember in xcom apocalypse, there was a limited number of troops available to hire. A couple of bad TPKs could wipe them out, and then you'd be in trouble, with no soldiers and no way to get any.
Answer: You will eventually have to hire new recruits at a low price:

XCOM starts out with a group of twelve Rookie soldiers. Additional soldiers can be recruited via the Barracks and arrive at headquarters three days later. Each recruit costs §10 on Easy and Normal difficulties, and §15 on Classic and Impossible. Additional soldiers can also be received as a mission reward from the Council.

http://xcom.wikia.com/wiki/Soldier_(XCOM:_Enemy_Unknown)
Answer: You will run out of rookies in your base, however you can hire new ones that take a few days to arrive.
As long as you have the money and the space in your barracks, you should be able to recruit new rookies. With the "New Guy" upgrade from the Officer Training School, the new recruits can arrive as squaddies rather than rookie.

Do I ever run out of new recruits?


Add product thumbnail to user/%/purchased-files?

Question: I've managed to add an extra field in the Purchased Files page, as well as hide the address limit, however I cannot figure out how to actually get the product thumbnail in there, like there is on the cart page. Below is what I'm working with so far, any ideas how to get the image associated with that file in the empty field?
Answer: You need to change page callback for path user/%/purchased-files in hook_menu_alter() and your custom callback should be based on code of uc_file_user_downloads() function, you need to change it, add new column with product image. I guess you need to change query in that function to get more data from 'uc_file_products' table about the product id, and based on that you can get all product info etc
Comment: I had to add an extra col into uc_file_products to hold the image, as there wasn't one before, and Ubercart doesn't seem to associate files with items purchased, presumably because you could possibly get the same file by purchasing multiple files. This is a hack-ish way to do this, but it works for me since I'm not planning on updating ubercart.

edit: posted as an answer, I'm running up against the character limit rapidly.


Removing elements of an 'at least one' association

Question: let's assume - regardless from technology and programming languages - you have a type and the type has an association to another type. This association has the complexity of 'at least one' (1..n). How would you specify the behavior, when removing elements from this association based on a predicate? Say, the predicate fits to all elements, thus the removal would violate the 1..n constraint, would you remove all elements but one or would you rather not remove any element in this case (and have a transactional-like behavior)?
Comment: Could there be a default value? Something to the effect of: "if all are removed, keep this one, it's the default."
Comment: @Macneil: If there is a default value in the collection already, then there is the problem of marking it as the default. If there is a default value, that is not in the collection and will be inserted to fulfill the 1..n constraint, it is merely a technical default value - at least in my experience.
Answer: That depends on the context:

If there were a default element (an element that somehow stands out), I would prefer your second suggestion of deleting all but that one element.
If all elements are equal and it makes no sense to define a default element, I would not select an arbitrary one not to delete, because that seems like it could lead to confusing and arbitrary behavior. And an unclean design, because if the predicate makes sense, then why doesn't the multiplicity  of the association have (0..n)? I would thus look for a different solution, e.g.

restrict the predicate to those that don't fit to all elements, if that makes sense in your case
not remove any element and give the according feedback to the user/client, so that he can change the predicate or pick one element not to delete
change the association to (0..n).
Answer: If the criteria affects all occurrences of the (many) side, you should not proceed with the delete, otherwise, you'd violate the design.
However, there is 1 case where you are allowed (optionally) to delete all occurrences of the (many) side. This is the case when the parent (the one side) is deleted.
Example:
Say, you have an association between an invoice header and the invoice items on this invoice, so one invoice contains (1...n) items. If you delete the invoice, all the items have to go. If you attempt to delete the last invoice item, the system should warn you that if you do that, the entire invoice will be deleted.
Answer: I would simply not allow removal of all elements. Do not expose such an option in your domain model.
A RemoveAllBut(element) method might be acceptable, though it will need to check that the element is indeed in the collection.


How will a decision tree cope if it cannot find a suitable feature to choose as root node from which to split further?

Question: When I look at decision trees, they start with a root node choosing the most suitable feature from which to split further. What if the decision tree is unable to find the most suitable feature from the data as root node? How does the decision tree cope in that situation?
Comment: Why would they be unable to find a suitable feature? Do you mean if the metric for  two features is a tie or something?
Comment: yes, something like that. Not all data-sets have an obvious winning feature.
Answer: In scikitlearn at least the code is in this file: https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/tree/_splitter.pyx.
Basically the determination of the root node is the same as the determination of any other node, it's just the first one that's done. What I think it's doing is either random splits (in which case your question is irrelevant) or "best" split, where best is determined by the evaluation of some criterion like decrease of gini impurity for each feature. In the case of a "Best" split it's evaluating the criterion for each feature in turn and keeping track of the best one, only overwriting that where a new feature's criterion evaluation is strictly better than the currently stored best feature. That strictly better evaluation means that, where two features have the same value for the criterion, the model will select the first feature it encounters as the one to split.
In other words, if Feature A and Feature B would result in an equally good split, it will set the root node to be Feature A purely because it evaluated that first.


4 colors/corners gradient with Illustrator or Photoshop

Question: I should create a vector rectangle filled with a gradient made of 4 colors, one for each corner. I could just find some very generic information about using live blends, but I am not sure that is the best tool and still I was not able to do this. How would you get that in Illustrator exactly? (And secondary in Photoshop?)
Comment: You could just draw squares and use a Gaussian blur, couldn't you?
Answer: Gradient Mesh in Illustrator

draw a rectangle
select the Mesh Tool
click one corner of the rectangle
apply corner color
Select the Direct Selection Tool
Click another corner anchor and apply color
repeat for remaining corners

There's no simple, one-click solution for a gradient of that nature.
Shape Layers in Photoshop
For Photoshop, the processes is much more cumbersome and involved and nowhere near as precise.
One method could be to use a separate shape/vector layer for each corner, then a solid filled shape as a base.

You basically set a gradient for each shape:

Then once you have the 4 shapes with Gradients change their blending modes to Darken. You don't absolutely need that bottom white rectangle I used. But things won't look quite right without a solid color (preferably white) background behind the gradient shape layers.
Another method for Photoshop could be to simply grab the Gradient Tool, set a color to transparent gradient and then drag from a corner. Repeat for each of the 4 colors. The problem with this method is that each time you drag, the length of the gradient will be different. So, you won't end up with 4 equal corner gradients. The Vector Layer/Shape Layer method ensures the gradients are all the same length.
In the end, I'd simply generate this in Illustrator and then copy/paste to Photoshop as a Smart Object.
Comment: A smart object in Photoshop (from Illustrator) looks the best and simplest solution actually. It also allows you to modify the gradient! Thanks for your very detailed answer.
Answer: To get the effect you're looking for in Photoshop, I'd suggest the Sblended add-on.  Full disclosure: I wrote it.
Here's a screenshot of the interface used to create the gradient.

add two lines by tapping anywhere in the main area
add two color stops to each line by tapping anywhere on the line
position the color stops at the corners by dragging
pick the colors you'd like by double-tapping a color stop

Once you've built the effect, you can apply it in the same way as the built-in Gradient Tool - by dragging it across whatever area you want.
You can grab the free demo version to try it out here: https://creative.adobe.com/addons/products/17501
Comment: Hi Brian, welcome to GDSE. Your plugin does indeed do what the OP asked. Thanks for the full disclosure. Feel free to hang around and keep contributing, your time and effort help make this site great!


Remove spaces from a string in VB.NET

Question: How do you remove spaces from a string in VB.NET?
Answer: To remove ALL spaces:
 myString = myString.Replace(" ", "")

To remove leading and trailing spaces:
myString = myString.Trim()

Note: this removes any white space, so newlines, tabs, etc. would be removed.
Comment: Replace(" ", vbNullString) may run a hair faster, and (more importantly) be a bit clearer. YMMV.
Comment: I think vbNullstring is a hold over from pre .net days. `String.Empty` is maybe the more contemporary keyword.
Comment: .Trim removes white-space characters. Might not be what he wants.
Answer: 2015: Newer LINQ & lambda.

As this is an old Q (and Answer), just thought to update it with
newer 2015 methods.
The original "space" can refer to non-space whitespace (ie, tab, newline, paragraph separator, line feed, carriage return, etc,
etc).
Also, Trim() only remove the spaces from the front/back of the string, it does not remove spaces inside the string; eg: " Leading and Trailing Spaces " will become "Leading and Trailing Spaces", but the spaces inside are still present.

Function RemoveWhitespace(fullString As String) As String
    Return New String(fullString.Where(Function(x) Not Char.IsWhiteSpace(x)).ToArray())
End Function

This will remove ALL (white)-space, leading, trailing and within the string.
Answer: "Spaces" in the original post could refer to whitespace, and no answer yet shows how to remove ALL whitespace from a string. For that regular expressions are the most flexible approach I've found.
Below is a console application where you can see the difference between replacing just spaces or all whitespace.
You can find more about .NET regular expressions at http://msdn.microsoft.com/en-us/library/hs600312.aspx and http://msdn.microsoft.com/en-us/library/az24scfc.aspx
Imports System.Text.RegularExpressions
Module TestRegExp
    Sub Main()
        ' Use to match all whitespace (note the lowercase s matters)
        Dim regWhitespace As New Regex("\s")

        ' Use to match space characters only
        Dim regSpace As New Regex(" ")

        Dim testString As String = "First Line" + vbCrLf + _
        "Second line followed by 2 tabs" + vbTab + vbTab + _
        "End of tabs"

        Console.WriteLine("Test string :")
        Console.WriteLine(testString)

        Console.WriteLine("Replace all whitespace :")
        ' This prints the string on one line with no spacing at all
        Console.WriteLine(regWhitespace.Replace(testString, String.Empty))

        Console.WriteLine("Replace all spaces :")
        ' This removes spaces, but retains the tabs and new lines
        Console.WriteLine(regSpace.Replace(testString, String.Empty))

        Console.WriteLine("Press any key to finish")
        Console.ReadKey()
    End Sub
End Module

Answer: To trim a string down so it does not contain two or more spaces in a row.  Every instance of 2 or more space will be trimmed down to 1 space.  A simple solution:
While ImageText1.Contains("  ")                     '2 spaces.
    ImageText1 = ImageText1.Replace("  ", " ")      'Replace with 1 space.
End While

Answer: What about Regex.Replace solution?
myStr = Regex.Replace(myStr, "\s", "")

Answer: This will remove spaces only, matches the SQL functionality of rtrim(ltrim(myString))
Dim charstotrim() As Char = {" "c}
myString = myString .Trim(charstotrim)

Answer: You can also use a small function that will loop through and remove any spaces.
This is very clean and simple.
Public Shared Function RemoveXtraSpaces(strVal As String) As String
     Dim iCount As Integer = 1
     Dim sTempstrVal As String

     sTempstrVal = ""

     For iCount = 1 To Len(strVal)
        sTempstrVal = sTempstrVal + Mid(strVal, iCount, 1).Trim
     Next

     RemoveXtraSpaces = sTempstrVal

     Return RemoveXtraSpaces

End Function

Comment: Not the downvoter, but that's completely overkill, and counterproductive.  You concatenate one character at a time, calling `Trim` every time?  Just use the accepted answer.
Comment: I would like to defend this answer as it provides a means to loop through the strings from one end or the other, to only remove a space in a given location within the string rather than all spaces. It may have value to someone looking to perform some clean up without taking out all spaces.
Answer: Try this code for to trim a String
Public Function AllTrim(ByVal GeVar As String) As String
    Dim i As Integer
    Dim e As Integer
    Dim NewStr As String = ""
    e = Len(GeVar)
    For i = 1 To e
        If Mid(GeVar, i, 1) <> " " Then
            NewStr = NewStr + Mid(GeVar, i, 1)
        End If
    Next i
    AllTrim = NewStr
    ' MsgBox("alltrim = " & NewStr)
End Function

Remove spaces from a string in VB.NET


Are newly inserted data automatically stored in InnoDB buffer pool

Question: I understand that innoDB will store select statement result in the buffer pool, does InnoDB store newly inserted data (insert into statement) into buffer pool even after data has committed and wrote to disk?
Answer: Yes and no. Yes, buffer pool will contain the recently inserted data. No, the buffer pool doesn't contain SELECT statement output, that is what the query cache does, but it is generally harmful, deprecated and removes in MySQL 8.0. The buffer pool contains InnoDB pages (both index and data).
Answer:
All data and index activity for all InnoDB read and write queries must have the data in the buffer_pool
The buffer_pool is structured around 16KB blocks, just as the BTrees in tables for data and secondary indexes.
Blocks are pulled into the buffer_pool when needed by queries.
Blocks are bumped out of the buffer_pool on (approximately) a least-recently-used bases.
How fast a block lives in the buffer_pool depends on how fast other blocks get bumped out of the buffer_pool.
Results of SELECTs never go into the buffer_pool.  (Well, INSERT..SELECT.. is sort of an exception.)

From those 'facts' you can deduce the answer to your Question, and many more.


index within block

Question: is it possible to choose which index you want to aim for when sending a transaction?
Lets say there are 100 transactions all with 5 gwei, if i want to be on index 25, would it be possible to send the transaction and add a parameter to be placed on index 25?
Answer: I don't think it is possible, the transaction index is a computed value after the block is mined. the index is determined by how much gas you are paying for the transaction.
To be on the top you pay more but to be in the middle you need to pay more than the transaction lower than you and less than the one on top of you. the price you are paying is the product of gasPrice and gasAmount (gasPrice * gasAmount) so you will need to calculate it and push it with the needed values.

index within block


What is the distribution of it?

Question: If $\theta$ is uniformly distributed in $(0, 2\pi),$ then what is the distribution of $e^{i\theta},$ where $i = \sqrt{-1}?$ And what are the statistical properties of $\left[e^{i0\theta}\, e^{i1\theta}\, e^{i2\theta}\dots\, e^{i(N-1)\theta}\right],$ where $\theta$ is a single observation and $N$ some integer?
Answer: $e^{ik\theta}$, where $k$ is any non-zero integer, is uniformly distributed on the complex plane unit circle. The expected value of $e^{ik\theta}$ is $\displaystyle\frac{\int_0^{2\pi} e^{ik\theta} d\theta}{2\pi} = \frac{i - ie^{2\pi i k}}{k} = \frac{i - i}{k} = 0.$ The variance of $e^{ik\theta}$ is $1,$ because all values that may be observed are at a distance of $1$ from the expected value $0.$
$e^{i0\theta} = 1$ is constant.
If you by notation $(0, 2\pi)$ mean that values $0$ and $2\pi$ are never observed, then one may observe $e^{ik\theta} = 1$ only if $|k| > 1$, because the distribution wraps around passing the point $e^{ik\theta} = 1$ at $\theta = 2\pi/k.$
Comment: +1. This is one of those curious cases where the expected value of a random variable is actually a value that the variable can never actually take on. It follows from the symmetry of the unit circle about the origin.
Comment: @Fat32 indeed, you're right. I was thinking of continuous-valued random variables.
Comment: @JasonR For **discrete** random variables it's very common that the RV would never take its expected value. On the other hand for **continuous** random variables one might expect that RV takes every possible value including the expected one. That's probably the curious case. That would happen for example with a symmetric pdf with a gap around the part of its domain which includes the mean of the RV.
Answer: A more general solution can behad from the Von Mises Distribution
$$
f(x\mid\mu,\kappa)=\frac{e^{\kappa\cos(x-\mu)}}{2\pi I_0(\kappa)}
$$
When $\kappa=0$, it is equal to the uniform on $-\pi \le x \le \pi$
The circular moments
$$ m_n = E\{ e^{\jmath n x} \}= \int_{-\pi}^{\pi} e^{\jmath n x}f(x\mid\mu,\kappa) dx =\frac{I_{|n|}(\kappa)}{I_0(\kappa)}e^{i n \mu} $$
https://en.wikipedia.org/wiki/Von_Mises_distribution

What is the distribution of it?


Replacing outlet and was only expecting 4 wires but now I have 6. What to do!

Question: I thought this was going to be an easy swap but my old outlet has 6 wires vs 4 wires on my new one. Can I still use this new outlet?

click to embiggen images
Comment: Holy backstabs, Batman! Good thing you took a picture **before** dismantling the old wiring! +1 for that alone. If none of those brass tabs are broken then it should be a fairly simple swap out. The outlet is basically being used as a junction.
Answer: Sure. Clearest/simplest way is to wirenut the 3 blacks and a short black, the 3 whites and a short white, and connect the free ends of the short wires ("pigtails") to the new device. Use the screws, not the backstabs (says decades of dubious experiences with backstabs...)
That is only the case because this appears to be a straightforwardly wired receptacle with nothing "funky" going on (does not appear to be half-switched, all the blacks are on the hot side, all the whites are on the neutral side, etc.)
Comment: See this recent question for one **mild** illustration of why we strongly suggest not using those. https://diy.stackexchange.com/q/238318/18078 It's not difficult to find examples of outlets that have actually melted or caught fire. Just Don't use those. Get the screw clamp kind if you want to back-wire. Houses are expensive things to burn.
Comment: @getrichordiediying Technically, yes... it depends on whether you're biased towards the "get rich" part of your name or the "die trying".  Backstabs are good way to put you on the path to "die trying".
Comment: @J... subtle note, it's actually "dye *diy*ing"
Comment: @psaxton Hah, just noticed that.  Actually "die DIYing", but in any case, yeah, backstabs will also put you on the path to "die DIYing"... or at least as a *result* of it!
Comment: Thanks! I will try this. Technically could I use the 3 black wires into 2 screws and use one of the backstabs?
Comment: Yes technically you could use push in  and screw terminals.
Answer: Your new outlet will work just fine. You'll have to remove the three black wires from the old outlet and wire nut them together with an additional 6" piece of black wire. Remove the three white wires from the old outlet and wire nut, pigtail, them together with an additional 6" piece of white wire. Take the additional black wire and hook it around one of the brass screws and tighten. Take the additional white wire and hook it around one of the silver screws and tighten.
Comment: @getrichordiediying  I can't condone  using backstabs. I have removed so many that have failed in service. Plus, I'd get crucified here if i did... lol
Comment: @getrichordiediying if you spend an extra dollar or two and get the "commercial grade" outlets, you get a side clamp. That gives you 4 holes into which you can stick a straight wire, then tighten them down, 2 at a time, with screws. These aren't "backstabs" (as in your old outlet) because they screw down and there isn't a spring to get loose, but you get the simplicity of not having to do the pig-tail and bend a shepherd's hook. Kinda the best of both worlds, and in my DIY opinion _well_ worth the extra money.
Comment: Thanks for the detailed steps. Alternatively, could I use the 3 black wires into 2 screws and use one of the push-ins/backstabs?
Comment: @FreeMan – does a commercial grade one look like the old one that I'm trying to replace – it has the 4 holes? The old one is very lose and doesn't hold the plugs in that's why I'm replacing it.
Comment: @getrichordiediying They come in "standard" (with the two oval shaped receptacles) or "decora" with the one large rectangular opening on the front. On the back, there are two screws on each side -brass for hot, silver for neutral - each screw can accept 2 wires. You can use it as a "terminal block" and directly connect up to 4  wires to each side. In that respect, then  yes, I guess you'd say it "looks like" your old one. From the front side it looks like a receptacle - it doesn't look "industrial" or anything...
Answer: Use a "spec grade" receptacle ($3, comes in a box instead of loose).  They accept 4 wires per side.
Those have a feature, informally called "Screw-and-clamp", in which the wires insert in the back, but you tighten the screws to clamp them.  That supports 2 wires under each screw.
This feature is also found on any GFCI receptacle.
Comment: In addition to avoiding the [problematic backstab](https://diy.stackexchange.com/questions/201207/what-are-backstab-receptacles-outlets), the other benefit of the pricier outlets is they have better plug connections inside, meaning you probably won't have to replace it again anytime soon.


Can it be proven that a product of factors where two or more factors have non-integer exponentiation is a irrational number?

Question: I'm reading a course in Discrete Mathematics and exploring different ways things can be proven.
One classic question seems to be prove, for instance, that ${\sqrt{30}}$ is a irrational number.
By proof through contradiction and going through the motion we do following:
${\sqrt{30}} = \frac{a}{b}$ where $a$, $b$ are integers, $b\ne0$ and $gcd(a,b)=1$.
We end up with $2*3*5*b^2=a^2$
Now one can look at substitution and see that we end up with a contradiction.
But, a different argument at this point could be:
Since all factors of $a^2$ must be of power $2n$, where $n$ is integer $\ge 1$, $a=(q^n_1*q^n_2*..) \Rightarrow a^2=(q^{2n}_1*q^{2n}_2*..)$. Since we have $2*3*5*b^2=a^2$ that would mean that if $a^2$ have these factors then they would have exponential of $^{2n+1}$ after multiplication with $b^2$, if $a^2$ doesn't have these factors they would have exponential of $^1$ after multiplication.
Taking the square root of $a^2$ would result in these factors have a exponential that are non-integer. Can we prove that for any combination of factors where the exponentials are fractions that the product is irrational?
Comment: Thanks @JoséCarlosSantos, fixed that!
Comment: Welcome to MSE. In order to get $\sqrt{30}$, you should type `\sqrt{30}` and not `\sqrt30`, which will give you $\sqrt30$.
Answer: Welcome to MSE!
$\sqrt 4$ is an integer, not irrational.
In your argument, $4b^2=a^2$, so $2^2b^2=a^2$ and there is no way to find a contradiction.
So if the number is a perfect square, like 4, 9, 16, the proof of contraction fails as it should.


Prove these two angles are equal

Question:
$ACB=ACD$
$BAC=ADC$
$MB=MA$

$Prove \angle MCB=\angle MBD$
Answer: $\qquad\qquad\qquad$
Let $E\ (\not=C)$ be a point on the line $CM$ such that $MC=ME$, and let $F$ be the intersection point of $BD$ with $CE$. Since the quadrilateral $AEBC$ is a parallelogram, we have $\angle{EBA}=\angle{BAC}$ and $\angle{AEB}=\angle{ACB}$.
We know that $\triangle{ABE}$ and $\triangle{BAC}$ are congruent, and that $\triangle{BAC}$ and $\triangle{ADC}$ are similar.
So, if we set $BA=a,AE=b,EB=c$, then
$$BC=b,\quad AC=c$$
and
$$AD:BA=AC:BC\implies AD:a=c:b\implies AD=\frac{ac}{b}$$
So, we have $$\angle{EBC}=\angle{DAB}\quad \text{and}\quad BE:BC=AD:AB$$
from which we have that $\triangle{EBC}$ and $\triangle{DAB}$ are similar.
Therefore, $\angle{MBD}=\angle{ABD}=\angle{BCE}=\angle{MCB}$.
Answer: Just for fun, a different solution. Let $N$ be the midpoint of $AD$ and let $L$ be the intersection point between $CN$ and $BD$. Then triangles $CND$ and $CMA$ are similar, so $\angle CND = \angle CMA$. Therefore $\angle CNA + \angle CMA = \pi - \angle CND + \angle CMA = \pi$. Therefore the four points $C, M, A, N$ lie on a common circle. Therefore $\angle CNM = \angle CAM = \angle CAB$. But since $M$ and $N$ are midpoints of $AB$ and $AD$ respectively, the segment $MN$ is parallel to $BD$ (and half of it in length). Therefore $\angle CLB = \angle CNM = \angle CAB$ which means that the four points $C, L, A, B$ lie on a common circle and therefore $\angle NCA = \angle LCA = \angle LBA = \angle ABD$. But since triangles $NCA$ and $MCB$ are similar, we conclude that $\angle MBD = \angle ABD = \angle NCA = \angle MCB$.

Prove these two angles are equal


Do electron donating groups make a molecule nucleophilic?

Question: Do electron donating groups make a molecule nucleophilic?
One group, the alkyl group in this example, is electron donating in $\ce{CH3CH2O-}$. Will the molecule be nucleophlic?
Comment: The molecule is already nucleophilic by virtue of the negative charge and lone pair on oxygen.
Answer:
Do electron donating groups make a molecule nucleophilic?

Sometimes.
Sure, electron donating groups can make a molecule more nucleophilic by virtue of increasing the negative charge density on the nucleophilic atom.
However, nucleophilicity is a kinetic property, and having a lot of electron donating groups attached can significantly affect the ability of the nucleophile to approach the electrophile. This reduces nucleophilicity. An example would be tert-butoxide. Yes, oxygen with a negative charge is generally nucleophilic, and yes, the tert-butyl group is an inductive donor, but tert-butoxide is not very nucleophilic because of steric hinderance.

One group, the alkyl group in this example, is electron donating in $\ce{CH3CH2O-}$. Will the molecule be nucleophlic?

Maybe. Nucleophilicity also depends on the solvent. A charged ion such as ethoxide ion would be well-solvated in a polar solvent, such as water, and less well-solvated in a non-polar solvent, such as hexane.
Solvation impacts reaction kinetics, and in turn, impacts nucleophilicity. Consider the halides for example. In polar protic solvents, iodide ion is the strongest nucleophile. Protic solvents are not able to solvate iodide ion as well as they can solvate the fluoride ion, which has a much higher negative charge density. In polar aprotic solvents, however, fluoride ion is generally a stronger nucleophile than iodide ion because fluoride ion is not as strongly solvated and it also has a great negative charge density.
In sum, nucleophilicity is not an inherent property. It depends on a variety of factors - both external and internal to whatever molecule or ion that you are considering.
Answer: Yes electron donating group increases nucleophillic nature either by $+I$ (Inductive effect) or  by $+M$ (Mesomeric Effect). They do so by increasing the electron-density over nucleoplillic atom. In $CH_3CH_2O^-$ the alkyl group has its $+I$ effect which Increases nucleophillic nature.
Hyperconjugation also increases nucleophillic nature by $+H$ effect. According to Baker Nathan Hyperconjugation dominates Inductive effect. Therefore $CH_3-$ will Increase more nucleophicity than $CH_3CH_2-$ because of presence of 3$\alpha H$ rather than 2$\alpha$.
The general order of effects is :-
$+M > +H > +I$
Hope it Helps...!


l293d is not able to drive two 300 rpm motors simultaneously

Question: I am using l293d in a line follower but recently I am facing a problem. my l293d motor driver is not able to power 2 300 rpm motors simultaneously while with one of the motors at a time it works perfectly fine. Earlier it used to drive both the motors at optimal desired speed but recently its posing the above mentioned problems. I have tried replacing the Motor driver and Arduino itself but nothing worked and I am still facing the problem.
Comment: What is your power source, is it able to supply the current for 2 motors? The L293d with proper heatsinking should supply .6A per channel which seems like it should be sufficient for a robot under minimal load. I would check the batteries!
Comment: yeah the power source is just  fine .. I use a 12V-1A power adapter from the beginning . Earlier it worked just fine but recently this whole arrangement just got messed up with the motor driver failing to drive the 2 motors.
Comment: Do you have an earlier revision of the code? Could it be something software related?
Comment: I sense the code is all fine because the motor driver isn't able to drive the two motors simultaneously even when I directly connect them to the l293d outputs without taking any inputs from the Arduino .
Comment: Please post your code. I have seen this problem before, the OP claimed that it was a power/board problem and it turned out to be a bug in the code.
Comment: @SomitSinha Please also post your wiring/circuit diagram. You can either use the inbuilt circuit tool or you can draw it using [Fritzing](http://fritzing.org/home/).
Answer:
Check if both channels are working in either direction individually.
Check the current draw under the load per motor using an Digital Multimeter as an Ammeter function.

The L293 is designed to provide bidirectional drive currents of up to 1A at voltages from 4.5V to 36V.
600mA per channel for L293D

As long as your motors at drawing more than 600mA per motor, it should work fine.
Answer: Check your power supply with a multimeter. Look out for voltage drops under load, or similar problems.
Also, make some tests with another power supply in order to find out if the one you're currently using is faulty or not. You say you've tried replacing the motor driver and the arduino, but not the power supply.


Seeking benchmark dataset for election prediction

Question: What benchmark datasets are used for election prediction? Can anyone provide me a link to access such benchmark collection for future research work?
Answer: I have never really looked for a generic data set as most election outcome predictions are purely statistical in nature.  If there is any secret sauce, it is usually in the sampling methodology and weighting but even these are pretty well known.  The polls are usually informative because the polling firms repeat the same poll daily or weekly over long periods.


Rabbitmq - Reasonable performance/scale expectations

Question: I'd be grateful if anyone could point me in the direction of some reasonable scale figures/limitations on rabbitmq (on "average" hardware, fwiw) or post your experience with its performance. I'm trying to get a sense of capacity for number of queues, number of subscribers on queues, performance implications of having hundreds or thousands of listeners on fanout queues, any hard numbers anyone might have running rabbit in a high-capacity environment.
Comment: This is extremely simple to test, especially considering that, with the numbers you're expecting, you have a budget for getting some VMs ready.  I highly suggest you test it based on your exact use case, on the hardware you would expect to use.
Comment: Have a look at the plans of [CloudAMQP](https://www.cloudamqp.com/plans.html) - these are tested performance numbers for certain hardware configurations.
Answer: First of all, you need to understand which items in your list have scaling limits that you might hit, and which do not. Some of this is implementation dependent so it helps to read up on internals, for instance the book RabbitMQ in Action.
The number of queues is limited by your RAM. The number of messages in play, on the other hand, is not limited by RAM because RabbitMQ automatically pages them out to disk. Once I accidentally got almost 8 million messages in play on a development server when I wasn't paying attention.
There is also no limit to message sizes, but you really should think twice if the size of a single message exceeds 512K. I ended up using a memory cache to pass large objects between applications and only sent smaller control messages that included a memcache key. But if you really want to you can send huge JPEG's and binary objects like JAR files as messages.
The number of subscribers is an OS limit because a subscriber needs at least one TCP socket open. Of course that is tunable in most OSes, so your mileage will vary and that is why you have to test your model. I have been using JMETER to load test our web applications and I just discovered this AMQP plugin https://github.com/jlavallee/JMeter-Rabbit-AMQP but have not yet used it. In any case, this is the kind of testing that will quickly tell you what your hardware (or VM config) will reasonably handle.
The only difficult thing that you have is testing large numbers of consumers to the fanout queues. You might also want to compare using a topic exchange instead, with consumers subscribing using a wildcard (*) binding key which achieves the same end result. Try to run this test with as many different machines as you can to make sure that you aren't somehow running into a bottleneck caused by a single server running consumer processes. P.S. that Jmeter plugin looks like it may also be useful to simulate consumers.
Answer: This is not really an answerable question - there are too many factors (the moving definition of "average" hardware, the size of messages in the queue, the number of consumers and how often they poll / how quickly they complete work in messages, etc.).  You really need to benchmark your environment.
That said, check out some of these discussions of RabbitMQ performance (including some ideas on how you can benchmark your installation to see what you can expect out of Rabbit):

http://hiramchirino.com/blog/2011/12/stomp-messaging-benchmarks-activemq-vs-apollo-vs-hornetq-vs-rabbitmq/
http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2011-April/012508.html
http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2009-October/005177.html
http://www.rabbitmq.com/blog/2011/10/27/performance-of-queues-when-less-is-more/ (more on tuning)
Comment: I'm aware of the many variables. That's why I mentioned things like "average" hardware, in quotes as I understand how fuzzy an idea that is. Nevertheless I thought some numbers derived from peoples experiences would be useful.
Thanks for the references.
Comment: @user21640 It's not just the hardware that adds fuzz to your question - High-Frequency Trading may have a different idea of "high capacity" than you or I do, and vastly different definitions of acceptable performance. Ultimately the only person whose experience matters is you, in your environment, and in my experience one well-planned local benchmark is worth thousands of external reports when it comes to confidence in capacity planning - you never know when your workload is *THE* pathological case :-)


Is BLE 4.1 backwards compatible to BLE 4.0 ? Can a phone with bluetooth 4.0 talk with a mote with BLE4.1?

Question: BLE 4.1 is out and it could be considered the biggest news for internet of thing developers. I want to know if my mote with BLE 4.1 can interact with iPhone 6 which has Bluetooth 4.0.
Answer: Got this answer from TI E2E forum.
As per the Bluetooth SPEC, mote with BLE 4.1 should be backward compatible with Bluetooth 4.0. But you should keep in mind that you will not be able to take advantage of BLE 4.1 features. Mote will be as good as an Bluetooth 4.0 device.
Again it also depends on whether the mote device wants to go ahead with a BLE Connection with an older device. Because even if the SPEC says that 4.1 device is backward compatible, it goes to the manufacturer to decide whether they want to go ahead with an backward device.
Answer: Hmm, I didn't look carefully enough so here's my revised answer:
As you can see here BLE is a feature of BT 4.0. and higher so also included in BT 4.1.
So it should work assuming your Iphone supports BT 4.0 properly, but unfortunately you cannot be sure with Apple products.


Does Transmigrate soul transfer Ki, Psychic, and Magic abilities?

Question: If the spell Transmigrate Soul (Anima 153) succeeds, creature A's soul moves into creature B's body. With a good enough roll, creature A consumes creature B's soul. The spell then says that creature B keeps its physical attributes but replaces its mental attributes with those of creature A. If both creatures possessed different ki, psychic, and magical abilities, what abilities does creature B now have?
Answer: There are many discussions about this spell and most people agree with the following statements. This is what would happen when you use that spell:
Mental - Things you're keeping

Your Ki
Your Psychic abilities
Your Magical abilities
Your attributes, related abilities and resistances:

INT, PER, POW, WP

Almost everything you know
Your experience (your combat abilities are yours)

Mental - Things you're losing

The creature's mind and everything related to it
The creature's experience (in combat, his knowledge...)

Phsysical - Things you're keeping

A new body with all his physical advantages and disadvantages
Special characteristics if the new body has them
The creature's physical attributes, related abilities and resistances:

STR, AGI, DEX, CON

Physical - Things you're losing

Your body (usually weaker) and everything related to it.

Example
You are a mage and you transmigrate your soul into a samurai's body successfully. Now you can use your spells and your ki as if nothing changed, but inside a strong and fit body. This samurai has a katana but, as you have never learned how to fight or how to use it, you can't because you don't know how. Your base attack and defense are still the same since that requieres experience.
Source: My own experience and a lot of research in Spanish forums.
Comment: This answer appears to duplicate the other answer to this question, but without any reference to back up its contention. I'm guessing you intended to point out something the other answer didn't, but I can't work out what - could you possibly edit it so as to make that point clearer?
Comment: Well, I wanted it to be a comment in the other answer to complement it, but I can't. And yes, I try to point out the physical part because it's not very clear in the first answer.
Comment: That's a significant improvement, so +1. (I recommend adding relevant rules citations and/or links to relevant pages on the Spanish fora, though.)
Answer: In Anima, Ki,  Psychic and Magical powers all come from the soul of the individual.
The receptor will keep all his Ki, Psychic and Magical abilities.
You can find more in the official Anima forum (in Spanish), where this question has been asked multiple times and expands more in what can and what can't be done:
Official Site
Unfortunately, there are no written rules for exactly what you can get and what you can't. Some masters change attack and defense values and other don´t (as it could be physical or it could be training and part of the donors 'muscle memory´).
I recommend you discuss it with your master/players before attempting this spell. Or not, that could be more fun :D


How do I play 30 second games on chess.com?

Question: My current chess rating is approximately 1400 in 1 minute, 3 minute, and 5 minute games. I have seen some of the other players playing 30 seconds games whose rating is around 1200 but I cannot find an option to play 30 second games. How do I play 30 second games on chess.com?
Answer:
Go into Live Chess.
Click on the left button right above the "Play" button. It should currently display some time control.
Click on the "More" button.
Click on the "30 sec" button. For custom time controls, you can instead click on the "Custom" button and enter what you want.
Answer: Desperate to play 30 sec bullet in the chess.com app?
Go to: More -> Watch -> Top games.
If you're lucky you'll find some 30 sec games going on. If found, just click on it and wait for the game to end. A widget will then pop up showing stuffs related to the match. It will also have the button "New 30 sec". Yes! Click on that!
Also, to play next time, you can always click on one of your previous 30 sec games (I need not say the next step..).


Dell PowerConnect Console connection via Ethernet

Question: When you buy a Dell PowerConnect (In my case it's a 5548) you are given a console cable that is serial to ethernet. Let's say you don't have a serial port on your laptop and but you still want to run the setup wizard via the terminal. Is there settings to connect to the console port using an ethernet cable to run that wizard? I've tried to look at Dell's documentation but all I could find was an option to connect using the provided serial cable. Thanks!
Answer: Do yourself a favor and purchase a USB to serial adapter. You never know when you may need it in addition to connecting to your Dell switch.
Comment: Glad to help...
Answer: I just looked at the manual for Dell PowerConnect 5548 systems. The console port on the front accepts RJ45 connectors (same as Ethernet), but it is a serial connection.
The cable you got with it is not 'serial to ethernet'.
It is serial (std serial connector) to serial (RJ45 plug).
The non standard plug is often used so you can connect a serial console with patch cables. Allowing you to sit comfortably in the IT office while still maintaining a serial link to a switch.

See also page 6 on the 'getting started guide'. Unpacking paragraph. 3rd line: RS-323 cable with male 8-pin RJ-45 connector
Comment: ok so joeqwerty's comment about getting a USB to serial adapter would be the best bet for using my laptop directly. thanks for the explanation.
Comment: Assuming your laptop does not have serial anymore: Yes. But I thought it was important to explain the background. Both for you and for future readers of this site.
Comment: Agreed, I can only give the green check to one answer, but yours certainly is very helpful in understanding the situation. Thanks!!!
Answer: The included cable is likely DB9 to RJ45.  While most Ethernet uses some variant of the RJ45 not everything that uses RJ45 is Ethernet (older digital PBX phones come to mind).   Make sure of what you are plugging into - damage can occur (although it is uncommon).


Unlimited text field type and unordered list with links

Question: I'm continually amazed at how powerful drupal can be. Im using Drupal 7 and right now I am curious to see if its possible to create a field for a custom content type where I enter text that becomes links via an unordered list. I would love if I could enter this into the CMS without having to go into the code.
I managed to find a way of creating the unordered list by customizing the field template file (field.tpl.php) which is great, but curious if there is a way to wrap the text items in an href.

Link 1

Link 2

Link 3

Thanks all!
Answer: I found out a perfect module to do just what I wanted called Link.


What are possible environmental concerns that delay home construction/additions and why do they do so?

Question: I know that identifying wetlands or steep slopes on your property is important before you design and begin to build, but what other issues have people run into when trying to either start or finish an exterior project? I want to build an addition on my house, but I want to know what to expect or at least know where I can go to find this information. We are trying to determine a timeline for the project in order to make it easy for everyone involved. My contractor is looking into it as well, but I figured there was no harm in asking here!
Comment: It may help to know what kind of addition you are planning for and if you have any specific concerns. You mention wetlands and slopes, but environmental concerns will vary by region, so knowing more about your project will help avoid this being an exceptionally broad question. For example, frost is a concern in northern climates but not in southern, leading to basement requirements in the north while the south might use slab-on-grade or a crawlspace.
Comment: Welcome to Home Improvement.  Your question is good from the perspective of "good to know", but isn't a good fit for a Q&A site.  The site is designed around questions that have a "right answer" that you can look up in an authoritative source.  Questions that seek to create a list or aggregate knowledge don't fit that model.  You end up with many partial answers, perhaps none a complete one unless it is way outside the intended scope.  It also doesn't mesh with the site's "scoring system" of identifying good and bad answers via voting and acceptance.  A forum or chat might be a better venue.
Comment: Once a structure is built I have not had a problem getting a permit for small additions in the past, where is the property located and what is the % of the addition, are you adding a bedroom or expanding square fottage, most septic systems are based on the number of bedrooms.
Answer: Social: 1) Neighborhood, 2) schools: Many clients come to us to "remodel" their existing house because they like the neighborhood. They could find better land values elsewhere and probably build new cheaper, but they like their neighbor's, etc.
Economic: 1) Financial, 2) investment: You probably won't own that investment forever. Review trends in your area for increasing value. Will you need financing? Lending institutions require adequate time for closing.
Regulatory: 1) Adequate review period for permits, 2) adequate time for sub bids, utility install, etc.
Environmental: 1) Weather acceptable for material installation: Where I live, we build year-around, but it costs more in the winter because it's slower and we have to protect our work from the weather.
Design: 1) adequate time for design review considerations, changes, etc. 2) adequate time to obtain materials and equipment. If you're adding a second floor bath, do you have adequate water pressure? Will you a new electrical service added by utility? If you are not hooked up to the local sewer utility, you'll need adequate time for soil sample analysis, testing and design approval. Likewise for water and you'll need adequate distance between water supply (well) and septic system (septic tank and drainfield.


How can I identify all large tables that have no index?

Question: Is there a way I can identify all objects with over 10K rows and no index?
Comment: @Martin Smith , I need to create a sql agent job that captures tables over 10K  records with no index.
As you likely say this is for performance and also i'd like to get an idea of the tables sizes   and possibly applying indexes if needed be as our analystical team are running some expensive queries(via linked servers) Note this for an analytical / data warehouse environment .
Comment: yeah, originally I thought you were asking how you would go about producing tables that had over 10K rows and no index (which is of course only too easy hence my confusion). I replaced "get" with "identify" for clarity
Comment: Linked servers have some non-intuitive performance considerations.  While applying appropriate indexes will certainly help, it may not be the cause of performance issues, especially if they are joining local tables with remote tables.
Answer: I would use this query to find that out.  The rowcount for Non-Clustered is the sum of ALL non-clustered indexes on the table, but the heap/clustered count is accurate.
<code>;WITH CTE_RowCount AS
    (
    SELECT S.[name] AS SchemaName
        , O.[name] AS ObjectName
        , I.type_desc AS IndexType
        , SUM(P.[rows]) AS [RowCount]
    FROM sys.partitions AS P
        INNER JOIN sys.objects AS O ON O.object_id = P.object_id
        INNER JOIN sys.schemas AS S ON S.schema_id = O.schema_id
        INNER JOIN sys.indexes AS I ON I.object_id = P.object_id AND I.index_id = P.index_id
    GROUP BY S.[name], O.[name], I.[type_desc]
    )
SELECT *
FROM CTE_RowCount AS R
    PIVOT (SUM(R.[RowCount]) FOR IndexType IN ([HEAP], [CLUSTERED], [NONCLUSTERED])) AS Pvt
WHERE COALESCE(Pvt.[HEAP], Pvt.[CLUSTERED]) >= 10000
    --AND Pvt.[CLUSTERED] IS NULL -- Will only show if table is a HEAP
    --AND Pvt.[NONCLUSTERED] IS NULL --will only show if there are no non-clustered indexes.
</code>


Had my mechanic replace the front brakes on my '03 Toyota Camry and now it seems they have become warped

Question: Around 4-6 months ago I had my front brakes replaced by my mechanic. After he had completed this job I was having trouble with my e-brake not setting strong enough and therefore not working properly. He said no problem I just need to readjust the brakes I installed for you. I had him do so and all was fine for a little while. However, after a couple months or so the car begin to shake under the pedal and in the steering wheel when the brakes were applied. This became worse over time particularly when going downhill. When I contacted my mechanic about this he said that he needed to readjust the front brakes and that he was so sorry he must have adjusted them a little bit wrong and he would have them resurfaced because they are warped now and that was his fault therefore he would pay for the resurfacing and I would not be charged for anything. My question is is this entirely true? I have since been told by other mechanics that the brakes are self adjusting after replacement. Just trying to see if I need a new mechanic. Thank you all in advance!
Comment: Welcome to Motor Vehicle Maintenance & Repair! Is this for the front or the rear brakes? Trying to figure out why it is tagged as "drum brakes"?
Comment: You might check the tightening of the (front) lug nuts.  Sometimes ppl get carried away with the air gun, sometimes they forget.
Comment: Paulster2... I have it worded like that because the front brakes are not drum brakes and the rear brakes are. Or at least that's what he told me. He has since torn apart the dashboard on the Honda Ridgeline that my father and I share just to get the ignition switch out and look at it and I had already gotten it more than three quarters of the way before he ever showed up. He then proceeded to steal all of the screws and bolts to put it back together and refuses to do anymore on it until he gets paid. However, we of course refuse to pay him for tearing it totally apart unnecessarily
Comment: This sounds like this would be fun to watch as a reality show!
Answer: Front brakes cannot be adjusted. Rear drum brakes may need to be adjusted manually after a replacement, however during normal use they are indeed self-adjusting.
The shaking you are experiencing is very likely indeed to be related to your front brake rotors being warped. While misadjusted rear brakes may have caused some of that problem, that particular cause is unlikely after the rear brakes were adjusted.
The front brake rotors may become warped due to coninuous heavy braking, braking hard and immediate rapid cooling (such as driving into a puddle of water), or just being made out of cheaper grade steel.
Comment: Thank you for the advice. I was recently told however, that the brakes are self-adjusting
Comment: Like I said, the front brakes are non-adjustable (hydraulic piston only). However, the rear drum brakes need to be adjusted after being replaced as it's possible to have the shoes not spread far enough. If the shoes are not adjusted, the rear brakes will not function too their full capacity, if at all (and your parking brake will not hold well). In this case, the front brakes may overheat and warp.
Comment: My e-brake was in fact not holding well at all. Does this mean another adjustment should be made in order to fix the issue?
Comment: Seems likely that the rear brakes were not engaging due to misadjustment, that put too much load on the front brakes - they overheated and warped.


Which god does 神様 actually refer to?

Question: I have the impression that if a Japanese uses the term 神様, they refer to an omnipotent deity very similar to the Abrahamic god. According to my (very limited) knowledge of Shinto and Buddhism, there is no such equivalent in these beliefs, correct me if I'm wrong! So I was wondering if that term or the connection of the term with the concept emerged with Japan getting in contact with Christianity or if it has a different origin?
Comment: Make that _"any god[s]{●}"_, for that matter -- Japanese has no lexical plural in most cases, so any given noun could mean one, or many.
Comment: I mean, a lot of the time it refers to YHWH, but as far as I know it can apply to *any* god, from Amaterasu to Brahma to Thor.
Comment: good point, I was not thinking about that you could actually also refer to all of them at the same time with this word
Comment: Huh, I actually feel like 神様 can only be singular and you need 神様たち for the plural. (Of course 神 by itself can be plural or singular.) Not sure if that's just me...
Comment: @DariusJahandarie, while not definitive without further analysis of the hits, [a Google search for これらの神様](https://www.google.com/search?q=%22%E3%81%93%E3%82%8C%E3%82%89%E3%81%AE%E7%A5%9E%E6%A7%98%22) suggests that 神様 could be used to indicate the plural.
Comment: Huh, yeah, you're right. 日本の神様 can also obviously be plural. I guess maybe only when it's standalone it needs a little help.
Answer: Term meaning
In general
Any meaning that refers to any singular omnipotent being is likely from Christianity.  Japanese culture has been, so far as we can tell, polytheistic, syncretic, and animistic for the entirety of the historical record, and for as much of prehistory as we can reconstruct from archaeology and other sources.  *Anything* can have a kami, as the inherent force or "that-ness" of the thing.  As a consequence of this idea, kami are generally not regarded as omnipotent.
Not just one
Even with regard to Christianity, from every Japanese person I've talked to about this, the general attitude is not "the Christian God is the one and only, and I forsake all belief in any other god or spiritual force", but rather, "okay, I'll cover my bases in case Christianity turns out to be right, and try praying to this Christian god as well."
(This may explain why the Mormons seem to make such headway in Japan when kids on their mission report so many converts.  Once the annual tithe rolls around, a lot of these new Mormons apparently decide it's a bit too expensive, perhaps especially so when compared to the handfuls of loose change that seem to suffice for the local Shinto shrines.)
This "both / and" idea, rather than the "either / or" dichotomy imposed by the Abrahamic religions, is a large part of the modern Japanese approach to religion in the culture at large.  After birth, one is blessed at a Shinto shrine.  Later, one gets married in a Christian church.  And at death, one has a service and a memorial at a Buddhist temple. It's quite practical, in its way.
Term origins
The pieces
The Japanese term 神様【かみさま】 consists of two parts: 1) 神【かみ】, referring to a "god" or "deity" or even "spirit" in certain contexts, and 2) 様【さま】, an honorific suffix.  Both terms have long histories in the Japanese language, with roots tracing back to the very first long-form Japanese texts from the 700s.
The whole
Digging around in the University of Virginia's online corpus of Japanese works, a search for the term 神様 finds hits in The Tale of Genji from the early 1000s, often considered to be one of the world's first novels.
⇒ Given that this first quoted use (that I can find in a quick search; older ones might be out there) pre-dates any Christian influence on Japanese culture by roughly 500+ years, we can say pretty definitively that this term 神様【かみさま】 was not coined in response to Christianity.
⇑ As Aeon Akechi noted in the comments, I failed to notice that the Genji hits at the UVA site were for a modernized version.  Searching through the digitized-but-otherwise-mostly-unaltered text available at Wikisource revealed no instances of 神様【かみさま】 or various alternative spellings.
After further research into the specific sense development of 様【さま】, I found that the honorific usage was an extension of an older meaning of "facing, direction", used later as a polite form of indirection to indicate a person, and from that we got the honorific suffix usage appearing in the 1300s.  This gradually replaced older 殿【どの】, in turn from regular noun tono "lord", which sense grew from earlier "estate, mansion" to indicate the person living in such a grand house.  This kind of polite indirection gradually shifting to honorific or even pronoun usage is quite common through Japanese history; for that matter, the common term anata as a basic-politeness term for "you" originally meant "that thing or person in that direction way over there".
In the oldest texts, the common honorific for kami wasn't a suffix, but rather the prefix 御【み】, and we can find lots of ancient examples of combinations like 御神【みかみ】 and 大御神【おおみかみ】.  However, we don't find any instances of 神殿【かみどの】 where the 殿【どの】 is an honorific -- instead, the dono here still has the "mansion" meaning, and kamidono is a rare and now-archaic reading for modern term 神殿【しんでん】, which refers to a shrine.
I can't get a solid date on the first appearance of 神様【かみさま】.  I've gone through what I think are all of the digitally-searchable texts categorized as "middle ages" (中世, roughly 1100 up through 1600) over at the Japanese Wikisource, and found no instances of any spelling of 神様【かみさま】, even unlikely alternative spellings (神様・神状・神方・神さま・神ざま・かみさま・かみざま).
Tentative (revised) conclusion on the origin of 神様【かみさま】
Considering the following:

神様【かみさま】 doesn't appear in any of the "middle ages" Japanese works that I've searched
the existing 御神【みかみ】 honorific reference to kami may have been regarded as archaic, and/or too specific to local belief and likely viewed as "heathen" by the Portuguese
様【さま】 was likely in common use as an honorific suffix around the time that the Portuguese were actively translating Christian texts into Japanese

... it certainly seems within the realm of possibility that the specific construction 神様【かみさま】 was coined in relation to Christianity.  However, I cannot find anything conclusive at this point.
Note: In modern usage, as pointed out in the comments earlier, this term can refer to any god or gods, big or small, of whatever tradition.

Please comment if the above does not address your question.
Comment: Look a little closer. That's a modernized version of The Tale of Genji.
Comment: @AeonAkechi, gah!  Thank you.  The consequences of moving too fast.  I'll see if I can't find a more valid citation.
Comment: When was the Bible first translated? I remember reading somewhere that's when "kami" was selected among candidates as translation for "God"
Comment: @IgorSkochinsky, what other candidate terms would there have been?
Comment: Alas I don't remember the details, but I imagine they could have been thinking about stuff like 天王, dunno.
Comment: The Portuguese first arrived in Japan in 1543. Considering the time needed to learn a language well enough to translate, the earliest possible attempt couldn't have been before, say, 1544. The 1603 _Nippo Jisho_ records the word _Cami_ as seen [here](https://books.google.com/books?id=TFJAAQAAMAAJ&vq=Cami&pg=PP80#v=onepage&q=Cami&f=false) (left-hand column, second highlighted entry from the bottom) with the definition, _"que venerão os gentios de Iapão"_ ("that is venerated by the gentiles [heathens] of Japan"). This could suggest that the _-sama_ was added to differentiate the Christian god.

Which god does 神様 actually refer to?


Create libsvm from multiple csv files for xgboost external memory training

Question: I am trying to train an xgboost model using its external memory version, which takes a libsvm file as training set. Right now, all the data is stored in a bunch of csv files which combine together are way larger than the memory I have, say 70G.(you can easily read any one of them). I just wonder how to create one large libsvm file for xgboost. Or if there is any other work round for this. Thank you.
Answer: If you csv files do not have headers you can combine them with the Unix cat command.
Example:
> ls
file1.csv file2.csv
> cat *.csv > combined.csv

Now combined.csv is the concatenation of all the other files.
If all your csv files have headers you''ll want to do something trickier, like take the n-1 lines with tail.
XGBoost supports csv as an input.
If you want to convert that to libsvm regardless, you can use phraug's scripts.
Comment: Thanks for the answer, my understand is that libsvm is also a text file. Can I do the same `cat` thing on a bunch of libsvm files?