Reviewing unit tests before implementation

Question: I am going to adopt TDD in our team and one of the ideas I have is to review tests first. So one would write interfaces, mocks, and tests first, submit them for a code review and once interfaces and tests (think specification) are approved an actual implementation can be written (theoretically, can be done by another developer). I wonder how viable this idea is?
Comment: Why do you think this is a good idea ? What sort of env are you working in, commercial, enterprise, safety critical ?
Comment: the intention was to at first think and agree about pre/post-conditions and once tests are approved we know that a code that meets this specification defined via tests meets our requirements
Comment: Who is doing the approving ? What do you mean by 'approve' ?
Comment: @Phil Kirkham any team member can cab approve tests
Answer:
The Three Laws of TDD

You are not allowed to write any production code until you have
  first written a failing unit test.
You are not allowed to write more of a unit test than is sufficient
  to fail—and not compiling is failing.
You are not allowed to write more production code that is sufficient
  to pass the currently failing unit test.

...These three laws lock you into a cycle that is, perhaps, thirty seconds long....Round and round the cycle you go. Adding a bit to the test code. Adding a bit to the production code. The two code streams grow simultaneously into complementary components. The tests fit the production code like an antibody fits an antigen.

Source: The Clean Coder: A Code Of Conduct for Professional Programmers
To me this suggests that actually you shouldn't be spending time reviewing unit test code on an individual level, as there wouldn't be enough flexibility or speed in that approach to gain any of the benefit. It should be a fast process of multiple iterations. Theses iterations inform the programmer as they are writing code about the changes they are making, improving the code.
Instead review unit tests and final code submissions together. So long as the programmer understands the requirements correctly this should allow you to still have reviews (as you should of course) but keeping the advantages of TDD.
Comment: +1 for cycles. TDD is done in cycles: unit tests are very close to the code (and so solution and architecture) that is evolving. So it would make no sense to have unit tests written once and freeze them forever. It would however, make more sense to agree on some high-level acceptance tests in advance.
Comment: And if you are doing pair programming as well then review of code and tests is happening all the time...
Comment: I'm not sure how to parse that last paragraph.  It may need a period after "together" or after "correctly".
Comment: Period added to last paragraph. I wrote this before the office Christmas party so it was slightly rushed :(. @Phil yes I would agree about the paired approach being an optimal style of TDD if tight reviews were important.
Answer: Doesn't TDD mean the developer has the design suggested to him as he codes the tests rather than being handed a spec to write code to ? Don't you then also miss the dev having the conversation with the customer to understand their needs ?
Answer: I think Tom's answer explains why TDD doesn't work well with reviewing unit tests ahead of time; unit tests become part of the implementation process in TDD, and are part of a tight cycle between testing and implementation.  In other words, you can't write unit tests before coding if you are using TDD.
Reviewing Cucumber-style acceptance tests, however, makes sense before implementation starts.  The purpose of these tests is to make sure that the customer / business owner and the developer are on the same page, and that should happen before implementation.  Defining interfaces and reviewing them might also make sense, especially if two teams working in parallel. These should be relatively easy sells to the team.
I would be hesitant to design mocks ahead of time as well, as they will naturally be developed during TDD (if TDD is done right); however, doing mocks ahead of time could be useful for encouraging code reuse, so it's not a bad idea - just might not be worth the process pain. Developing mocks ahead of time could get some push-back from the dev team, if they don't fully grasp why they would be useful. I'd personally try this with just the acceptance tests and interfaces first, and then see if the team felt that adding mocks to the up-front requirements would help.  This might mean more pain up-front if testers rely on developers to write mocks and devs aren't doing it, but I suspect it will result in more buy-in in the end.  Also, you might find that good mocks are a natural result of TDD, and your testers are getting mocks without having to really push devs to create them.  If it's the devs writing the mocks that are pushing for them to be developed first, then you already have buy-in and should give it a try.
In general, I'd be sure to get team buy-in on any up-front requirements. If the team doesn't want to do the work or believe that it might help, it won't work.
Comment: There is a "cart before the horse" aspect to this.  Most of us are unable to anticipate every dependency before the software is written, which is one reason why the process is iterative.
Answer: I hate such persons that says "This is not a Scrum", when they were asked "Hey, we have a scrum without stand-ups, so how could we do [something]".
I am going be such a nasty person when I say "That is not a TDD what you have described". The TDD has some strict rules, but is it really a big reason to follow them all? I think – no.
Nutel, the idea you presented is viable, but it depends how you will implement it. You should not be restricted to when to write the unit tests: before or after the production code. Maybe it would be better to start from integration tests? Or from the system integration or acceptance tests?
Or, maybe you do not need the tests at all, and it would be better to run the design workshops and just to discuss better what we need from the new functionality.
It depends on situation on you project.


What size timber beams do we need to span our ceiling/floor system?

Question: We are building a hand hewn old oak log home (yes pioneer style not kit log).  We want exposed solid timber beams in the ceiling of the main floor.  We are having oak sawn into 2x6 tongue & groove ceiling/floor for on top of these beams.  Our roof load will not rest on this floor system, its weight will be on the log walls. There will be bedrooms above so weight load will just be living space. One room will have a 16ft open span, one 12 ft, the kicker will be the 20x20 open living room.  We were thinking these beams would need to be on 30inch centers.  Our question is what species of wood and what size beams?  We can saw our own pine, oak, poplar.
Answer: This question is a bit on (or over) the edge of what's sensible to ask here. Even those who might be structural engineers (I'm not) can't do your structural engineering over the internet. People get hurt when buildings fall down.
Hopefully you have some big trees available.
Running it through a basic wood beam calculator (DAGS, which will keep any links from getting old), the 20 ft span on 30" spacing will need to be at least 4x16, and if you are sawing (or hewing) it yourself you're going to have to learn to grade your lumber for beams (a knot or split in the wrong place can make a much larger beam unsuitable for the load, depending where it is on the beam.) Or you do what the old-time old builders of your old oak log home would have more likely have done, and put two posts in the room supporting a central beam, rather than trying to span 20 feet. Few barns even had spans over 12 feet...
If you mean "tulip poplar" AKA tuliptree (wood tends to be greenish), it might be usable. It's a somewhat respectable wood. White poplar (young bark can be greenish, but the wood is dead white) aka cottonwood aka popple -  I believe is generally considered unsuitable for beams - it's a lovely soft white wood to carve, you can cut wall panels from it, but it's weak as can be. Pine or oak are both fine.


Minecraft accounts are blended. How can i separate them?

Question: I just purchased a Minecraft Java account for my son on our home computer. My step-son has an account that was purchased at his mother's house that he accesses on our computer when he is with us. When I attempt to access Minecraft for my son (separate email address, different username) my step-son's worlds show up. How do I get it so my son can access his own worlds?
Comment: Your son should still be able to access his own worlds, did you mean to ask a different question?
Answer: Minecraft uses a single instance, worlds aren't seperated by account, any person logging in can use any world on that instance.
You can use a tool like http://multimc.org/ to create different instances of Minecraft avoiding this problem (each person logs in to their own instance and has only their own maps).
Answer: By default, Minecraft uses one folder to store the data for all profiles. However, you can change that with the default launcher. (note that "Profile" and "Account" are not the same thing)
Set up a profile for each of them using the "New Profile" button. You can change the game directory for each profile in the "Edit Profile" menu. Setting a different game directory for each profile will separate the save files.

Note that this will not separate saves by account, but by launcher profile, which can be selected individually on the bottom right hand corner of the launcher.
Answer: Minecraft stores singleplayer games on a computer per local computer account, not per minecraft account.
As such, to ensure that different users don't see the same set of save games, you need to give them different Windows logons.


Will blown in insulation help in this situation?

Question: I'm in the process of renovation of a 1945 house. Originally built with a flat roof, tar and gravel. At some point a gable roof was constructed over the original flat roof. Space between the ceilings and flat roof is 10  inches, there is insulation in that space ,about 2 inches of paper backed fiberglass. I would like to add more insulation with out removing the existing ceilings. My plan was to blow in cellulose on top of the tar/gravel roof. Does this make sense.
Comment: Brr! That would have our local fire department freaked as they had to deal with this, one serious attic fire if it ever gets lit. I realize it's not an answer to the question, but it wouldn't be allowed under current building codes because of the above concern.
Comment: @FiascoLabs, I don't understand how this would be against code.  Can you please cite a code that prohibits this?  Is it because it would be between the "old roof" and not really inside the house?
Comment: Does the original 10 inch "attic" space have vents to the outside? If it does, insulation above that space won't do much good.
Answer: I'd blow cellulose into the 10' space, from above.  I'd worry about moisture and rodent problems with cellulose between the old tar & gravel and the rafters.  The tar & gravel makes for a moisture barrier you don't really want.
Check your venting in this attic space, and consider a humidity controlled fan.
You probably have K&T wiring in the 10' space, if so see https://diy.stackexchange.com/a/20279/5960
Answer: This does make complete sense, you'd have a nice layer of insulation there if you fill that void.  As it stands, that pocket might be in danger of forming condensation when your inside temp differs greatly from your attic temp.


Which resolutions does the Retina MacBook Pro support, and how?

Question: The new Retina MacBook Pro has an astounding 2880x1800 pixels. Naturally, the "native" double-detail resolution is 1440x900. But what other resolutions can be used? And how crisp are they? (Are they just up-/down-scaled @2x graphics?)
Comment: specify which model more clearly... e.g. "late 2012, 15 in"
Answer: Supported resolutions

Retina, Ratio 16:10

2880 by 1800 pixels

scaled, Ratio 16:10

1920 x 1200 pixels
1680 x 1050 pixels
1280 x 800 pixels
1024 x 640 pixels

According to the official tech specs by Apple.

How does the scaling work?
According to an article in AnandTech:

Selecting any of these options gives you the effective desktop resolution of the setting, but Apple actually renders the screen at a higher resolution and scales it to fit the 2880 x 1800 panel. As a result of this scaled rendering, there can be a performance and quality impact.

There is a new option to configure the resolution in the system settings. While you actually change the resolution, Apple only refers to the visual impact of the settings.
So basically changing the resolution offers:

Large text, but much crisper.
More space for visual content (and smaller text), but not as sharp.
Something in-between (default retina).

(original picture from AnandTech)
Note:
Due to the imprecise definition of "retina display", this answer may seem confusing, because at the top Apple speaks of 2880x1800 as retina, but the picture suggest something different.
Comment: It scales the UI but the native resolution is 2880x1800, as the answer to [my question](http://apple.stackexchange.com/q/53605/14610) shows, you can force the UI scaling to 1.0 rather than somewhere between 1.5 and 2.8125 using 3rd party software.
Answer: This also gives a good understanding on how it works: http://www.slideshare.net/MarkRiggan/retina-display-textures
Answer: Another clear answer is obtained from using a Windows OS on a Mac. So, in terms of pure Hardware support (the other answers gave great summaries of software-answers, and I am by no means advocating or bashing Windows-on-Mac solutions, just giving the pure-hardware capabilities of the MBP w/Retina), the resolutions are:
2880x1800
2560x1920
2560x1600
2048x1536
1920x1440
1920x1200
1920x1080
1680x1080
1600x1200
1440x900
1400x1050
1366x768
1280x1024
1280x960
1280x800
1280x768
1280x720
1152x864
1024x768
800x600
From this, it seems the max resolution is 2880x1920, not 2880x1800, but I cannot verify that. It seems like the maximum horizontal resolution is 2880 and the maximum vertical resolution is 1920, but not both at the same time. Further investigation would be nice.
Comment: I'm curious about the down vote... I clearly addressed the angle I was approaching.
Comment: 2560x1920 would be a software mode, which is then scaled to fit the display. It's been stated and verified all over the Internet that the screen physically has 2880x1880 pixels. The hardware only supports that; scaling is done in the OS/graphics drivers = software.


How to execute SQL SELECT query and see the results?

Question: I want to run a SELECT query on the Wordpress database and get the results on the screen.
Any widget which does it?
Comment: The title is misleading, it sounds more like how to run a query in php and print the results, which is what the answer gives. If you want a plugin (not a widget) then it should be "what plugin allows me to run select sql queries?" and you get this https://wordpress.org/plugins/run-sql-query/ or https://wordpress.org/plugins/sql-executioner/
Answer: Have a look at the $wpdb class, it does exactly what you want:
<code>$myrows = $wpdb->get_results( "SELECT id, name FROM mytable" );
</code>
Try to avoid SQL queries for basic operations though. WordPress offers you many convenience functions for 80% of the tasks you would every come up with. They provide a nicer interface and preserve upwards compatibility.
For example to get posts from the DB you could use the WP_Query class or the get_posts() function.
Comment: Hello and thanks for your reply.
I do not have access to php files right now. I would prefere to do this via a widget. Any widget that offers this?


Dry hopping without secondary fermentation

Question: I have so far only done bottom-fermented beers without transferring into a second vessel for secondary fermentation. If I wanted to do some dry hopping with this technique, when is the best time to put the hops? Towards the end of fermentation into the fermenter or into the bottles when it is bottling time?
Comment: So does this mean you've only done lagers and left the beer on the entire yeast cake for the lagering process?  I am confused a bit by the wording of the question.
Comment: I agree. Bad wording. Here's what I do: I ferment in a locked fermentor until I have anywhere between 50 and 70% fermentation (depending on the beer), the yeast has settled and the the foam has gone down. Then I fill the beer in bottles and have it condition there at cold temperatures for at least 2 weeks. So I guess, I am doing something like a combined bottle-conditioning/secondary, right? I worked in a big, industrial brewery in Germany many years back, so I am kinda downscaling an industrial process, I guess, and adding some of the good stuff, like dry-hopping.
Comment: Oh, and usually I get a bit of yeast in the bottles by accident but the majority of the yeast cake I throw out.
Answer: I suggest you do it a week or a few days before bottling.  Hop aromas are volatile and the less time they are in an "open" environment the better.  If you throw the hops in without a bag allow a little extra time for them to settle as well.
Answer: I started dry hopping in primary as a rule.  I add my dry hops after the most vigorous part of fermentation is over, about 3-4 days.  Waiting a bit helps prevent more foaming I have found.  However I do add the hops before the ferment is done.  The reason for this is that when adding whole hops to the fermentor they are filled with a lot of air.  That air can lead to some oxidation/staling.  By adding the hops while there is still signs of fermentation the yeast tend to consume the oxygen limiting the oxidation of the beer some.
Yes the ferment activity does "scrub" some of the volatile aromatics out of the beer, but who cares, you just add more hops to compensate.  Its a recipe issue not a process issue.
Increase your normal dry hop addition by 10-15% to compensate.
I can't take credit for this technique.  I heard about it on The Brewing Network from Mike McDole.  I had heard about it prior to the BN, but it has been best explained there.


Can alternative embodiments well known to skilled persons but not described in my description be protected by my broad claim?

Question: I missed from the description some alternative embodiments, particularly some different structures/versions/variations. The claim is broad and it is not limited to the embodiments of the description but the alternative embodiments are not mentioned in my description. These alternative embodiments are well known and obvious to the skilled persons. For example, I have a published state of the art review paper that describes all these embodiments. Would that mean that I will be protected for these embodiments by my patent or do I need to file a new application to document these? The issue with filing a new application is that the examiner may not find it inventive because it is well known to the skilled person.
Comment: Are you trying to get patent protection for things you admit are obvious and which have already been published?
Comment: Or are you saying that, once given the invention, the variants are obvious?
Comment: Also, do have an actual issued patent of just an application? Claims in applications are very often broader than the subsequent patent.
Comment: I patent a device based on bolts where skilled persons already know the different types of bolts (e.g. square bolts, round bolts, etc). Choosing one bolt or the other may have some advantages but the function of the bolt device will still be the same. I have only mentioned in the description the square bolts but my claim does not limit the device to square bolts. Will I be protected against other types of bolts or will competitors build my device with round bolts and circumvent my patent? Or they can even patent it by claiming round bolts?
Answer: If you have a granted patent with a broad claim, then you can enforce that patent against others who infringe upon it. If you are worried about some minor variations of the invention getting patent protection then publishing those minor (or even major) variations should keep anyone else from obtaining a patent on the variation. I say should because the patent examiner may not see your publication. That said, if you actually publish the technical details, and can prove it, you can keep anyone from trying to enforce their patent on that detail on you.
You can setup on Google Scholar alerts which will make you aware if someone cites your patent. This can alert you to patent applications that might be related to your patent. You can then contact the patent office with your prior art.


How did Rivka get married when she was three years old?

Question: What does the Medrash mean when it tells us that Rivka was three years old when she married Yitzchok? Is that meant in a literal sense? If so, how is this to be explained in a rational way?
Comment: Which Midrash are you referring to?  A source/link would come in handy.
Comment: What is irrational about her being married off at 3? Life was different back then
Comment: @DoubleAA. You mean that was the normal thing? That old men married 3 year old girls, who were already taking the sheep out to graze, and who conducted adult conversation? And it was normal for parents to let the 3 year old make the final decision about the marriage?
Comment: @MarkA. Doesn't sound too crazy. It didn't have to be common to be not crazy.
Comment: Re your comment "who were already taking the sheep out to graze, and who conducted adult conversation? And it was normal for parents to let the 3 year old make the final decision about the marriage?": If that was part of your question, you shoulda put it in the question post.
Answer: The following I remember from a Sicha of the Lubavitcher Rebbe:
Rashi at the end of Parshas VaYeira feels the need to explain why the "news" Abraham received about his family tree is written right after the Akeidah (or at all) ? He answers by showing the Medrash which states that once Issac went through the Akeidah, (at age 37) he was ready to marry, so the Torah announces Rivkah's birth (she is on the list received by Abraham). Since we know Issac married when he was 40, therefore Rivkah is 3 years old at her marriage.
Tosfos to Yevamos 61b, brings an opposing Medrash which says she was married at age 14. (see Seder Olam Rabbah)
The Rebbe (and other scholars) are bothered by the fact that the Torah calls Rivkah a "naarah" when Eliezer meets her. A naarah in Torah language can only be an older girl above 12 years of age. Otherwise, the Torah would use the word "katanah" if she were really physically 3.
Based on this apparent contradiction, the Rebbe resolves it by saying the Seder Olam age of 14 is her physical age. The Medrash brought by Rashi, is not speaking physically, but spiritually. We know that Sarah passed away exactly at the time of the Akeidah. The Tanya explains that according to Kabbalah, a righteous person who dies, may sometimes be granted a mission to help a struggling living person in this world. The Tzadik/Tzadekes who passed has their soul reborn into the soul of their "student" on Earth, in order to help them overcome spiritual obstacles. This is called the secret of "Ibur Neshamah".
Sarah was reborn into the soul of Rivkah at the Akeidah (right after Sarah's passing). Therefore, the Medrash calls her a "three year old" at her wedding. That is, three years since she was born with Sarah's soul (which happened when she was physically 11).
Further proof that we are dealing with a living shared incarnation, is that Rivkah's arrival causes the return of Sarah's blessings (cloud, lights, dough). Issac is consoled "after his mother" and "brings her to his mother's tent" specifically. (Gen. 24:67)
In addition, I say that the "news" Abraham receives could not possibly have happened all at once. It is a long family tree with the report of many births over a long time. There is no reason to say Rivkah, who is on the list, was born exactly then (at the Akeidah when the news was sent) unless we are speaking of a spiritual birth.
So, Rivkah was 14 when she married Issac. She was 3 years old as a combined soul with Sarah.
The problem many people have with this IMHO, is that they only know the Rashi (not Tosfos and other meforshim) and take Rashi very literally on his use of a Medrash. But Medrashim were not usually meant to be used literally!
Therefore they find themselves stuck choosing between defending their faith (she was 3) and facing rational objection (how did she do the camel marathon...child marriage etc.)
The fact is, its just not a problem.
Yes, there were cases of ancients who were physically stronger and more mature at younger ages. The Gemara does show this to be the case. However, it does not seem to be so regarding Rivkah Imeinu.
Comment: Got a source for this? The only sicha I could find on the topic (לקו"ש ט"ו חיי שרה ג) seems to accept her age as stated by Rashi, and even uses it to support the Rebbe's campaign to have girls light shabbos candles from the age of 3. It also mentions (end of אות ו) that she was clearly unusually mature for her age, basically for the reasons OP outlines in his [comment](https://judaism.stackexchange.com/questions/79377/how-did-rivka-get-married-when-she-was-three-years-old#comment240218_79377).
Answer: Rav Schwab, in his sefer "Meiyun Beis Hashoeva", explains Rivka being 14.5 using a similar approach to that of Lubavitcher Rebbe mentioned above.
An English summary of the approach can be found at: http://www.nachumsegal.com/taking-closer-look-parshas-toldos-rabbi-dov-kramer-5774/
Comment: Avi W., [Welcome to Mi Yodeya](//meta.judaism.stackexchange.com/a/3887), and thanks very much for sharing these references! You could make this answer even more valuable by [edit]ing in [your own summary](//meta.judaism.stackexchange.com/q/75) of the pertinent information in the linked article. I hope you'll look around and find other material here of interest, perhaps starting with our dozens of questions on [this week's parasha](http://judaism.stackexchange.com/questions/tagged/bo). I look forward to seeing you around!


Can ATC provide VFR flight following to a VFR aircraft in class E airspace?

Question: Just wondering if ATC can do this or not. I'd also appreciate input on whether it's useful or a good idea, and how it looks in the real world.
Comment: We already have several questions on flight following that may (mostly) answer this: [here](https://aviation.stackexchange.com/q/30353/62), [here](https://aviation.stackexchange.com/q/19265/62), [here](https://aviation.stackexchange.com/q/516/62), [here](https://aviation.stackexchange.com/q/48405/62)
Answer: They can. I often pick it up here in the Northeast since the airspace is fairly busy. Generally speaking I was taught that flight following is always a good idea. It is a useful tool to you in the cockpit and can provide advisories of fast moving hard to see aircraft as well as those that may be approaching to overtake you. Generally it helps to improve your radio skills and may reduce your work load ultimately.
As for who to contact, that can change. I had this very question during my training (asked here) and you can find the answer here. If you are departing from a controlled field you can sometimes ask the tower to set it up which they may or may not do. The Airport Facility Directory will have an "approach" and/or "departure" frequency listed for most fields which is generally who you call. If you are in the wrong area they generally send you over to the right controller.
Comment: Who do you contact to receive the service in class E? Does it depend on where you are? I'm assuming if the class E (or class E surface) is an extension of a class D airspace, you'd pick it up from the tower. And maybe if you're outside of a TRACON, you'd get it from a center controller?
Comment: @jeff0000 I have added a bit to cover that, comment if it does not answer the extension of the question.
Answer: Yes, you can request VFR flight following in Class E airspace and 90% of the time you will be flying in Class E airspace.  There's nothing unusual or difficult about it; you simply request flight following and ATC will usually approve it unless traffic congestion, emergencies, etc consume all available ATC resources for this.
Comment: Typically its the different Approaches that provide flight following, not Center, unless you are at higher altitudes.  For example, east coast of MA, you will talk to Boston Approach most of the time. Once you climb higher, like above 5000 ft and start heading westward, they will then hand off to NY Center. And even, you might get handed back to Bradley Approach, Albany Approach, etc. if  you are not up in NY Center's airspace.
Answer: Yes, as far as I know the entire US Airspace is covered by one center or another. It is the centers which provide flight following. For example on a recent flight from CYKZ ( Toronto Buttonville ) to KFRG (Farmingdale Republic on Long Island , NY), I asked CYKZ controller for flight following ( on the ground ) and she handed me off to Toronto Center. I again requested flight following and the request was granted. Toronto Center handed me off to Buffalo Center, then to Rochester center, Binghamton Center, Wilkes Barre Center, Boston Center, New York Center and finally to KFRG Tower. I believe if I didn't pick up flight following with Toronto, then I could have picked it up with any of the other centers mentioned above. In the JFK area I have picked up flight following with New York approach ( there are different frequencies depending upon whether you are going East or not). On a recent approach NY approach frequency was very busy and I ended up picking up flight following from Albany approach on my way to Montreal. These rules apply in US only. Canadian rules are different and I am still trying to figure them out.
Comment: *"It is the centers which provide flight following" This is incorrect, for example I can pick up flight following with my local airport and fly 60 or more miles under their radar services before they hand me off to center or another airport. Center does not always provide Flight Following services, just about any ATC radar area with a controller can do it.
Comment: @PrashantSaraswat is correct. The local airport does not provide flight following. However, if the airport is in the coverage area of an approach control then they will hand you off to them. If there is no approach coverage then you are handed off to center. I fly out of KSBP and will get flight following on the ground. I get handed off to Santa Barbara approach and if I stay low I will be handed off to a bunch of different approach controllers all the way to southern California. If I fly north, I will get handed off to Oakland center and don"t get handed off to approach until in the Bay Area.
Comment: The real limit to flight following is radar coverage at lower altitudes. If Center can't pick you up on radar, they can't provide flight following. If you're getting flight following and you drop off the scope, you'll hear "radar contact lost, flight following terminated."
Comment: ok. My airport - KFRG - is a class D airport and they do have radar coverage but they do not provide flight following as far as I know. OTOH I have always received my flight following from a center along the route. So maybe it is correct to say that all centers provide flight following and some other airports with radar may also provide flight following.
Comment: @Prashant, FRG is a Airport Traffic Control Tower which *may* receive a radar feed and *may* provide certain limited radar services. But "flight following" is a service provided by a dedicated radar facility, whether a TRACON or ARTCC. Some ATCTs are co-located with a TRACON and some are not. The radar control facility for FRG (and the rest of the New York area) is the New York TRACON, N90.


LPR Printing InputSlot Issues

Question: I am printing from a Unix system to a Xerox Phaser 4510 (altho I have also had issues printing to a Xerox WorkCentre 7765).
I am using LPR and trying to choose the InputSlot
The lpoptions show the following options:
InputSlot/Paper Tray: Tray1 *Tray2 Tray3 Tray4 ManualFeed Tray6

And here is a sample command that I am using:
lpr -P printer -o InputSlot=Tray1 test.pdf.ps

Here is the problem:
Tray1 = Gives me Tray2
Tray2 = Gives me Tray3
Tray3 = Gives me Tray4

Tray4, ManualFeed, Tray6 = Tray2 (the default tray)

If I change the default tray in either LPR, the printer settings, or both. LPR still sends tray2 as the default, where as printing from a windows machine or mac, would use the new default tray.
I have also tried Tray0, and several other things, but I have not found a way to get it to print on tray 1.
Any Ideas?
Answer: The wrong PPD was being used. Changed and is now working!

LPR Printing InputSlot Issues


Resizing the images for faster page load

Question: I was checking my sites page load time. I saw that I could improve it by reducing the size of the images which were getting resized by css. Now I wanted to ask if resizing the images is worth the page load speed? As it takes quite good amount of time to do the resizing so is it strictly recommended for a good website?

Thanks in advance.
Answer: Yes, it is. Making users download useless extra image data just so the browser can resize the image to less than half the size is bad practice, and it's one of the warning signs of a poorly designed/developed website.
If you want to improve page performance why wouldn't you reduce unnecessary bandwidth usage? That's like asking, "If I want to get better mileage, should I patch the leak in my fuel tank?" Well, of course you should! A leaky gas tank is the exact opposite of what you want to get good gas mileage.
If you're making users download dozens of 800x600 images to view your page, is it really any surprise that the page performance is poor? And at the size the images are being displayed, almost 80% of the transferred data is just useless junk. You may as well have a page that has 10 visible images on it but loads 40 other images that are never seen by the user.
Answer: If the images are all the same size you can use imagemagick to do a batch convert.  The other thing you need to do is look in analytics to see how many returning visitors you have, and if it's significant make sure you are setting the images to not expire using htaccess...
Answer: If you're concerned about speed, not only should you resize images but also consider creating CSS sprites to combine multiple background images into a single image using an online tool like SpriteMe or CSS Sprite Generator.
CSS sprites are a way to reduce the number of HTTP requests made for image resources referenced by your site.
Comment: Sprites _are_ generally a good idea, but I think the optimal use case is lots of small icon-sized images. If you stitch together a bunch of medium-large images, the sprite map could get quite big, which would reduce the _perceived_ performance even if the site page loads faster in reality. Instead, for larger images, I'd go with lazy loading to increase perceived performance.


How do I retrieve data from locked Lumia 520?

Question: My husband passed away almost 2 yrs ago. I want to access his phone to retrieve precious and irreplaceable photos and messages but cannot remember his security passcode. Resetting the phone will lose everything. Please help.
Comment: Did you find a way to do this ? There's a vid online somewhere shows how to reset pin via onedrive somehow. Im trying to locate this tutorial so I can try it Im currently trying to recover some photos.
Answer: If the phone isn't connected to a business (enterprise) account, you should be able to keep trying different passcodes until you hit the right one; it'll just take a long time. Other options that might be faster:

Does the phone have a microSD card installed? If so, it was likely being used for storing photos (the 520 doesn't have a lot of internal storage). You could remove that card, put it in a computer, and get its contents off that way.
Is the phone set up to back up its photos to OneDrive? If you have the password to the Microsoft account (if needed you can probably get Microsoft to unlock it for you, though that might take a while) you can check OneDrive to see if the photos got uploaded there, and download them if so.
If you want to get back the SMS (and they were being backed up), you can use another phone signed into the same Microsoft account (doesn't need to have the same PIN, or any PIN at all even) to restore them.

I feel like there really ought to be a way to unlock a Windows phone using the account password instead of the PIN, but I'm afraid I don't know of one.


iOS node not syncing with private BKC

Question: I use the Geth framework and Swift 4 to boot a node inside an iOS 11.0 app. This node connects to my local BKC (to 4 nodes to be precise).
Here are some tests I made :

if I start 3 computer nodes and start mining, the 4th computer node will sync on start
if I start all my nodes (computer and app) and start mining on a computer node, each node will notice it and sync
if I start all my computer nodes and start mining and then I boot a fresh new app node, the app node won't sync (even if he connects without any issue to computer nodes)
if I start my app node with Rinkeby genesis and bootnodes, it will sync after a few seconds

So, I probably missed something but I don't understand why my app node syncs with Rinkeby and not with my private blockchain.
I'm using a static-nodes.json file to connect all my nodes together (computer and app).
I start my computer nodes with :
geth --datadir <datadir> --port <port> --networkid <id> --v5disc --lightserv <int> console.
I use a custom genesis file. The admin.peers method confirms me that all my nodes connect to each other without any issue. And I use the GethSetVerbosity(9) to display trace and debug in my Xcode console.
Any idea ?
Comment: If you're still having this issue, it would be awesome if you could edit your question and provide your network topology and opened ports between the nodes and the IOS device. If you've solved the issue, it would be awesome if you could "self answer" too!
Answer: Is it necessary to use an iOS device as a node? I can't think a reason for doing that. For most things that you'll need in a mobile you could do with JSON RCP.

iOS node not syncing with private BKC


How do you say you are jealous of something/someone in Japanese?

Question: I would like to say "I was jealous of people who could eat and talk with everyone".
I tried translating it on my own and I ended up with "みんなと食べられて話せる人たちに羨ましかった。"
Have I done it right?
I find something off even though I think I have used every grammar correctly.
Please correct me if I am wrong.
Thanks
Comment: wait, is your question about grammar (tags) or vocabulary (title)?
Comment: Should be related to a specific part of grammar, I think. Since I know there's an i-adjective "羨ましい" for jealousy but don't know how to use it.
Answer: This sentence "A is jealous of B" is translated as "AはBが羨ましい", "AはBに嫉妬する" and "AはBを羨ましがる.". So your sentence is unnatural.
Answer: 羨ましい, from what I have seen, uses が to mark the thing/person which is envied. For instance:

(私は)あなたがとても羨ましい。
  I envy you so much.

So, assuming 羨ましい is good for your context (see below...), I think your sentence would be better rephrased as:

(私は)みんなと食べられて話せる人たちが羨ましかった。

I would also consider about including an 一緒に to strengthen the "togetherness" of those people's actions, after the と, but it is not necessary.
However, depending on the sort of jealousy, (and just sticking to い-adjectives for simple comparison), a sentence using 妬ましい (ねたましい) might be better. 羨ましい conveys an essentially a neutral/positive jealousy; while 妬ましい conveys more negative sentiment e.g. a sense of a hatred towards, and/or an inferiority complex due to that other person/thing. (See Difference between 妬【ねた】ましい and 羨【うらや】ましい, for example.)
A sentence using 妬ましい can use the same structure as the example above (i.e. 人たちが妬ましかった。).
There are also unsurprisingly other ways to express jealousy (e.g. 妬ましく思っている, 焼きもちを焼く, 嫉妬する), but those may be better saved for a question addressing those differences more specifically.
Comment: Yeah, the particle to be used before 羨ましい was the biggest concern for me. Thanks for clearing that up! I hope other than that, everything sounds cool.
Comment: Yes, that's right.


Which augment item is the most useful to Viktor? Augment of death or gravity?

Question: I have been playing Viktor lately in League of Legends and I was  wondering which augment item was the best to make Viktor a strong force in the team. I have been using the Augment of Death but people have been telling me to to use Augment of Gravity but I'm not sure which would be more useful. Any thoughts?
Answer: The question depends on what you want your role to be... or, if you're getting stomped in lane, what role you can be ;-)
Death obviously grants you a ton more damage by giving you the DoT (Damage over Time) effect. In fact (from League Of Legends wikia):

Magic Damage: 70 / 115 / 160 / 205 / 250 (+0.7 per ability power)
  Total Damage With Augment: 91 / 150 / 208 / 267 / 325 (+0.91 per ability power)

That's... a big deal. Especially for an AoE ability.
However, it does leave Gravity Field a little weak because of how vulnerable you have to make yourself to cast it into a teamfight. Moreover, Augment Gravity doesn't just make Gravity Field stronger:

Gravity Field has an additional 30% cast range. The item now grants
  him +3 ability power per level, +200 mana, +10% cooldown reduction and
  +5 mana regeneration per 5 seconds

Now that we know the benefits... Which one is better?
If your team is relying on you to dish out a ton of magic damage, for instance if you have a tankier team or an AD-heavy team (forcing the opponents to build armor to cope), then you almost have to get Augment Death. Viktor's entire damage kit was balanced around that idea. If you don't, you'll be hamstringing your role.
However, if your team lacks a lot of CC; has an initiate that brings the enemy team into a tight formation (Shen taunts, Orianna ults (because you have two AP? I don't know); your team has a lot of gap-closers (Irelia, Xin Zhao, Jarvan, etc.); or if you're just behind and need to be helpful in a different way, you want to get Augment Gravity.
TL;DR: Augment Death lets you crank out the damage, but your team utility will be low. If your team needs the additional utility, or you're too far behind to do meaningful damage, Augment Gravity.
Answer: Most people pick Death for the extra damage but Gravity is amazing if you can catch people with it in teamfights . You should pick one or the other depending on the team comp , whether you need more damage or CC .
Thats what I think anyway :)
Answer: Death will insure you more early kills, thus helping you snowball better into lategame. If there's one thing Viktor likes doing, it's destroying... Well, everything, in the late game.
Answer: I've been using Viktor lately and I've found 2 effective builds, using the Deathray augment for harass dps (at later levels this is a very effective tool for creeping and harassing at the same time if you know how to control the path of the laser properly).
The other is using the Overcharge augment where it increases your movement speed every time you cast. Use boots +3 speed and then run people down using field, storm and laser to pick them off.
There are situations where using fields augment would have its advantages but having a range like that makes it an effective ganking tool for lane control. Basically it buffs up a support skill.
Overall, including certain item builds, I would say Death ray augment is by far the most useful of the 3, especially if you have an AP rune and Mastery sheet ready, all those little bonuses add up fast after level 10.


Syncing production with staging

Question: we have a staging server in order to test out plugins and roll out new features and also re designing sites. The issue is that the staging version of the site will be out of sync as soon as new content is done on live site, or a new image is uploaded. What is the best way to keep the staging version in sync with the live one, including all posts, images and plugins as well as the whole database in general.
Comment: @JacobPeattie - technically it's a duplicate, but that post is also 8 years old.
Comment: Possible duplicate of [Database synchronization between dev/staging and production](https://wordpress.stackexchange.com/questions/2100/database-synchronization-between-dev-staging-and-production)
Comment: I use WP Migrate DB Pro and it works extremely well. There is even an option to not change the activated plugin settings that seems like it would help in your case.
Comment: WP Migrate DB Pro is made to replace one db with another. It does not address the needs of this question. If you copy staging db and overwrite production db, all those sales transactions that occurred in the mean time on the production db will be overwritten.
Answer: If you are using Pantheon for hosting it turns out to be trivial to do this as a test (they call it dev), stage (they call it test) and production server are built into their platform along with tools to manage moving data and files around. Plus with Pantheon you get easy but optional Git deploy as part of the deal.
You can test out Pantheon for free as you only have to pay for sites once you get ready to deploy to a production domain. Also, if you build sites for other people you can become a partner and unlike discounted partner rates for your clients.
If you are not on Pantheon, and cannot move, then for moving the DB down from the live server to staging I would recommend using a SQL tool like Navicat for MySQL (great transfer tools), DataGrip (great UX but not so great transfer tools), Sequel Pro (free for Mac, not as feature rich) or HeidiSQL (free, for Win, not as feature rich).
And for source code (plugins, themes, etc) and uploads I would recommend a plain-old STFP client, of which there are (too) many.
Answer: If you use the Mediatemple staging feature (or GoDaddy, is the same parent company)
Then the short answer is: No, for a silly reason you can't
The use case they had in mind probably was: Do all the changes in dev and publish them to prod, but apparently that doesn't work obviously for stores, etc. where you obviously generate new data in production environment.
The best approach is to generate new zip files from prod (Files & DB)
delete the old staging site, create a new one and set it up again with the files from prod.
Now if you don't want to use such feauture, best thing would be to set up overnight cronjobs which do this very same approach overnight so at least every morning you work with the most actual state...
Problem with this approach is that uncommited changes to production will be deleted overnight...
So whatever way you choose there's caveats...

Syncing production with staging


Traveling with expired Green Card

Question: I want to know whether CBP will let me depart with an expired green card. It will expire soon but I have already booked a flight and I do not have time to renew it here in the US. So I will do so at the US consulate in my home country or file an I90 form and pay the re-entry fee  at immigration/customs on my return. I am not worried about re-entry but more so about being allowed to depart. I just got back from a trip in September this year, and the immigration/customs official stamped my passport. I don't know whether this counts as an I551 stamp. I'll leave a picture so you can check it out.
Comment: That's not an I-551 stamp.  CBP does not inspect departing passengers and won't prevent you from leaving.
Comment: For future reference, it is well worth while filing the renewal well in advance, up to 6 months before expiration. Although it took longer than 6 months to process, USCIS added an extension when I went for my bio-metrics appointment, which delayed expiration until after the replacement arrived.
Comment: Big thanks to yall that helped me get a clear answer! Blessings
Answer: The US has no exit checks; one does not interact with immigration officers when leaving the US, no matter by land, sea, or air (well, technically, CBP could do random checks of departing passengers, but this is extremely rare and I have never seen it happen). In general, anyone with or without status can leave the US at any time without any issues as long as they can enter the destination country.
Technically, a carrier is allowed to board a passenger for return to the US with an expired 10-year green card (see CBP carrier information guide, page 36, "LPR's with expired I-551's may be boarded without penalty provided the card was issued with a 10-year expiration date."), but I am not sure how many airlines will be willing to board you for return to the US with an expired green card.
I am not sure what you mean by "I will do so at the US consulate in my home country", but you can't file I-90 abroad because the green card can only be delivered to an address in the US. Instead, if you can't get back with the expired card, you would have to file Form I-131A with the consulate for a transportation letter (which costs $575) to return to the US, and then file I-90 (which costs another $540) once you are back in the US.

Traveling with expired Green Card


Is there an application that automatically tests the system?

Question: The System Testing that comes with Ubuntu is cool, but it just takes an enormous amount of time to complete, and I just don't have time to sit around pressing the "Test" button. Is there something that does the tests automatically?
Answer: There's no reliable way for the software to tell if e.g. you can hear a sound or if your screen resolution is what you expect. Therefore you can not have fully automated hardware tests but need someone to tell if the test was successful.
Answer: see if you can find"system profiler and benchmarker"  it came with zorin 4, so must be available through synaptic or ubuntu tweak.  works well, useful options to choose from, gives pretty good information that i can understand.


Cross-Currency Inflation-Linked Swap

Question: I am trying to find any references to cross-currency inflation-linked swaps. Have anyone encountered them and can describe how they work and how they differ from standard year on year inflation swaps?
Answer: This is likely to be a marginal product that exposes the investor to the delta between reference baskets. For example, trading EMU HICP vs UK CPI, and the basket different may be a greater weighting on food etc.
The bank writing these instruments could easily hedge the risk. There is opportunity for sizeable bets.
Have not come across any media or other references, would be interested to see...
Answer: In some countries that have had high inflation in the past, they use 'inflation-adjusted' currencies alongside the nominal ones, e.g. in Mexico they have MXV along with MXN; in Colombia, COU along with COP; in Chile, CLF along with CLP. You can get broker quotes (e.g. from ICAP or maybe BGC) for swapping fixed MXV (i.e. MXN adjusted for inflation) v USD Libor.
I came across this old (2013) ICAP document, which suggests (pages 59ff) that they classify fixed inflation-adjusted v floating nominal (e.g. CLF - inflation adjusted fixed v CLP Camara - nominal floating) to be cross-currency swaps as well. But if it's not cross-currency enough for you, you can combine it, e.g. with CLP camara floating v CLP fixed, then CLP fixed v some other currency floating.

Cross-Currency Inflation-Linked Swap


Search results - detail pane

Question: I realise this probably requires custom development, but curious if anyone has considered a two pane search results, where the left pane is the listing and the right pane a detailed contact record.  The aim is to improve/speed up navigation for user looking at records.
Answer: If you mouse over the icon on the left of each result row a popup comes up with more details on the contact. This does help isolating the correct record when reviewing results.

Search results - detail pane


Using a non-numeric ID in a backend component

Question: In a backend component, I have one table that does not have numeric ID numbers. It is instead indexed on a unique alphanumeric value (think like a list of U.S. territories indexed on abbreviation, e.g. 'AZ'). I am working on building a simple view to display and edit these records, but Joomla! strips off the non-numeric ID numbers, removing the "id=" part of the query string altogether when I attempt to edit a record. Where in the system does this occur and can we safely override it?
Comment: If he is doing this in the back end it has nothing to do with the router file since no routing is taking place.
Comment: It's your router file where this happens. check and fix router.php file.
Answer: You have a couple of options here:
1) Easiest is to create a new auto increment field in your table and use that ID for your editing layout.
2) In your list view create a link that goes to the editing layout and rely on that link for getting to the editing screen.
 (example: index.php?option=my_component&view=my_view&layout=edit&my_alpha_id=123ABC&task=my_view.edit)
Be sure if you go the link route that you add the task URL Param to keep from getting errors. Also change the bold sections above to meet your needs.


Why does BitLocker not use RSA?

Question: If understand correctly from this post and the Wikipedia page for BitLocker and TPM, by default, BitLocker uses symmetric cryptography like AES. However, TPM is capable of performing RSA encryption.
Given that the RSA key is stored in the TPM, why does BitLocker not use asymmetric encryption (i.e., RSA)? By using such an encryption technique, we might be able to defend against the cold boot attack or sniffing on the LPC bus.
Comment: How would using asymmetric encryption even help? Unless you never intend to write any data to the disk, you would need to have both sides of the key in memory in order to use the disk anyway. (I suppose there are special cases where you'd want a disk anyone can _read_ but with strong authentication of its content -- but even there encrypting each block separately with an asymmetric primitive would not be the solution of choice).
Comment: BTW, you might be interested to know that there _are_ ways to mitigate cold boot attacks against FDE, such as TRESOR or using a new CPU with TME (Total Memory Encryption). Neither of those require a TPM.
Comment: @kelalaka I've always found that paper a bit silly. It's a DMA attack, which naturally needs to be mitigated separately (with a properly-configured IOMMU). It isn't specific to TRESOR at all. It's no more an "attack on TRESOR" than using JTAG to debug the CPU and extract the keys is an "attack on TRESOR". Same with attaching a logic probe to the DRAM modules and triggering an NMI and reading the registers as they are pushed to the stack. Or a browser 0day combined with a kernel exploit to read the keys. Anyway, just boot with `intel_iommu=on` and you should be safe from that particular attack.
Comment: @forest, there is an attack on TRESOR, [TRESOR Hunt](https://dl.acm.org/citation.cfm?id=2420961)
Answer: Asymmetric encryption is vastly inferior to symmetric encryption. That is, in all respects, except one -- being asymmetric. When that property is needed, there's no way around it, obviously.
Asymmetric encryption is much slower. It is much more susceptible to showing recognizable patterns of some kind given non-random input. You need much larger key sizes to provide an adequate level of protection, and the system is much more vulnerable in general with current and future technology (reasonably-sized quantum computers will basically mean instant death for RSA, but AES is pretty much "yeah, so what" in that respect).
That's the reason why asymmetric encryption is almost never used to encrypt bulk data.
Nothing prevents you from encrypting a terabyte of data with RSA using 2048 bit chunks, much like you encrypt a terabyte with AES in 128 bit chunks. Only just, it doesn't make sense to do that because it is several thousand times slower, and at the same time is much more insecure.
Comment: @kelalaka For _communication_.
Comment: This answer is clearly wrong with regards to the susceptible to showing recognizable patterns based on the input, and it misses out on the fact that RSA encryption would expand the ciphertext and can therefore not be used for block encryption (even for textbook RSA, as the modulus size needs to be bigger than the block size).
Comment: @kelalaka Asymmetric cryptography is almost exclusively used to exchange key information for symmetric cryptography. As Damon says, you still use symmetric algorithms for encrypting bulk data.
Comment: Damon - you may wish to rethink your post, or maybe delete it until it is fixed. As stated by reputable crypto-savvy folks (@Maarten is a mod on Crypto.SE) it has some major flaws.
Comment: There **is** something preventing you from safely encrypting bulk data with RSA, though -- RSA is vulnerable to a number of different attacks involving plaintexts with known, unusual values (for example, small values of _m_).
Comment: RSA is _not_ more susceptible to showing recognizable patterns given a non-random input, unless you are very specifically using the horribly insecure _textbook RSA_. If you use RSA with proper padding (such as OAEP), it provides IND-CCA2 security. The real reason it would be a bad idea to encrypt something using just RSA is because it would be stupid slow and because the message would expand during encryption.
Comment: @duskwuff Padding prevents this from being an issue, especially since padding is non-deterministic (takes random values), so you can't even use brute force on the original message to confirm what was encrypted.
Comment: vastly inferior? Compare the expand of cryptography after invention on Asymmetric Cryptography.
Comment: This answer isn't really wrong—RSA, for instance, _is_ bad at concealing nonuniform inputs, and the ratio between the adversary's cost and the user's cost is much smaller for RSA than for AES—but it doesn't address (a) how essentially all secure public-key encryption in practice _combines_ public-key mathemagic like RSA to choose a key, with a symmetric-key authenticated cipher like AES-GCM, in a KEM/DEM structure, and (b) why even a secure if inefficient short-message cipher like RSAES-OAEP _can't_ be used for _disk encryption_ as such, because of the ciphertext expansion.
Comment: In fact, I think I will migrate to Crypto - where they are much smarter than me about this topic!
Comment: @kelalaka Indeed, that's yet another reason why it's a very convenient mechanism for exchanging keys - neither of the sides needs to know the other sides private information. But in other cases, this may be undesirable, and in most cases, unnecessary.
Comment: @Luaan The [holy grail](https://en.wikipedia.org/wiki/Homomorphic_encryption) of Cryptography is based on Asymmetric cryptography
Answer: The cold boot attack can be performed on any encryption scheme as long as the keys reside in memory. For full-disk encryption (FDE) with symmetric algorithms like AES, you will need to take the key out from the TPM, where you will be susceptible to a cold boot attack.
Though the TPM is capable of RSA encryption and decryption, for FDE RSA has problems, in short the speed:

RSA must use the OAEP scheme to be secure which reduces the message size.
To speed up public key encryption the public key is selected as 3, 5, ... However, the decryption to access one block will be much slower even if you use CRT to gain 4x speed.
Even though the TPM can perform RSA encryption on the chip, it will be much slower for Full Disk Encryption (FDE).

Therefore, TPM-based FDEs use TPM for key storage.
Comment: This is the correct answer, and the only one which does not perpetuate the myth that a TPM device itself performs disk encryption or that it somehow mitigates cold boot attacks.
Answer: TPMs do not perform the actual encryption used for full disk encryption. All they do is encrypt the key while the system is powered off or in a suspended state. The key is decrypted and passed once to the operating system over the LPC bus, which then keeps it in memory while encryption is performed. The reason a TPM would be a poor choice for securely accelerating full disk encryption is threefold:

The TPM communicates over the extremely slow LPC bus (4 bit width at 33 MHz).
The TPM hardware is generally very slow, being designed for security, not speed.
TPMs are not general-purpose encryption coprocessors that take arbitrary keys.

If you really wanted to use it to perform the actual encryption in a way that would mitigate cold boot attacks, you would need to pass the plaintext (or ciphertext) from the disk to the TPM over the LPC bus to encrypt (or decrypt) it, then pass the ciphertext (or plaintext) back over the LPC bus to the computer. This process would be an extremely slow way to avoid cold boot attacks, and would likely be easy to bypass given the ability to tamper with signals on the LPC bus (the TPM would be a decryption oracle!).
Although you could in theory use RSA for bulk encryption, provided you used proper padding like PKCS#1v1.5 or OAEP, it would expand the message (ciphertext would be larger than plaintext), and it would be extremely slow and inefficient. Despite what some other answers have claimed, it would not be insecure when a proper padding scheme is used, but it would be a silly and inefficient use of RSA.
Comment: I'd say that the frequent use of RSA with a static private key (for decryption) would probably be more susceptible to side channel attacks than AES. It would of course be dependent on the implementation specifics, but I'd rather put my cards on AES...
Comment: @SqueamishOssifrage Indeed. It could not be used as a drop-in replacement for a block cipher. Although the implementation would not be elegant in the slightest, it would be _possible_ and could be made secure.
Comment: Not merely inefficient, but it would be difficult to make it resemble the block characteristics of the underlying device.  Any ciphertext expansion, which is a necessary feature of any RSA-shoehorned encryption, would violate OS and application [assumptions about atomic or linear writes](https://sqlite.org/atomiccommit.html), requiring another layer in the middle.  Avoiding this requires qualitatively changing the premises, from sector-by-sector disk encryption (which is essentially transparent) to what is essentially a file system in its own right.
Comment: @MaartenBodewes Yes, with one of my half work, I could easily extract keys from OpenSSL. The library implementation, as you noted, really determines the attacks success ratio.

Why does BitLocker not use RSA?


How do bitcoin clients update after downtime?

Question: If a bitcoin client goes offline or misses a new block, what is the process of finding the current, main blockchain? And how does bitcoin ensure that updates to the blockchain will be propogated to each device connected to the network (i.e. to make sure connected nodes never have a missed block in the ledger?) Does it somehow recursively backtrack from the next broadcasted block's reference to the previous block? And then how does it ensure that the current chain broadcasted is an addition to the main chain, rather than some fork? For example, if the client connects to the network and receives a block of given height, how does it both know that it has the most work of any chain, and that the local copy contains all blocks in the chain?
Comment: have a look here: https://www.transifex.com/bitcoinbook/mastering-bitcoin/languages/ Andreas book "Mastering Bitcoin" has already been translated into many languages, and serves as a very good start into the matter. There is also an online (english) version of the book. The answer(s) to your many questions would bee too much... This forum is intended to raise simple questions, one by one ...
Comment: @pebwindkraft thanks for the resource! I'm really wondering just the general process of how clients get new blocks after downtime. Everything else is surrounding that concept. I couldn't really find anything else online that answers how the client gets changes to the main block chain.
Answer: Peers of the node will tell the node the height of their longest blockchain, and if this is greater than what the node currently has stored, it will request the missing blocks from that node (to validate and store them). Also, if a node is on the network and receives a new block, it will look at the hash of its parent and decide if it has the parent already or not. If it doesn't have the parent, it will ask its peers for it. That way it will eventually download all the blocks it is missing and be up to date again
The node will keep track of how long each fork of the blockchain is, and will use the longest one it finds which it considers valid. If a long fork appears which the node thinks is not valid, it will show a warning that either the node is out of date or the peers are.
Comment: Great explanation! Thanks! Could you explain more by your last sentence?
Comment: If a chain looks invalid to a node, but its pretty long, it'll wonder why the network keeps extending it, because the network should drop invalid blocks. So if it is above a certain length, the node will give a warning to the user, because the most likely reason is a hardfork which requires a client software upgrade


Can a beer be carbonated during primary or secondary fermentation?

Question: Is it always necessary to carbonate your beer with sugar or tablets or is it possible to get the right amount of carbonation with the primary and secondary fermentation?
Answer: In short, no, not if you're using an airlock. You need pressure to reach the levels of carbonation required. With an airlock, you only get atmospheric pressure, so the pressure inside is the same outside.
Carbonation is measured in volumes of CO2. 1 Volume of CO2 is the same volume of CO2 as beer - 2 volumes would be twice the volume of CO2 as beer at atmospheric pressure.
At atmospheric pressure, fermenting with an airlock, you get about 1 volume of CO2 dissolved, yet common beer styles require 2.0 or more volumes to be considered carbonated - 2.4 vols is a common figure. To get more than 1 volume you need pressure. This is why carbonation is normally done in the bottle or keg where the required pressure can be maintained.
If you were fermenting in a pressure-capable vessel, such as a keg, then you can pressurize the CO2 produced during fermentation. You use a spunding valve and crank up the pressure towards the end of primary to increase the pressure inside the keg to the required level for carbonation - 12-15psi is common.
Comment: If you ferment under pressure, you'll also need to bottle under pressure using a counter pressure bottle filler. Otherwise you'll end up with bottles of foam. Also remember that the pressure required for a given volume of CO2 is higher at room temperature. To get 2.4 volumes at 70 f. requires 25psi.
Comment: Good points Tobias. Alternatively, if it's fermented in a keg, you can serve directly from the keg (with a shortened beer pickup tube) or transfer/filter to a clean keg under pressure.
Comment: I suspect that reaching your target carbonation in primary/secondary could drop your pH low enough to affect the fermentation.  Carbon dioxide dissolved in water is carbonic acid, and I've measured its effect on the pH in my wine and mead musts.  As I understand it, pH is rarely a concern in worts because you have plenty of buffering compounds.  Elevating CO2 to serving levels may overcome those buffers.
Answer: You could do without priming, it's just not practicable. If you have a quick fermentation sample and know what the final gravity will be, you can check on the fermenter every couple of hours and when the gravity gets close enough to the FG, you bottle. In German, this is called Grünschlauchen.
In real life, your need for sleep, a day job, social interactions, and such will probably make this difficult.
Answer: In the "bad old days" of homebrewing, beer was carbonated by bottling before fermentation was complete.  That allowed it to carb without adding any additional priming.   It also led to many exploding bottles.
Answer: In my very brief experience, CO2 released during primary fermentation is lost from the airlock.  The pale that I just bottled was effectively flat after two weeks in primary with a three-piece airlock.  (Or maybe I'm Doing It Wrong.)
Comment: nope, you're doing it right! That's why you need some way to build up the pressure.
Answer: Actually you can. You just need to know the final gravity of your beer. This could be done by attenuation limit test (you take sample of your beer and add good amount of fresh yeast and let it ferment quicker by shaking, keeping in top region of fermenting temperature) see instructions here: http://www.brewwithfermentis.com/2010/11/29/attenuation-limit/ just shake it as frequently as possible and keep it in good temperature and you should get your result quickly. Then you measure SG of your fermenting beer (it is slowing down when it is reaching FG). You could even slow it down by lowering the temperature to the low regions of fermenting temperature (ie. if you are not sure you will be around). Once your desired gravity is reached, crash cool to 7 deg C (for Ales) and leave it for few days to settle. Then bottle/rack and leave bottles/casks in room temperature for few days, yeast will "wake up" and ferment residual sugar and create natural cask condition.
General rule of thumb is botttle/rack when SG reaches 2-4 points above attenuation limit. Precise calculators could be found on internet. Temperature control is a must, but you can just get any old freezer and temperature control device from eBay - with this you can keep any temperature you want (21 deg C, 7 deg C whatever) in your freezer, both will cost you less than 60 quid and you will be able to produce much better beers.


That which is necessary is moral?

Question: "That which is necessary is legal" is a doctrine practiced by sane states, so I would like to believe.
What has been said about "That which is necessary is moral"?
Comment: Hi, welcome to Philosophy SE. Yes, more concrete questions are appreciated because they help devise more focused and useful answers.
Comment: Depends on what you mean by 'necessary'.  Morality has to do with choice.  If choice is not involved, than it isn't even in the domain of morality.
Comment: @kbelder I mean: If there is a general consensus among human beings that if a person X doing a certain action Y is "necessary", will it follow that there is a general consensus among human beings that person X doing certain action Y is "moral" ?
Answer: There is an inherent back pressure that comes from a doctrine like this.  "That which is necessary is legal" presses back on the definition of "necessary."  If there is a strong desire for an act to be illegal, there will be a corresponding strong desire for that act to be deemed "not necessary."
If you apply this logic to "That which is necessary is moral," the backpressure gets extraordinarily strong.  Questions of "is it necessary to remain alive?" arise.  Consider the Samurai: in many situations the only moral course of action they had available was to commit ritualistic suicide.  They did not have the luxury of assuming that living was a necessity.
However, it does lead in an interesting direction to explore.  This quote feels very similar to the attitude that there is always a moral path to follow, no matter how far one has strayed.  Doctrines can be slippery at times.
Answer: You have to be a bit careful in philosophy when tossing around the word necessary. Philosophers, like kleptomaniacs, take things literally. :)
However, in context, "That which is necessary is legal", or Quod est necessarium est licitum is actually a tenet of what's called the necessity defense that is recognized as common law and is in most states' statutory law. And what it means is:

Sometimes, in a particular situation, a technical breach of law is
  more advantageous to society than the consequence of strict adherence
  to the law

Something we all commonly encounter on the news without really considering it too often. An example - killing in self defense. In most examples of the necessity defense, an argument based on common good, or significant, unavoidable harm is given as the basis for necessity.
So, your question essentially boils down to this (if I understand you correctly):
Do any theories of morality have a similar clause: At times, doing the most moral thing requires acting immorally?
The answer is, yes, though there might be some wiggle room in terms of what's defined as moral, immoral or amoral on a case-by-case basis. The necessity defense would fall under the umbrella of utilitarianism in terms of ethical theory. An oversimplification of utilitarianism might be stated as:

"One should do whatever maximizes the total or average welfare of
  society"

Or, using the example of self-defense, "that which is necessary, is legal/moral" could be restated as:

"when one is facing imminent harm, it is in society's total or average
  best interest that one defend one's self with equivalent force and in
  such circumstances killing may be considered a moral or amoral act."

Hope this helps.
-Wah
Answer: Emile Durkheim, a prominent French sociologist and philosopher, disagrees with you, and the original Roman saying:"Deviance serves major functions to society according to Durkheim; it affirms our cultural values and norms and clarifies moral boundaries. It also promotes social unity and encourages social change. A society without crime is an ideal place for many, (so they may think.) However, a society without crime is society without any progress". So crime is necessary, and illegal.
The same applies all the more to morality. As St.Augustine put it, "the canvas of creation requires both the black and the white paint". The evil is immoral, but it may be necessary, to provide "diversity" or free choice for example. See Is God either immoral or not omnipotent? and How does free will defense of God's benevolence work?
Answer: If a proposition p is moral just in case it ought to be that p, then the principle that what is necessary is moral is adopted in normal philosophical deontic logics in the sense that if q is a thesis of the logic then also it ought to be that q is a thesis of that logic.
Answer: Whether morals are absolute or relative, as far as we know they are relevant only in a human context. We don't expect nature to "act morally", nor have other sentient beings been found from whom we could expect so.
But to be able to act morally, humans need to live, and living entails certain necessities. Thus the relationship between morals and (vital) necessities should be described not as necessity implying morality, but as "necessities being satisfied" being a requirement for concepts like morality and ethics to even make sense.
Comment: "But to be able to act morally, humans need to live" - is that necessarily true? There are instances of humans sacrificing themselves because they think that's the more moral choice.
Answer: I always hate introducing folk-tradition stuff here, because I cannot attribute any of it.  But this seems relevant to the question in a broad sense.  This basic notion seems to have been known to Kant, since he uses one branch of it "ought implies can" in lectures.
There is a sequencing to the basic modalities, sometimes expressed in a little box containing the modal and mode-like verbs

ist -> muss -+-> soll --> darf -+
             |                  |
             +-> will --> mag --+-> kann --> weiss

Or in English:

consistent -> must -+-> should -> may --+
                    |                   |
                    +-> will --> might -+-> can --> conceivable

It kind of gives an informal excuse for the odd relationships between the conjugations of these specific eight verbs, and it captures some essential concepts of the relationships between different kinds of modal statements.
In every case "box" --> "diamond"

  consistency -> conceivability (= non-inconsistency)
  must -> can (= not mustn't)
  should -> may (= not shouldn't)
  will -> might (= not won't)

And the force of the modal construction comes in three tiers:

Essential reality determines
Accidental reality which determines
Political or personal reality: obligation or inclination.

In branch of concern to Kant is "soll -> darf -> kann -> weiss".  In particular, it is unfair to require and misleading to permit what is impossible.  And it is impossible to carry out what is not conceivable.  The former two have application primarily in law, and the latter with how one handles children or those of diminished capacity.
Answer: The relation between needs and public policy is not straightforward. Discussions about what people "really" need are hard to settle, and even if people agree that X is needed, a lot of questions concerning how to satisfy X and how important is to satisfy it, given that we also need A, B and C, have to be answered. Also, in some situations, there might be a conflict between satisfying need X and being just, brave or honest, and it's not clear that we should always put needs on top of these other values.
Since your question is tagged as a reference request, I highly recommend David Wiggins' "Needs, Need, Needing", available here, if you wanna delve into the topic of needs, "Claims of Need", also by Wiggins, is an excellent paper, but is not available online.
Your question is too open ended to give a meaningful reply. In a sense, every major brand of moral theory tries to tell you what is needed to make a better world, or to do the right thing, or to be a flourishing human being; but the notion of need seems to acquire meaning only after we decide which of these things are really worth getting.
Answer:
That which is neccessary is moral

This question can only arise in a situation where what appears to the right course of action is against normative moral considerations.
It's an appeal, in a sense to legislate new moral norms.
Kants answer to this is his categorical imperative; which is that a possible course of action in a situation is if this action can be considered as a general maxim of moral conduct; that is one thinks of oneself as a potential legislator for the community.
It is as though one submitted the situation at hand to some impartial judge who then legislates the possible lines of action for this and analogous situations binding on the whole community.
It's easy to see that this cannot go against what laws are already held.
It maybe this impartial judge might demonstrate that the situation allows of actions that do not go against already established norms, but that this might require more work; or that it actually opens up the possibility of a new positive norm that is to be welcomed rather than to be deterred from; or most likely it requires a minor modification.

That which is necessary is moral?


Punishment for mitzvos asey?

Question: Are you punished from Hashem if you don't do a mitzvah asey (brachos, davening, asher yatzar, etc.)?
Comment: related https://judaism.stackexchange.com/a/91008/759
Answer: Generally, no (with a couple of exceptions - failure to bring the Korban Pesach, or to undergo a bris milah - both of which are punishable by kareis).
However, the Gemara (Berachos 26a, Chagigah 9a-b) classifies failure to perform other positive mitzvos as מעוות לא יוכל לתקון - a crooked thing that cannot be straightened out. Or in the formulation of Tanya (Iggeres Hateshuvah, ch. 1), האור נעדר - the Divine "light," that should have been drawn down by the mitzvah-action, is missing.
Comment: Failure to bring the Pesach and not doing milah are the only two which involve kares. However, there are many others which are punishable in some way (and maybe even all of them). See, for example, S' HaChinuch mitzvah #1, "...and his punishment is very severe."
Comment: Not a punishment as much as incentive and encouragement, but see the Talmud quoted here: http://judaism.stackexchange.com/a/16656/603
Answer: It is clear from Rambam in Hilchos Teshuvah that teshuvah must be done for missing a positive commandment. The implication is that there will be some price to pay for not doing it. What that is he does not say...
Comment: @Yahu: There are two aspects to a positive mitzvah - obeying a Divine commandment, and accomplishing a positive act. Failure to perform the mitzvah, then, also has two aspects - disobedience and lack of accomplishment. Teshuvah is needed for the former, not necessarily because there is a price to pay, but simply because disobedience against Hashem is a pretty serious thing.
Comment: Isn't one obligated to bring a Korban Olah for failing to fulfill a mitzvas asey, e.g. going a whole day without Tefilin?  (Note that our questioner is mixing deoraysa and derabanans).
Comment: But is it an actual obligation to bring an Olah in that case, or is it just that it's the right thing to do, but there's no formal obligation?
Comment: If there is no price to pay how serious can it be?
Answer: There are different types of positive commandment with respect to punishment.
One type is obligatory on the person, such as wearing tefillin or saying shma.
Another type isn't an obligation upon the person, such as tzitzis, which is only obligatory if one wears a four-cornered garment, or mezuza, which is only obligatory on residents of a home. One can go his whole life without such a garment or home and never be obligated to do the mitzvah.
The Talmud in Menachos (41a) states that, for the latter type of mitzva, during times of Divine anger, one is punished for not having obligated oneself and performed the mitzva. Clearly, the first type of mitzva incurs penalty all the time.

Punishment for mitzvos asey?


Use phone keyboard to control PES on Android phone?

Question: I installed Pro Evolution Soccer on my Android phone but I can't find any setting to change the game control method to keyboard instead of the touch screen.
Is it possible to phone keyboard to control PES on Android phone?
Comment: If you try using something like a Bluetooth keyboard despite the settings does it still work?
Answer: I think there is no way of changing settings because most of the Android Phones are only touch screen and doesn't have physical keypad. Thats the reason for no keyboard settings in PES because the game package is built for common features, keeping in mind that most of the phone supports that and as i already explained only some android phones have physical keypad.


Upper Bound for Difficulty of Questions on Math.SE

Question: I know that there has been previous discussion about the inappropriateness of certain questions for mathoverflow.net, such as questions pertaining to elementary notions of compactness or differentiability.  So, in a sense, there is an established lower bound for the difficulty of questions for mathoverflow.net, but is there an established upper bound for the difficulty of questions for math.se?  Certainly, this is de facto the case, but is there a level of question which would be inappropriate for math.se based on the high level of difficulty or sophistication of the question? If there is not, should there be? It seems that it would be detrimental for certain high level problems to be posted on the site, and certainly not beneficial to the majority of users of math.se.
Comment: There is also an upper bound on MO. MO is not for known open problems.
Comment: 9${}{}{}{}{}{}$
Comment: Somewhat related question, on future potential migration of some questions to MathOverflow: http://meta.math.stackexchange.com/questions/4880/what-when-and-will-we-migrate-questions-to-mo-2-0
Answer: All mathematics problems are welcome here.  There is no upper or lower bound for what level question may be asked, and I do not see why more advanced mathematics would be "detrimental" to the majority of users.
In some cases, after receiving no answers, some users have then posted their question on math overflow.  In some rare cases where a questions was posted on both sites, the answer has actually appeared on math stack exchange rather than overflow.
Comment: Let me add a small comment to this: we do _not_ discourage hard problems from being posted here. But we _recognize_ that for questions related to current research, it is likely you will get quicker and more complete answers over at MathOverflow. And it is not just research mathematics. In the [FAQ](http://math.stackexchange.com/faq) we describe several cases where your questions _would be on topic here_ but may still receive faster and better responses elsewhere.
Comment: Also "better response" is subjective here.  It is possible that the same question would get a better answer *for that asker* here or at MO for different askers.
Comment: "All mathematics problems are welcome here."

From my experience, I really doubt that.


Is salad dressing fast food?

Question: So I'm doing a challenge where my friend says I cant eat the salad dressing ,as it like a junk food and junk food = fast food but since there's a difference between them. I wanted to know if salad dressing is a fast food or not.
Answer: I don't think junk food and fast food are always interchangeable. Some fast foods are healthy (salads, for example). I can't think of any right now, but I imagine there are foods that are made slowly but still have little nutritional value.
Anyway, focusing on salad dressing, I would not primarily consider this "fast food". Yes, it's "fast" in the sense that it's already made (assuming you're talking about ones you buy at the store) and it's "food" in the sense that you can eat it. But fast food is commonly associated with pre-cooked meals, pre-made ingredients, and mass-production. The typical example would be a burger.
I would say that salad dressing is a condiment:

A condiment or table sauce is a spice, sauce, or preparation (such as onions) that is added to food to impart a specific flavor, to enhance the flavor, or, in some cultures, to complement the dish. The term originally described pickled or preserved foods, but its meaning has changed over time.
  (Wikipedia)

Note that salad dressing is a sauce. You can also find salad dressing in Wikipedia's list of condiments.
Comment: Just because it's a salad (fast food or otherwise) doesn't mean it's healthy. Some salads contain [more than the daily recommended amount of sugar](https://www.eatthis.com/unhealthiest-salads/).

Is salad dressing fast food?


How do I install systemless SuperSU in Samsung?

Question: I'm currently using a custom Android 6.0 ROM on my Samsung Galaxy Note 3 SM-N900. I need to put suhide in my device and it need systemless SuperSU to be installed, Google didn't help me at all. Any of you guys know how to?
Answer: If you are using stock Android 6 and newer you can only have systemless root because of security restriction. So if you root your phone running stock Android 6, you will have systemless root.
Because you are using a Samsung phone it might be a bit more tricky. It could be that your custom rom has it's own su installation in the system partition. Then it's not systemless. To have a systemless root installation it's required to install su in the boot image. This requires your device's bootloader to allow flashing the boot image.
On most devices you can somehow flash the boot image by unlocking the bootloader.
For more information about what systemless root is have a look here.
Answer: Sometimes the need for a systemless installation of SuperSU is not detected by the installation script, to force this to occur follow the following steps.

Start TWRP 3.0 or higher on the device
Go to Advanced - Terminal
In the terminal, enter echo SYSTEMLESS=true>>/data/.supersu
Press Enter
Exit to the TWRP main menu
Flash the current SuperSU as per normal

When flashing SuperSU, you should see in the TWRP recovery log screen mentions of system-less installation and patching of the boot image.
Comment: @Yayy Systemless does not hide root from apps... That is done by suhide, rootcloak, or Magisk, but recent changes to SafetyNet (mandatory part of play services) have made it impossible to hide root.
Comment: My ROM is currently already rooted. Do I need to unroot before doing all these?
Comment: Guess I am confused... Why do you want systemless root? Some devices require it, others do not... There is no technical advantage of one over the other. But yes, you would have to fully unroot, then do this process. If your on a custom ROM it likely won't work though, have to go back to rom dev, if stock it should provided you are on Marshmallow or newer. Systemless root does not work on older Android versions.
Comment: Welp, ok. Guess I'm not able to install systemless root then. My stock ROM is Android 5.1.1, I just need systemless root to hide root form Pokemon Go lol. Thanks for your answer anyway :)
Comment: Wow ok, I'm gonna use my Ipad then :D


What animals, if any, have reproduced in space?

Question: Have any living animals successfully reproduced entirely in space? If none have, what animals have had the most complete reproductive cycles in space?
Comment: Related question [Is it possible to get pregnant through natural means in space?](http://space.stackexchange.com/questions/604)
Answer: The nematode, or roundworm, known as Caenorhabditis elegans, is able to reproduce fully in space from mating through development.
Though simple, the nematode is an animal and it is one of the most studied creatures on the International Space Station. I am not aware of any other animals that have been observed to successfully reproduce in space.
Here is the relevant portion of my source material (emphasis added):

ICE-First-Aging is one of several experiments that investigates the effects of space flight on a model organism in the nematode worm family (Caenorhabditis elegans) and aims to develop links to human physiology in space. The organism chosen for this study is known to be able to mate, reproduce and develop apparently normally during space flight.

Fruit flies have also successfully reproduced in space, and there was an attempt to study the reproduction of geckos in space--unfortunately, the geckos froze at some point during the flight.
Sources:

International Caenorhabditis elegans Experiment First Flight-Aging (ICE-First-Aging) - 02.15.14 - NASA
Russia confirms death of five geckos on space sex mission - The Guardian
Answer: Till now no animals have been successfully reproduced in space.In 1979 Russians carried out an experiment in space to find out whether rats can reproduce in space , in that space mission the rats showed no signs of copulation because of weightlessness in space.
Then Japanese
researchers artificially fertilized
mouse eggs with sperm that had
been stored inside a three-
dimensional clinostat, a machine that
mimics weightlessness by rotating
objects in such a way that the effects
of gravity are spread in every
direction. Some embryos were
ultimately implanted in female mice
and survived to a healthy birth, but at
lower numbers than a regular-gravity
control group because of the microgravity.
In answer to your second question three space experiments
were carried out by the Russian scientists by using aquatic invertebrate animals such as
Amphipods, Gastropods (pond
snails), Ostracods and Daphnia
(water flea) .
The first experiment
used a Space shuttle only and it was
a 10-day flight. The other two space
experiments were carried out in the
Space station Mir (Shuttle/Mir
mission), and the flight units had
been kept in microgravity for 4
months. Daphnia produced their
offspring during a 10-day Shuttle
flight. In the first Mir experiment, no
Daphnia were detected when
recovered to the ground. However,
they were alive in the second Mir
experiment. Daphnia were the most
fragile species among the
invertebrate animals employed in the
present experiments. All the animals,
i.e., Amphipods, pond snails,
Ostracods and Daphnia had survived
for 4 months in space, i.e., they had
produced their offspring or repeated
their life-cycles under microgravity
Comment: This answer will have to be updated (hopefully) later this year when they send fruit flies into space specifically to study their full reproductive life cycle — http://www.csmonitor.com/Science/2013/1125/How-fruit-flies-will-get-us-to-Mars
Comment: Would be nice to add links to primary articles...
Comment: To clarify: The Amphipods, Gastropods, Ostracods, and Daphnia all repeated their life cycles? Did this mean second generations reproduced on their own - that space born animals had viable offspring in space?
Answer: Japanese rice fish, Oryzias latipes, spent 15 days in 1994 abord the Colombia Shuttle where they reproduced: http://cosmo.ric.u-tokyo.ac.jp/SPACEMEDAKA/IML2/e/text/textcontents_E.html
The same species where brought aboard the ISS in 2012, http://www.nasa.gov/mission_pages/station/research/news/aquatic.html, with facilities for breeding - though I havn't found the results of that experiment.
Answer: The first animal that conceived her offspring in space was a cockroach named Nadezhda. She was one of many cockroaches on board the Russian satellite Foton-M 3 (September 14 - 26, 2007) After they were returned to earth, the one named Nadezhda became the first earth creature to produce young that had been conceived in space. Her 33 kids were healthy though their carapace had darkened in colour much earlier, in comparison with natural-condition cockroaches who develop that darker tone later in their life cycle. But the rest of the conditions and capacities of the cockroaches remained normal.Later it was reported that Nadezhda's grandchildren, born to one of the space-born insects, had given birth on earth to normal cockroaches, with a life cycle and development pretty similar to that of any other cockroach.
https://en.wikipedia.org/wiki/Nadezhda_(cockroach).
Here is a picture of Nadezhda and her 33 children.
https://me.me/i/nadezhda-a-cockroach-sent-into-space-by-russian-scientists-was-17491511
Comment: That's great, even cockroaches have permanent Wikipedia pages. What ever happened to fifteen minutes? https://i.stack.imgur.com/LoOeo.jpg ;-)