Is this given ray diagram for a biconvex lens correct?

Question: Figure shows a biconvex lens of having radius of curvatures as R1 and R2 , in the ray depicted shouldnt the meeting point of the rays be at 2F and the object should be placed at -2F , where F is the focal length from the lens maker formula for thin lenses ? The figure depicted -2F1 going to 2F1 this is wrong isnt ? It should be F in place of F1 ,where 1/F= 1/F1 +1/F2 isnt ? And is the F1 and F2 called the focal point of lenses having one radius of curvature as infinity ?is that the definition of first and secondary focus(other than the parallel rays meeting one)?
Comment: Depending on the context (where is it from ?) it might serve to illustrate aberration experienced by off-center rays.
Comment: I think so otherwise it should have been at 2F2 only
Answer: F$_1$ and F$_2$ are the principal foci. They are the same distance, f, (the focal length) either side of the optical centre of the lens.
I can therefore make no sense of your equation  "1/F= 1/F1 +1/F2".
The rays on the diagram are roughly correct. An object in a plane at distance 2f from the optical centre of the lens should form an image on the plane at a distance 2f from the optical centre but to the other side of the lens. You can show this by putting $u=2f$ into the equation
$$\frac 1u + \frac 1v = \frac 1f\ \ \ \ \ \ \ \text{[real-is-positive convention]}$$
or, equivalently, by putting $u=-2f$ into the equation
$$\frac 1u + \frac 1f = \frac 1v\ \ \ \ \ \ \ \text{[cartesian convention]}$$
I assume that 2F$_1$ and 2F$_2$ are supposed to be points on the lens axis a distance 2f from the optical centre of the lens, on either side of the lens. 2F$_2$ seems to be marked too close to the lens.
When I first  looked at the diagram I was misled by the labels C$_1$ and C$_2$, expecting them to stand for the centres of curvature of the two faces of the lens. But these will not be at distance 2f from the centre of the lens, as on the diagram. [It would require a refractive index of 2 for the lens material, as you can show from the lens-makers' formula.] Clearly C$_1$ and C$_2$ have nothing to do with centres of curvature!
Comment: Sorry. I'm assuming that $R_1 = R_2 = R$ (say), so $R=2f$.
Comment: Yes. The principal foci are the same distance either side of the optical centre, even if the lens surfaces have different curvatures. It would be a co-incidence if either centre of curvature were twice the focal length from the optical centre, and if the curvatures were equal, the centres of curvature would certainly not be at this distance, as it would need the lens material to have too high a refractive index. As far as I know, with the exception of diamond, transparent materials have refractive indices less than 2.
Comment: Sir i clearly understand now what you mean , regarding the final note u said: 1/f = (2-1)(1/R1 +1/R2) (all terms positive) , we arrived at R1R2/(R1+R2) = f , now how u showed this to be 2f = R1 and 2f=R2 ?
Comment: I see Sir so in general we can say foy any lens having radii of curvature R1,R2 , F1O =OF2 and 2F1O =2OF2 is not equal to R1 and R2 right?


Can a quantum computer implement a classical one?

Question: The normal question about this topic would be: Can a classical computer implement a quantum computer? But now I wonder the exact opposite: can a quantum computer implement a classical one? Can we say that classical computation is a subset of quantum computing?
Comment: Isn't the question whether one class of computer can *tractably* implement the other? I believe that a classical computer can simulate a quantum computer, but the complexity just gets bad very rapidly in the worst cases.
Comment: Your current computer is using tons of qubits without taking advantage of any of the special quantum features.
Answer: Yes, it is perfectly possible to run a quantum computer as a classical one, simply by keeping all the qubits in 0 or 1 and deciding not to use the capability to place them on superpositions of those states or entangle them to each other.
To be a bit more precise, the computation complexity class BQP (of problems that can be efficiently solved in a quantum computer) contains as a subset the class BPP (of problems that can be efficiently solved in a classical computer, if you allow for a finite probability of success) which itself contains the class P (of problems that can be efficiently solved in a classical computer). The Wikipedia pages for those complexity classes have more detail on those inclusions.
Comment: @knzhou [Reversible computing](https://en.wikipedia.org/wiki/Reversible_computing) is Turing complete and can be happily implemented in quantum computers. (In more detail: quantum computers cannot implement 'standard' (lossy) AND gates, but they have no problem with the reversible-computing equivalent $(x,y,z)\mapsto (x,y,z\oplus(x\otimes y))$.)
Comment: I think OP may be referring to the issue where you can only use reversible gates, e.g. fully quantum computers cannot use AND gates.


gboard disable multilingual typing

Question: I have just bought a nokia 7 plus and I can't disable the multilingual typing. I tried going into settings for gboard under "text corrections" but the option to enable/disable multilingual typing isn't even there. How can I disable it? Please help!
Answer: Go to settings for Gboard → languages ↠ English (or the language you are having trouble with) and deselect "Multilingual typing"

gboard disable multilingual typing


"Bad Version of provider." while loading the Public key with RSACryptoServiceProvider

Question: I am creating RSA key pair using AsymmetricKeyAlgorithmProvider (Windows.Security.Cryptography.Core) and exporting the keys as shown below:
  AsymmetricKeyAlgorithmProvider rsaGenKeys = AsymmetricKeyAlgorithmProvider.OpenAlgorithm(AsymmetricAlgorithmNames.RsaPkcs1);

  CryptographicKey keyPair = rsaGenKeys.CreateKeyPair(2048);
  byte[] privateKeyBlob = keyPair.Export(CryptographicPrivateKeyBlobType.Pkcs1RsaPrivateKey).ToArray();

  string privateKeyBlobStr = Convert.ToBase64String(privateKeyBlob);

  byte[] publicKeyBlob = keyPair.ExportPublicKey().ToArray();

  string pubilcKeyBlobStr = Convert.ToBase64String(publicKeyBlob);

Now, the receiver of this data happens to be a Silverlight app and is using RSACryptoServiceProvider (System.Security.Cryptography) to load this public key:
RSACryptoServiceProvider rsaPublic = new RSACryptoServiceProvider();
byte[] keyBlobBytes = Convert.FromBase64String(keyBlob);
rsaPublic.ImportCspBlob(keyBlobBytes);

Where keyBlob is the byte array having the public key.
The issue is when ImportCspBlob is called it throws exception saying "Bad Version of provider."
Comment: have you find a solution for this?
Answer: I had the same error. For some reason FxSSH did not like a public RSA key I generated. I had to use the RSA key in the https://github.com/Aimeast/FxSsh readme.


What's a good way to get items quickly?

Question: I have always wondered what I should do to get items quickly in TF2 without paying any money?
Comment: Besides what he said, you can purchase items (usually not worth it). But, if you become premium, the drop limit increases (I forget in what way). Then, if you have premium, you can trade items you don't want for items you do. For your first purchase I would recommend a key, seeing that A- You can unbox, and B- You can easily trade it for good stuff.
Comment: Be polite on a server and you can often find someone willing to give you a weapon for free.
Answer: Items are dropped randomly when playing, at the rate of approximately 1 per hour, over a maximum of 10 hours of play per week. There is no way to increase this.
You also receive items from completing the Milestone achievements- the "Earn x class achievements" achievements. There are 3 achievements per class which typically provide you with one weapon for each slot.
Trading is also possible, though if you haven't spent any money you can only receive items- you cannot give them.
Answer: You can get between 8-14 (most oftenly around 10) items each week. It always resets on Thursdays, so you have the possibility of getting more items on that day.

What's a good way to get items quickly?


how to unlock phone which gs no internate connection

Question: How can I unlock my phone since it needs Google account sign in , while my phone has no internet connection neither wifi connection.
Answer: I dont know whether its your phone or not. but try this:
Download Android ADB files over the internet. Look for your phones models, Fastboot mode. enter into fastboot mode.

Connect you (turned on) Phone to the Computer via USB.
Open a command prompt terminal window, move to the location where you have your adb files.
Enter below commands in console:

adb devices
adb shell
cd data/system
rm *.key
Done...Now You Just Have To Reboot.


USACO: Subsets (Inefficient)

Question: I am trying to solve subsets from the USACO training gateway...
Problem Statement
For many sets of consecutive integers from 1 through N (1 <= N <= 39), one can partition the set into two sets whose sums are identical.
For example, if N=3, one can partition the set {1, 2, 3} in one way so that the sums of both subsets are identical:
{3} and {1,2}
This counts as a single partitioning (i.e., reversing the order counts as the same partitioning and thus does not increase the count of partitions).
If N=7, there are four ways to partition the set {1, 2, 3, ... 7} so that each partition has the same sum:
{1,6,7} and {2,3,4,5}
{2,5,7} and {1,3,4,6}
{3,4,7} and {1,2,5,6}
{1,2,4,7} and {3,5,6}
Given N, your program should print the number of ways a set containing the integers from 1 through N can be partitioned into two sets whose sums are identical. Print 0 if there are no such ways.
Your program must calculate the answer, not look it up from a table.
End
Before I was running on a O(N*2^N) by simply permuting through the set and finding the sums.
Finding out how horribly inefficient that was, I moved on to mapping the sum sequences...
http://en.wikipedia.org/wiki/Composition_(number_theory)
After many coding problems to scrape out repetitions, still too slow, so I am back to square one :(.
Now that I look more closely at the problem, it looks like I should try to find a way to not find the sums, but actually go directly to the number of sums via some kind of formula.
If anyone can give me pointers on how to solve this problem, I'm all ears. I program in java, C++ and python.
Comment: this one is in the dynamic programming section (i think). have given any thought to such a solution?
Comment: i have a bit - but it is still realming in my mind, knowing how complex it is. Nonetheless, it still doesn't have the 'find number of sums' approach that I outlined above
Answer: Actually, there is a better and simpler solution.  You should use Dynamic Programming
instead.  In your code, you would have an array of integers (whose size is the sum), where each value at index i represents the number of ways to possibly partition the numbers so that one of the partitions has a sum of i.  Here is what your code could look like in C++:
<code>int values[N];
int dp[sum+1]; //sum is the sum of the consecutive integers

int solve(){
    if(sum%2==1)
        return 0;
    dp[0]=1;
    for(int i=0; i<N; i++){
        int val = values[i]; //values contains the consecutive integers
        for(int j=sum-val; j>=0; j--){
            dp[j+val]+=dp[j];
        }
    }
    return dp[sum/2]/2;
}
</code>
This gives you an O(N^3) solution, which is by far fast enough for this problem.
I haven't tested this code, so there might be a syntax error or something, but you get the point.  Let me know if you have any more questions.
Answer: This is the same thing as finding the coefficient x^0 term in the polynomial (x^1+1/x)(x^2+1/x^2)...(x^n+1/x^n), which should take about an upper bound of O(n^3).
Comment: This generalizes to any set of integers, right? You have just solved the subset-sum problem in O(n^3}...

USACO: Subsets (Inefficient)


Precession - why decompose to angular momentum component?

Question: I always see it is conventional (in Landau-Lifshitz for example) to decompose the angular velocity vector to 2 components: axis of symmetry and angular momentum vector, and then define the angular momentum part as $\Omega_p$, meaning the precession component. My question is, why? Why not orthogonal components? Why is the angular momentum component considered the precession component? Is it a mere definition?
Answer: The direction of change for the angular momentum vector follows a circle which lies in a plane defined by the torque vector and its rate of change.  Calculations for that circular motion are most easily handled by using a component of the angular momentum which lies in that plane.


Making headers from DLL exports

Question: Is there a tool to extract/generate .h headers for DLL exports given only the DLL? Manually typing them is proving a pain in the backside...
Answer: That's not possible in case of generic C Dll. C procedure symbols have no type information mangled in.
dumpbin can list the procedure names, but you cannot deduce the return types, the number of parameters, e.t.c.
Answer: Agree with EFraim but maybe you have some extra, additional info, about the dll that you can use. http://www.dependencywalker.com/ lists all the functions that are exported by that module and could perhaps give you a clue depending on the dll.

Making headers from DLL exports


Are all questions checked and/or edited by moderators or editor before being posted?

Question: I experienced once that someone asked me to reconsider my question before posting.  I don't know "who" did that because I have a logical question to ask after I am sure about his.
Answer: No human sees them before posting.
I believe you're looking at the automated system that checks questions prior to answering: "Draft your question" followed by "Review your question".  It points out errors such as:

"Title is missing."
"Please enter at least one tag; see a list of popular tags."

I don't think the precise algorithm has been made public, but no human is involved in this process.  To my knowledge, diamond moderators don't have access to the results of this step.  Diamond moderators go through the same process when asking questions.
In some instances the algorithm will outright block a question (e.g. if it has no tags).  In other instances, the algorithm detects what it thinks are opinionated, argumentative, etc., which may be poorly received and so it gives a warning.  It may or may not be correct.
I understand the motivation behind this feature is to assist new users in writing better questions, and thereby having an overall better user experience.  (I'd speculate the underlying algorithm utilizes machine learning, and is trained using prior poorly received questions.)


Is it unethical to edit grammatical errors in a letter of recommendation?

Question: I have worked at a processing facility for three years as the head of the shipping department. Last week, when my time with the company came to a close, my supervisor wrote a letter of recommendation and asked me to refer any future employers to him. He assured me that he would give them glowing reviews, etc. I'm very appreciative of his kindness and his generosity, but there are three or four grammatical errors in the letter. Is it unethical to edit those errors? Would it be considered "edgy"? It's nothing but awkwardly placed commas and a single typo.
Comment: It's not clear from your question whether the letter of recommendation is for academic purposes or something else. This site focuses on academic matters, so, if your letter is for another non-academic position, the norms in that field may be completely different than that encountered in academia. Can you clarify your question?
Answer: Speaking strictly as a matter of ethics, I would have to say no, it would not be unethical so long as you did not change any of the actual words (other than perhaps correcting their spelling) or change the meaning / intent of the letter. I would further add that you may even be saving the person some level of embarrassment.
Answer: I think you should not edit anything. Maybe you do a mistake and change the meaning (or just the font) or someone checks the creation date of the file and sees that it does not fit or something else. You'd submit a manipulated version of a recommendation even if you do it with a good intention.
Rather ask your supervisor to correct it.


Load different custom fonts to different products

Question: Is there a way to load different fonts for different products in Magento2.4 ? The fonts will be self hosted in /web/fonts, but I want them to load only to specific products. Could be done in a block inside a product, something like
  ?
Answer: I don't know if you want to change the font for some products on category product listing pages or in product detail page.
But you can. If you want to change the font for some products in catalog/category pages you can go to the below path:
app/design/frontend/[Your Them Package]/[Your Theme]/Magento_Catalog/templates/product/list.phtml
And write the below code at the end of the file:
<?php if( $_product->getId() == [product id1] or $_product->getId() == [product id2]){ ?>

<?php } ?>

or below one if the products are many:
$some_prd = array('product_id1', 'product_id2', 'product_id3' );
<?php if(in_array($_product->getId(), $some_prd)){ ?>

<?php } ?>

Note: For any design customization, copy the file in child theme, change the file in the child theme and use the child theme. Don't modify the base/parent theme files.
Comment: I would like to load some custom font in the product details page. I was thinking if it could be done by creating a static block, where the font/css will load and call it through a widget to specific products.


What is the application of capacitor between Vcc and GND

Question: This is a schematic of a ATmega328P used circuit.
It has paralleled two 100nF capacitors between Vcc and GND. (C8 and C9)
What is the function of this two capacitors and why they are paralleled?

Comment: Cant believe that "duplicate" answer got so many points. Newbs.   @NSiri this redundancy cuts the voltage transient dips in half if they are SMD and allows some cheaper ceramic types to be considered.  The idea is to have mOhm level ESR.
Comment: Just as Important the choice of quality low ESR decoupling caps is the ESL from the cap, and the length of  traces between the load and cap, which adds inductance of 1nH/mm which if the uC is fast enough slew rate to amplify the ripple. V=LdI/dt
Answer: MCUs often have multiple pairs of GND/VDD pairs, to provide charge to the MCU core with lower inductance; adjacent leadframe metallic structures for GND/VDD are the standard method; adjacency of conductive paths produces the minimum loop area and thus the smallest STORED ENERGY and thus the quickest way to rebuild the on-chip charge just consumed by MCU ROM/RAM/ALU/BUS activity.
That charge is best re-plenished if a reservoir of change (those  bypass capacitors) are located extremely close to the MCU GND/VDD pin twins.
Notice the schematic shows two GND pins and two VDD pins, hence the two capacitors.
======  added VDD dampening, for lower EMI =====
To avoid failing the EMI radiated emissions, the VDD capacitors should be dampened; the internal ESR may be adequate IF YOU GET LUCKY. If you fail EMI, confusion reigns and people worry that the "magic" has vanished, when the previous design was executed with a punt-and-hope we-are-unaware of how to design well dampened VDD systems.
Using the math Rdampen = sqrt( L / C ),
with 4" (10cm of wire) between the 0.1uF cap installed at the MCU and the 10uF cap centrally located as bulk bypass for all the +3.3 volt users, you have 100nH (10 cm of wire at 10nH/cm, the wire NOT over a plane) and 0.1uF cap (Ignore the larger cap, for computing resonance).
The resonance of 100nH and 0.1uF is 1.6MHz.
The appropriate Rdampen, for zeta = 1 if I recall, or Q of 2, is sqrt( L / C).
Rdampen = sqrt( 0.1uF / 0.1uF) = ONE OHM.
I'd implement this as shown here

simulate this circuit – Schematic created using CircuitLab
Answer: When operating a 16 or 20 MHz class uC, which come in different grades it means the FET switching speed is fast enough to be stable.  The cause of this speed is a lower internal RdsOn*Ciss product which in turn results in a higher internal dI/dt for the many millions of internal switches.
When  traces to Vdd,Vss are 1nH/mm and Vp=LdI/dt=LVdd/(Ron*dt). Where the numerator speed grade increases the denominator when they both go lower.
Thus to keep ripple to a reasonable level, someone in your image (that has no citation) has decided to use two 0.1uF which is pretty standard to use one.  More important is the self resonant frequency of this decoupling cap due its spec and your layout must be defined to know exactly what happens, but with high transient fast current rise time that reduces to near zero, the better you need to learn about reactive decoupling frequency response and load regulation.
Two may be twice as good for ripple reduction with a close layout, but what is acceptable for analog parts of the uC?
You can also get more expensive caps that are twice as wide vs. Long, which gives inherently higher SRF.  But on the whole, this example is sound advice for 16,20,MHz ARM chips which have drivers of 25 Ohms.
Comment: @ Tony I've seen (in simulations) the two-caps-one-resistor network be able to provide the transient charges needed, but also be able to quickly dampen.
Comment: Yes you can see any simulation with ESR, ESL added to tracks.caps , source and load with this.  Q will relate to X(f)/Rs. All caps must have non-zero ESR.


Is there any reason to use optical qubits instead of hyperfine qubits?

Question: In trapped ion quantum computing, while optical qubits have an energy difference of hundreds of THz, hyperfine qubits operate in the microwave regime ($1\sim 10$ THz). Due to this reason, hyperfine qubits have longer lifetimes (thinking in terms of the time-energy Heisenberg uncertainty principle). According to DiVincenzo's criteria, long coherence times are essential for reliable quantum computing. So is there any reason to pursue optical qubits instead of hyperfine qubits?
Answer: I just had this question myself and it lead me to a 2010 paper (which I just realized was written by a current professor of mine!) Hyperfine and optical barium ion qubits.
In that paper, they show that the same barium ion can be used as an optical qubit or a hyperfine qubit. The advantage for the optical regime being

...the laser wavelengths for the $6S_{1/2}$ to $5D_{5/2}$ infrared "shelving" transition as well as barium's visible-wavelength cooling transition are the longest of any ionic qubit candidate, which makes it favorable for remote photonic coupling through optical fiber. This property is essential for long distance entanglement between ionic qubits [9,10], since the postselection entanglement process is mediated by emitted photons.


Moving transfer help!

Question: I just got a bitcoin qt wallet today and I have already sent the money, it is taking to long to to though so if I dump my key and import it to an e-wallet like blockchain.info, will my coins still show up?
Answer: As long as the transaction is in the network (it has been transmitted without double spends), you can access your bitcoins with the private key from any client, be it Standard Client, blockchain.info or anything else. Your money is not stored in your wallet, but in the Bitcoin Network - only the private key that lets you access that money is stored in the wallet file.
Answer: I would assume that you mean that the client is taking a long time to synchronize.  If you exported the key and imported it into an e-wallet (or even just a wallet that was already synced), you should see your coins immediately.
You could also download a bootstrap.dat, which may speed up synchronization of the blockchain.  There is a download at http://archive.org/details/bitcoin_bootstrap.dat if you want to try it.

Moving transfer help!


How can I farm for Pirate Maps without a minion?

Question: I'm trying to fight the pirate invasion, but I don't know a fast and easy way to  get the Pirate Map without minions.
Comment: "The Pirate Map is a Hardmode item used to summon a Pirate Invasion. It has a 1% (1/100) chance of dropping from any enemy within or close to an Ocean during Hardmode." https://terraria.gamepedia.com/Pirate_Map
Answer: Here is a quick way to farm the ocean for drops. It takes advantage of artificial biomes by causing jungle monsters to spawn in the ocean, most notably Arapaima.
What you will need:

50 jungle biome blocks. Mud with jungle grass will work as in the picture, lizhard temple blocks increase spawn rates however.
Yo-yo or tile piercing weapons. The yoyo can be thrown out the hole in the side of the structure and guided down into the ocean water. (I was using the Eye of Cthulhu yo-yo, A drop from Mothron)
Water candle, battle potions, anything to increase spawn rates.
Banners are optional but will help you to kill enemies that much faster.

The block of ice above the structure was used to farm hallow and ice biome keys. It obviously isn't needed to farm pirate maps so disregard it.

As for building it, the design doesn't have to match this one exactly but you will need a couple key features.

The structure needs to dip into the water and needs sloped sides. This will cause Arapaima to glide underneath the structure. Keeping the blocky sides will cause them to get stuck instead of sliding against the slopes.
You need to stand in water to attract water enemies to your position. All it takes is a little box that holds 2 buckets worth of water.
Platforms to catch the loot. You can either build the platforms or it will drop to the ocean floor for you to collect. Just a matter of convenience.
Comment: Nuts, I was gonna answer this but I'm at work so I couldn't get any screenshots. This is really the best and easiest way to farm map pieces. Once you've collected some traps from the Jungle Temple, you can easily convert it to an AFK farm as well - the spears usually kill the arapaimas in one or two activations.
Answer: Obviously if you do not have a decent minion to help you, you'd have to do it yourself. AFAIK monsters from statues does not drop biomes loots such as the pirate map you need so that is not an option.
Increase Spawn
This is almost a given for hunting monster drops. The ocean itself is a good place to tap on since every tile of water can spawn ocean monsters and each have a chance to drop since it is already within the biome. To boost it further you can build a layer with solid blocks above the ocean with another biome, to that I recommend corruption.
The corruption spawns a few variant of flying monsters on the surface level. With spawn rate boost such as Water Candle and Battle Potion you'll find yourself be constantly swarmed with monsters. The map have a fixed drop for every kill within the ocean biome so there is no need to prioritise any monsters, just kill all of them.
Swimming
Since you are to fight within the ocean biome, most of it is within the large body of water. Being able to freely move in the water will open a much larger area in which you can farm from, also allowing you to loot items dropped in the deeper parts of the ocean.
Minimally I will suggest Diving Gear but if you want to take it further and farm a Neptune's Shell it'll be even better. Having either will allow you to swim near the surface of the water between the extra biome you made and ocean, maximising the amount of area in which monsters can spawn.
Combat
If you  are having trouble coping with two biomes of endless onslaught but still wish to maximise the farming efficiency, you can consider doing a few things:

Open gaps between the extra biome, allow you to jump into the water or out of it freely. This is a double bonus allowing you to escape to the side with less monsters to heal or to the side with more monsters to farm.
Build a room and use weapons that can hit through/pass walls, a couple of suggested weapons include Crystal Vile Shard, Daedalus Stormbow(you'll need to build the area properly to use this effectively) and a gun with Chlorophyte Bullet
Build a room near the edge of the ocean and move the nurse there for quick healing during combat.
Get a pair of wings
Fill the deeper end of the ocean nearer to the surface with sand so you do not need to dive as much to get the loots


What Does an OS Actually Do?

Question: What exactly does an operating system do? I know that operating systems can be programmed, in, for example, C++, but I previously believed that C++ programs must be run under an operating system? Can somebody please explain and give links? thanks in advance, ell
Comment: I recommend this book if you want a good overview of the key general issues http://williamstallings.com/OS/OS6e.html
Answer: An operating system is a layer between your code (user code) and the hardware.
The OS is responsible for managing the physical components and giving you a simple (hopefully) API off of which to build. It handles which programs run, when, who goes first, how memory is handled, who gets memory, video drawing, and all that good stuff.
For example, when making a GUI, instead of you sending each bit to the monitor, you tell the OS (or window manager) to make a window. You then tell it to place a button in your window. The OS then handles drawing the window, moving the window, moving the button (but keeping it where it should be in the window).
Now, you can program an operating system in C++, but it's not easy. You have to develop your kernel and whatnot, find a way to interface with the hardware, then expose that interface to your users and their programs.
So, essentially, an OS handles software-to-hardware interfacing and manages your physical resources. C++ programs can be run in an OS or, with enough work, run by themselves or even be an OS.
Comment: @Earlz: Having written an OS scheduler in the past, I can confidently say that writing a scheduler to handle threading and multitasking is significantly easier (and more fun!) than writing a multi-threaded application.  I would not say writing an OS in any language is "easy," though...
Comment: C/C++ OSs are easy to setup. But dropping to assembly is necessary for small platform specific functions. Also, don't forget about threading and multitasking!
Answer: Actually, the C++ standard itself has something to say on this issue. §1.4/7:

Two kinds of implementations are defined: hosted and freestanding. For a hosted implementation, this International Standard defines the set of available libraries. A freestanding implementation is one in which execution may take place without the benefit of an operating system, and has an implementation-defined set of libraries that includes certain language-support libraries (18.104.22.168).

And in 18.104.22.168,

A freestanding implementation has an implementation-defined set of headers. This set shall include at least the following headers, as shown in Table 13:

Table 13—C++ Headers for Freestanding Implementations
_______________________________________________
 Subclause Header(s)
 18.1 Types    <cstddef>
 18.2 Implementation properties    <limits>
 18.3 Start and termination    <cstdlib>
 18.4 Dynamic memory management    <new>
 18.5 Type identification  <typeinfo>
 18.6 Exception handling   <exception>
 18.7 Other runtime support    <cstdarg>

The supplied version of the header  shall declare at least the functions abort(), atexit(), and exit() (18.3).

These headers either define constants or provide basic support to the compiler. In practice, some language features will be missing until the OS completes some initialization, for example new and catch.
Answer: An OS is really just a program that runs other programs and manages hardware resources for them.
If you are really serious about getting into the internals, I'd recommend reading the book Understanding the Linux Kernel.
Answer: sure, http://en.wikipedia.org/wiki/Operating_system

An operating system is the software on a computer that manages the way different programs use its hardware, and regulates the ways that a user controls the computer. Operating systems are found on almost any device that contains a computer with multiple programs—from cellular phones and video game consoles to supercomputers and web servers. Some popular modern operating systems for personal computers include Microsoft Windows, Mac OS X, and Linux (see also: list of operating systems, comparison of operating systems).

I mean the description of an operating system, what it does when and why goes far beyond an answer on this site imho.
Answer: An operating system, more specifically its kernel, is developed in a language such as C. And it is compiled into machine code just like any other program. The major difference between a mainstream OS and some code that you write in C is that the C code will run in a timeshare via the OS's CPU Scheduler. Also consider that the OS runs first, and is able to setup such an environment where it completely controls and restricts anything which it launches. Also keep in mind that system calls are how a process can communicate back to the OS, everything is just typical machine instructions that could run on any other processor of its type.
A few key features that any mainstream OS provides:

CPU Scheduler - This will load a process, allow it to run for a very limited amount of time before kicking it back off, regaining control and allowing something else to run (wether it be a kernel task or another process, typically kernel tasks have priority)
Memory management - Any application which you run does not have exact memory addresses since this is prone to change. All processes will run in virtual memory, and the OS will translate virtual memory (ex: 0x41000+) into a physical address. (again, its abstracting the hardware as is mentioned often)
File systems - various kinds
Resources - any kind of device kind be treated as a resource. A process may request access to a resource. (Oddly enough, in this day and age no mainstream OS has a mechanism for preventing dead locks for resources.)
Security - This is done through roles. It is very important that every process run within tight constrictions. This is another abstraction that the OS provides.
Answer: An operating system is just a software which is an interface between your hardware and your software. It makes an abstraction of this hardware to make it simpler to use. For instance, you don't have to read the keyboard status in your programs to check if the user hit a key. You might think of it as a lot of bricks put together and piled on top of each other, from a very precise view of the hardware to a very abstract view (from bits, to windows or buttons... for instance)
You don't have to program an operating system in a specific language, but most of them are written in C for efficiency and convenience reasons. You can do programming (your own applications) in any language then, provided that you have the correct libraries installed on the operating system.
Answer: There is no "clear" definition of what are the responsibilities of an OS. It could include the following:

Memory management
Devices & drivers
File system(s)
Processes and threads
System calls

In a nutshell OS is a program that enable the user to control computer's hardware in a relatively simple way
Comment: There IS a clear definition of what are the responsibilities of an OS: it provides programs with access to underlying machine hardware. There is no clear definition for amount of virtualization/multiplexing the OS must provide, though.
Answer: From a programming perspective operating systems primarily provide abstraction.  Abstraction from the details of the CPU and memory management, abstraction from dealing with hardware devices, abstraction from the details of network protocol stacks.
The operating system provides a higher-level programming interface, often standardized across several operating systems like POSIX does for all Unix flavors.
Answer: After reading the question, I see what you're trying to ask. What you're asking is if C/C++ programs require an OS to run. The answer is no. A C/C++ is a compiler that translate human language into machine language. It doesn't require a specific operating system. However, if you compile in say, Visual Studio, the resulting executable machine code can't run on anything but the Windows.
In specific, C/C++ code are usually portable in that if you have a compiler for an operating system, you can compile it and it will run like so. However, sometimes you have machine specific code (or OS specific code), such as a windows application that uses windows-based interfaces that cannot be ported over to another operating system. Some examples I can think of are like directory operations are usually not portable and usually depends on what OS you're on. However, most file operations, like fopen, are portable.
An OS is a bit different. It requires a different kind of compiler, and it requires a different way to load. Most OS are made in C/C++, it is then compiled by a compiler, then it is distributed. For example, Microsoft wrote Windows 95 in C/C++, they put it through a compiler, then burnt the resulting executable code into a CD-ROM, then sold it to you then you put the disk in and it will copy the resulting executable code onto your machine and you use it.
They don't give you the source code, then your computer compiles it; it's usually they give you the resulting executable.
Comment: Writing an OS does *not* require a "different kind of compiler". At least, not beyond the compiler needing to output a different "executable" format (i.e. one that the bootloader can launch or that the hardware can start directly if the target system does things that way). Gcc builds linux and the userspace programs.
Comment: @dmckee: there are more, subtle differences. For instance, the code generation for C++ features like exception handling may differ. And I don't think G++ (part of the Gnu Compiler Collection) can be used to build Linux - you need its C compiler. That shows even within GCC there are different kinds of compilers.
Comment: @MSalters: This answer is misleading if left uncorrected. The GNU c compiler builds the linux kernel, most of the user space programs *and* the boot loader for most linux distributions. The fact the the GNU compiler collection contains more than one compiler adds nothing to the discussion. Indeed, if you go back to the days of gcc 1.34, there was only the one compiler (for c), and gcc *still* built the kernel and the user-space programs.
Comment: @dmckee: please note that the question is about C++, not C. Therefore it is quite relevant that gcc includes both, but only the second can be used to build Linux
Answer: Basically an OS is the program that all other programs run inside of. It's literally the first program that your computer starts running when it boots up. As such, it controls all the hardware, and acts at the gatekeeper for other programs to access that hardware. It also controls ( or should, at least ) all the programs that are running under it -- when they start, how the stop, and what resources they have access to. You might call it "The Master Control Program" :)
Answer: The term "operating system" when applied to a PC, normally refers to a modern "protected memory" operating system that provides not only a basic set of system services but also a complete user interface:

the combination of a kernel, device drivers, and system services that provide memory protection, tasks that can not interfere with each other's memory, and threads which are units of execution within a process, as well as ways for threads and tasks to talk to each other and to access shared resources like file-systems that contain files, on storage devices like your PC's hard disk,  are in fact, the core of the operating system.
the "shell" on top of that operating system might be as simple as the "command.com" text command prompt on DOS (remember " C:> _ "?) or as complex as the Windows Shell,  including its control panel, etc.

Sometimes, a "linux distribution" contains far more than an operating system, but is informally referred to by a single name (such as Ubuntu) and so the line between what the operating system is (the linux kernel and standard libraries perhaps) and the applications that merely ship with that operating system (the Gnome and KDE environments on Linux) is pretty gray.
A great way to learn what an operating system really is, is to read one of Tannenbaum's books on Operating Systems.  I believe he shows the implementation in detail of his "minix" kernel. Another book is "Linux Kernel Internals". If you can handle the technical detail in this kind of book, then you can really understand what an operating system "kernel" is, and then begin to make sense of the layers around that kernel.
I am not aware of one commercial or open source operating system that is written primarily in C++.   Such system-level programming is most commonly carried out in a mix of pure ANSI C, and Assembly/Machine language.  The low level assembly bits often are involved in tasks like handling interrupts, initializing hardware and booting the system up.   Before you have a heap, and a stack, and a working virtual memory system, you wouldn't want to be using C++ objects, or even certain C features like malloc.   Your resources and your design must be constrained by performance criteria, and any kind of extra overhead, even a semantic overhead, is to be deplored.
Recently Linus Torvalds famously insulted C++ and described on a mailing list why he would never use it for a Linux kernel.  I believe however, that C++ is making inroads in areas that have typically been havens of "pure C". The Gnu GCC team for example is willing to allow C++ into the GCC codebase now, at last.

What Does an OS Actually Do?


Why does shaving dehydrate the skin? Is there an hormonal effect involved?

Question: I want to understand why the face becomes dry after shaving and if shaving affects hormones? I've heard that after shaving, hair grows back faster, why? Shaving damages hair follicles and they become inflamed. One could get an infection JUST by shaving because tissue is ripped from the hair follicles. So maybe the increase in hair growth can be attributed to the natural blood rush that brings nutrients to the damaged follicles when they are inflamed after shaving....
Comment: 1) You answer your own question, there is absolutely no biological reason to shave, its social. 2) One does not control the amount of sweat one produces, I wish we could. 3) You are combining multiple questions into one, please don't and post separate questions for each query instead. Voting to close.
Comment: Ah, then please rephrase your question to make that clear. Mention the hormones and that hair grows back faster. "Our own biology rejects shaving" is really unclear.
Comment: @terdon You represent a jaded portion of this community, you don't like my question(s)? Explain to me why it they aren't valid, otherwise you have the option of nonparticipation in this thread.
Comment: I still don't see what you're asking. Of course running a sharp blade against your skin causes irritation. Are you asking why an how does skin get irritated?
Comment: @terdon is there something happening with hair follicles? And yes, I understand how the skin gets irritated-- I want to understand why the face becomes dry after shaving and if shaving effects hormones? I've heard that after shaving, hair grows back faster, why????
Comment: Hmmmm... any special reason that makes you think hormones are involved?
Comment: @nico Not in particular, but through shaving we damage tissue, which might cause an uptake in hair growth hormone. If not enough hormone is available, wouldn't the body think it is deficient in the hair growth hormone and produce more?
Comment: @Rustyn Yazdanpour: I would assume it is just a local reaction, otherwise all of your skin would be affected, which is not the case... My take (but I may be wrong) is that it is just a side effect of the inflammation (e.g. some interleukins can cause dry skin).
Answer: First of all 'Testosterone' hormone controls the growth of hair on our body and also oil secretion. Depending up on the nature of a person's body, this hormone controls the growth of the hair.
Why shaving facial hair leaves the skin dry ?
First let me explain the reason behind the oiliness of the skin. Sebum is produced by the sebaceous glands and is a complex made up of cholesterol, free fatty acids, glycerides, squalene, and wax esters. Sebum and sweat, along with the epidermal lipids discussed earlier, make up the oil on the surface of the skin. Some people will have more oily skin and some have less which depends on the nature of body.
While shaving the sharp razor cuts the hair and also damages the skin and hair follicles. The level of damage to skin also depends whether you are shaving downwards or upwards. Because upward shaving usually causes more damage to skin and hair follicle. Complete detail of damage to hair follicle can be found in this article: Science of shaving.
Shaving also removes skin lipids and water content creates pores which exposes the skin. If the surrounding atmosphere is dry then skin loses water. Or if the surrounding is moist or humid then water content will be balanced. That is the reason why we use artificial face moisturizer for immediate remedy to avoid infection and balance the wetness of face. So it takes a while for the skin to get back to normal state if nothing is done after shaving which sometime leads to acne or rashes due to infection.
Another reason for dry face is use of hot water which removes skin oil instantaneously. So lukewarm water or cold water will further reduce the dryness of the skin. (Use of shaving cream with high alkaline content will obviously result in dry skin. This holds for soaps also.)
Complete details can be found in the first link provided and Drying skin after shave.


How can I make my Samsung Galaxy S9+ install unsigned applications?

Question: I have root on my phone, and also Lucky Patcher patched the signature verification stuff (both of them). I have rooted my Galaxy with Magisk and Odin (using PC). I can't patch "dalvik-cache" whatever that means, and I have a suspicion that that is why my unsigned apks install, but crash straight after opening. It's not the app, as I can use them perfectly well on an emulator. Does anyone know how to get past this problem? Thanks!
Comment: Android can not install unsigned apps/APKs, the APK signature is always checked when you install it. The only way would be to manipulate an already installed app. Upon installation the APK file is saved, some files extracted and the DEX files are pre-compiled using dex2oat on modern devices using ART runtime. Those extracted files and the APK itself can be modified but that isn't that simple. I assume that is Lucky Patcher is trying to do and fails.
Comment: @Robert Maybe some signature could be updated in some apk manifest?
Comment: @peterh-ReinstateMonica You can of course re-sign an APK file with a self-generated key pair. But then Android would not allow to install this app as an update of an already existing app because the keys do not match. On a rooted device it may be possible to change the files where Android saves the info which installed app is signed by what key, but I never did this before and don't know how complicated such a modification would be.
Answer: Check whether apps can support your android OS version.
You can turn on Allow installation of app from unknown sources. Go to setting / security / turn on Unknown sources option.
Comment: "Allow installation of app from unknown sources" -- this wouldn't make a difference. Unsigned apps cannot be installed. See https://source.android.com/security/apksigning


Should a scale like C double harmonic major or C phrygian dominant be notated as a 4 flats or natural key?

Question: I'm not really looking for an "objective" answer, but a list of pros and cons for the 2 options I listed (and maybe other options like notating the key as 3 flats or making a weird custom key). It would help to know what you think is best. It would also be helpful to know what the answer for this type of question be for other scales.
Comment: I could use some clarification: are asking about an entire piece that makes use of one of those scales, or are you asking about a passage that happens to use them?
Comment: entire piece, but I think it would be helpful for knowing the answer for both cases
Answer: I would notate C double-harmonic major as though it were C major (no sharps/flats) and then use accidentals to indicate the modifications for the actual scale. (To clarify: for D double-harmonic major, I would use the D major key signature, and for X double-harmonic major, I would use the X major key signature.)
For C phrygian dominant I would use the C minor key signature (three flats), because phrygian is often thought of as derivative of minor, then use accidentals for the modified note.
The reasoning behind these choices is that modes are often conceived as modifications of the more familiar major/minor. And in particular, I'm thinking of scales like melodic and, especially, harmonic minor. Those aren't indicated directly by the key signature, but an experienced musician immediately recognizes their use by the presence of specific accidentals on specific scale degrees.
Comment: Would you change your answer (to minor key signature instead of major key signature) if you're notating music in D Double Harmonic Major instead of C Double Harmonic Major and you therefore need accidentals in the key signature no matter what?
Comment: @Dekkadeci No, I would still just use the key signature for D major and let accidentals to the rest. I've updated to make that explicit.
Comment: How about, if you have a C dominant chord in F major, and you want to make it C altered with the common scale-overlay method, and so you think about C# melodic minor... Would you notate what you're actually thinking about i.e. six sharps, or write it like a modified F major i.e. with six flats? :)
Comment: @piiperiReinstateMonica Let me make sure I even understand your question. You're saying the key is F major, but the melody at a certain point corresponds to a C7alt harmonic context? If yes, I keep the key signature as F major but notate the altered notes with sharps. I would only use flats if it made reading significantly easier, and regardless, I wouldn't change the key signature.
Comment: If you have an idea of playing something over a C dominant chord so that it creates a "C altered" harmony, and do that by imagining a C# melodic minor scale over it, and you want to write that idea in notation, like "what I'm seeing". I mean, musical notation can be used to describe subjective perspectives, can't it. Kind of like how players of transposing instruments have a different perspective to the same sounds.
Answer: Since the double harmonic major is in fact still a major scale, it needs the key signature of the original key - for C, no sharps or flats. Then use accidentals to lower the 2nd and 6th notes. You can't really have a key signature that reflects that. At least one that would be recognisable to most, perhaps excluding Bartok!
The Phrygian dominant. It is based on the 5th mode of the harmonic minor, which is, some would say, an altered scale in its own right! Again lowered 2nd and 6th, but called dominant due to being based on the 5th note of the parent scale, (hence dominant, with M3) a key signature wouldn't make a lot of sense to most musos, so accidentals are order of the day.
Bit like there won't be a key signature for the chromatic scale.
Comment: Would you change your answer (to minor key signature instead of major key signature) if you're notating music in D Double Harmonic Major instead of C Double Harmonic Major and you therefore need accidentals in the key signature no matter what? How about for D Phrygian Dominant instead of C Phrygian Dominant?
Comment: @Dekkadeci - good question! I certainly won't be writing in either, ever! But logically, since Phrygian Dominant is the 5th mode of a minor scale, I'd expect it to be written in the key signature of its parent. So for C PD, parent is Fm, so write key sig. of Fm. Can't really see much being written in those esoteric keys, so it's sort of academic, in my world. And - I dislike calling them accidentals there - surely they're just 'key sig.'? Wish we could find a better name!
Answer: Since you're not looking for the objective answer:
Two possible ways of thinking about the Phrygian dominant are equivalent in notation:

Think of it as the fifth mode of a harmonic minor and use the same signature you'd use for that harmonic minor.  Put an accidental to raise the third when it appears.
Think of it as a Phrygian mode with a raised third.

In either case, C Phrygian dominant would use the key signature for A♭ major or F minor (4 ♭s), but with E♮ when it appears.  I've also tried channeling Bartók and using the non-standard signature with B♭, A♭, and D♭, but that can be easy to misread since we see 3 ♭s and expect they are B♭, E♭, and A♭.
If I'm writing in double harmonic, I might notate with the signature of the major and add flats on the 2 and 6, (C major with D♭ and A♭ accidentals) or as the Phrygian with raised 3 and 7 (C Phrygian/4 flats with E♮ and B♮ accidentals).  It depends on the context, and this scale is more often used with chords outside the scale.
Answer: Due to how often both the Phrygian Dominant scales and the double harmonic major scales are used when soloing on the dominant of minor keys - often even regardless of genre, and this includes classical music! - I actually generally use minor key signatures instead of major key signatures when notating music that uses any of those scales. Also a golden rule: I generally do not switch key signatures with rapid scale changes as long as the tonic does not change. (Examples of rapid scale changes to and away from Phrygian Dominant scales include 0:51-1:46 of Dream Theater's "Ytse Jam" (I'd use a 1-flat key signature throughout that excerpt, excerpt swaps between A Phrygian Dominant and E Phrygian Dominant, the excerpt "soloing" on the dominant (of D minor) should be apparent) and Morpho Knight's cutscene and boss themes from Kirby and the Forgotten Land (I used a 3-flat key signature throughout this piece, other transcribers used 4-flat key signatures partially due to a problematic starting trill on C and D flat - piece uses C Phrygian, C minor, and C Phrygian Dominant, possibly among others)).
But for pros and cons, I may as well write this (assume all mentions of tonics and subdominants are of the parent Phrygian Dominant or double harmonic major scale):
Minor Key Signature of Tonic
Pros

Makes the tonic clear
More forgiving with rapid scale changes later (e.g. use of ^2 instead of ^♭2, use of ^♭3 instead of ^3)

Cons

May involve more key signature changes than necessary, especially for dominant preparations of sonata-allegros and other soloing on the dominant (e.g. soloing on the dominant of D minor would involve using a no-accidental key signature here and a 1-flat key signature later)

Minor Key Signature of Subdominant
Pros

Aligns with customs for notating modal music, especially music that uses the regular Phrygian scale (at least customs that involve notating as few accidentals in measures as possible and accurately reflecting the contents of the base scale)
Is the most appropriate for dominant preparations of sonata-allegros and other soloing on the dominant due to reflecting the actual home key of those passages - see these 2 examples from classical music:

Introduction of the Danse Bacchanale from Samson et Dalila by Camille Saint-Saëns, piano transcription by the composer - uses the A double harmonic major scale

Dominant preparation of the 3rd movement of Ludwig van Beethoven's Piano Sonata No. 14 in C Sharp Minor, Op. 27, No. 2 "Moonlight" - melody of the 2nd to 2nd last measures uses the G sharp Phrygian Dominant scale - so do all of the 9th to 16th measures

Cons

May obscure the tonic (this is important for music that primarily uses Phrygian Dominant and/or double harmonic major scales and never seems to "leave soloing on the dominant", such as "Wicked Thing" from Bravely Default)

Major Key Signature of Tonic
Pros

Makes the use of ^(♯)3 clear (instead of ^♭3)
Also makes the tonic clear

Cons

Often ends up requiring more accidentals on notes in measures than other options
Involves a later substantial key signature change if used for dominant preparations and soloing on the dominant (e.g. soloing on the dominant of D minor would involve using a 3-sharp key signature here and a 1-flat key signature later)


Instagram logout is not working in iphone?

Question: I am integrated Instagram in iPhone,At first time login page display on my iPhone and after logout when again login than credentials are not Asking and directly login. i also 'nil' old credentials on logout and i also clear cookie at logout but it not working.when i delete cookie from safari then it work fine. how to solve it programetically.
Logout Button code as below
<code>-(void)doLogout
 {
    IGAppDelegate* appDelegate = (IGAppDelegate*)[UIApplication sharedApplication].delegate;
    [cookies deleteCookie:cookie];

// clear cookie

 NSHTTPCookieStorage* cookies = [NSHTTPCookieStorage sharedHTTPCookieStorage];
 NSArray* instagramCookies = [cookies cookiesForURL:[NSURL URLWithString:@"https://instagram.com/"]];

    NSLog(@"Array is == %@",instagramCookies);

    for (NSHTTPCookie* cookie in instagramCookies)
    {
        [cookies deleteCookie:cookie];
    }

// accessToken set nil

    [[NSUserDefaults standardUserDefaults] setObject:nil forKey:@"accessToken"];
    [[NSUserDefaults standardUserDefaults] synchronize];
    [self.navigationController popViewControllerAnimated:YES];
}
</code>
Comment: i am facing same issue ...if any solution then plz post it as an answer.
Comment: you open in safari then its store its credential, You have to open Instagram login URL in webview.
Answer: We have to use WebView instead of safari so this problem will be solved.
I have made some changes in crino's sdk in which this problem has been resolved.
You can get code from https://github.com/gouravgupta72/instagramIOSsdk/  here.


What does "each other player" mean on Unwinding Clock?

Question: If I am playing a four man free for all, when do my artifacts untap using Unwinding Clock's ability? I'm having trouble understanding. The card says "each other player". If I am player one, are players two three and four "other players" or is player three the other player since it says "each other player"?
Comment: @Joe, the OP seems to have confused "each other" (each player other than you) with the English phrase "every other" (which can refer to skipping half of the objects in the set)
Comment: Why would player three be the only player referred to by "each other player"?
Comment: @Joe See my answer - I was confused too, but my wife figured it out for me!
Answer: You untap your artifacts during player two's untap step, player three's untap step, and player four's untap step.
This isn't anything that's in the comprehensive rules or anything, it's just the meaning of the words on the card. "Each other player" could be explained as "each player who is not you" or to be really clear "every single player who is not you". None of those players is you, so you untap your artifacts during each of their untap steps.
I think you might have been wondering whether "each other" meant alternating (yes 1, no 2, yes 3, no 4...) like "every other" sometimes does. But "each other" doesn't ever mean that, so there's no ambiguity here!
You can see this demonstrated indirectly a few places in the rules, for example:

103.4. ... First, the starting player declares whether or not he or she
  will take a mulligan. Then each other player in turn order does the same. ...

Obviously that applies to all players, not alternating players! And of course, all the cards that say "each other player" wouldn't really make much sense if they meant alternating starting with you - in a two player game, that'd be just you.
Answer: Each other player always means every player that is not yourself, not to be confused with alternating players. I've not come across a card that says this but I think this is what is confusing you?
Cards usually use each other player to signal every opponent http://gatherer.wizards.com/Pages/Card/Details.aspx?name=grave+pact, and target opponent to signal just one opponent. http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=227064
Comment: In a two-headed giant game, "each other player" does not mean the same thing as "each opponent". They are worded differently for a reason.
Comment: Also, your explanation could be a lot clearer - "every other" often means "alternating" in everyday English.


Why does the speed of sound relate to temperature in increasing altitude?

Question:
This graph is very puzzling to me. It is my understanding that the speed of sound relates to the density of the media it travels through. Sound travels faster in water, and even faster in steel. So what is the underlying reason for this relationship between speed of sound and temperature. Perhaps temperature relates to the speed the gas molecules, but I would still expect that the pressure drop and density drop should affect the speed of sound more. AFter all, don't they say you can't hear sound in space because there are too little moleucles. Thanks.
Comment: Related:  https://physics.stackexchange.com/a/266046/59023
Answer: Sound is a hydrodynamic effect.  To be in a hydrodynamic regime, the wave length of the sound must be large compared to the mean free path of the air molecules.  As the density of the air goes down and the inter-particle spacing grows, there is a very real effect that the minimum wave lengths of sound one can consider grow accordingly.
The sound speed squared is given by $(\partial p / \partial \rho)_s$ where $p$ is the pressure, $\rho$ the mass density, and $s$ the entropy.  The $s$ outside the parentheses means that entropy should be held constant in taking the derivative.  At a first pass, we can ignore this constraint, and just do some dimensional analysis using the ideal gas law, $pV = n R T$, where we can identify $\rho = n M/ V$ where $M$ is the mass of a gas molecule.  Roughly then, $(\partial p / \partial \rho)$ is proportional to $T / M$.  The density drops out.  Of course, we performed this derivative at constant $T$, not constant $s$.  Fixing this up will introduce a factor of $\gamma$, the adiabatic index, an order one number which depends on the structure of the gas molecule -- monatomic, diatomic, etc.  The density, though, drops out of the sound speed.  More details can be found here.


How do I align these elements to be the way I want?

Question: I am working on an online composition notebook. Students would be able to use this without "losing" their notebook before a check... I need various elements aligned, but can't figure out how...
Link to project: https://drive.google.com/drive/folders/15YrZ5XkcyoyuAsVE29BSA-UEa67GmyBf?usp=sharing
What I wanted to happen is roughly created in Microsoft paint, but it is the basic gist of what the final UI, (Excluding the Title bar, and other stuff), should look like.
I tried using style="float:left" for the textbox inputs, and style="float:right" for the image, but it didn't work.
Thinking about it though, I still have a lot to learn, an example being of how I would be able to overlay the text over the image... I just thought it would be good enough of basic code to get some sort of help...

EDIT: Now that I have researched what this program does, the more I realize that so many more programs do it so efficiently... I have, in the end, decided to abandon the project.
Answer: It was the display: inline-block; that wouldn't let you align it. Simply align it like below.

Left

Center

Center

Right


Voltage Divider Multiplier Value Too High?

Question: After constructing a voltage divider to reduce the voltage from my power supply (Output 10kV, 30mA) an oscilloscope probe was used in hopes of measuring the output voltage of the system. Due to the way this system functions a DMM could not be used due to the high pulses of voltage outputted by the power supply as the input voltage increases. That is why I thought it would be best to use an oscilloscope with a voltage divider to measure this voltage. In my case the voltage divider was configured where R1 = 64.1MΩ and R2 = 1.298MΩ (R1 was initially set at 23.00MΩ however my oscilloscope could not read the output voltage as high as was needed so the resistance of R1 was increased). After performing the calculations necessary to determine the amount the output voltage seen on the oscilloscope needs to be multiplied by, a multiplier of 52.15 is produced. I followed the math seen on this post (Measure high voltages with a multimeter) which resulted in this value however it seems to be too high. Did I simply calculate incorrectly or is the equation found there incorrect? (A high voltage probe is being used with an impedance of 40MΩ which has been taken into account when calculating the multiplier.)
Comment: Remember that a typical oscilloscope has an input impedance of 10 MΩ with a 10x probe.
Comment: You said pulses. What's the bandwidth of these pulses? What's the bandwidth of your scope and probes?
Comment: I am using a Tektronix P1500A probe which has a bandwidth of 500MHz and impedance of 40MΩ on a Tektronix TBS2000 Oscope with a bandwidth of 100MHz at 1GS/s. The bandwidth of the pulses themselves are unknown as oscope cannot seem to measure them while connected to the divider.
Comment: In which order did you put the resistors?
Comment: @VoltageSpike The larger 64.1MΩ  resistor is the first in the series and the 1.298MΩ  resistor is the one being measured off of by the oscilloscope.
Answer: Your setup won't be very good at high frequencies. I guessed at some of the scope probe and scope values, but with the circuit below, the bandwidth is only about 40 kHz. I haven't accounted for all the parasitics, it could be worse.
If you need higher bandwidth than this, you can buy 1000x high voltage scope probes.

simulate this circuit – Schematic created using CircuitLab
Answer: Your probe has an input impedance of 40M\$\Omega\$ in parallel with 2.5pF, according to this Tektronix page. At, say, 100kHz the 2.5pF has a reactance of < 1M\$\Omega\$, so it acts as a low-pass filter.
To get this to read correctly with a high bandwidth you would need to parallel the 64M resistor with a small capacitance (rated for the high voltage involved). Getting the right value and trimming it (or some added capacitance across the probe input) would be non-trivial. High voltage scope probes are expensive.


Handling IP Changes for Master MySQL Server

Question: I have been working with master-slave replication in MySQl and was wondering if there is any possibility to set the listen-address property of the MYSQL config file to read the IP statically assigned to host (and may be grabbed using nbtstat -n | find "IpAddress:" and saved as a system variable). The reason is that I do not want any IP changes to affect replication. In that case, I will entirely rely on the reboot that the involved team does after the changes.
Answer: You must create the replication user with the host IP on the Master
CREATE USER 'static_repl'@'10.20.30.253' ... ;
GRANT REPLICATION USER,REPLICATION CLIENT ON *.* to 'static_repl'@'10.20.30.253';

If you have an IP range in mind, use that range
CREATE USER 'static_repl'@'10.20.%' ... ;
GRANT REPLICATION USER,REPLICATION CLIENT ON *.* to 'static_repl'@'10.20.%';

Then, stop the slave, delete the user that is not static from the master, and start the slave.
Comment: I was worried of the listen-address on masters config file. Anyway to handle this dynamically? apart from the 0.0.0.0 setting.


photostream with no iphone

Question: I no longer have my iPhone, but I wanted to know if there was anyway I could access the pictures that I uploaded to Photostream before I got rid of the phone. Or are they all completely lost?
Comment: Do you have an OS X computer? You can access your photostream in iPhoto if so...
Answer: If you have a Windows PC, you can download iCloud Control Panel from Apple. Once installed, open iCloud Control Panel and enter the same Apple ID and password as you used on your iPhone. Any photos taken within the last 30 days (or up to 1000, whichever limit was hit first) will be downloaded.
If you're on Mac, have OS X v10.7.3 or later, and have iPhoto '11 (v9.2 or later), go to System Preferences > iCloud and again, sign in with the same Apple ID and password as your iPhone. Open iPhoto, click on Photo Stream in the left column, and click Turn On Photo Stream when prompted.

photostream with no iphone


Testing QAbstractListModels

Question: I want to test some QAbstractListModels I already implemented, is it better to use ModelTest from Qt labs or make my own unit test using QTestLib. Also can someone point me what actually ModelTest do and how to use it or a good tutorial on it other than this one
Answer: Do both. ModelTest will only check that your model fulfils the basic expectations of the ModelView framework. You still need to write your own unit test cases to verify that your model operates specifically in the manner that you expect.
There are many models that may pass the ModelTest test, but you still felt the need to write your own. Obviously, there are special things about your model, or you wouldn't have bothered to write a new one. So, test those things!
Answer: ModelTest simply listens to the signals that your model sends out. After every signal it verifies, as much as it can, that what the signal implies has actually happened within the model.
There's no tutorial needed, because it's trivial to use, just like the article you linked to shows.
Simply instantiate a ModelTest for your model. It can be even the model's child, so will exist as long as the model does. The helper function below illustrates that it is, in fact, trivial.
<code>void instrument(QAbstractItemModel * model)
{
  new ModelTest(model, model);
}
</code>

Testing QAbstractListModels


Error creating site collection - Slow Query Duration

Question: I'm trying to create site collection but I see several errors in logs when doing this. I'm working on test environment...

Creating site: URL "/" 94d3249e-2766-c0a9-cc0b-687468c08613
Begin Query the AD to get the user email and display name. 94d3249e-2766-c0a9-cc0b-687468c08613
Feature Activation: Activating Feature 'Fields' (ID: 'ca7bd552-10b1-4563-85b9-5ed1d39c962a') at URL http://sp2013:27000.
A large block of literal text was sent to sql (length 93794).  This can result in blocking in sql and excessive memory use on the front end.
Slow Query Duration: 2045.6606531853   94d3249e-2766-c0a9-cc0b-687468c08613
      Line 6517: 10/20/2017 13:29:56.33   w3wp.exe (0x011C)                           0x1364  SharePoint Foundation           Database                        fa44    High        Slow Query StackTrace-Managed:    at Microsoft.SharePoint.Utilities.SqlSession.OnPostExecuteCommand(SqlCommand command, SqlQueryData monitoringData)
  SqlCommand: 'EXEC @ReturnCode = proc_ProvisionContentType '22e947b3-6f22-4995-bf25-2c9f0dbab1d7','37eb0e92-d8e8-47e2-a33a-2c5f27541c90',N'',...

I haven't found information for 'Slow query duration' for this kind of scenarios, any help would be appreciated.
Answer: Seems more like an issue with your SQL server fragmentation.

I would recommend stopping the SharePoint services.
Restart server
Keep unused services off
Try creating site collection

Then turn services one by one till you figure out the culprit.
Answer: This is normal when creating a Site Collection. There is nothing to troubleshoot here.


How to prevent app restart when changing locale?

Question: I have an app that is not localized and the UI will only be displayed in one language. I would like to avoid having the app restart when the locale of the device is changed.
I am aware that to handle configuration changes myself, I can set the 'locale' property in configChanges:
android:configChanges="orientation|keyboardHidden|screenSize|locale"

In addition, my app has the following min and target sdk versions:
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="15"/>

I suspect that using only 'locale' in android:configChanges only works on devices using an SDK < 17 (details to follow).
I have tested my app with the aforementioned configuration on a device with Android 2.3.5.
The app does not restart (as expected!).
However, on a device with Android 4.2.2 the app restarts even though I have specified locale. To test whether the restart is due to a configuration change, I added the following function:
@Override
public Object onRetainNonConfigurationInstance()
{
    Log.d(LOG_TAG, "onRetainNonConfigurationInstance");
    return null;
}

In the logcat output I see:
10-11 08:53:28.838: D/myapp(10282): onRetainNonConfigurationInstance

Since my target API is set to 15, I cannot add "layoutDirection" to my android:configChanges. Is there any other way to prevent my app from restarting on devices using sdk >= 17 ?
Thanks in advance.
Answer: Why do you have targetSdkVersion="15" ? Should be 18... Especially since you plan on supporting Android Jelly Bean 4.2.2
Check this link.
Comment: The android keyboard implementation changes significantly at targetSdkVersion >= 17. At this point I don't have the time to recode a proper solution for the keyboard, so my targetVersion needs to remain < 17.


What stored charges do in a capacitor?

Question: Why does a fan need capacitor? Capacitor is just providing charges to fan but it can be accomplished without it by directly connecting fan with electric supply. Which other appliances need capacitor?
Comment: Would [electronics.se] be a better home for this question?
Comment: If the fan motor has brushes, the capacitor can prevent arcing.
Answer: A capacitor is often used for "decoupling".
The wires into any electrical appliance have inductance (because they are long and thin). This means that if there is a sudden increased demand in current, there will be a significant voltage drop. A capacitor can act as a "tiny battery" that briefly supplies this current while the main supply catches up. A fan often has a brushed motor which leads to spikes in current, and you want to smooth these out to prevent interference.
Just as the capacitor provides some local "peak current", it also prevents sudden spikes in current demand on the main supply, and in so doing it prevents the fan from becoming a noise generator on the mains. Very often you will see a capacitor used in conjunction with a choke - an inline inductor that helps prevent noise from being radiated by the appliance. Such a choke limits changes in current - and makes it even more necessary for the appliance to have some decoupling.
High speed electronics invariably have to have some local decoupling because at speeds of a GHz even a few cm of circuit board trace represents significant inductance.
Answer: Many fan motors are single phase, permanent split capacitor (PSC) induction motors.  Single phase motors inherently have no starting torque and to get around this problem, engineers often "trick" the motor into thinking it is being supplied by 2 phases instead of one.  This is done by adding a second set of windings to the motor that are physically offset to the main winding.  This second winding also needs to be electrically offset (that is, it needs phase shift) from the main winding.  There have been many techniques to do this, but the PSC induction motor uses a capacitor to cause the phase shift.
Comment: This is very interesting. I learnt something new today. Thanks.
Answer: There is another reason for capacitors in electronics (but probably not fans) and that is Power Factor Correction

What stored charges do in a capacitor?


Calculating areas outside a point

Question: I have a university assignment that requires me to find an optimum location for a land fill site. There are various parameters I need to map. I have managed to map all the ones within a distance of something (using buffering and overlay techniques as in the image), but I have no clue how to define an area outside of a point. I need to define areas 20 miles outside of any major urban area, 20 miles from a major water feature and 10 miles from any national parks. I have all the base information (urban area, water features, national parks) in layers. I have a full licence with all additional add on's at my disposal - I just don;t know which to use or how]1
Comment: Do you have the Spatial Analyst extension and/or an Advanced Desktop License?  Most solutions will use tools in one or both of those categories, so it is important for you to tell us what you have available to you.  Please [edit] your original question to provide that information.
Comment: At the moment your map looks like it has quite a bit of information that is unrelated or only loosely related to your specific question about how to select features in one layer that are outside polygon features in another layer.  Try thinking about using just two layers to answer that before complicating it with extra layers.
Answer: There is a tool in the analysis toolbox called symmetrical difference that you could use. You would put all your buffers in one layer and your counties in another layer. Then the tool would tell you all the areas in the counties that don't intersect any of the buffers.
Answer: If I understand you right, you want the opposite of a buffer. Then first, you need a polygon of your area of interest (AOI), say the border of a state or something like that. Second you calculate your distance buffers which you could clip from the previous AOI polygon. That should give the "outside" of the buffers.

Calculating areas outside a point


Any other books or any other book

Question: Any other books or any other book? We usually say any book, and not any books, but when we put other, we seem to say any other books instead of any other book. Are both sentences equivalent or not? Why would one be grammatically incorrect?
Comment: In what context are you using the phrase? As part of a question?
Answer: Both "any other book" and "any other books" are grammatical. As usual, the singular is speaking about one book, and the plural is speaking about more than one.
Here are two examples:
"Is there any other book on the subject?" is asked by a speaker who may expect an answer of "no", or the name of one book.
"Are there any other books on the subject?" is asked by a speaker who may expect an answer naming several books.

Any other books or any other book


Google Voice and SD cards

Question: Why does Google Voice need to be able to modify or delete the contents of my SD  card? It's part of the permissions and I don't want to download it until I understand it.
Answer: Google Voice needs to be able to save data such as contact details, ongoing conversations, etc., somewhere and in the case of conversations delete them later - I suspect that this is where the "modify and delete data from SD card" comes in.
Comment: Don't forget the language packs for offline speech recognition :)

Google Voice and SD cards


How can I remove Ubuntu without affecting Windows so I don't have to choose an OS to boot at startup?

Question: I installed Ubuntu 12.10 alongside Windows but now I want to permanently remove it from my computer as I find it quite uncomfortable to have to choose which OS to boot at startup time.
How can I remove it without affecting my Windows system?
Answer: This question appeared in my 'dashboard' as active but I've just realised it's from over 5 years ago - it looked active because Community has marked it for being moved. But whilst I'm here anyway I'll add a little to it:
@phoibos offers decent advice to answer the question asked and then points in the direction of 'you don't need to get rid of Ubuntu to get the functionality asked for'.
Removing Ubuntu and getting Windows to re-write the bootloader afterwards is an awful lot more hassle than just changing a couple of lines in the grub file located in the /etc/default folder.

Open up a terminal and type sudo nano /etc/default/grub
Change GRUB_DEFAULT=0 to GRUB_DEFAULT=saved
Add GRUB_SAVEDEFAULT=true on a new line below it.

From there you can press Ctrl + o to save your changes ('Write Out'), enter to accept the filename 'grub' and then Ctrl + x to exit.
If you prefer you can just press Ctrl + x once you've made your changes, y to accept the offer to save your changes and then enter to accept the filename.

When you run sudo update-grub to update your new grub adjustments, then the last Operating System that you successfully booted will be the default option.

So if you usually end up running Windows, then when you switch on your machine it will be the option highlighted in the grub menu. If you don't choose something else then it'll get on with booting it when the timer runs out (or you press enter).
Using the same method, you can also change the GRUB_TIMEOUT=10 to just a few seconds if you prefer to get on with booting your usual choice more quickly.
Keeping another Operating System on your machine may turn out to be surprisingly useful if something unexpected happens to your main system.
(This assumes that you can spare 15 - 20 GB or so on your storage device, although some of the lighter distros take up even less space even with a bunch of useful programs installed).
Also, Community, don't worry about deleting/moving this answer if you'd prefer - I've saved a copy in case something similar is asked again ;)
Answer: Get rid of Ubuntu:
Boot your windows boot disc and fix the master boot record to get rid of Ubuntus Grub menu.
The process is described here:
http://www.howtogeek.com/howto/32523/how-to-manually-repair-windows-7-boot-loader-problems/
If you rebooted to Windows and didn't encounter the Grub menu, you're free to do with Ubuntus partitions whatever you please (if you don't have any valuable data on its partitions).
A (IMHO) better alternative:
Keep Ubuntu, but make the default entry for the Grub boot loader Windows. Now you can still boot Ubuntu if you like, but if you don't select its entry in the boot menu, Windows gets loaded.
See this answer: How do I set Windows to boot as the default in the boot loader?


How can others vote to undelete when nobody can find my question?

Question: I have a deleted question that I have voted for undeletion. I need two more votes until it is undeleted. But how can anyone vote to undelete when nobody can find my question? If I log out, there comes a 'File not found (404)' page.
Answer: 10-kers can see deleted posts and undelete votes in their 10K-tools.
If you post a link to your question and expand a little bit on why it needs to be undeleted we can see if we agree.
Another option is to join a chat room that has some regulars to help out. A good starting point is the The Meta room


Is there a way to link to a Google+ comment?

Question: I cannot find anywhere on a Comment something I can just right-click and copy so I can have a direct link to it. Is there any way to link to a specific comment?
Comment: You can get a link to a whole post (from the text like "Yesterday 5:23 PM") but AFAIK not to an individual comment on a post.
Comment: Doesn't look like it, no.
Answer: There doesn't seem to be a way to right-click and link to them yet, but there is an ID on the element you can use to build a link:
For example, https://plus.google.com/+FeliciaDay/posts/DKroN5F74Sy#z13jifpa0rnrzrpud23ky1h4wrvagfzxp04#1413850339753657
If you inspect the element, you can see that each comment is wrapped in a DIV tag with an ID attribute, which you can use to build a link. I'm sure it would be possible to build some kind of browser plugin or script that would let you create links to comments using this.
Comment: What a mess. This works (and is the best answer), *iff* you're on the post's individual page, and only if the floating toolbar is already displayed. I've had the page scroll to the `#` but then have everything after the `#` erase after the bar appears. Here's a link [to a specific post](https://plus.google.com/+DouglasCrockfordEsq/posts/aeJGSb7zheb#z13qgxf55zy2y34id04cipiaorjydfxg5tc0k#1425034256333065) that seems to reload as the floating bar is shown (FF 38.0.1).
Comment: And [here's it not working on the main page](https://plus.google.com/communities/104441363299760713736#z13qgxf55zy2y34id04cipiaorjydfxg5tc0k#1424973194397577) unless the comment has already been exposed. That makes some sense, but it'd be nice if they had an API to make this cleaner.
Comment: Is this still accurate? I can see things like `commentid="z131hbdo4obmfhgh504cgvww2yv1vrm5j0g#1528137166749957"`, but no `id=` anywhere.


How to put label text in two rows using QGIS?

Question: I have a long text in one attribute field and want to place it as a label. Because the text is so long I want to divide it in two rows. How to do that using QGIS. I have a solution to divide text in two fields and make multi labeling, but I don't want that.
Comment: Welcome to gis.stackexchange! Please note that a good question on this site is expected to show some degree of research on your part, i.e. what you have tried and - if applicable - code so far. For more info, you can check our [faq].
Answer: You need to use  wordwrap() in labeling the field as follows:
 wordwrap(  "Fieldname" ,number)         # example:  wordwrap(  "Name_2" ,5)

where:
Fieldname is the name of the target field, and Number is the desired length of characters to wrap the string

You should place it under Label with as in the following image:
Answer: The third option is to define a certain character or multiple characters as a wrapping point.
You can do This under layer properties -> Labels -> Formatting. You will find an option called "Warp on character" here you define your character. You need to take to use such characters which are not used somewhere else. In the image 1, I use the "--" as warp character.

The result can be seen in image 2
Answer: You can write an expression and insert a newline character where you want to wrap the text onto a new line. One of my layers uses a formula that pulls together six fields to create the label.
if(coalesce("caption" ,'') = '', '', "caption" || '\n') || trim(concat("Distance",' ', "Unit", ' ', "Label", ' ',"Distance 2",' ', "Unit 2", ' ',"Label 2", ' '))
the first part (coalesce) is dealing to null propagation and ensuring there isn't a blank top line if the first field is empty. I haven't quite got to dealing the possibility of a blank 2nd line.


Book where a professor of language dying of cancer is reincarnated in to the body of a cat/man hybrid

Question: I am looking for the title of a book in which the main character is a professor who dying of cancer.  He is on a cruise and traveling when killed by a meteor.  He is then reincarnated into the body of a cat-like human.  It turns out that the planet is earth thousands of years in the past.
Comment: If you are reborn back in a time before your previous life, would that be "preincarnation?"
Answer: As per A book where a man inhabits the body of a dying man and befriends a telepathic cat, this is likely the Gandalara Cycle by Randall Garrett and Vicki Ann Heydron.

When the fireball hit the cruise ship, Richard Carillo was already on his way out - a terminally ill language professor. He regained consciousness as a well man in the desert... only it wasn't a desert on Earth, and he was a man only because he was still male. More surpises awaited him in the exotic city of Raithskar - he was called Markasset, a master swordsman, son of a powerful leader, and a man on the run, accused of murder and the theft of a precious, sacred jewel. With the aid of Keeshah, a great war-cat with which he shared a telepathic link, he set out to clear his newfound name...

I asked about it myself here.


Why is only a square matrix invertible?

Question: Can anyone give a very simple proof (or explanation) as to why only square matrix can possibly be invertible?
Answer: Basically, an $\,n\times m\,$ matrix represents a linear map between linear spaces over some field of dimensions $\,m\,,\,n\,$ .
That a matrix is invertible means the map it represents is invertible, which means it is an isomorphism between linear spaces, and we know this is possible iff the linear spaces' dimensions are the same, and from here $\,n=m\,$ and the matrix is a square one.
Answer: A product of two matrices of order $m\times n$ and $n\times p$ is a matrix $m\times p$.
But when a matrix $A$ has an inverse $B$, it has a two sided inverse, that is $AB=BA=I$.
The only possibility is $m=n=p$.
Comment: Well, just purely as function, we don't say a function has an inverse if $f\circ g = g\circ f$. Rather, we say $f:X\to Y$ has an inverse if there is a $g:Y\to X$ such that $g\circ f = \operatorname{id}_X$ and $f\circ g = \operatorname{id}_Y$.  So we'd want $p=m$ and $AB=I_m$ and $BA=I_n$.
Comment: Thanks. Another quick question: You can find the inverse using both the determinant AND gauss jordan elimation, right?
Answer: An inverse of a square matrix $A$ is $B$ such that $A B = I$. You can also find a $m \times n$ matrix $A$ and $n \times m$ matrix $B$ such that $A B = I$, and call $B$ inverse of $A$. However such inverse need not be unique, nor does it endow any subset of matrices with a group structure under multiplication. Therefore it isn't as interesting.
Comment: Actually, an inverse is $B$ such that $AB=I$ and $BA=I$. What you are describing is a 1-sided inverse.
Answer: An $m\times n$ matrix $A$ is invertible if there exists an $n\times m$ matrix $B$ such that the products $AB=I_m$ and $BA=I_n$ are identity matrices. I'll show that this implies $m=n$. I'll work over an arbitrary commutative ring with $1\neq0$ (e.g. fields, the integers, all integral domains, etc.).
I just need the following basic properties of the determinant of square matrices:

$\det(CD)=\det(C)\det(D)$ for any two square matrices $C$ and $D$.
$\det(I)=1$ for $I$ the identity matrix of any size.
$\det(C)=0$ if $C$ has any zero row or column.

We argue by contradiction. Assume that $m>n$ (one can do assume without loss of generality, since the roles of $A$ and $B$ can be exchanged). We extend $A$ and $B$ to $m\times m$ square matrices by adding zeroes,
$$C=(A|0),\qquad D=\left(\frac{B}{0}\right).$$
Then
$$CB=AB=I.$$
By 1, 2, 3, above
$$1=\det(I)=\det(CD)=\det(C)\det(D)=0,$$
reaching the desired contradiction.

Why is only a square matrix invertible?


ACRU4 riparian zone receiving flood water from river channel

Question: I would like to include wetlands and riparian zones as hydrological response units (HRUs) within the agricultural catchment research unit (ACRU4) model. In the ACRU4 user manual there are graphical representations showing how one would typically conceptualize the riparian zone and wetland within the model. However, it is unclear as to how a user should specify that when stream/river bank full discharge is exceeded, water will spill onto the riparian zone or wetland. Please can someone specify how this is done?
Answer: All that you need to do is define the ChannelFlowCapacity (CAPM3S) variable.  It can be difficult to know what value to use for this variable, however, for example, you could make an estimate of how often the wetland receives flood water from the channel and then look at the flow time series and determine the appropriate flow value for the variable.
Alternatively, you could set a very low value for the variable so that the wetland stays wet most of the time.


Do I need a tune up or a transmission

Question: My 2001 Buick LaSabre with 106000 miles started hesitating changing gears and roughly doing so.  I stopped and shopped for about an hour and started driving again, and it changed gears smoothly with no more trouble. It's due for a tune up. Could a tune up be the problem or it have to be the transmission is failing.
Comment: A tune-up is not going to help with transmission problems.
Answer: Did you do a tranny fluid flush? This helps with reducing shift harshness in general and might(hopefully in your case) be the cause of the shift hesitation!

Do I need a tune up or a transmission


Xpages - How to save values to list box that have been entered by client side javascript

Question: I have a list box that I am adding and removing items with client side javascript.  The issue is that these new values are not being saved to the list box(binded to field).  The only value that comes back is the original one that was set in list box.  The values are all there on the client since I can loop through the array.  How can I get these values to replace the value that is currently there?
Comment: After changing the values with clientside. Do you save the document with a simple action or do you post them another way or?
Comment: I save the document using a simple action (Save Document).
Comment: maybe the notes field is not multivalue with correct separator?
Comment: Appears I can added to an edit box just fine. Not sure why the values are not being retained upon submit.
Comment: Maybe you try to retrieve only the first value. You should provide sample code
Answer: By default the listbox have a validator that you may not see during save, (you need to add error controls to see it)  and the validator do not accept new values added using CSJS
If you set disableValidators="true" in the listbox control you suppress the validator and the save works fine. you also need to select the entries in the listbox using CSJS before you save,
Credits goes to Jesse Gallagher
Thomas
Answer: In the List Box properties, you must to set mutiple = true


What happens to Dirk at the end of George RR Martin's "Dying of the Light"?

Question: Trying to avoid spoilers - what do we think happened to Dirk at the end of Dying of the Light? If you had told me what the final scene was, I would have told you immediately what happened. However, reading it, it sure seems like Dirk expects a different outcome. Anyone see something I missed?
Answer: Following Dirk's thought processes we know "It will be easy", "Take one blow and give one, that's all." but also "He was very frightened" which suggests he does indeed fear for his life.
We know that duels are sometimes, but not always, fatal.  I think much will depend on the mood of Bretan Braith.  We know Bretan Braith wanted Dirk and Jaan to die when he burned down Kryne Lamiya, but that was largely because of Dirk dodging the duel.  Braith has a chance to kill Dirk before the duel commences but instead returns his pistol to the holster.  The Code Duello is all important to him.
The result is left deliberately ambiguous, however for a moment Dirk thinks Bretan Braith is the shadowy bargeman, a figure who haunts Dirk and possibly represents his impending death.  On the other hand maybe the bargeman represents Dirk's mortal fears and by facing that fear other outcomes are possible.
Comment: Or, said the other way: it is intentionally left ambiguous. The final answer is: Dirk went to face his opponent in a duel.


Where is data stored in paper wallet?

Question: I have a question about paper wallet. I can print paper wallet using walletgenerator.net. But I am confused about how the things works, where is the data about wallet coins stored? Is there global database of all wallet addresses and transactions? How my public key is paired with my wallet when somebody tries to send me coins?
Answer:
Is there global database of all wallet addresses and transactions?

Yes, it is called the blockchain.  You can browse it through various websites, called block explorers: e.g. http://blockchain.info, http://blockr.io, http://blockexplorer.com.  If you use full node software such as Bitcoin Core, you will download a complete copy of this database (currently over 120 GB).

How my public key is paired with my wallet when somebody tries to send me coins?

The paper wallet contains a private key and an address.  From the private key one can compute the corresponding public key, and the address is a hash of the public key.  You can give your address to anyone, and they can send coins to that address; this means that a transaction is recorded in the blockchain showing a credit of coins to your address.  Other than your address, this doesn't need any further information or involvement from you.
You only need the private key when you want to spend those coins.  Importing that private key into wallet software, you can make a new transaction to spend the coins that were sent to you.  The private key is needed in order to sign the transaction and prove that it is authorized by you, the rightful owner of the coins; but this process does not reveal the private key to anyone else.  (As part of this process, the public key will be recomputed from the private key and included in the signature.  That is easier than including the public key on the paper wallet.)
Comment: Thank you for explanation, I appreciate it! So if I want to not use online wallet (for security reasons if their site gets hacked), I need to download complete copy of database for each coin, correct? So I need Bitcoin database, ETH database, ... Or is there any way to use paper wallet without downloading core?
Comment: @newbie85: If you have a new question, please create another topic.

Where is data stored in paper wallet?


What exactly last line of code is doing?

Question: @user = find_user
@user_sport = UserSport.new(params[:iuser_sport])
@user.user_sports << @user_sport

What exactly last line of code is doing??
Answer: It is appending @user_sport to the user_sports array.
More info: <<

Append—Pushes the given object on to
  the end of this array. This expression
  returns the array itself, so several
  appends may be chained together.

push is also an equivalent method if you prefer to see the word. << is common though, so it comes down to personal preference.
Answer: From rails API doc

Adds one or more objects to the
  collection by creating associations in
  the join table (collection.push and
  collection.concat are aliases to this
  method).

the '<<' creates association between activeRecords object,
here User has many UserSports so @user.user_sports << @user_sport defines association between @user and @user_sport.