Is cycling the best option to strength the thighs muscle and make them look smaller?

Question: I am concern about my thighs size.
I an adult men weighing 56.4 Kg, 165 cm tall (5.4 feet), considered as a short man.
My last visit to a nutritionist, was a disaster. She told me that I should not lose more weight. And I should focus on gaining muscles by going to gym or buying some home equipment to do so.
In my first visit, the weight was 57.5 Kg and the mass of body fat (MBF) was 10.5 kg
And the control of MBF was <code>+0.0</code>. So she told me to stop walking for 45 minutes per day, or at least walking less than that and increase the muscles build.
I was concern of my thighs size, while standing the diamter is 54 cm. And when I sit down it will go very wide.
The segmental assessment gave:

1.89Kg of MBF and 7.77Kg of SLM (Soft Lead Mass) for the left leg
1.88Kg of MBF and 7.86 of SLM for the right leg.

The dietitian told me to do some cycling to strength up the thighs muscle so the look will change and it will firm up when sitting.
Reading from this article:

So yes, cycling will change the shape of your legs, but unless you're
  doing a LOT of squats, and maintaining the same levels of fat (by
  eating A LOT), you're not likely to get "bigger".

And it made me confused about doing cycling or not.
So is cycling going to make my thighs bigger or smaller ? And what other things to do other than cycling to strengthen the muscles and make them look smaller? Squats are not an option as I don't want to get a curved bottom.
Answer: Well as the article says, you will get bigger if you're squatting and maintaining high levels of fats. If you are cycling but eating less and not weight lifting your legs are going to become firmer and slimmer


What should I read next after Neil deGrasse Tysons "Astrophysics for people in a hurry"?

Question: I really liked the clever way the author explained stuff in this book but I already understood most of it. Neil himself states in the book that if you are not in a hurry and want to know more about the topic the are plenty of bigger books you can look into. So my question is: what is sort of a next step after this book on this topic (astronomy, astrophysics)?
Thanks.
Comment: You would need to describe your ability at mathematics and physics to get advice.
Comment: I have a masters degree in cybernetics and robotics but when it comes to astronomy I am fairly new. I think I would be able to get around some physics and math.
Answer: I liked Black holes & time warps by Kip Thorne. Here's the link. While being easy to understand, he does go into some details regarding black holes and the warping of time, which I think are interesting to the casual reader. If you have a science degree, you might not learn much new informations, but it's a good read.


Does deleting your Android apps data delete your personal files?

Question: I use Redmi Note 3 with Android 6.0.1. Out of 10 GB internal storage, 4.5 GB is occupied only by apps. I see that app data and app cache eat up a lot of free space. I safely delete app cache data.But since that's not enough so I want to delete my app data also. But all my files in my phone are important to me so I want to be sure that deleting my apps data won't delete my personal files. Some of the apps whose app data I intend to delete are Google play services, Google drive, Mi Browser and Google chrome. I am not sure what files does this 'app data' contain and I don't know if there's any method to know that.
Comment: To make an example, a browser's app data would contain e.g. your history and login information, among others. In other words, deleting an app's data is the same as installing the app from scratch, from a casual user's standpoint.
Answer: Clearing an app data DO delete files from your phone. Becuase those files are associated directly with the apps that you are deleting. Any other files which are not AUTOMATICALLY created by the app being deleted will not be deleted when you clear an app's data.
So, go ahead and feel free to delete an app's data. But be careful deleting an app's data actually resets that app into a freshly installed app state. And if you delete the Google app's data chances are that you might lose some bookmarks, history or any preferences you have set previously.


Is there any reason why Biden might not want to rejoin the TPP?

Question: Biden has shrunk from making the case from rejoin the TPP after Trump left the TPP. Might there be any reason why Biden hasn't immediately taken the measures to rejoin it? The TPP was seen as a way to contain China, and I am wondering if there's anything within the TPP that might trouble Biden.
Answer: Biden's attitude towards the Trans-Pacific Partnership are not that black-and-white. In 2019, he said:

"I would not join the TPP as it was initially put forward. I would insist that we renegotiate pieces of that with the Pacific nations ... so that we could bring them together to hold China accountable."

So while he might be in favor of the idea of the TPP in general, he is not in favor of doing it the way it was originally negotiated.
What aspects does he want to renegotiate? He further stated:

We have to join with the 40 percent of the world that we had with us and this time make sure that there's no one sitting at that table doing the deal unless environmentalists are there and labor is there.

Changing an international trade agreement to put more emphasis on social and ecologic concerns is definitely a political pill which is hard to swallow for many of the more conservative people who have a say in this, both domestic and internationally. That could make such a renegotiation a rather challenging effort.
Answer: (I originally wrote this as a comment to Phillip's answer, which I've upvoted.  However, I ended up thinking that it was a possibly a significant shift from what he intended as an answer, so it would be best put separately).
In addition to what Philipp said, having a trade agreement in the first place can also be a bitter political pill to more lefty people. Certainly NAFTA is a trigger to many left-of-center Canadians. So there is likely a sizable constituency of Biden supporters who are reflectively allergic to such a deal and may or may not come around even if labor and environmentalists are there.
And those labor and environmentalist representatives also will have to take into account their own constituents looking out of a betrayal of principles.


What if I receive bitcoins when my device is powered off?

Question: What happens if I receive bitcoins when my computer or smartphone is not online or powered off?
Comment: My guess is that the transaction is processed in the ledger. When you go online and login, this transaction is read by your bitcoin client.
Comment: So if I launch my wallet, it will download all blocks and catch up with any transactions it didn't already know about, right?
Answer: Solution
This works fine.
The bitcoins will appear next time I start my wallet application. (Read tuxcanfly answer)
Bitcoins are not actually received by the software (wallet) on my computer, they are appended to a public ledger that is shared between all the devices on the Bitcoin network. (Read SPRBRN comment)
If someone sent bitcoins when my wallet client program is not running and I launch it later, it will download all blocks and catch up with any transactions it did not already know about, and the bitcoins will eventually appear as if they were just received in real time.
My wallet is only needed when I wish to spend bitcoins!
Helpful resources

https://bitcoin.org/en/faq#what-if-i-receive-a-bitcoin-when-my-computer-is-powered-off
https://www.weusecoins.com/en/questions/#what-if-i-receive-a-bitcoin-when-my-computer-is-powered-off
Answer: The network contains those transactions (either in nodes' mempool or block) and you will receive your Bitcoins when you are back online.
Comment: .......... Yes.
Comment: So my wallet download all blocks automatically in the background?
Answer: Yes. You can even send bitcoins to 'cold storage' or a 'brainwallet', which is pretty amazing IMHO!
Answer: Money (BTC transaction) is being send from one wallet to another,
that is being recorded in a book (public ledger),
which is written by many people (miners) and
kept securely by other people (BTC nodes)
Once written in the Book, it is never changed
When you open your wallet next time, what it does is, it simply checks this book, and reports to you how much balance you have, with an update if you received a new transaction between the last time you opened the book and now.
I hope this answers your query.


How do I legally download the songs from a Google Play Music playlist?

Question: I have a Google Play Music 'Unlimited' subscription. How do I make the songs in my playlist available offline, as you can do on Spotify and the Mobile Apps? I am not talking about just the 'Free and Purchased' songs, but all the tracks. Also, it needs to be legal. I don't do piracy.
Answer: It's not an option in the computer/browser version of Google Play Music.  I've done this in the Android app.  Find the content you want to sync offline, and tap the down-pointing arrow button.

In the Android app you can sync songs, albums, artists, and playlists for offline playback, limited only by the available space on your phone.


Accounts, Active Directory and Tiers

Question: Watching a video series about Active Directory and doing security based on tiers. You have the main administrators in Tier-0 and End users in Tier-2 for example sakes.
The idea is administrator level users never have access to anything but tier-0 to avoid token compromises ect.. You also avoid generic accounts for audit purposes.
My question is this. You are an administrator and you work heavily in Tier-0, but you also work in Tier-2 where you access the internet, emails and remote into other Tier-2 machines for remote desktop work. Do you generally create another account for Tier-0 work or assign yourself privileges do that level on a need to use basis?
Answer: Microsoft is suggesting that you do both.
This is a part of their PowerShell v5 paradigm known as JIT/JEA (or JitJea) aka Just In Time, Just Enough Administration.
Answer: Where I've seen this done, separate accounts were used.

Accounts, Active Directory and Tiers


What is the best method/product for cleaning pasta's starch residue from colander and cooking pot?

Question: After cooking pasta, I typically drain it in a colander.  I have found the starch residue in both the cooking pot and particularly the colander is difficult to clean without hand scrubbing it.  I am curious if anyone knows a solution - either a method or product that makes clean-up quicker and easier.  Thanks for any ideas you may have!
Comment: @FuzzyChef I think it's just semantics - what I call scrubbing, you  refer to as a little rubbing.  My primary issue is that the colander seems to look hazy after washing - and often there are simple solutions / "secrets" people have for making things much easier. I think it may also be the quality of the pasta as well that contributes.  Thanks.
Comment: Melanie, if you have to actually scrub it ... rather than just giving it a little rubbing with as sponge and soap ... then you're doing something else unusual.  Perhaps you could add the steps you go through?
Comment: I realize this is an old question, but just for kicks....What about avoiding the use of a colander?  Use a spider or tongs to remove pasta from boiling water directly to pan containing the condiment.  This assumes a traditional Italian approach, but is applicable with other cuisines.
Answer: Soaking in water works for me. Put the colander in the pot, fill it with water - preferably before it dries out in the first place - and then leave it alone until you are ready to do the dishes, whether that's after dinner or (gasp!) in the morning. Either way the starch will slip off easily.
Comment: Thanks Kate.  That is generally the way I do it now, but after soaking I still have to scrub considerably.  Glad that works well for you though!  I appreciate the input!
Answer: In my opinion, the most important part is to rinse immediately after use.
If you use the collander, then let it sit for a few hours (through dinner) or 'til the morning, you're going to have to soak and/or scrub.
A quick spray-down immediately after using will save you a ton of work later:

pour pasta into collander.
spray down the pot (I have a pull-out sprayer, and I spray around the edge where the ring formed at the water level; you can give it a quick swipe with a scrub sponge, but you have to be careful about soap near the sink if there's a collander of pasta sitting in there))
dump out the pot (not over the collander)
pour the stuff in the collander back into the pot or whatever serving vessel.
spray down the collander (both sides) & move to the dish drain for full cleaning later
Answer: If there is some build-up then a soak in mild borax solution will get colander shiny new again. However, starch will then again want to stick even more easily... Prevent it with a wee spray of non-stick. I justify my use in that I spare a good deal of hot water in the clean up.
Answer: I am aware that I address the question indirectly.
What I have observed is that starch is a problem only if the concentration of starch in the water is high.
What I do, is to make sure that I cook the pasta in way more water than most people do. I try to use at least 1-2 L of water for every 50g of dry pasta.
The main reason why I prefer to use that much water is because the quality of the pasta turn out considerably better that way. The easier washing is just a side effect :)
Yes, bringing all that water to a boil does take a bit more time.
Comment: I doubt the quality is actually better: http://cooking.stackexchange.com/a/3965/1672
Answer: I've only found that hand-scrubbing works. I use a soap and Bon Ami (no-scratch cleanser), at least for the colander. Regular soap and a no-scratch scrubbing sponge works on the pot for me, too.
Answer: Here's a trick I just discovered.
What I used:

Non-Stick dishwasher-safe pot that's starch-encrusted after 2 years of use, a couple times a week every week.  (Shush, I like spaghetti..)  I've put it through the dishwasher before and tried to scrub it off, but never had any success; it's always looked just as bad after drying of as before I started trying to clean it.
Dawn ultra-concentrated dishwashing liquid (The only dishwashing liquid I've used on pots/pans; I use it because my parents did.  Others will probably work as well)
Disposable scrubbing sponge (Very cheap; I found them at Walgreens)
Dishwasher
Cascade detergent pacs (powered by Dawn), for the dishwasher

Steps I took:

Put a few drops of Dawn in the pot, turn on the faucet at high blast so the agitation makes it foam up.  Fill it to the brim.
I only let it soak for about 2 hours, more might work better.
Use the scrub-sponge over the whole internal surface to get off the loose starch.  You shouldn't need to actually scrub hard; I lightly brushed it for a short time, like 2 or 3 minutes, and so much residue was coming off that had I to rinse the sponge often.
Put it in the dishwasher.

Come tonight, about 80% of the inside of the pot was completely clean of residue, no evidence it was ever there in the first place.  The remaining residue has streaks in it as though the scrubber just didn't get all the surface-starch off.  I'm pretty confident that doing this only one or two more times will have it looking as good as new.
Answer: I looked up how to do it and it seems there is no easy answer.
I decided to try baking soda and vinegar.  It worked pretty well!
I put vinegar in a bowl, got the colander wet with the vinegar, poured baking soda into the colander and scrubbed it a bit. The abrasive soda helps loosen the starch and the vinegar starts to bubble up. I left the colander in the bowl of vinegar for a while, scrubbed again and rinsed. It was a lot better, but needed another round. I poured more baking soda into the colander, scrubbed and left it in the vinegar again. It looks so much better. I might try heating the vinegar the next time to see if it speeds up the process!
Comment: Interesting.  Is this a plastic, bare metal, or enamalized metal colander?
Answer: I've always used the Lagostina stainless steel pot cleaner to remove starch stains and it works great! :)
Answer: I was always told to rinse the colander or pot with cold water as soon as the food is removed to prevent the starch from setting up on the utensil.
Answer: Rinse with cold water immediately, then wash in warm.  Hot water makes the starch turn gluier; cold water releases it.
Answer: Make a bath of lye and soak items fully submerged.
Lye will dissolve anything organic, including mothers-in-law.
WARNING
Lye is very caustic and will burn skin and damage eyes.
Wear gloves and eye protection.
It's also not very good for septic systems.
Comment: In addition to being dangerous to skin, lye will corrode or violently react with many metals. This is fantastically bad advice.


Online stores for second hand photo equipment in France

Question: What are the biggest reputable online camera stores in France that offer used equipment for sale?  Is there anything similar to keh.com either in France or in nearby countries (with affordable, customs-free shipping to France)?
Comment: If you buy electronics/photographic equipment from an online shop in any EU member state, there is no customs duty payable, so you might consider buying equipment from the UK for example. (You would have to take the current euro/sterling exchange rate into consideration in that case of course.)
Comment: I came to France recently and I am not yet familiar with the local situation.
Comment: @osullic Thanks, yes, I know that, that's why I asked also about nearby countries.  But the question still stands: which stores do people use here?
Comment: There is www.mpbphotographic.co.uk here in England, I don't know what delivery to France would be like
Answer: Two of the most famous online camera store for used equipment in France are Objectif Bastille (http://www.objectif-bastille.com/) and Phox (http://www.phox-occasion.com/).
Both have physicals stores and their used products come with a 6 month warranty (at least for bodys and lenses). I bought one used lense from "Objectif Bastille" 18 month ago and have still no problem with it. A friend bought his body from Phox (about 2 years ago) and is still happy with it.
If you are looking for non-professional website (and speak French), you can try Le Bon Coin (www.leboncoin.fr/), it's a website similar to craigslist where each person can add a "for sale" post. As usual with such website, you should take precautions when buying.
Answer: I recommend eBay France and PriceMinister .
On Priceminister, people often have no idea what they're selling so you can find interesting prices.
Both will offer you buyer protection and as far as eBay is concerned, often low prices.
You can also stay tuned to your local Craigslist and Le Bon Coin which was already mentioned.


Is teleportation circle two-way?

Question: If I want to send a strike team through a teleportation circle and get them back home, would I need to send the wizard who cast the circle with the strike team to cast teleportation circle again when strike team wants to return? Or can the strike team use the teleportation circle they arrived from to make the return trip?
Answer: The spell teleportation circle creates a one-way effect. Returning the strike team to base requires them to find their own way back, be that with the wizard who cast the spell teleportation circle or some other means.
Comment: You can, however, use the Teleport Circle itself as a locate, so long as your familiarize yourself with it prior to your strike team departure. You might also be able to make use of some kind of recall effect, if you can manage the communication angle.

Is teleportation circle two-way?


Why is it a problem to store strong passwords as unsalted hashes?

Question: My users all have strong (80-bit true entropy) passwords. How do I know that? Because my imaginary website randomly generates the passwords for them (client-side).  In that context, could you explain why it would be a problem to store them as plain unsalted hashes (either MD5, SHA1, or SHA256).
Comment: It is really dangerous to generate passwords client-side. The hacker could detect a logic in this 'random' generation and break into most of the account. This should be - at least - server side.
Comment: Note a dupe of "Why are salted hashes more secure for password storage?" as using cryptographically secure random passwords changes the need for salt.
Comment: Possible duplicate of [Why are salted hashes more secure for password storage?](http://security.stackexchange.com/questions/51959/why-are-salted-hashes-more-secure-for-password-storage)
Comment: "Client-side" = no, you really don't know anything.
Answer: Such strong passwords can be safely stored unsalted with a fast algorithm like SHA256, there is no problem in that.
The problems are different, you have to trust the client, the secure transportation to the server, and you have to make sure that the generated passwords are indeed unpredictable.
Answer: Sufficiently long passwords generated by a secure random number generator hashed by an algorithm with long output (at least 128 bit) and no known weakness (at least SHA256) will become infeasible to bruteforce (either against a single hash or compute a useful rainbow table) and salting will not be necessary.
Your description of your implementation doesn't satisfy the italic points. The password should contain enough entropy to deter bruteforcing. It should at least be 128-bits these days. Also, there's no way to get true randomness in a browser without non-standard browser extensions*. Naively using a PRNG does not give you very random numbers.
Edit:
* This is now possible with the Web Cryptography API, but any wrapper library that falls back to other ways of generating random numbers must be used with care.
Comment: There is an experimental JavaScript API meant to provide cryptographic random number generation in JavaScript, see [this answer](https://security.stackexchange.com/a/20035/32746), and 80 bits password  [seems generally considered good enough](https://security.stackexchange.com/q/69374/32746). However, from a practical point-of-view, I'm still wondering how the OP expects his users to remember cookies off the top of head...


How to send int[][] as a byte array through Serial

Question: I have int arr[50][2]; and I need to send it through Serial. But I don't know how to do it. is it possible?
Comment: No, unless you make code that can do that. The most common way is to use Serial.print and transmit each element of the array (that is 100 times the Serial.print). You could transmit a single binary block of data, but the computer might have the MSB at the lower byte and the Arduino at the higher byte or vice versa. You need a very accurate description of the data which is transferred. It can be defined as a single block of 200 bytes consisting of 2 byte signed integers with MSB first with start byte and end byte and a crc checksum.
Comment: I forgot to mention to select a high baudrate. Not 9600 but 115200 or higher. The output tx buffer is 64 bytes, and if the tx buffer is filled, the Serial.print will wait and that will delay the sketch.
Comment: In what format? binary data or readable ascii? seperated with comma's?
Comment: @Jot Is it possible to get the same array on another side?
Comment: Send it to what through serial? A PC, another arduino, a printer, something else?
Comment: @Craig to another arduino
Comment: serial communication is like a tennis ball launcher .... in your example, it will fire 100 tennis balls at you, one after another .... it is up to you to arrange them any way you want after you catch them .... therefore, you have to know in which sequence they were fired
Answer: In the comment you write that the receiving end is an Arduino too. Then you can send the data in binary form.
To send the array:
Serial.write((byte*) arr, sizeof(arr));

(byte*) is cast of the memory location of arr to a byte array
sizeof returns the size of the array in bytes

To receive the binary data you must know the size. Here we read 100 16-bit integers:
Serial.readBytes((byte*) arr, 100 * sizeof(short));

Function readBytes is one of the 'timed' functions of Stream. It waits for the next byte (until timeout).
If one Arduino is 8-bit and the second is 32-bit, then use the type short instead of int, because the size of type int is different, but the type short is 16 bit long on all Arduinos.


What do I do if there are only two wires coming from my ceiling electrical box?

Question: I'm about to install several Hunter ceiling fans. The instructions that came with the fan show three wires coming from the ceiling box for a single switch light.  When I remove the light, there are only two wires leading to it.  And the wires are old, cloth covered.  (House was built in '50.)  Why two rather than three and what the heck do I do now?
Comment: Do your new fans have wireless remote controls?
Comment: Not included but I think they are "add-able".
Answer: The 3 wires are normally hot, neutral, and ground. It sounds like your home doesn't have a ground wire.
From Wikipedia:

Equipment earthing conductors provide an electrical connection between non-current-carrying metallic parts of equipment and the earth. The reason for doing this according to the U.S. National Electrical Code (NEC), is to limit the voltage imposed by lightning, line surges, and contact with higher voltage lines. The equipment earthing conductor is usually also used as the equipment bonding conductor (see below).
Equipment bonding conductors provide a low impedance path between non-current-carrying metallic parts of equipment and one of the conductors of that electrical system's source, so that if a part becomes energized for any reason, such as a frayed or damaged conductor, a short circuit will occur and operate a circuit breaker or fuse to disconnect the faulted circuit. By bonding (interconnecting) all exposed non-current carrying metal objects together, they should remain near the same potential thus reducing the chance of a shock. This is especially important in bathrooms where one may be in contact with several different metallic systems such as supply and drain pipes and appliance frames. The equipment bonding conductor is usually also used as the equipment earthing conductor (see above).

If the box is metallic, there's a chance it may still be grounded, even though there is no wire. There's an answer to a similar question that describes how to check if a box is grounded.

If the box is grounded..
If the box is grounded, then you can connect the ground wire from the fan directly to the box, and the fan will be grounded.
If not..
If the box is not grounded, you have two choices:

Run a ground to the box. This would mean running a new wire back to the panel (could be bare copper, but if you're doing the work may be better just to run a new wire - 14/3 would be the best), which could mean opening up drywall.
Wire the fan without ground. This is slightly dangerous, but not moreso than the when the previous fixture was there -- except that people do touch fans to control them. If something ever happens to cause the fixture to become energized (eg a frayed wire inside), someone who touches it will likely be shocked (which can cause serious injuries and even death).

Personally, if I was unable to get a ground to the box, I'd probably use a fan that was remote controlled so no one ever has a need to touch it (get a fan either with no pull strings/controls, or cut the cords off so no one is tempted to touch them). The wall switch can be left in to control overall power, and the remote used to switch light/fan speed, or the wall switch can be removed so the power is permanently on and the remote is used for everything.
In any case, you should connect the fan's ground wire to the box, so that at least the fan body and box are bonded (at the same electrical potential).

Bootleg Ground
DO NOT CONNECT GROUND AND NEUTRAL in the box. This is sometimes called a "bootleg ground" and is not only pointless, but actually very dangerous. If the neutral wire ever has a fault ANYWHERE, in addition to the fixture simply not working, it becomes energized and you can be shocked if you touch it (as you likely would to, say, check if the light bulb was burnt out).
Comment: Get the remote control as gregmac suggests. This is the safest way and will give you switching for light and fan separately and fan speed, all without touching the device.
Comment: Sorry but your answer is misleading. If you have ever wired a ceiling fan before, what the OP says is correct, the fan has 3 wires, with the Blue being power for the fan. If the house isn't wired with 14/3 to the ceiling box, then his only options are to either rewire with 14/3, where the red wire would provide constant power (for the fan) and the other would be switched, for the light. To use the existing 14/2, then you need to connect the blue and black from the fan together with the black in the ceiling box. This would have the switch control power to the fan and light both, forcing you to
Comment: @Chris The OP doesn't have 14/2: he has a white and black, with no ground wire. My answer was more concerned with how to safely wire and use the fan, not how to control the light and fan separately, though I've edited it because if you're going to rewire at all, it's worthwhile to run 14/3 to give you that option.
Comment: @Skaperen -- all you need is a means of turning on and off the light at each entrance, whether it be a hard-wired switch or a wall-mounted remote. (210.70 is the NEC cite btw)
Comment: If the fan is a primary light, especially for a kitchen, dependency on the remote control to turn the light on may not be in compliance with electrical code.  A wall switch may be required (at each entrance) at least for turning on the light (maybe regardless of saved remote control setting). If other lights are around that wall switches can turn on, then not a worry.
Comment: @Skaperen code citation?
Comment: Is the warning against a "bootlog" ground true for the reverse direction as well? That is, if connecting a device with only hot and neutral to the power source which has three wires, don't connect the neutral on the device to the main ground?  (In this case it appears to go directly to a 120VAC to 24VAC transformer in the device)
Comment: Suggestion: If you're going to run the fan un-grounded, see if it's possibe lto add a GFCI. A GFCI should keep you safe even if the fan body gets connected to hot.
Answer: Two is "normal".  Black for hot and white for neutral.
Your fan has 3 wires (4 counting the green ground).  You will have a white which you will connect to your neutral and you will have power for light and power for fan.  Both of the power lines will be capped with your "black"/hot wire coming in.
To have the light and fan controlled independently you would need to rewire from fan to switch with 12-3 (or 14-3).  An alternative is to install a remote that has sensor sitting in fan unit (or buy a fan with it built in).
Answer: Your wiring is an ungrounded system, possibly what was called "knob and tube", which refers to the ceramic insulators used. Be very careful with the cloth-covered insulation, as age will make it quite brittle and easily damaged. Most of the times with wiring this old, both appear the same color, making your install more time-consuming determining hot from neutral. I have used heat-shrink tubing in the past to ensure the old cloth insulation remained intact during fixture replacement, as well as for color coding the existing wires. You only have to sleeve it over the existing wire, no need to shrink-fit it as it is just to prevent shorts and aid in wire identification. Determining which is the hot (black) and which functions as the return (white) is where you have to take your time and be careful due to holding your meter to see as well as holding your tester leads. If wired backwards, everything will still function, but your chances of electrical shock greatly increase. Grounding the fan green wire to the box will not help in preventing electrical shock in an ungrounded system. A remote control unit is probably the safest option besides an entire wiring upgrade.
Answer: Ceiling Fan and Light wall switch. Look with a flashlight into the back of the plastic box. That is were you may find the bare cooper ground lead for the replacement wall switch (4th wire). If the original fan light switch did not use the ground (3 wire) then the electrician would just shove the ground wire deep back in the box. Pull it out and ground the new wall switch. It could be safer.


Pause Android LogCat output

Question: How can I get a wider LogCat output than the one from the terminal window? I also want to be able to pause the output so I can actually read something.
My OS is Windows 7 X64.
Answer: Windows
Its easier, what you can do is this, from the cmd window, adb logcat > my_logcat.txt and just let it run, now, you can pause, resume the scrolling, in that cmd window, same keystrokes for Linux terminal, IIRC, now launch an editor and open the file 'my_logcat.txt' and there the results will show, had there not being a pause/resume in the cmd window, the file will get updated, such as using 'notepad2', 'Notepad++' or similar, the in-built Windows's version of Notepad would do very little justice.
Linux
From a Linux terminal under a GUI such as KDE/Gnome, using the two utilities combined, found on most distributions, multitail, which is like a tail unix utility, only more powerful!
adb logcat # want to see the logcat on the screen

Using Ctrl+S to suspend, then Ctrl+Q to resume the display, and simply mouse scroll the terminal to back-track seeing the logcat output.
The other way is this...
adb logcat > my_logcat.txt 2>&1 &
multitail my_logcat.txt

The first line above creates a background process by using the & at the end of the command, redirecting any errors to /dev/null hence 2>&1.
As the process is forked into the background, using multitail can perform, scroll-back on the logcat.
Comment: I forgot the > in the instruction below lol. Thank you for the detailed solution for both linux and windows ;) +1
Answer: If you are using LogCat viewer in Eclipse you can click the "Scroll Lock" button to prevent it from automatically scrolling down.

It is the icon on the top right in the screenshot above.
Answer: I don't know what logcat does so I can only guess you should use it the same way you do with any other command that spews out text.
Redirect the output to a file you can read in an editor or view with less
$>logcat [<option>] [<filter-spec>] > /path/to/a/file-to-open-in-an-editor

Comment: Well, I can't get this working. For some reason everything on my C drive, including the desktop, is read-only for the terminal window... see: http://piclair.com/data/2to2f.jpg

Isn't there a simple application that monitors logcat output and has the ability to pauze the output? That would make things a lot easier

Pause Android LogCat output


What are the ways from which I can remove scratches from my bike tank

Question: I have a bike honda shine 125cc. It looks good, but when any scratches made I feel very sad, I want to remove all these scratches from bike tank, so it again looks good, What are the ways from which I can remove these scratches. How can I achive this without expending much cost?
Comment: Pics or it never happened
Comment: plz wait....I will update the pics soon.
Comment: Pics.  I can't see what you are talking about.
Answer: It very much depends on the depth and severity of the scratches, a photograph would help here.
For minor scratches polishing and waxing the paintwork may yield the results you are after.  If the scratches are deeper, polishing with an abrasive such as cutting paste or a product such as T-cut prior to applying wax may do the trick.
If the damage to the paintwork is too deep and severe, the simplest way to repair it is to repaint the part.  This doesn't need to be a particularly expensive operation, especially if you can remove the tank from the bike yourself.
Once you are happy with the paintwork, regular applications of wax / "sealant" finishing polish ought to guard against further scratches.


Slow cooker lasagna

Question: Can a lasagna be made in the slow cooker, or will that cause the pasta to become unpleasant?
Answer: I have never tried it but the extended cooking of a slow cooker, combined with the concentrated and trapped moisture would surely turn the pasta into a gummy paste.
No-boil noodles are just a marketing ploy.  You can assemble lasagna with regular uncooked lasagna noodles and bake it for 1 hour (350F) covered with foil waxed paper/parchment paper and foil and then uncover and scatter cheese across the top and bake for another 15 minutes.
Just make sure you have a layer of sauce in contact with the noodles and they'll absorb the moisture during cooking.
You can also assemble and freeze it this way too.
Comment: I assume "noodles" means the lasagne pasta? To this brit, noodles are long thin things. :)
Comment: Yes, the pasta strips used for lasagna.
Comment: @cinque:  Thanks for the vote of confidence!  One note on your comment about fresh lasagna pasta.  I'm my explanation of making lasagna without cooking it, I'm referring to the standard dried lasagna noodles.  I have never done it with fresh pasta in the same manner and am concerned that it would end up pasty and gummy.  The dried noodles can absorb a lot more of the liquid from the sauce and meat and therefore still have a nice texture.

If you do try it with fresh pasta sheets be sure to let us know how it turns out.
Answer: Some claim it can be done (e.g., Crockpot Lasagna)
However, I tried it once and was not happy with the pasta. Of course, I did not repeat the experiment to determine if that was my own fault; it probably was.
Answer: My neighbor does it quite frequently, and it comes out fine if you use a pasta that doesn't get overly soft when cooked.  (I think she uses Barilla, and not the 'no cook' type, although she doesn't cook them first).
You do have to brown the ground beef and sweat any vegetables in advance, though, so it's not one of those 'throw everything into a pot and forget about it' slow cooker recipes.
I know many of her slow cooker recipes she got from the Fix It and Forget It cookbook, but I don't know for sure that it was one of them.
Comment: maybe that was the problem when we tried it.  We definately prefer the "throw everything into a pot and forget about" method when working with the slow-cooker.
Answer: My wife and I tried a slow-cooker lasagnga recipe and it was a disaster, probably for the reasons that Darin mentioned.  Perhaps we didn't follow the recipe correctly, but either way, we weren't pleased with the results.  I remember it being fairly slimy and certainly not resembling what we expected for a lasagna recipe.
Though we love our Crockpot for lots of different recipes, I would advise preparing lasagna in a more traditional way.

Slow cooker lasagna


Federal Rule of Civil Procedure Rule 11

Question: Can a FRCP Rule 11 Motion suffice as a "responsive pleading," or do you have to either (1) answer the complaint; or (2) file a rule 12 motion, to meet the responsive pleading deadline, and then later file a Rule 11 Motion.
Comment: Keeping in mind that a Rule 11 motion can't be filed until 21 days after its served - to provide time to cure (*11(c)(2)*) - it seems like number 2 could work.   Edit to clarify - the Rule 11 motion couldn't be filed on time to satisfy the 21 day answer requirement so I don't see how it could stand as a responsive pleading.
Answer: No.
You must file either an Answer or a Motion to Dismiss. If the Court were feeling lenient, it might determine that your Rule 11 motion was in effect a Motion to Dismiss, but assuming that the Court would be lenient in that manner would be unwise. You need to file an Answer or a Motion to Dismiss, and then a Rule 11 motion.
Also, filing a Rule 11 motion is usually unwise right at the outset of a lawsuit absent some extremely remarkable circumstances, particularly if you are representing yourself. I would strongly caution against doing so.

Federal Rule of Civil Procedure Rule 11


Need data populated/inhabited areas for Madagascar

Question: I am trying to analyze the number of schools per square kilometer in Madagascar, but only considering the number over inhabited areas. I have data on schools from the World Bank, but I can't find a reliable source of data for populated areas.
I have looked at the data on Open Street Maps but the extent and quality of the data varies a lot by sub-region. Some areas have many buildings and roads mapped while others do not. I lived in Madagascar for four years and I can tell that these gaps are due to missing data. I joined select land uses with a buffer around buildings to get an "inhabited areas" layer, but the measure of schools per area is also varying unrealistically (some places have more than 50 up to thousands of schools per square kilometer of calculated area).
Where can I find data on inhabited/populated areas to compliment or replace OSM? Are there any strategies this community has come across for finding or calculating measures of populated areas?
Answer: You can get all sorts of gridded population data (e.g. counts or density) from the Worldpop website, this includes Madagascar. Methodology is discussed here.


Reading sensor data over MUX

Question: I will start by saying I am very new to using Arduino.  The project I am planning is to create several arrays of sensors (each array will consist of 4 DS18B20 sensors and one temperature/humidity sensor) and using a MUX connected to Arduino I want to read the data from each [ten] array.  I have found sketches I can modify to do this task in a continuous cycle but I need to be able to display data from an array for an extended time period of several minutes.  My Arduino will output to a 3.2" LCD so there is only enough screen space to show data for one array at a time.
Comment: Push the "edit" button and add more info or at least ask a question.
Comment: DS18B20 sensors don't need a mux. You can have 40 DS18B20's on a single line. As to the "question". You could add some buttons below the LCD to select which array data to show.
Comment: You have posted a statement, not a question. You could post your code, perhaps? Also state what happens, and what you expect to happen.
Answer: The DS18B20 is a 1-Wire device and doesn't require a multiplexer, each device has its own address on the bus and you can connect a lot of them with a single wire. Depending on the humidity sensor you pick you may be able to use the same bus for it as well.
It is harder to find 1-Wire humidity sensors, but you could use a DS2438 Smart Battery Monitor which also includes an ADC to give you values from an analog humidity sensor.
The challenge of designing your project will be setting up an easy to understand display and controlling how/when it changes.

Reading sensor data over MUX


Restoring a single database from mysql enterprise full backup

Question: I am having command to restore all databases from full dump taken by enterprise full backup .Can anyone help me how to restore single database from full dump .
Comment: The table you want to restore is InnoDB or MyISAM? Because there are different approaches depending the engine
Answer: Try this:
mysql -u root -p --one-database destdbname < alldatabases.sql

In the above code substitute destdbname with the database name you want to restore, and alldatabases.sql with the name of your full DB backup.
If you would rather just extract the database dump of the single database from the --all-databases dump file, you can do this with sed using this command:
sed -n '/^-- Current Database: `dbname`/,/^-- Current Database: `/p' alldatabases.sql > output.sql

Where dbname is replaced with the database name of the database to extract, and alldatabases.sql is the name of your dump file. The result will be saved into the file output.sql.
Comment: MySQL Enterprise Backup does not launch mysqldumps, so you cannot restore it like data in is a mysqldump.


Yaesu FT-857D VFO scan won't stop

Question: I have set ny Yaesu FT857-D to PMS scan of the 144-148MHz FM ham band, but it doesn't seem to find anything.
However, I see the green "busy" light come on every once in a while during the scanning, but the scan doesn't stop.
The other strange thing is that turning the squelch down to zero has no effect on the scan, either. (Although I can open the squelch when tuned into a particular frequency)
Anyone have any ideas what could be wrong?
Answer: Based on your description, I suspect the problem is that you have tone squelch (TSQ) enabled. In this mode, the audio is muted unless the signal contains the proper tone, but the receive light will still light up to indicate a non-matching signal is present. (This is true outside of scanning too.)
Go to Multi Function Row MFe and press the A TON button to cycle through encode/squelch modes to the blank position. (If the button is labeled ENC instead of TON, then in menu mode set 079 SPLIT TONE to OFF first.)
Comment: Checked that. TON was already in the blank position. The scanner still goes right past any signal, with only the green light coming on to show it is there.
Comment: Also, this problem only occurs in the 2m band (144-148MHz). When I try the VFO scanning in 430-440MHz, the scan stops when I detect a signal or open the squelch.

Yaesu FT-857D VFO scan won't stop


Can a rabbi conduct a marriage if the bride is already pregnant from the groom?

Question: Are there any prohibitions against or stipulations for conducting a marriage between a woman and the man who recently impregnated her, assuming they are otherwise fit for marriage.
Comment: Could you add a bit of background to this question? What are some reasons why you think it might be allowed or forbidden? Understanding where this question comes from can help inspire relevant answers.
Comment: See R. Ovadiah of Bertinoro's eye witness account on the status of contemporaneous brides in Palermo (Darke Zion, [bottom of page](http://www.hebrewbooks.org/pdfpager.aspx?req=3738&st=&pgnum=8)).
Comment: @Oliver I note that the situation in R. Ovadiah of Bertinoro's report was slightly different than contemporary forms of premarital sex. He writes ורוב הארוסות תבאנה הרות לחופה. I understand this to mean, that they were legally betrothed to each other when they engaged in relations, which may have allowed them to rationalize their amorous activities. Nevertheless, the problem was that they had not yet fully consecrated the relationship with the final step of Chupa. Contrast this with contemporary forms of premarital relations, where there isn't any prior religious sanctification at all.
Answer: Short answer -- it's allowed.
You'll find a discussion elsewhere on this site about if someone impregnated a woman, do we recommend that he marry her. Which implies that the rabbi can certainly do such a wedding.
The discussion becomes a little more complicated if the pregnant fiancee was not Jewish at the time, and the rabbi now wants to convert her and marry them. (See Igros Moshe EH4:47).
The only question remaining is exactly what word to use in the kesubah (marriage document); theoretically you could refer to the bride as a "maiden" if she was never before married, and all her past partners were Jewish; there's a recording on yutorah.org from Rabbi J. David Bleich who said it looks wrong for a rabbi to sign his name on that language if the bride is visibly pregnant, so instead the text should just refer to her as an it'sa ("woman"). But if the whole conversation revolves around exactly what words to put in the document, it's clear that doing such a marriage is allowed.
Comment: Heh, I guess it would be technically correct to write *besulta* (virgin) if she conceived though IVF, even if she is very obviously pregnant.
Comment: @Adam from a strict halachic perspective, *besulta* simply means "eligible to marry a kohen." Still Rabbi Bleich says not to use that word if the rabbi is also a witness on the Kesubah and the bride is visibly pregnant.
Comment: That's just plain wrong. A widow is definitely not a *besulta* and is definitely fit for a kohen. Even a woman who had relations with a Jew should could marry (but didn't) is fit for a kohen. Only the kohen gadol is restricted to a *besulta*.
Comment: @Adám sorry, good point. *Armelasa* is used for widows. You are discussing the word *Besulah* in the Chumash vis-a-vis the prohibition; the only time she must be a *besulah* is to marry a kohen gadol. When it comes to writing *besulta* in a kesubah,  Poskim have stated clearly the reverse: if she's kohen-eligible, write *besulta*. Igros Moshe OC4:118 advises an anonymous Jewish couple who've been "together" in college to go ahead and write *besulta* without even telling the officiating rabbi about their history.
Answer: Shemot 22:15 states:

וְכִֽי־יְפַתֶּ֣ה אִ֗ישׁ בְּתוּלָ֛ה אֲשֶׁ֥ר לֹֽא־אֹרָ֖שָׂה וְשָׁכַ֣ב עִמָּ֑הּ מָהֹ֛ר יִמְהָרֶ֥נָּה לּ֖וֹ לְאִשָּֽׁה

If a man seduces a virgin who is not betrothed and lies with her, he shall provide her with a marriage contract as a wife.
If pregnancy is assumed as a possibility of sex, this should mean this is not only permissible but mandatory.
Comment: Even if the bride is pregnant from the groom, there is no indication that he was the one who took her virginity. She could have been together with other men, before she was impregnated by the groom. - Also, in the case of seduction of a virgin, marriage was mandatory upon the man, only if the woman wanted to marry him. The choice is hers.


Is $83^{27} +1 $ a prime number?

Question: I'm having problems with exercises on proving whether or not a given number is prime. Is $83^{27} + 1$ prime?
Comment: **The number is EVEN!**
Comment: Wolfram Alpha [says](http://www.wolframalpha.com/input/?i=factor+83%5E27%2B1) that $83^{27}+1= 2^2×3^4×7×109×757×2269×9613×49339×2208799×14685985270709080390792801$. Perhaps it's fun to try to prove that 3 and 7 are factors.
Comment: If it is for a test, the simple answer is that you don't have the tools to prove it prime, so it must be composite.
Comment: Someone else points out that it can't be prime because it's even.  That's probably the quickest way.  May answer shows how to factor it (so it can't be prime) by a method that would work just as well if it had been $84^{27}+1$.
Comment: @Joseph It is "well-known" and not too hard to prove that if $b^n+1$ is prime for some integer $b>1$ then $n$ has to be zero or a power of two. And 27 is neither zero nor a power of two. Search for Generalized Fermat Prime to find a proof, or do the proof yourself.
Comment: As a rule of thumb; these monstrously big numbers are **always composite**, or they won't appear in such questions. Now if you want a real challenge try $83^{27} + 6$.
Comment: What's the largest prime factor you can prove this number has without a computer?
Comment: $83=81+2$ and $2^2=3+1$, so the number is a multiple of $3$.
Comment: Follow up question: Is $84^{27}+1$ a prime number? EDIT: Wait, I've got it. Which numbers are prime? seems to have potential.
Comment: @RossMillikan: Haha that's a good one!
Comment: @JeppeStigNielsen That doesn't make sense. $b^n+1$ can be a prime as well for n = 1, and b being a prime-1. So your comment cannot be entirely correct.
Comment: @AntonRoth I thought about that case and decided to consider $n=1$ a special power of two, $1=2^0$. The smallest Fermat prime, called $F_0$, is of this form.
Comment: @JeppeStigNielsen True, that slipped my mind...
Answer: $83$ is odd, so is any power of $83$. Hence $83^{27}+1$ is even, but the only even prime number is $2$ and this number is not $2$.
More generally, if $a,k\in\mathbb N$ and $k$ is odd, then
$$a^k+1\equiv (-1)^k+1\equiv 0\pmod{a+1}$$
So $a+1\mid a^k+1$. In this case this yields $84=2^2\cdot 3\cdot 7$ as divisor.
Comment: Your last statement can also be seen by geometric series: $(1+x+\cdots+x^{k-1})(x-1)=x^k-1$. For $k$ odd, substitute $x=-a$ and cancel out the minuses signs on each side to get the factor $(a+1)$ on the left with $a^k+1$ on the right.
Answer: Well, it is an even number, so...
Comment: @gekkostate: (1) If you think all the answers must provide all the reasons behind them then you're going to downvote a lot around here, as many participants, probably most of the serious ones, don't think like you do. (2) The question is at a level that requires as trivial to know that powers of odd numbers are odd, and sum of odd numbers is even, so to add that to the answer seems trivial *after* it's been remarked that the number is odd (and thus the OP begins to think "why?" and he completes the answer by himself). Think of this, perhaps you'll realize you rush too much to do downvote...
Comment: I downvoted your answer on the basis that it doesn't provide the reason behind _why_ it is even. For example, it doesn't say that since $83$ is odd, so the powers of it must also be odd and thus, odd + 1 must be even.
Comment: I clearly failed to see the intent behind your answer but I still feel that it lacks any reasoning whatsoever. Your answer is equivalent to the highest upvoted comment so maybe, that should have been enough? Also, I hardly ever downvote questions/answers (ratio of up to down is 77/5) so I didn't really rush into this (clearly, I use downvotes sparingly). I don't want to make this into something that it is not. Let's leave this at the fact that we have a difference of opinions on answers.
Comment: I just love the precise nature of this answer. +1
Answer: $$
83^{27} + 1 = \Big(83^9\Big)^3 + 1^3 = a^3+b^3 = (a+b)(a^2-ab+b^2) = \Big(83^9+1\Big)\Big((83^9)^2-83^9+1\Big).
$$
So, no, it's not prime.
PS (added later):  Some point out that it's obviously an even number, so it's not prime.  But what I do above would work just as well if it were $84$ rather than $83$.
Answer: Note that $83\equiv -1\pmod{84}$. Thus $83^{27}+1\equiv 0\pmod{84}$.
It follows that our number is divisible by all the divisors of $84$.
It is also non-prime in other ways. For let $x=83^3$. Then our number is $x^9+1$, so is divisible by $x+1$. Similarly, we could let $y=83^9$, and conclude that our number is divisible by $y+1$.
Seriously non-prime!
Answer: We have a chain of divisibilities, based on the fact that $(a-b)\mid(a^n-b^n)$,
$$
83^1-(-1)^1\mid83^3-(-1)^3\mid83^9-(-1)^9\mid83^{27}-(-1)^{27}=83^{27}+1
$$
Using this chain, we get, using $a^3-b^3=(a-b)(a^2+ab+b^2)$,
$$
\begin{align}
83^{27}+1
&=\frac{83^{27}+1}{83^9+1}\times\frac{83^9+1}{83^3+1}\times\frac{83^3+1}{83^1+1}\times\left(83^1+1\right)\\
&=\left(83^{18}-83^9+1\right)\times\left(83^6-83^3+1\right)\times\left(83^2-83^1+1\right)\times\left(83^1+1\right)\\[9pt]
&=34946659039493167203883141969862007\times326939801583\times6807\times84
\end{align}
$$
Thus, $83^{27}+1$ is not prime.
Note: none of these factors are guaranteed to be prime, just factors.
Comment: Would the downvoter care to comment?
Comment: I like it. Some might say overly rigorous for a simple problem, but helps demonstrate some deeper thinking than just noticing that it would be even. +1
Answer: It is obviously not prime. $83$ is odd, therefore $83^{27}$ is odd, hence $83^{27}+1$ is even and not prime.
Answer: The only prime numbers of the form $a^x+b^x$, occur when $x$ is a power of two.  This does not guarantee a prime, but if $x$ is not a power of $2$, then the number has algebraic factors.
In practice, there is an algebraic divisor of $a^n-b^n$, for each $m$ that divides $n$.  For the equation $a^n+b^n$, one would look for divisors of $2n$ that don't divide $n$.  Inthe question we have $n=27$, so the divisors of 54 that don't divide 27.  That is, 2, 6, 18 and 54.  For powers of 2, there is only one number that divides $2n$ but not $n$.
Comment: Extebded answer to include this.
Answer: well it is divisible by $84$ and in general $\forall a,m\in\mathbb {N}$ we have
$(a+1)\mid (a^{2m+1}+1)$ So....
Answer: Let's ask WolframAlpha!

PrimeQ[83^27 + 1]

is $6\,532\,937\,361\,590\,551\,025\,727\,805\,459\,013\,652\,074\,798\,022\,177\,030\,828$ a prime number?
$83^{27} + 1$ is not a prime number
$2^2 \times 3^4 \times 7 \times 109 \times 757 \times 2269 \times 9613 \times 49339 \times 2208799 \times 14685985270709080390792801 \space\text{(14 prime factors, 10 distinct)}$

However, using basic knowledge that an odd times an odd is always an odd ($3 \times 3 = 9$), we see that $83$ (an odd number) raised to any power is an odd number. Then we add one to it and get an even number.
Being even (and obviously not equal to $2$), the definition of a prime tells us that the number is not prime because it is divisible by $2$ (my words):

prime (noun):

Any natural number, greater than $1$, that, when divided by any natural number, greater than $1$, other than itself or $1$ does not result in a natural number.
Any "natural number greater than $1$ that has no positive divisors other than $1$ and itself." (Wikipedia article "prime number")

Is $83^{27} +1 $ a prime number?


What does "unbiasedness" mean?

Question:
What does it mean to say that "the variance is a biased estimator".
What does it mean to convert a biased estimate to an unbiased estimate through a simple formula. What does this conversion do exactly?
Also, What is the practical use of this conversion? Do you convert these scores when using certain kind of statistics?
Answer: You can find everything here. However, here is a brief answer.
Let $\mu$ and $\sigma^2$ be the mean and the variance of interest; you wish to estimate $\sigma^2$ based on a sample of size $n$.
Now, let us say you use the following estimator:
$S^2 = \frac{1}{n} \sum_{i=1}^n (X_{i} - \bar{X})^2$,
where $\bar{X} = \frac{1}{n} \sum_{i=1}^n X_i$ is the estimator of $\mu$.
It is not too difficult (see footnote) to see that $E[S^2] = \frac{n-1}{n}\sigma^2$.
Since $E[S^2] \neq \sigma^2$, the estimator $S^2$ is said to be biased.
But, observe that $E[\frac{n}{n-1} S^2] = \sigma^2$. Therefore $\tilde{S}^2 = \frac{n}{n-1} S^2$ is an unbiased estimator of $\sigma^2$.
Footnote
Start by writing $(X_i - \bar{X})^2 = ((X_i - \mu) + (\mu - \bar{X}))^2$ and then expand the product...
Edit to account for your comments
The expected value of $S^2$ does not give $\sigma^2$ (and hence $S^2$ is biased) but it turns out you can transform $S^2$ into $\tilde{S}^2$ so that the expectation does give $\sigma^2$.
In practice, one often prefers to work with $\tilde{S}^2$ instead of $S^2$. But, if $n$ is large enough, this is not a big issue since $\frac{n}{n-1} \approx 1$.
Remark Note that unbiasedness is a property of an estimator, not of an expectation as you wrote.
Comment: I mean more in theoretical terms. I can find the formula in any book, but i'm interested more in the explanation in words. The expectation of the sigma is unbiased and we can transform the estimate into the expectation?
Comment: also i'm asking about the practical aspects of this, do you use this conversion while performing analyses?
Comment: @ocram What is $n$? Is it the sample size? Or number of samples taken? Or both?
Comment: @quirik: The assumption is that a single sample is taken and that this sample is of size n
Comment: @ocram How do we then calculate expected value of variance if we have one sample? What am I missing?
Comment: Hint for those who try to solve the footnote problem: you should use [Bienaymé formula](https://en.wikipedia.org/wiki/Variance#Sum_of_uncorrelated_variables_.28Bienaym.C3.A9_formula.29)
Answer: This response clarifies ocram's answer. The key reason (and common misunderstanding) for $E[S^2] \neq \sigma^2$ is that $S^2$ uses the estimate $\bar{X}$ which is itself estimated from data.
If you work through the derivation, you will see that the variance of this estimate $E[(\bar{X}-\mu)^2]$ is exactly what gives the additional $-\frac{\sigma^2}{n}$ term
Answer: The explanation that @Ocram gave is great. To explain what he said in words: if we calculate $s^2$ by dividing just by $n$, (which is intuitive) our estimation of $s^2$ will be an underestimate.  To compensate, we divide by $n-1$.
Here's an exercise: Make up a discrete probability with 2 outcomes, say $P(2) = .25$ and $P(6) = .75$. Find $\mu$ and $\sigma$ for this distribution.  Calculate $\mu$ and $\sigma$ for the sample mean when $n = 3$.   Calculate all possible samples of size $n =3$.  Calculate $s^2$ over those samples, and apply appropriate frequencies.
Sometimes, you gotta get your hands dirty.
Comment: thanks for your help. A few questions: In your excercise: what kind of distribution are you referring to, Binomial? What do you mean make up a discrete probability? You mean calculate all the probabilities of 2 and 6 over different sample sizes?
Comment: They mean a distribution over a binary variable whose only two values are 2 and 6, the first with probability .25 and the second with probability 0.75. I don't know why they chose values 2 and 6 -- probably to stress that the values are not really relevant; it would have been simpler to talk a Bernoulli-distributed variable with probability of success 0.25, and things would work the same.
Answer: Generally using "n" in the denominator gives smaller values than the population variance which is what we want to estimate. This especially happens if the small samples are taken. In the language of statistics, we say that the sample variance provides a "biased" estimate of the population variance and needs to be made "unbiased".
This video will answer each part of your question adequately.
https://www.youtube.com/watch?v=xslIhnquFoE

What does "unbiasedness" mean?


Cash on delivery not showing on payment page in Magento 2.3

Question: Cash on delivery payment method not showing on the payment page. I have enabled it from backend but it's still not showing. All Other payment methods are working except COD. I have gone through this solution Cash On Delivery payment method not showing in checkout page in magento 2.1.9  also but it doesn't help.
Answer: Do you have simple product or configurable or downloadable product ?
because, COD will not show in downloadable or virtual product.
Just check and let me know.
Comment: I have only simple and configurable products. I tried disabling other payment methods also but it's not working by doing this also. @bharat desai


Does coffee in a cafe press keep brewing after being 'squeezed'?

Question: I've recently gotten a Cafe Press for making my coffee, and I'm pretty bad with proportions. If I make too much and leave it sitting in the press with the grounds pressed to the bottom, does the coffee on top keep 'brewing'? Does it otherwise adversely affect the flavour? Does it affect the caffeine content?
Answer: The brewed coffee stays in contact with the ground, even though you pressed the sieve to the bottom. It will eventually release the unwanted flavors it contains, albeit slowly. The ground coffee should be in contact with the hot water for about 30 seconds.
See this answer for the caffeine content.
Comment: @Pureferret: If you tend to leave your press pot sitting, consider the "scoop out" or "reverse fill" methods detailed at: http://www.coffeenate.com/how-to-french-press-coffee-technique/ . Both have the added benefit of making the pot easier to clean out afterward...


Why do some questions in question lists have a yellow background?

Question: On SO, when I'm scrolling through "questions" some have a yellow background.  Is this intuitive to everyone but me?  What is the yellow background trying to tell me about this particular question?
Answer: The questions highlighted in yellow have tags you have marked as watched. Questions appearing grayed out you have marked as ignored. You can manage these either on the front page or on the preferences page of your profile.
Comment: totally non-intuitive to me. I specifically came to meta today to find out why this was happening.
Comment: Wow.  That's great.  Although it wasn't intuitive to me when I saw the color.  I wonder if a tooltip or something is warranted here?
Comment: I just tried to upvote this answer, then found I voted it already 3 years ago. So not only is it not intuitive, it's not memorable :(
Comment: Non-intuitive for me also.
Comment: I also came to meta today just to find out about the yellow background (and imported my account just to leave this comment). At first I assumed that they were newer questions or questions with less satisfactory answers.
Comment: Non-intuitive. Just searched Google to find an answer to this question.
Comment: Are we sure this is correct. I have the tag "css" added as a favorite and I've posted a question that is tagged with "css".  When I navigate questions with the "css" tag, my question is white, when I navigate to "html" where my question also shows up, it's yellow.
Comment: **MISSING PIECE:** When you are browsing questions of a tag that you are following, that tag's questions are not highlighted yellow. The yellow highlighted ones have OTHER tags that you also follow. Here I see that flutter-only tagged questions are not highlighted even if I follow flutter: https://stackoverflow.com/questions/tagged/flutter
Comment: I browse only my favourite tags but still a subsection gets highlighted yellow. This seems to be when the question contains 2 out of 3 of my tags.
Comment: Was pretty intuitive for me =/
Comment: I too had to come here and find out why some of the questions were highlighted.  Now it makes sense.
Comment: Obvious now I read this, totally wasn't before
Comment: Did anyone else thought it indicates question got Flagged and waiting for moderation?
Comment: **Unintuitive** what yellow means.  **Unuseful** indicating favorites here. **Unstable** what this feature is even called: used to be called "favorite", or "interesting", now it's called "watched". **Unstable** where you control it: used to be able to change this set of tags from the profile, now it's on each tag page.
Answer: There are two reasons a question can be marked as yellow.
Favorite tags
You can add favorite tags from the main page, or the prefs page (Link to prefs above bio in profile). They get highlighted on all pages (except for their own tag pages).

You can also ignore a tag, and it will grey out/disappear (depending on prefs and the page). Note that ignored tags have preference over favorite tags. In the example above, a question tagged javascriptfacebook will be greyed out.
Frequented tags
If you post on a tag often, and have a good enough score, the system decides you like the tag and auto-highlights it. This is only if you have not specified any other favorite tags.
Of course, it can lead to this{*}:

If you really don't want to choose favorite tags, then add some random nonsense tag to the list. SOmewhere on MSO, I saw frequentedtagsfail used for this, so I use it as well.

*That did happen to me. I was besieged by enticing yellow QM questions that I didn't know a thing about.
Answer: Those questions have tags that you have marked as interesting.
Answer: Conversely, the tags which you mark as ignored will be grayed out.


Need to learn recurrence relation discrete mathematics

Question: Which is the best tutorial available online to learn the recurrence relation concept and its solution in discrete mathematics, in a systematic way?
Answer: I liked this Discrete Mathematics: An Open Introduction, by Oscar Levin, for generating functions, so I'm guessing it will be good for recurrence relations.
Comment: I use this text when I teach discrete math.  It does do a good job of explaining recurrence relations, including a complete derivation of solutions to second order linear recurrence relations.  Not sure why someone would downvote this answer.
Answer: Better yet, I very much liked generatingfunctionology by Herbert Wilf; it is the go-to text for what you are seeking.  It addresses generating functions, and considerable help for understanding recurrence relations. (And it's free from the author, and downloadable as a pdf.!)
In addition, you'll find extensive information at Ronald L. Graham, Donald E. Knuth, and Oren Patashnik's Concrete Mathematics.
For beginner information, there are a number of sources and tutorials online.   For example, see Brilliant.org, recurrence relations.
Another potential online source for introductory material is located here.


Export layer coordinates - Sketch 3

Question: How can you export the (x,y) coordinates of a layer with the rest of CSS properties?
I can't export position values even placing them at 0,0
Comment: Unfortunately that's currently not possible with Sketch. Notice that the dimensions of the element are not exported either.
Comment: I personally find the position information to be kinda useless. For example: Photoshop gives you the position, but it uses absolute positioning. Since you don't normally position every element like that, this information is pretty much useless. It just won't play well with other elements. Even if PS gave me the position in margins or paddings instead, I would most likely have to adjust them anyways because it's very likely that I have some padding in the parent element.
Answer: As huptur said, css-sizes and and css-positions are not exported.
Maybe it's not interesting for Joonas but it's important for me (and many other people, for sure).
Hope It can be done in future versions.

Export layer coordinates - Sketch 3


Link pointing to illegal content

Question: This question contained a link to a warez site run or developed by the OP. Not only the link pointed to illegal content, but also didn't add much value to the question, so I edited it out. Was this the right thing to do? Should any further action be taken?
Comment: According to [TOS](http://stackexchange.com/legal), part 3 Subscriber Content `"Subscriber represents, warrants and agrees that it will not contribute any Subscriber Content that [...] c) infringes any intellectual property right of another or the privacy or publicity rights of another"`, it is the right thing to do to save the question.
Comment: @nhahtdh You should post that as an answer instead of a comment.
Comment: I didn't because I didn't know the answer to the 2nd question (`Should any further action be taken?`)
Comment: @nhahtdh The TOS would be a sufficient answer (imho), don't post answers as comments or someone might steal them ;)
Answer: According to the Terms of Service (emphasis mine):

3. Subscriber Content
Subscriber represents, warrants and agrees that it will not contribute any Subscriber Content that (a) infringes, violates or otherwise interferes with any copyright or trademark of another party, (b) reveals any trade secret, unless Subscriber owns the trade secret or has the owner's permission to post it, (c) infringes any intellectual property right of another or the privacy or publicity rights of another, (d) is libelous, defamatory, abusive, threatening, harassing, hateful, offensive or otherwise violates any law or right of any third party, (e) contains a virus, trojan horse, worm, time bomb or other computer programming routine or engine that is intended to damage, detrimentally interfere with, surreptitiously intercept or expropriate any system, data or information, or (f) remains posted after Subscriber has been notified that such Subscriber Content violates any of sections (a) to (e) of this sentence.

Editing the question and removing the link was appropriate. I also checked the user's other questions quickly, just in case he had a habit of posting the link. He doesn't, but had I found anything else I'd flag one of his posts for moderation attention to let team diamond know there's something fishy going on.
The user visited the question after your edit, so he probably noticed your edit message and since he didn't rollback I'm guessing he understood that sharing the link wasn't such a smart idea (and it was  pointless anyway).
Comment: I'm no lawyer, but I think the user was not directly violating the terms. The posted content itself was not illegal, but could lead to illegal content. Anyway, I take it that such links are not welcome on SE, right?
Comment: @bfavaretto well, since it didn't add much value to the post, and especially given that the link pointed to a site run by the poster, it probably qualifies as spam, and that itself makes it unwelcome. On the other hand, if a link to a site involved in shady activity _does_ add significant value to the post, then you'll get varying opinions, but I'd say it'd be fine. (Of course I can't think of an instance offhand where this actually happened...)

Link pointing to illegal content


What is Roman Catholic Church's official view on the nature of Christ?

Question: One question that has haunted the Catholic Church from the very beginning is about the way divine and human are related in the person of Jesus Christ. The differences in doctrines have lead to the creation of Assyrian Church of the East and Oriental Orthodox Church. The Council of Chalcedon in AD 451 has accepted Dyophysitism as the accepted Catholic doctrine. But is this the final stand made by the Catholic Church? Or did any post Chalcedonian councils further clarified this matter? This being such a sensitive topic could any one please explain the official Catholic position on the nature of Christ?
Comment: @ShemSeger Thank you ... Ah! the Mormon view.
Comment: It's interesting to me that after thousands of years this is still a question. `Behold, mine house is a house of order, saith the Lord God, and not a house of confusion.` As confusing as the trinity is, why do people still choose to believe in it? The true nature of Christ is simple to understand.
Comment: @ShemSeger What is the true nature of Christ and from which *Christianity* is this nature you speak of?
Comment: @FMShyanguya [Jesus Christ, the Son of God.](http://sh-e.ms/natureofhrist)  This is the simple truth restored to the earth by our Lord Jesus Christ through his latter-day prophets.
Answer: Yes, there were subsequent ecumenical councils that dealt with the matter. As explained in the Catechism of the Catholic Church, paragraph 468:

After the Council of Chalcedon, some made of Christ's human nature a kind of personal subject. Against them, the fifth ecumenical council at Constantinople in 553 confessed that "there is but one hypostasis [or person], which is our Lord Jesus Christ, one of the Trinity." Thus everything in Christ's human nature is to be attributed to his divine person as its proper subject, not only his miracles but also his sufferings and even his death: "He who was crucified in the flesh, our Lord Jesus Christ, is true God, Lord of glory, and one of the Holy Trinity."
Answer: Modern Catholic christology describes a Hypostatic union.
Wikipedia discusses briefly how this is historically related to Dyophisitism:

Theodore of Mopsuestia [argued] that in Christ there were two natures (dyophysite) (human and divine) and two hypostases (in the sense of "essence" or "person") that co-existed. However in Theodore's time the word hypostasis could be used in a sense synonymous with ousia (which clearly means "essence" rather than "person") as it had been used by Origen and Tatian.

So the short answer to your question appears to be that, yes, this is still the view held by Catholicism, but it has been refined over the last 1500 years.
Answer: The official Christological view of Catholic Church is dogmatized in her twenty one Ecumenical Councils. Council of Florence in relation to the eternal procession of the Holy Spirit from the Father through the Son is indispensable for Catholic. In those councils, the same Apostolic faith passed down from the Apostles are kept. That the whole and only person of Christ is the Logos, a divine person. Who has two natures: divine and human. This is why we Catholic call the virgin Mary, Theotokos (Greek for Mother of God). Because the one she gave birth is not merely a human nature but a divine person, the Logos. Nature can't be conceived but a person does. Because the Spirit proceeds from the Father through the Son, visible ecclesial communion with the Church of Rome is important. While regarding the relationship between Catholic with other separated brethren progress in ecumenical dialogues have been made significantly including the last meeting between Pope Francis and Patriarch Bartholomew of Constantinople to commemorate the mutual annulment of anathemas in 1054.
Answer: The Catechism of the Catholic Church 463 - 478. Read it, meditate and pray. Look up the references and citations in the scriptures. Ask the Holy Spirit for understanding along with piety and fear of the Lord. God has revealed his Word to us. But you can't read it once and understand. You have to read, pray and pursue it daily.
Comment: Please quote and/or summarise what that part of the catchecism says. Otherwise this isn't really of much value. We expect answers here to be self-contained, and have an academic tone, rather than a more pastoral tone imploring people to pray and meditate.


PHP PDO SQL Server Select statement not replacing question marks

Question: Awhile ago I wrote a database class which uses PDO in order to connect to SQL Server databases and also to MySQL databases. It has always replaced the question marks fine when using it on the MySQL databases, but for the SQL Server database I had to create a work around which basically replaces the question marks manually. Here is the code for that.
if($this->getPDODriver() == 'odbc' && !empty($values_a) && substr_count($query_s, "?") > 0) {
    $query_s = preg_replace(array_fill(0, substr_count($query_s, "?"), '/\?/'), $values_a, $query_s, 1);
    $values_a = NULL;
}

Now, I understand that this completely defeats the purpose of the question marks and PDO, but it has been working fine for me. What I would like to do now though, is find out why the question marks are not getting replaced in the first place, and remove this workaround.
If I have a select statement like the following
SELECT * FROM database WHERE value = ?

That is what the query looks like when I go to prepare it, but when I display the query results, it is a blank array.
Just remember, this class is working fine with MySQL, and it is working fine with the work around above. So I know it has something to do with the question marks.
Answer: The information is not enough Look in SQL Server Profiler and compare the real query sended by pdo with expected.


Is asking about "Anime Crossovers" off-topic here?

Question: I've been asking in beta about anime crossovers 'cause I'm really interested about it. But they always vote for my question to be closed. Is topic about anime crossovers too off-topic to ask here? Just making sure so that my effort of asking won't be forsaken. Thanks a lot.
Comment: How come? I think it's like asking "What was the first anime?" and just an answer of "Astroboy". Is that under a list-type of question?
Comment: I used "Anime(s)" because I'm not sure if the answer involves only one or two or more animes. So, can I conclude that "anime crossovers" topic is allowed in here, and that it only depends on how the user asked the question?
Comment: It sounds a bit like a list-type question. The recipe of not-constructive.
Comment: I'll give you an example of what I asked, "What particular anime first showcased crossover?" Is this not-constructive?
Comment: Hence "a bit like". So it's not completely in that category. But it's still leaning slightly in that direction.
Comment: To be very nitpicky, it was because "Anime(s)" was plural in the question. That immediately raised the "not-constructive" flag when I first read it. But now that I read it again, it isn't that bad.
Comment: "and that it only depends on how the user asked the question?" - Unfortunately, that actually is indeed the case. Numerous times on meta.SO I see people saying that X question needs to be phrased better. Because how the question is asked will solicit different types of answers. If it is phrased improperly, it could solicit the type that will ultimately turn the question into a non-constructive trap.
Comment: All a while I thought that "anime crossovers" is off-topic here. Since they've been voting to close my questions about it. Thanks.
Comment: Should I pull the comments into an answer?
Comment: @mysticial, can you then answer my question here, not as comment but as an answer? Thanks.
Answer: It's not really a list question. To me it's hard but reasonably narrow. A list question is "How many anime have a prick as a main character?" (lol just an example).
When answers start to go over 10, then you must worry.
In any case, it depends. As a moderator I've left open questions that could have been Not constructive but that only received one answer. So my opinion is: keep an eye on such questions, if too many answers start to come in, then vote to close.
Answer: Pulling the comments into here:
When I first read the title:

What particular anime(s) first showcased crossovers?

It immediately struck me as being the typical non-constructive question. Why? Because it sounds like it is asking for a list.
At the very core, the question is fairly legit. There can only be one Anime that had the first crossover. So it has an objective answer to it. I won't go into whether or not that answer is obtainable as SingerOfTheFall's answer covers that quite well.
However, the trick to these borderline questions is that they need to be phrased correctly.
Depending on a how a question is phrased, it can lead to different types of answers. Phrasing it incorrectly could send the question into a downward spiral towards non-constructive land.
As your current title stands, the plural on "anime(s)" could possibly bait many answers from different people who have opinions on what is "among the first". But phrasing it as:

"What Anime first showcased crossovers?"

would tip it back towards that constructive direction. To make the question more constructive, you can request that all answers have authoritative evidence that they are the first. (Skeptics has a policy of requiring references to avoid this speculation trap.)
But as SingerOfTheFall mentions, it may be difficult in this case. But that's a separate issue.
Comment: As I mentioned a while ago, "Anime(s)" was used because the answer can be hypothetically be like this, "The first anime that showcased crossovers is the Anime1 that involved the appearance of Character2 from Anime2". It was just use because of the uncertainty of the probable answer.
Comment: Then we're stuck in a hole aren't we? If the only way to make the question possible is to phrase non-constructively then that's gonna be an issue. Don't get me wrong though. Whether or not the question can be answered is a completely separate issue from whether it is constructive.
Comment: Not really: "Which pair/group of animes got crossed over first", or "when did the first crossover between animes occur" would be unambiguous about the count. It's a matter of wording and good will in reading. And even if not, I see no reason why a list of first few crossovers would be wrong - it's not like the list is arbitrarily long and would elicit undue, unwelcome discussion if the fifth is one of the first or isn't.
Answer: Your question is, and is not a list question at the same time.
On one hand, it indeed needs a short answer containing only the anime name. However, there is one problem: we can't know everything.
What does that mean in your context? That means that the question will become a list question eventually. Some person might think "Hey ok, Anime AAA was the first one, since it was released in 1990", and post it as an answer. Then another person comes and thinks "Hey, but there was also Anime BBB which appeared a year earlier!", and posts this as his own answer. Then another person comes... and so on and so forth. So eventually it will be a list-competition question with people trying to remember earlier and earlier examples of crossovers.
Probably if you rephrase the question to somehow avoid such a situation, it will be gladly reopened.
Comment: Thanks. But what you mentioned as an example, should that be a problem? I mean, you want to know the "first", so if someone knows the "earliest", then much better. Or should it be a problem? I thought that by "list-type", you mean like asking "Enumerate animes that starts with letter 'A'" type of question.
Comment: @xjshiya, I don't know if it is _that much_ of a problem, or if this is enough to close it. I've just seen that before, so I decided to let you know ;)


How to reduce the size of video to 700 mb

Question: Please help me , I have copied some movies to laptop from dvd disk, but the size of movies are more than 2 gb. But the movies uploaded to torrents are only 700 mb with the same clarity. How to reduce the size of my videos with out affecting the quality. Which software I should use for this.
Comment: I've been using handbrake to convert my videos and have been very successful.
Answer: Ok one thing to note is the resolution of the video. Most 700mb torrents are not full HD. most are 720p or if they are 1080p they are in h.265
Assuming resolution is 1080p you can go from 2 gb to about 1gb without a huge drop in quality. The big issue becomes with the type of movie. Movies with a lower (smaller) color palette will degrade quicker because compression aims to make as many pixels nearby alike to lower the decoding time and storage space. It analyzes the video in varying block sizes and re-writes it.
H265 was made to take 40% less space as h.264 while keeping the same visual quality. The issue with h265 is the processing power required to encode it. I have a server I use to encode mine and it still takes a long time.
As for the way you would do it...
Use a video converter that allows you to control the bitrate. Adobe media encoder is a great option if you have it. For h264 you don't want to drop your bitrate below about 1-1.3gbps for the video. If you chose to go to h265 then you can drop the bitrate to about 600-700mbps and keep the same quality. all of this comes with trial and error.


Ipad - actionsheet not showing all buttons in landscape mode when keyboard is present

Question: I am developing an Ipad application. It supports both landscape and portrait mode. The app has keyboard.It also shows an action sheet with 4 buttons when required. In portrait mode it works perfectly. But in landscape mode action sheet only show 2 buttons when keyboard is there .Without keyboard it show all 4 buttons.
Any solution?
Answer: I dont undertand what you mean with "Actionsheet", but the trick here is that you have to subscribe to be notified that the keyboard will show and then move your buttons to a place where they can be displayed.


Achieve better compression ratio on 7zip compression

Question: I use an open source compression software named Peazip running on a Intel Core i5-8250U @1.6 GHz processor. However, I have tried compressing files to 7z many times but the compression ratio is hardly less than 98%. Is it because of the processor or something else? Anyone please let me know how do I get a better compression ratio and do recommend any other alternative software that can achieve it. I have tried various compression softwares (even the official one), but the result hardly varies. If it some other issue let me know.
Answer: Your processor won't affect the compression ratio that can be achieved, although it will affect the speed of the process.
You did not specify what kind of files you are trying to compress, but the type of file makes a huge difference in the amount of compression that can be achieved. A plain text file or uncompressed image will typically have a high compression ratio. If you are trying to compress an already compressed format you will not have a good compression ratio. For example, many media files like MP3 and JPEG are already compressed. Therefore, you cannot get a much higher compression ratio if you try to compress such a file. Also some types of data do not compress as well as other types.
The short version is that trying to compress an already compressed file will never work well.
Comment: What @Bill W said will apply to nearly all video files and similarly compressed files such as MP3s.  They are already highly compressed.  The only way to get them smaller would be to re-encode them at a lower quality setting, which will degrade the visual quality of the video.
Comment: The files are videos in HEVC format. If these won't give a good compression ratio which would? How are self extracting 7z file with high compression ratio of less than 50% created. I need to manage the space in my ext HDD. So I am trying compressing the video files in mkv and mp4 format. How do I do so?
Comment: @Sibasish Mishra HEVC format is already compressed, you cannot make them much smaller no matter what format is used.
Comment: But I really want to know how to compress to 50%, just like the software files we download from internet but they are installed onto our computers in sizes taht are 2-4 times the size of the installer. How do are these aoftwares compressed? That's my question
Comment: @Sibasish Mishra An installer can be very small because the installer does not include all the files that will be installed, rather it will download the required files as part of the installation process.


How to use fiat exchange rate oracle in DAPP?

Question: my team is trying to develop a DAPP about fiat exchange rate. How to get the latest fiat exchange rate (USD/EURO etc.) accurately from external Oracles(Or are there better ways doing this)?
Comment: Look into www.oraclize.it
Answer: Are you going to store this information on the blockchain? Because it's going to COST YOU A LOT to constantly update every second the exchange rates. Or are you going to update every moment?
Also I need to understand what type of fiat exchange rate do you need. Major pairs (EUR/USD, GBP/USD, etc.), minor pairs (AUD/NZD, CAD/AUD, etc.) or exotic pairs (HKD/INR, SGD, KRW, etc.).
I assume that you have asked this information  for the front-end therefore an API should work. I recommend Currency Layer If you need exotic pairs, you must pay unfortunately.
Comment: We are just going to implement major pairs. In addition, we only update those information on a daily bases. It is a real world currency betting game. Are there any reliables APIs? It is better to have multiple sources of oracles, right?
Comment: Nice project. It's like brokerage or financial services so I like the betting game idea, especially since I was involved in Binary options ('a financial exotic option in which the payoff is either some fixed monetary amount or nothing at all'). Honestly, I know that some brokerage services use those sources and legally "manipulate" them towards their benefits. Those 'brokers' are called 'over the counter'. In this case, it's fine to have 1 source you can trust. I am coming with an update answer
Answer: Basically I found 1Forge which provides a lot of pairs for free. I registered with them and they have paid plans as well, however the free plan is satisfying enough.
They give an API key which you can use to connect and get those pairs. I used npm from their GitHub page and I played with it to see different functionalities:
You can get Quotes for specific pairs

You can do Conversion of any amount from those pairs

What I like most about 1Forge is that they offer the price, bid and ask. In the future it could allow you to update prices more frequently if you want.
Hope that helped


what's the sentence meaning?

Question: I read this sentence in the twilight's book but I don't get it:
"But I knew myself too well too think I would really have the guts to do it.
I made the Cowardly Lion look like the Terminator"
Thanks
Answer:
I make this look like that.
  In comparison to me, this seems the same as that.

The two statements above carry the same general semantics.
The Cowardly Lion is a character from the novel The Wonderful Wizard of Oz.  The Terminator is the eponymous character from the film The Terminator.

In comparison to me, one of the least brave figures in children's literature seems as brave as a fearless robot soldier.
Answer: I have no idea what a twilight's book may be, but it doesn't seem to be written in competent English. The references in the bolded sentence are references to characters in movies that are well known in the US. The Cowardly Lion is a symbol of utter cowardice. The Terminotor is a symbol of utter fearlessness.

what's the sentence meaning?


Rabbeinu Tam Tefillin

Question: I have recently seen a Chasid wearing two baatim (Rashi and Rabeeinu Tam) on his head but only (Rashi) for Tefillin Shel Yad. Later, a third Tefillin Shel Rosh were applied but the Shel Yad stayed put. Is this halachically correct?
Comment: Aharon, could you clarify something for us? Are you sure he was a chasid? What Chasidic Dynasty was he from? Did he wear three shel roshes at the same time?
Comment: Welcome to mi.yodeya, Aharon Palmer!
Comment: Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/68015/discussion-between-ezra-and-double-aa).
Comment: I have never heard of such a practice and your best bet is to ask the person himself. there are those who wear more than just rashi and rabenu tam but this is not how that is described at all
Comment: I can't recall details but besides for the more common rashi and rabeinu tam Tefilen there is also of the rai'vid and a fourth who's name I can't remember. These last 2 have one bayis being the same as one of the other 2 opinions. So if someone was accustomed to fulfilling Tefilen according to all opinions he would put on rashi take of one bayis, replace it with with opinion 3. Take everything off. Put on rabeinu tam Tefilen. Take one bayis off and replace it with opinion 4. I'm sure some of my details are wrong but that's the general idea.
Answer: This practice is halachicly justifiable, although I've never heard of people doing this in practice.
The Shulchan Aruch when bringing the machlokes about the order of the parshios brings from the Rosh and other Ashkinazi poskim to have two tefilin shel yad, one in each order. However, it is not so clear that the order of the shel yad changes according to Rabainu Tam. The Rambam in a teauvah (brought by the kesef Mishnah maybe?) brings the order of the shel yad as a proof to the rashi order against RT.
A third order for the parshios is the Shimusha Raba, which is the reverse of Rashi. There is an opinion, I believe the Ravad, that is the reverse of RT, but the Arizal was machmir for SR and not this fourth order. In the shel yad, the SR holds like Rashi, and the fourth order can hold like RT, which as I said is uncertain.
The Ari put on SR tefilin at mincha, but why not after shacharis?
Answer: Some have the custom of wearing both at the same time. The ou site has a discussion concerning Rashi and Rabbeinu Tam tefillin. See point 4.
Rabbeinu Tam tefillin
Comment: Hmm, see our chat we had [here](https://chat.stackexchange.com/rooms/68015/discussion-between-ezra-and-double-aa). This should be a comment, not an answer.

Rabbeinu Tam Tefillin


Will humidity hurt my furniture and paint/fixtures while on vacation? Note: I left a few windows cracked before I left for a week

Question: I am on vacation for a week. I left a couple windows cracked in my 2 bedroom apartment. I also left all the doors inside the apartment open. I thought air flow would be good while I'm gone, but now I'm worried that some rainy days while I'm gone could cause the humidity to go up and down. The tempurature will be between 50 (at night) and 70 during the day, but the humidity will rise and fall quite a bit. Should I be worried about damaging the apartment? I could try to have someone come and close the windows for me but it would be really difficult to do this - so unless it's critical I would rather just leave them. Thanks for any advice.
Comment: I am voting to close this as looking for recommendations on the use of an apartment are off topic here.
Answer: Normal humidity should do no harm to anything that's been properly made. Remember, humanity has lived with poorly sealed houses in humid climates for centuries, and our belongings have adapted to deal with that.
Woodworkers, for example, are very aware that wood expands and contracts as it gains and losses moisture, at different rates along and across the grain. That would cause trouble if everything was firmly held in place, so some connections are actually designed to slide a bit.
Other things make other adaptations, but o in general as long as materials aren't going to be soaked they will do OK.


An easy way to select one db dump from multiple db MySQL dump

Question: In an urgent situation another person made a backup of all the databases from my webserver to one *.sql file (MySQL dump). Now I have a ~700 Mb file with about 20 different databases. As I only need one of them to restore at the moment, is there an easy way to select the only part I need (one database)? Of course I can try to simply select the needed text from the *.sql file to perform a query in PHPMyAdmin, but it is not so easy as the file is big.
Answer: Take the difference between two 'CREATE DATABASE' using sed operation
eg
sed -n '/^-- Current Database: `dbname`/,/^-- Current Database: `/p' alldatabases.sql > output.sql

https://stackoverflow.com/questions/2342356/import-single-database-from-all-databases-dump
https://stackoverflow.com/questions/3596444/how-do-i-restore-one-database-from-a-mysqldump-containing-multiple-databases
Restoring a single database from mysql enterprise full backup
Comment: Thanks! It's definitely what I need! I'll try to use this version of sed for Windows http://gnuwin32.sourceforge.net/packages/sed.htm
Answer: Despite the fact that MySQLRockstar's answer is undoubtedly correct I haven't succeed with the sed script. I was my first time doing this, so I needed some more time to experiment and I was in a hurry.
I've had some experience with Perl so I succesfully used this approach https://stackoverflow.com/questions/1876754/split-up-a-mysqldump-file-with-multiple-databases-by-database/4347578#4347578 The script succesfully split my dump into separate files for each database. FYI I was doing this on Windows in command line after installing http://www.activestate.com/activeperl. Here is useful info for beginners: http://learn.perl.org/first_steps/
Hope this information is helpful!