Why is MCU Thanos inferior to his 616 counterpart?

Question: In Thanos: Infinity Gauntlet, Thanos was extremely powerful with the Infinity Gauntlet, and would no way get severely injured by Thor's stormbreaker. With the IG, he knew what moves people would make before they made them, he was able to turn characters to glass and shatter them (Thor), turn people into essentially Legos (Nova), Shatter Vibranium with his fist (Captain America), turn Quasar's bands against him, and easily create another person who was nearly equal to him in physical strength. Also, the IG was not even remotely damaged when he snapped. Why was the MCU Thanos nearly defeated?
Comment: Not sure this warrants a full answer, but simply: Thanos being an ustoppable force of nature makes for a boring movie, doesn't it?  "Thanos kicks the crap out of everyone" doesn't exactly sell tickets.  Also, the Infinity Gauntlet is very much damaged after The Snap, as seen [here] (https://i.ytimg.com/vi/O5xYqJx2f_k/maxresdefault.jpg)
Comment: I was saying that in the comic the gaunlet was not damaged; I know that it was nearly destroyed in the film.
Comment: It sounds like you're really asking why the Infinity Gauntlet seems less powerful in *Avengers: Infinity War* than in the original *Infinity Gauntlet* mini-series. From the title, I would think you're asking about the relative power levels of the MCU Thanos and the comics Thanos *without* the Gauntlet.
Answer: I'm going to try to flesh this out into a full answer.  Lots of speculation ahead.
Bad Movie
As I stated in the comments, "Thanos Wrecks the MCU" makes for a boring, repetitive movie.  No one is going to want to see that (okay, maybe some people, but not enough to get green-lit by the likes of Disney).  A good movie needs to get audiences emotionally invested, but in order to root for an underdog, they need to have something going for them. The MCU accomplishes this by bringing Thanos close to the edge of defeat, showing us that it is possible for the combined efforts of the Avengers, the Guardians of the Galaxy, and others to defeat him.
Different Motives
Thanos in the comics is almost a different character.  His trail of destruction up to and including The Snap is to win the attention and affection of Mistress Death.  It's all rather...petty, really, but there are different constraints in comics.  You can take a long time to get around to your story arc.  You can drag out a fight for longer before your audience loses interest.
There is no Mistress Death equivalent in the MCU.  Thanos' underlying motives have been established differently - he sees himself as a savior, even if no one else does.  He considers himself the only one with the will to do what needs to be done in order to prevent what he sees as the collapse of civilization.  This is important, because in the comics Thanos loses because he doesn't believe he's worthy of power.  MCU Thanos has no such qualms that we know of - in fact it's almost the exact opposite.
The Snap and the Gauntlet
In the comics, Thanos retains the functional Gauntlet after The Snap.  In the movie, the Gauntlet is damaged, which probably serves two purposes.  The first is to make Thanos non-omnipotent again (he's already a formidable opponent in combat, with a still-functioning Gauntlet it would become "Thanos Wills the MCU Out of Existence" pretty quickly).
I'm speculating that it also removes the possibility of an "easy fix" for the heroes.  A damaged Gauntlet maybe can't undo The Snap with Another Snap, so now they have to figure out another solution.  It's possible that the damage will be revealed as something along the lines of "the infinity stones can't be used together again" - we have no real way of knowing.  But I believe the damage to the Gauntlet serves as a visual indicator that what Thanos did was a one-time thing.
Comment: There's another thing, he's killed off half the life in the universe, but give the universe a century or two and the population problems will be back to critical levels, surely he'll need to snap on a regular basis. I'm not sure Thanos has thought this through . . .
Comment: ... until he makes another gauntlet?
Comment: @BinaryWorrier There's no indication that it's possible to make another gauntlet.  Thanos didn't create the first one, and he crippled the Dwarf that made it for him after killing all the other Dwarf smiths.  In addition, making another gauntlet would be counter to Thanos' goal - he's achieved what he wants, why would he make the one thing that can undo his accomplishment?


How can i remove the milliseconds from date time in rails?

Question: I have to compare the date in rails to get the values after that date I have send the date as "2013-03-04T06:26:25Z"but actually the record in the db contains date as follows 2013-03-04 06:26:25.817149 so when i check with the date it also returns that record but i want records after that date. how can i remove the milliseconds from the db? please help me.
Comment: which DB are you using?
Comment: I am using postgres....
Comment: Or if you know that the time you're using to search with never has millisecond precision, just improve your query and query for records `>= time+1.second`.
Answer: I had a similar problem
Update your time object like this before sending it to the database :
time.change(:usec => 0)

Comment: Microseconds matter, esp. when you're testing. The database might truncate microseconds to predefined precision, e.g. Postgres makes it 6. Thus the value read back from the database **does not** match the value it was back in Ruby land, and you get a mismatch like: `-:completed_at => 2018-07-30 12:27:06.544967008 +0000, +:completed_at => 2018-07-30 12:27:06.544967000 +0000`. Easiest of all is to remove microseconds in values we're about to store. Then matching is okay and we don't have to work around this truncation issue.
Comment: Cant we be able to specify the format to save instead of doing this?
Comment: The format to save is defined in your database, it can be DATE, DATETIME, etc. Your ORM will convert the date to the right format for you. I don't know postgres, so maybe you can change the type to a less precise one.
Comment: No i am asking about setting some thing like strftime(%H%M%S) somewhere in the config so as to make the date to be saved as specified format.
Comment: You don't have to deal with the time format because your ORM does it. See about datatypes in postgres.
Answer: Since ruby 1.9 you can use round
t = Time.now.round
t.usec # => 0

Comment: `.round` _rounds_, it doesn't just remove the millis. So in the OP example, you'd get `06:26:25 != 06:26:26`
Answer: I was also having this problem, however when I was applying the change as indicated in @Intrepidd's answer, it wasn't affecting the microseconds of my time object.
Please note that (at least currently) the :usec key only works with the Time#change method, and not with the DateTime#change method.
The DateTime#change method ignores the keys that it doesn't accept, so you wouldn't be able to tell that your attempted change of the microseconds didn't work unless you inspected the object further (such as with DateTime#rfc3339(9)).
So before you attempt this change, make sure that you are working with a Time object, not a DateTime object.


How to connect subnet on second NIC to internet

Question: I tried googling for a while, but I can't put my problem to a good search query so I can't find an answer for what I'm trying to do.
Here we go:
I have 3 PCs that I'm trying to connect with my own subnet. One of them is already connected to an outside network and has internet connection.
Here's my configuration:

PC1: has two NICs,

eth0 has the DHCP IP 192.168.0.11, the gateway is 192.168.0.1, and DNS is set automatically to 184.108.40.206, 220.127.116.11, 18.104.22.168, 22.214.171.124. This is the outside network.
eth1 has the static IP 192.168.70.1, I set the gateway to 192.168.0.11 (the IP of eth0), I didn't set DNS.

PC2: has the static IP 192.168.70.2. Gateway is 192.168.70.1. No DNS.
PC3: has the static IP 192.168.70.2. Gateway is 192.168.70.1. No DNS.

Now the two networks work beautifully. I can ssh, ping, and whatever else I need to do except for internet. So my question is the following:

How do I set the gateway on PC1-eth1 so it forwards from the inner network to the outer one? my current solution doesn't work.
How do I set the DNS for PC1-eth1, PC2, and PC3? do I simply set it to 220.127.116.11 and the gateway will handle the DNS requests? Or do I have to setup a DNS server?!

All three machines are using Ubuntu 18.04.
Answer: After a lot of tiring search. I found this: https://help.ubuntu.com/community/Internet/ConnectionSharing#Ubuntu_Internet_Gateway_Method_.28iptables.29
Which describes how to do this type of forwarding between different networks through two NICs. Exactly what I'm looking for.


matlabs linprog too slow

Question: I am working on a matlab application for which I need much improved speed.  I am using linprog to solve a 2-constraint linear program with around 10,000 variables bounded by zero and one.  Linprog is extremely slow for my application.  Is there any way I can reformulate to improve speed?  Or do you perhaps know of some matlab-compatible shareware (I'm on a tight budget) that would be useful?
Answer: if you don't mind an implementation that is not in matlab but interfaced using MEX, maybe glpk and glpkmex can help
http://glpkmex.sourceforge.net/
Alternatively, lpsolve may be able to help also but it's not as good as glpk library for large scale problems:
http://web.mit.edu/lpsolve/doc/MATLAB.htm
If you can get your hands on it, IBM ILOG CPLEX is actually one of the best for large scale problems. There is an interface to matlab (http://www-01.ibm.com/software/integration/optimization/cplex-optimizer/connectors/), and you can try to get an extended trial version if you do not have a licence.
In special cases it may be possible to simplify your problem significantly by looking at the coefficients in the objective function and determining which constraint will be active depending on what your constraints are.  Variables which do not participate in active constraints can be set at either min value or max value (0 or 1, as per your description) depending on whether their coefficients in the objective function are positive or negative , assuming you are minimizing your objective function. If you're doing maximization then do the reverse. This shaves off the number of variables =).
Answer: Sounds like a linear program with box constraints (may be called bound constraints) to me. Have you set those box constraints properly? See the reference for more information.

matlabs linprog too slow


Do i have to pay for games not installed on my ps4?

Question: I bought Minecraft on my PS3, and have recently upgraded to a PS4. In my library on the store, it lists Minecraft as not installed, but when I go to install it, I have to pay for it. What is the problem, and is there any way to get around this?
Answer: Minecraft on PS3 and PS4 are two different games, so while you may own the PS3 version, you will have to pay again to get the PS4 version. Only games that support "Cross-Buy" can be bought once and played on different systems, but you will have to read up on what the game supports on the PlayStation Store.
Cross Buy games will usually have tags for [PS4] [PS Vita] where the game is supported on multiple platforms. Unfortunately, Minecraft is not one of them.
Answer: I don't know about Minecraft specifically, but the only PlayStation games that would allow you to do this would say in the game's description that you get both versions when purchased. Most such titles are for console and portable versions, I'm not aware of any PS3/PS4 ones. So, either buy the PS4 version of Minecraft or hook your PS3 back up.


Call sequence of viewWillDisappear of the previous controller and viewWillAppear of the next controller

Question: I wanted to know what is the correct sequence of method calls for viewWillDisappear of the previous controller and viewWillAppear of the next controller? I see sometime when we go from first view controller to second, viewWillAppear of second view controller will be called first and then the viewWillDisappear of the first view controller. And at times it is reverse.
Answer: I have made the same experience. Also this is different in ios4.x vs iOS5.x I found. So I ended up assuming that there is no pre-defined order.
Even worse when there is an AlertView involved....
Anyway, could you please explain why does it matter in your case?
Assuming you need to pass some kind of variable or textView content  you might do in an extended
<code>- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil withMyData:....
</code>


Linear voltage regulator dropout voltage

Question: I have a question regarding on linear voltage regulator. The pass element in the linear voltage regulator can be NPN or PNP transistor. If a Darlington pair is used as the pass element, the dropout voltage will be Vsat+2Vbe. Is that because the PNP is in saturation mode and the NPN is in active region? I'm having a hard time to analysis the transistor. Why not the dropout voltage just Vsat of the NPN?
Comment: The main reason is hFEdrops to 10% or Ic/Ib=10 whichever is better thus efficiency
Answer:
Why not the dropout voltage just Vsat of the NPN?

As Transistor said, saturation requires driving the base at a higher voltage than the collector, which means higher than the input voltage, which is not possible unless another higher supply is available.
It would not be desirable anyway, as a BJT close to saturation has quite awful characteristics, it becomes very slow and its capacitance increases, which means the regulator's transient performance would become poor. If the transistor is fully saturated, then the regulator is no longer regulating anything.
It is possible to do it with a NMOS if a higher supply is available, which can be done with a charge pump. Some LDOs exploit this. In this case, when dropout voltage is low the MOS works in "variable resistor" mode which is also slower than normal follower mode, but still usable.
Answer:
If a Darlington pair is used as the pass element, the dropout voltage will be Vsat+2Vbe.  Why not the dropout voltage just Vsat of the NPN?

Lets say that you have a 5V linear regulator with an NPN Darlington pair series pass transistor. In order to get 5V at the output, the transistor must be driven properly. By properly, I mean the Darlington pair must be supplied with an appropriate base current in order to bias it to supply 5V at the output.
Now look at the arrows in the datlington pair's symbol. It tells you the direction of current flow through the transistor. The base current flows from the base to the emitter. So if a base current must be supplied to the darlington pair, a voltage must appear at the base of it that pushes some current from the base to the emitter; a base voltage that is 2*0.7V greater than the emitter voltage will push current through the base emitter junction of the transistor, thus biasing it.
So if the output voltage is at 5V (which is obtained from the emitter of the transistor), the base drive voltage should be able to go up to at least 5V + 2*Vbe to drive the transistor.
Now that we have got our 5V, we are obviously going to connect a load to it, right? When the load draws current, the current has to flow through the collector to emitter path of one (the outer, let's say) transistor. This voltage drop adds to the overall dropout voltage of the voltage regulator. That is how the dropout voltage turns out to be 2Vbe + Vce(sat).
Lets look at an example. Lets say that a darlington pair has a Vbe of 1.5V and a Vce(sat) of 0.5V at 1A of load current. Then, you will need to supply atleast (5 + 1.5 + 0.5)v, or atleast 7V.
Comment: The Vcesat there is the minimum voltage required to drive this PNP, as the current increase the Vce will also increase. Is that correct way to understand?
Comment: Yes, Vce increases with the current. You must first decide how much current you want your regulator to output, then make all necessary calculations
Answer:

simulate this circuit – Schematic created using CircuitLab
Figure 1. A Darlington pair driving a 1 kΩ load.

Q1 can't be driven into saturation which would require the collector voltage to drop below the base voltage. It can't because the base and collector are directly connected.
For Q2 the situation is even worse as the base voltage is 0.6 V or so below Q1's base voltage.


What emblems can you earn in ranked League games?

Question: The new ranked system in League involves, among other things, emblems that can be earned. The only two I've seen thus far are for winning 3 games in a row, and playing more than 100 games. What other emblems can be earned?
Answer: There's also one called "Recruit", for when you first join a certain league:

I'm not aware of any others.
Also, since there appears to be some confusion, the Veteran emblem is awarded when you have played 100 or more games in the same league.  Moving up and down divisions (i.e. from Silver IV to Silver III) doesn't change what league you are in, so this emblem is effectively for playing 100 games in the same rating tier (Silver, Gold, etc.).
Comment: There isn't even one for 10 win hotstreak, which is dumb, because I actually achieved it in silver and wanted a different emblem :P
Comment: Wait, isn't the Veteran emblem only ment for a division? Doesn't the emblem get removed when you go from Silver IV to Silver III?
Comment: @Joetjah No, it's for a tier.  FYI: you can give him the bounty, there's only 3 emblems.
Comment: Im fairly certain these are the only ones currently. I always feel bad for that person with the veteran emblem XD
Comment: @Ravekner I have the veteran emblem!  It's taken me over 100 games to get from Silver IV to Silver I, I'm not too ashamed of that.
Comment: Ah. That makes a little more sense I suppose. I had always assumed it was people that had been stuck in the same tier like silver IV with a veteran emblem. But if you can get it for being in all of silver for over 100 games its not so bad.


API credentials visible when creating Github pages website?

Question: I am in the planning stages of creating a rmarkdown website and publishing it using Github pages. The actual content of the website will be a
flexdashboard or a Shiny app(still deciding). Regardless, I want to be able to use publicly available APIs in this application. Some of these APIs require public and private (or secret) keys to access. I obviously would prefer to not have my secret keys displayed in the source code on Github. Is there a way around this that does not involve purchasing a private Github account? I am sure people have run into this issue in the past, but I have not been able to find a sufficient answer. I am not well-versed to application security whatsoever, so any help would be appreciated.
Comment: this is really a question for GitHub support or GitHub Pages forums
Comment: @schroeder my mistake. Was a little unsure if this was correct place for my question. You can delete or put on hold or whatever
Answer: GitHub Pages is designed for hosting public websites, and it's great at doing that.  But as soon as you want to start keeping certain things private, it falls apart as an option pretty quickly.  Even if you have a private repo, GitHub will still serve all the files to the public - no authentication needed.
For this sort of situation, you want to use something other than GitHub Pages.  Which service specifically is not in scope here, but any hosting service that gives you a bit more control will work; you'll just need to run the Jekyll build process yourself and then publish the resulting HTML to your host.


Absolute path to stylesheet_dir/images/my_img.jpg does not work?

Question: I am manipulating an img element in functions.php using jQuery by changing the src attr on hover. How do I make so the absolute path works? Currently, when I view the image directly in the browser it brings me to 404 page. Relative path doesn't work either.
Answer: i always start every theme w/ some constants
`
define('THEME', get_bloginfo('stylesheet_directory'));
//or you could use this one:
//define('THEME', get_stylesheet_directory_uri());
define('IMAGES', THEME . '/images');
`
and some others, but the point is that at any place in my code i can point to my theme's image folder
<code>
img src = "<?php echo IMAGES . '/image.png';?>"
</code>
Comment: Yah that's another way of getting the relative path. But like I said it doesn't work. But if I host the image in another site and use their link, the img displays fine. Maybe it's because of thematic theme? I know I could just switch to another theme to find out but I don't want to break things as of now.
Comment: doubt it is a thematic issue, i use this w/ thematic all the time.  should produce a link like http://mysite.com/wp-content/themes/mytheme/images/image.png which isn't a relative link.

from codex on get_bloginfo
'stylesheet_directory' - Returns the stylesheet directory URL of the active theme. (Was a local path in earlier WordPress versions.) Consider using get_stylesheet_directory_uri() instead.

so you could
define('THEME', get_stylesheet_directory_uri());

what do you get in your markup (view source) for the image source. that is more telling than  "it doesn't work"
Comment: You are right it works! Maybe I was too sleepy yesterday! :-) Now the problem I am facing is how to do that with jQuery but that's a different question already. Thanks!
Comment: if you inject your jquery in the header or footer you can still process the php.  if you have it in a js file that won't work.  >>>

var src = ""


How do Shrinkage Methods change flexibility of a model?

Question: While working through An Introduction to Statistical Learning, I had difficulty clarifying how flexibility relates to Ridge Regression and Lasso. I recognize that both impose penalties on the coefficient estimates using either L1 or L2 norms, but how do they ultimately affect the flexibility of the model?
Comment: It's not completely clear what you mean by "flexibility". Can you perhaps provide a relevant quote from the textbook?
Comment: Ridge regression's advantage over least squares is rooted in the bias-variance trade-off. As λ increases, the flexibility of the ridge regression fit decreases, leading to decreased variance but increased bias.

This was the original textbook statement that I found relating ridge regression and flexibility.
Answer: The term "model complexity" or "high variance model" are abstract statements to say the model has "many parameters" and can do some complicated tasks (regression or classification). For example, a linear model is not as complex as a 5th order polynomial model.
Here I will explain why we need shrinkage/ regularization first then explain why adding L1 and L2 norm constraints can reduce the model complexity.
Part 1.
Suppose you have some data, the data is not complex, do you want fit it with a simple model? Or fit with with a complex model but regularize it.
Please check following demo I am fitting a line, 2nd order, 3rd order, and 5 order polynomial to same data. You can clear see, a line is under fitting and 5 order is over fitting. A good fit may be a 3rd order.

BUT, I can do 5 order with regularization / shrinkage !! The following curve is 5th order, but with regularization. you can observe we controlled the over fitting and the model complexity close to 3rd order, but more "flexible" than 3rd order at same time not too over fit.

The idea is using complicate model with regularization would be better than using simple model, in many modern data.
Part 2.
Intuitively you can use the "degree of freedom" idea to think about why adding L1 or L2 constraints can reduce the model complexity. Please check following 2d example, without constraint the weights can be any value, but with L2 constraint, the weights must be in a circle and with L1 constraint (shown in green), the weights must be in a diamond (shown in red).
Now come back to the polynomial fit example, for 5th order model, there are many parameters, but we limit the values of the parameters to be certain range. That is why the model can act as simpler model.
Comment: But what is your answer to the question of the original post?
Answer: LASSO and ridge regression are typically written in the Lagrangian form, with a penalty on the $l_1$ or squared $l_2$ norms. But, there's an equivalent form with a constraint on the norms instead of a penalty. For ridge regression:
$$\underset{w}{\min} \|y - Xw\|_2^2 \quad \text{s.t.} \quad \|w\|_2^2 \le c$$
For LASSO:
$$\underset{w}{\min} \|y - Xw\|_2^2 \quad \text{s.t.} \quad \|w\|_1 \le c$$
We can interpret these constraints geometrically, by thinking of the weight vector as a point in the space of all possible choices of weights. In the case of ridge regression, the constraint $\|w\|_2^2 \le c$ means that the weight vector $w$ is restricted to lie within a hypersphere of radius $\sqrt{c}$. Similarly, the $l_1$ constraint in LASSO means that the weights are restricted to lie within a polytope whose size scales with $c$ (the vertices of the polytope lie along the axes and $c$ gives the distance of each vertex from the origin).
Informally, a more flexible model is able to represent a wider variety of functional forms. Each form corresponds to a particular choice of parameters. For LASSO and ridge regression, we can see that the set of allowable parameters shrinks as we decrease $c$, because the hypersphere/polytope becomes smaller. Decreasing $c$ corresponds to increasing the penalty term (often called $\lambda$) in the Lagrangian form. Therefore, tightening the constraint (or increasing the penalty) corresponds to decreasing the model flexibility.


How I can change configuration of HttpMessageHandler from Polly retry?

Question: I have the following issue. I have a proxy set. If a request via proxy very slow or has crashed I would like to try again without proxy.
For setting proxy I have the following code in the Startup.cs file:
services.AddHttpClient<ICheckPackagesService, CheckPackagesService>(x =>
{
    x.Timeout = TimeSpan.FromSeconds(10);
}).ConfigurePrimaryHttpMessageHandler(() => new SocketsHttpHandler
{
    Proxy = new WebProxy(IpService.GetIp())
});

But I can't imagine what I have to do for sending new one request without proxy (if the previous one has crashed of course!). A fast research in the official documentation gives me nothing.
Please, share your experience for this case. Thank you!
P.S. I use .NET Core 2.2.401.
Answer: You cannot change the any of the properties of HttpClientHandler or assign a new version of HttpClientHandler to an existing HttpClient after it is instantiated.
Therefore you cannot use a Polly retry policy configured via HttpClientFactory to call via a new proxy (Polly policies configured via HttpClientFactory are applied as a DelegatingHandler within HttpClient).
As stated in the first link, use named clients defined on IHttpClientFactory instead, and define a named client for each proxy endpoint.


Back of the enveloppe forward irs pricing

Question: trying to have a back of the enveloppe way of working out generic forward starting swap rates like 2y2y or 5y3y to put in a spreadsheet without too much loss of accuracy. Whats a good way to look at it / work it out for exple 3y2y?
Thanks all!
Answer: Swap rates are essentially weighted averages of forwards. If you have a swap curve ready at hand then you can calculate the forwards as follows.
$$term = head \cdot tail \Longrightarrow (1+\frac{r_1}{f})^{f t_1} = (1+\frac{r_{t_2}}{f})^{ft_2} \cdot  (1+\frac{\color{red}{r_{t_3}}}{f})^{ft_3} $$
where $f$ is the fixed leg payment frequency, $t_i$ the time to maturity for each component and $r_i$ the fixed interest rate.
So if we take your 5y3y example, we would have $t_1 = 8$ (term), $t_2 = 5$ (head) and $t_3 = 3$ (tail, i.e. our forward rate). Since you have the spot starting swaps you only have one unknown variables, $r_3$ which is the forward rate starting in 5y and maturing in 8y from today. Approximately, for EUR we'd have an 8y rate of -3.2bp, 5y at -1.6bp and payment frequency is annual. The rest is just simple algebra.
Here's an example in Excel:
<code>=100*(((1-0.00032)^8/(1-0.0016)^5)^(1/3)-1)</code>


I want to make straight spaghetti

Question: I want my spaghetti to lie straight and flat on the plate. How will I cook the noodles without getting them all tangled up? Can I bake them in a bread pan with sauce and meat?
Comment: This will get difficult when you intend to serve the spaghetti on a different plate than the pot/dish you cooked them in, as they will bend during transfer unless you severely undercook them. Can you elaborate on what exactly you want to achieve?
Comment: @JohnW. you might be able to parboil just enough to soften, then arrange them in something reasonably solid, like some forms of lasagne that can be sliced into portions and hold their shape, however those tend to be cut up cold and reheated
Comment: I wonder if it would work to put the ends of the dry spaghetti in some kind of flat clip and then cook it with that. You could then pull them out of the water at the clip, let them hang down from it and comb them.
Comment: @Philipp a clip would likely lead to the place where they were clipped to be undercooked, as the boiling water couldn't get to the pasta.  You could cut the ends off at the end (just cut them free from the clip, rather than releasing it), but I'd also be worried about the pasta clumping together as it cooks, as it can't freely move around as it swells
Comment: Out of curiosity, what's the reason you'd like straight spaghetti?
Comment: Presentation! What else could possibly be new with my favorite food?
Answer: To add to the existing answer. The easiest method would probably be to bake the spaghetti.
If you cook the spaghetti in a casserole in the oven instead of cooking them in a pot of water, they get less tangled and stay straight. You can take them out with a spatula which should help them stay in shape.
I found this article/recipe that follows a couple of simple steps to make baked spaghetti without stirring them (so that they don't get tangled up) and also provides a picture of the result.

Coat the spaghetti with olive oil. Since you will not cook the
spaghetti before placing it in the baking dish (added: and put them
straight into the casserole and not toss or turn them during the
process), it's important to coat the spaghetti with olive oil to
make sure it doesn't stick together while baking in the oven.
Salt the spaghetti before it bakes (added: and add the other ingredients). Just as it's important to add salt
when cooking spaghetti traditionally, it's the same idea when baking
spaghetti. Add the salt right to the pasta in the beginning for best
flavor.
Make sure to use enough liquid for the spaghetti. These one pan meals
can be tricky to measure the right amount of liquid for pasta. But in
general 4 ounces of pasta will take about 1 cup of liquid. I like it a
little saucier, so I use 5 cups of liquid for 16 ounces of pasta. A
good rule of thumb is to make sure there is enough liquid to cover the
pasta in the baking dish.
Comment: A 9x13 pan would probably work for this (you want it a bit longer than the dry pasta, as it'll lengthen as it swells).  But I'd still recommend the tongs — you can grab them at the end, and let gravity work.  A spatula would require getting under the whole length of you didn't want it to droop off the ends. Two spatulas might work, but you'd have sag in between (and it'd likely slide off; you'd need to leave pasta dangling at the ends to counteract the pulling from the sag in the middle).  Or fry to find a suitable vessel so you can bake & serve in the same dish
Answer: Spaghetti is flexible and only gets tangled if you mix it around a lot. Use as large a pan as you can and don't stir the pasta around unduly.
Remove it from the pan with tongs rather than straining it in a colander, and arrange is as you wish.
Comment: Tongs were my thought, too.  It also helps to not overcook it, so it doesn't start sticking to itself once it's out of the water.  And I like to fan it out as you're putting it in the pan, as just dropping it in as a bundle risks it clumping together as it cooks
Answer: If you want to bake them in a bread pan, you probably could just assemble the whole thing (sauce, .... ) with the pasta uncooked or just parboiled a few minutes.
A little bit like lasagna or ziti.

I want to make straight spaghetti


My framerate in Feed The Beast: Endeavour is awful, even though my PC is good. What can I do about this?

Question: I have a decent enough PC (8 GB of RAM, i5 6600K, Radeon RX 570) that should be able to handle Feed The Beast: Endeavour fine, but my FPS jumps around between 5 to 10 FPS. What can I do about this?
Comment: I agree with Topcode. When I had a PC equipped with a i7 6800k, 16GB of RAM, and a GTX 1070, I was only able to get 30 to 40 fps with FTB/heavily modded Minecraft. That PC specs is, sadly, not decent enough.
Comment: Just my opinion, and I'm not trying to be rude (my computer has very comparable specs) but I don't know if these days those specs are exceptionally good, especially for modded Minecraft, which can get pretty hard you your computer pretty fast.
Comment: This is not an answer on it's own, but make sure you don't over allocate memory. Go with the amount the pack recommends. Giving a pack 16GB of memory, if all it needs is 4GB can lead to problems, such a micro-stutters.
Comment: @Topcode I wrote the question as if it was my perspective just to make it sound good, but in reality what happened was that I was going to play FTB with my girlfriend, and her PC (the one which specs are written here), had this atrocious performance. This despite that my PC, which is older and has overall slower hardware, had good performance. So while you may have a point, I don't think it makes my question invalid. My PC gets a stable 60 FPS in FTB apart from occasional hitches which I can live with.
Answer: Try setting Mipmap Levels to OFF in instead of 4 which the default value is. This increased my performance from around 5 to 10 FPS to around 80 FPS.

I'm not sure why this helps exactly, but looking around the Internet I'm far from the only one to have had this resolve FPS problems in Feed The Beast on otherwise powerful hardware.
Comment: minor point: mimapping will consume more *gpu* memory, not system memory. Looks like RX 570 reference boards were 4 or 6 GB (?)
Comment: I'm guessing this is a lack of RAM. Mipmaps increase RAM consumption for textures by about 33%, and 8 GB of RAM is not a lot nowadays. Mipmaps shouldn't affect performance all that much, but if your PC is running out of RAM, this can severely impact your performance, which is exactly what seems to have happened here.
Comment: @Nolonar For whatever reason, mipmapping in Minecraft leads to horrible performance on some computers, even with plenty of RAM and VRAM. 3D games are still arcane art :D
Answer: Especially in modded Minecraft, reducing particle counts can improve CPU performance dramatically. Even though Minecraft is now a AAA title, it still uses the CPU to calculate particle physics, and with a single core! As if this is not bad enough, there is no culling that's done with this, meaning that all particles are taking physics computations all the time.
In short, reducing particles to minimal, or better none will get rid of a lot of client-side calculations, and as a result boost your FPS by a significant margin.


Connecting to and managing many Raspberry Pies without port forwarding

Question: I will have many (10-300) Raspberry Pies running my own software in different networks, probably without its own static public ip, but all connected to the internet. I need to be able to manage these devices somehow, for example, reboot remotely or update my software inside it remotely.
How do i do it then? Are there any free softwares to manage pies or any other solution?
Comment: You can utilise UPNP with a call home mechanism. Or if UPNP no option do a reverse tunnel to command and control centre. If you need inspiration look at how botnets are created... yea.. :D
Answer: If you have a server (in this case example.com) somewhere with a fixed IP, you can always do a remote port forwarding with SSH. The command is
 local$ ssh -R 22:localhost:3000 firstname.lastname@example.com

Be sure to enable port forwarding in your server, adding the following to your /etc/ssh/sshd_config
GatewayPorts yes

And restart the ssh on your server
server$ sudo service ssh restart

What it means is that if you enter to example.com:3000 you will be redirected to your local machine at port 22. And now is when the magic happens, you can simply do, from wherever in the world with internet access:
ssh firstname.lastname@example.com -p 3000

And you will sshing into your local machine.
If you put each of your RPis into a different port in your server, let's say from 3001 to 3100, you can just automate whatever you want to do by changing the value in ssh firstname.lastname@example.com -p NN (where of course NN is the port).
ssh is for free, having a server is not. You may check Linode or DigitalOcean, they have plans starting at 5$/month and they both allow you to do what you want. So, if you are going to buy 300 raspis, 1 year of server service goes for around 0.7% of your budget.
Comment: +1 for DigitalOCean and remote prot forwarding / reverse tunneling :D
Answer: Have a look at RealVNC's VNC Connect. It's a cloud-based "remote desktop" solution that doesn't require port-forwarding. Raspberry Pi recently announced it was available on their blog
Answer: I recently faced the same problem. I am using Tailscale and that is perfect for controlling multiple Raspberry Pis (and other devices). The way it works is it creates a virtual network between all your devices. After setting it up, I was able to control my Pis (on two different networks) from my phone (on LTE).
Links: https://tailscale.com/
https://tailscale.com/download/linux/rpi
I haven't looked at the alternatives, eg ZeroTier https://www.zerotier.com/
Answer: Your best bet is to use PiTunnel.com to manage them all.
It's easy to install on each device, and then you'll be able to access the terminal remotely, monitor their health, and use its custom tunnels to access any other service like web server or VNC.
(Full disclosure, I'm the creator of PiTunnel and we created it specifically to solve this problem for ourselves and others looking to do the same thing)


What is the reaction mechanism between a basic oxide and an acid?

Question: For instance in $$\ce{ Li2O (s) + 2HCl (aq) -> 2LiCl (aq) + H2O (l)}$$ I am wondering why the $\ce{Cl}$ displaces $\ce{Li}$ .I figure that oxygen is negatively charged as it pulls the electron from Lithium toward it, and that Chlorine is attracted to the lithium since chlorine is negatively charged, as itself has higher electronegativity than Hydrogen. But why dont lithium and oxygen just stick together, and hydrogen and chlorine stick together as well, instead of swapping places? Maybe it is related to the electronegativities of oxygen and lithium?
Answer: It's because the oxide ion is unstable in aqueous solutions. You may know that the dissolution of $\ce{H2O}$ into $\ce{H+}$ and $\ce{OH-}$ has a $K_w = 10^{-7}$. Trying to pull one proton off a water molecule is hard enough, pulling another one, well you get the idea.
What basically happens is that once you drop the lithium oxide into $\ce{HCl}$ solution, it dissociates into $\ce{Li+}$ and $\ce{O^{2-}}$,
$$\ce{Li2O -> 2Li+ + O^{2-}}$$
The oxide quickly grabs two protons from the acid solution.
$$\ce{O^2- +2H+ -> H2O}$$
What's left is the $\ce{Li^2+}$ and $\ce{Cl-}$ ions. They simply exist in the aqueous medium as a dissolved ionized salt.
Comment: Thank you for your answer. I was wondering why Li2O dissociates in water?


windows apps

Question: Hello am new to c++ from php. Although i am not an absolute newbie, meaning i have programmed large db driven apps using oop php and sql, i would like to know what the general process of creating stand alone windows applications using c++ is as far as patters, APIs compilations etc...
EDITED:  As far as GUI how would you the visual interface of something like firefox.  How do you create the looks, because it doesn't quite look like the AWT lib like in visualc++?
Answer: I think you should really pick up a copy of Programming Windows 5th Edition by Charles Petzold to help you with a lot of this background information.
Answer: Microsoft libraries:
From unmanaged C++ you can use either native Win32 API, MFC or ATL/WTL.
The native Win32 API is a collection of C-style methods exposed by the Windows family of OSes. These APIs work by manipulating windows and message loops. You can start reading about Win32 in the MSDN Windowing section.
MFC is a C++ class library which provides rich object-oriented wrappers around the Win32 APIs. It abstracts the Win32 windows as CWindow class and message loops as CMessageMap. You can read more about MFC on MSDN.
ATL/WTL is a lightweight C++ template library, which started as a C++ wrappers for COM and later adopted some ideas from MFC (thus sharing the same classes names) for support of Win32 windowing. The ATL windowing support was later split into WTL, which was then released as open source. The ATL windowing support is documented on MSDN in the ATL Window Classes section.
From managed C++, you can use either WinForms or WPF. Both are fairly thoroughly covered on MSDN, although their documentation and samples are heavily skewed towards C# and VB.Net. I personally would also recommend you look at C#, if you want to explore these UI platforms.
What you need to use these:
Of course, first you need a C++ compiler. :-)
To use the Win32 APIs, you only need the Windows SDK and optionally Visual C++ Express.
To use MFC and ATL, you need one of the Visual Studio Professional or above editions. ATL and MFC are not included in Visual C++ Express. (ATL/MFC might be included in the WIndows SDK or other free products that I am not aware of.)
WTL 8.0 is available as a free download. You can also get WTL sources from Source Forge WTL project.
To use WinForms or WPF, you need the latest .Net framework (well, tehcnically you need any .Net framework :-)) and optionally Visual C#/VB.Net Express. I am not sure if Visual C++ Express supports managed C++.
Third-party options:
There are several third-party C++ libraries that wrap/abstract the native Win32 APIs. Some of them are sufficiently abstract to allow developing UI not ony for Windows, but other platforms as well. Qt and wxWidgets are couple I know of, but have never used.
Answer: I think your question is way too broad. Try to break it into smaller chunks, like questions about getting started with GUI programming on windows, questions on patterns, questions on forming an API, etc.
Answer: His question was intentionally broad: quote "I would like to know what the general process is."
To the OP:
First you need to decide if your going to be using the console or building an app with gui support.
For most of the hello world tutorials you find they should run fine on any platform as long as they have access to a console of some kind.
Once you understand how C++ works and how to build simple programs you can start studying
the windows librarys that provide you with the GUI and whatnot.
So to start get yourself a C++ compiler (DevCpp at www.bloodshed.net is good)
and do the basic hello world and whatnot.
Then its a matter of implementing whatever you want from windows.h and other includes.
As for APIs this would depend on the type of program you want to make:
for image/sound/input (ie games/imageviewers/mediaplayers) you should learn the Standard Development Library or SDL.
For doing GUI you can use the windows APIs as per above or check out Qt at www.qtsoftware.com or wxWidgets at www.wxwidgets.org
as a bonus if you refrain as much as possible from using the windows APIs your program will be much easier to port.
SDL, Qt, wxWidgets are all cross-platform.

windows apps


Travelling with my partner and child - child has different nationality/passport

Question: My partner and I (British nationals) are travelling to the Republic of Ireland with our son, who was born in Canada and holds a Canadian passport. Will this cause any issues when we board a plane? We are planning on also taking his birth certificate to prove we are his parents.
Comment: If either of you was a British citizen otherwise than by descent at the time of the child's birth, the child is almost certainly already a British citizen (in addition to being a Canadian citizen). Of course, even if your child has multiple nationalities, they can travel to third countries using the passport of any of their nationalities.
Answer: No, it's very unlikely to cause problems.  There are three different nationalities in my family, we've traveled extensively with various permutations of them including the kids having different passports from the parents, and nobody at an airline or Immigration has ever even asked a single question about it.
Caveat: things may be more complicated if there's any reason for Immigration to suspect that you're not the child's parents and/or there are potential signs of child trafficking (see under "Trafficking Indicators").  But if the three of you are traveling together, the child shares your last name and looks related etc, this is very unlikely.
Comment: Or if they have the birth certificate, which they will.


libcups2-dev won't install because of libcupsimage2-dev

Question: I'm running Raspbian and want to install Splix, for which I need libcupsimage2-dev, so I installed it using apt-get, which yielded an error saying it has a dependency on "libcupsimage2-dev" which won't be installed. When I run "sudo apt --fix-broken install" it yields me:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libcupsimage2-dev
The following NEW packages will be installed:
  libcupsimage2-dev
0 upgraded, 1 newly installed, 0 to remove and 212 not upgraded.
1 not fully installed or removed.
Need to get 0 B/18.3 kB of archives.
After this operation, 66.6 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
E: Invalid archive member header cgnTrol.tar,xz  1566333;93$  (
E: Internal error, could not locate member control.tar.{zstlz4gzxzbz2lzma}
E: Prior errors apply to /var/cache/apt/archives/libcupsimage2-dev_2.2.10-6+deb10u1_armhf.deb
debconf: apt-extracttemplates failed: No such file or directory
dpkg-deb: error: file '/var/cache/apt/archives/libcupsimage2-dev_2.2.10-6+deb10u1_armhf.deb' is corrupt - bad archive header magic
dpkg: error processing archive /var/cache/apt/archives/libcupsimage2-dev_2.2.10-6+deb10u1_armhf.deb (--unpack):
 dpkg-deb --control subprocess returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/libcupsimage2-dev_2.2.10-6+deb10u1_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Answer: The archive is corrupt, you should delete it and try again:
sudo rm /var/cache/apt/archives/libcupsimage2-dev_2.2.10-6+deb10u1_armhf.deb


CCSprite in cocos2d v2.0 rc0

Question: I'm a little confused about CCSprite's position: is this it's center or bottom left? CCNode, CCLayer, CCMenu, CCMenuItem are the same?
Answer: position and anchorPoint are correlated fields; by default, position refers to where the center-point of the sprite (node) is to be placed. This is because an anchorPoint is = ccp(0.5, 0.5) by default for any given CCNode inheritor. Please note that anchorPoint is measured in units of percentage of the dimensions of the node it is describing.
Here is an excellent article that helped me get my head around it back when I was learning: http://www.qcmat.com/understanding-anchorpoint-in-cocos2d/
Answer: It's the center by default, except for CCNode, CCLayer and CCScene where it is the lower left corner.
Since the CCNode has 0 width and 0 height the lower left corner equals its center unless you set the contentSize property manually.
The anchorpoint can modify where the texture is drawn over a node's position. Typically you don't want to change it though. See here: https://stackoverflow.com/a/7810180/201863

CCSprite in cocos2d v2.0 rc0


rtmpdump or some other rtmp recording software that reconnects?

Question: It seems to be a common issue. If internet disconnects for a couple minutes or if stream goes offline for a couple of minites, thenn rtmpdump simply stops recording. Is there any free or cheap software that attempts to reconnect forever until manually stopped or something?
Answer: http://www.binarymark.com/Products/StreamingVideoDownloader/default.aspx may help. It works by monitoring traffic for rtmp content and when it detects the beginning of stream, it automatically records. As long as after Internet reconnection media server reinitiates streaming, it will be recorded (although a new video will be created for every streaming reinitialization).
Disclosure: I helped develop this product.


Approximating strength and hardness of alloys

Question: I do not have any formal education in metallurgy, but I am trying to make a game mechanic based on it. I need to be able to alloy together different metals and alloyable materials such as carbon in different percentages, and get an approximation of the strength and hardness of the resulting alloy. If anyone has any ideas how what I would need to do to calculate such a thing I would be very appreciative, thanks!
Comment: Is your goal a mechanic that is fun, or one that simulates reality to some extent? Those two goals are often exclusive.
Comment: To have fun, but also somewhat realistic, such as if someone alloys copper and tin it should be stronger than either, as with bronze
Comment: Since presumably you'll have a limited number of metal resources available in your game, why not just look up a list of relative hardnesses and hard-code it? Limit the way the player is able to alloy things (otherwise you have to worry about the case when they alloy say 50% tin-copper bronze, and whether that should be weaker than 10% tin-copper, and the player needs to understand metallurgy to play).
Comment: Should some combinations actually become weaker?
Answer: You could take cues from bit fields. Bit fields have the special quality that adding up previous bits is always one less than the next one. So I'd order the metals by hardness, then assign a bit to each one. E.g.:
Quicksilver = 1
Lead = 2
Iron = 4
Then you can add up the metals and get a certain hardness. E.g. adding Quicksilver and Lead would give a harder metal, but still not as hard as Iron.
Of course, this assumes that adding Quicksilver and Lead makes a stronger metal, if Quicksilver actually weakens the lead, you may have to pick the numbers 1 less than each power of 2, and then subtract the smaller from the larger:
Quicksilver = 1
Lead = 3
Iron = 7
and then mixing quicksilver with lead gives 2, which is < Lead but > Quicksilver. Mixing Lead with Iron gives 4, which is still better than Lead. And Quicksilver with Iron wouldn't dilute it as much, but would weaken iron. Would that work for you? Or is that too simplistic?
I guess you would want to draw a curve and then find an equation that expresses it, mathematically spoken.
If you have a limited number of combinations (91 metals is too much, but if you only need 8, there's only 64 combinations), you could just list them all in order, and their combinations, and then give each one a number that represents its hardness. You could put those in a dictionary/map with which metals are involved as the key (in alphabetic order or whatever) to look up the resulting hardness.
Of course, if you want to model flexibility as well, or different ratios of metals, you'd probably find someone well-versed in metallurgy and ask them how it really works. But in most games the combinations are so few that you can just manually generate them.


Fundamental component of Sinusoidal PWM inverter output

Question:
It is given in "Ned Mohan Power electronics converters applications and design" that, "sinusoidal PWM output's instantaneous average (over one time period of carrier wave) is same as the fundamental frequency component in the signal."
I am unable to think how, instantaneous average is related to only fundamental frequency component as, instantaneous average may include any slow varying (low frequency signal's contribution) components, as high frequency ones near by switching frequency get zeroed in a time period. 'mf' frequency modulation index when chosen appropriately, odd such that output becomes odd symmetric (only sine components) and half wave symmetric (only odd harmonic components) too, 3rd harmonic may interfere. How can we make sure that output doesn't contain 3rd harmonic, that too if contains, would be less compared with fundamental one ?
Please help me understanding this..
Comment: Your question is unclear to me. A PWM output is filtered trough LC filter, that's all. Please explain what are those odd, 'mf', 3rd harmonics...
Comment: Ya, that's it. But, Relation between fundamental frequency component amplitude with respect to DC voltage used for generating pulses.. the formula for fundamental frequency component would differ then, as instantaneous average may contain other harmonics. .
Comment: Feel free to use any switching technique to minimize the HF harmonics components, if possible. Then you still have to use a low pass filter, a ferrite choke,...Only the low frequency will pass - that's only the fundamental, other HF components are blocked, so the instantaneous average at the output of the filter will contain only fundamental, no others.
Answer: Maybe this picture will help: -

(source: elweb.cz)
There are three waveforms: -

Basic sinewave (red)
Triangle wave at PWM frequency (one triangle occurs in one switching cycle) in green
PWM waveform at bottom of picture (blue)

If you look at the PWM waveform (blue) and averaged the high/low content in each switching cycle, you would get varying numerical values that followed the basic waveform of the sine wave. Switching cycle: -

So, for the 1st cycle, the average is about 25% and, for the second cycle, the average is about 60%. You don't need a calculator to estimate this, just use your eyes and ask yourself how much of the waveform is "high" in a particular switching cycle then move onto the next one.
It's got nothing to do with frequency modulation or harmonics, just averaging. Averaging can be done by basic resistor, inductor and capacitor combinations aka "low pass filters".
Answer: To complement Andy aka...
The quote in question.

sinusoidal PWM output's instantaneous average (over one time period of
  carrier wave) is same as the fundamental frequency component in the
  signal

Take a 10V pk sine wave and take a PWM signal that toggles between +15V and -15V.
At zero degrees (or the equivalent timebase): a sinwave will have an amplitude of ... 0. Now take an associated PWM that would be used to synthesis a sinewave at this point in time. At this point the PWM duty will be 50% -> 0V
Now take 90deg (or the equivalent timebase) the sinewave would be at its peak, a peak of +10V.  At this instance, the PWM (concidering one period) duty would be 83.333...% and this would have an average of +10V
Answer:
"3rd harmonic may interfere."

We know from Information Theory and Shannon's Law that signal being sampled cannot exceed 1/2 of the sampling rate. Now we can see from the low pass filter response of the PWM output, has a noise factor on the signal depending on these ratios of frequencies and the attenuation slope.
This tradeoff means we need a specification for signal bandwidth and thus Step Load response time in a SMPS closed loop or order to validate the switching frequency to loop bandwidth requirements.

The Loop bandwidth is often chosen less than 1/3 of switching frequency which is like saying the 3rd harmonic starts to cause aliasing or interference noise with the PWM in your question.

With 6dB per octave filtering that implies the 3rd harmonic signal level is down 12dB for a signal at the loop bandwidth frequency. This in turn implies a certain amount of jitter on the PWM filtered signal and thus noise level in a supply.

This is not the only source of ripple as the ESR of components is another limiting factor with Ip-p*ESR ripple in caps.


What conduit can I use to run 240v cable along outside of house, main to sub (San Francisco)?

Question: Question: What type of conduit can I use to run 50' of 8/3 cable from main breaker panel to spa sub panel along the outside wall of my house to get a 240v circuit to my Spa?
Comment: Sounds like a hard prohibition of cable in conduit. Can I ask why?
Comment: Are we talking somewhere where the conduit can get beat up on with lawn equipment, etal?
Comment: Just for reference, you CANNOT run cable, especially NM-B cable (Romex) to a spa panel or dissconnect on the outside of a structure, even in conduit. You must run individual conductors, including an insulated ground, in conduit for ALL of the outside portion of the wiring to a spa or pool.
Answer: Let's start with your options. First if you are running underground it would be PVC or direct burial cable type UF. Second if you are running above ground it would be any conduit system approved for such use. The most common PVC, Emt, nonmetallic flexible conduit commonly known as Carflex, and pvc coated metallic conduit commonly known as Sealtite. Or any combination of the above.
Personally I would run EMT with WT stainless steel connectors and couplings. Then transfer over to some type of flex to connect to your panel. Also I would suggest that if you are running conduit I would use 3-#8 w/ #10G THWN or Xhhw conductors instead of an 8/3 NM cable. It would be less expensive and since you are running conduit no extra protection is needed.


How to prevent recombination of carriers?

Question: Let say we have a contact of an electron conductor and a hole conductor. How is it possible to prevent recombination of the carriers nearly completely? So, electrons do not suppose to fly or tunnel inside a hole conductor and contra, even if electric potential is applied? Could heterojunctions fit to this purpose?
Comment: Detailed balance holds in equilibrium, so it's kind of hard barring a depletion region between them.
Comment: Could you explain it in a more detailed way?
Comment: If $np > n_{i}^{2}$ there will be recombination. Period.
Answer: Imagine having an electric bias (a uniform electric field) across the junction. Electrons appearing will be biased in one direction and the corresponding holes will be biased in the opposite direction. If this can be upheld until they are far enough apart, then recombination will not occur.
This is one of the key working principles of a typical solar cell, where dissimilar materials with dissimilar electron concentrations will get a natural electric field build up in this way due to electron diffusion from one to the other when in contact.
Comment: @JohnSmith The main (and only useful) recombination in a solar cell is at the metal wire connections.   If you omit those, it doesn't produce useful current.
Comment: If I understand it correctly, in solar cell the main intent is to delay the carriers recombination, not to prevent it completely. A solar cell would be useless if there wouldn't be any recombination. But in my case the task is to prevent recombination completely for indefinite period of time.
Comment: @JohnSmith Sure, you need the recombination again, but not before the electron has travelled through the external circuit.


Installing and using Android Studio as virtual device on Ubuntu 16.04

Question: I'm struggling to install and use Android Studio as a virtual device (AVD) with Ubuntu 16.04.
I tried using Ubuntu make:
umake android 'android-ndk'

but that didn't work, so I tried it the old fashioned way.
Now I'm having emulator troubles and can't really use a real device because it isn't working.
Can anyone provide a step by step installation for Android Studio and QEMU VM?
Answer: Installing and using Android Studio on Ubuntu 16.04 is a task that needs a certain strategy and you need to follow certain steps.

Your system must be equipped with a 64-bit CPU capable of supporting Hardware Virtualization and at least 4 GB of RAM but this will not be enough if you're planning to use other programs while Android Studio is running.  In that case, 8 GB is a must.  You must be using the 64-bit Ubuntu 16.04 of course.
You need to install the  Oracle JDK 8 and this can be done by adding the webupd8team java ppa to your system (sudo add-apt-repository ppa:webupd8team/java) and installing both oracle-java8-installer and oracle-java8-set-default.
Install the complete KVM/qemu on your system by following the instructions given here.
In the beginning, you will find instructions on how to check if your system's processor is ok for use with KVM.
Don't forget to log off and back on after the installation, otherwise your user will not be activated as a member of the libvirtd group and you will not be able to use KVM.
Download the latest Android Studio .zip file from the Android Developer's site and make sure you install the 32-bit support files listed over there.
NOTE: The file lib32bz2-1.0 does not exist on 16.04, so you have to install libbz2-1.0:i386 instead, using sudo apt-get install libbz2-1.0:i386.
Extract the contents of the .zip file in a folder of your choice and create a launcher for the studio.sh file you will find in the android-studio/bin folder and if everything else is ok, it should run fine.

You will need to install all the necessary libraries and images using the android SDK and create the AVD's you'll be using of course but I think you must know that already since you are a developer.  In order for the emulator to actually use KVM, you must start it using these emulator parameters:

/pathTo/emulator -avd avd_name -qemu -m 1024 -enable-kvm

Update: The command above has been deprecated.  You can run your emulator with full hardware virtualization support now by simply using -accel on.

/pathTo/emulator -avd avd_name -accel on

This switch is not necessary though, since the default setting for -accel is auto which means that if KVM is installed correctly, it will be used by default.
The value of 1024 is an example.  Use the same amount of memory you configured your AVD to use.  Further instructions on how to insert the parameters above to android-studio instead of launching the emulator manually, you can find on the android developers site.  Personally, I prefer to launch it manually and have it there whenever I need it.
Comment: I was trying to start the emulator from terminal with `-enable-kvm` option and then i got `unknown option: -enable-kvm`
Comment: Oh,, never mind about my comment above. **I missed `-qemu` parameter**. The android starts really fast!
Comment: this line `/pathTo/emulator -avd avd_name -qemu -m 1024 -enable-kvm` saved my day! From 97% RAM to 70% of 8gb


One word for "The amount paid to a person A because of the damage caused to him by person B"

Question: I know there's a word for this but can't remember it. Can someone please help me figure this out.
It also means, amount paid to a king after winning a war by the defeated king.
Thank you :)
Answer: In a modern civil law context, damages:

A sum of money claimed or awarded in compensation for a loss or an injury:
He or she sues not only for personal injury but for damages for the loss or destruction of the motor vehicle.

Also sometimes compensation:

Something, typically money, awarded to someone in recognition of loss, suffering, or injury:
he is seeking compensation for injuries suffered at work

Or restitution:

Recompense for injury or loss:
Since such legislation is not compatible, in my view, with Community law, they should, in principle, be entitled to seek restitution for those payments.

Occasionally recompense, sometimes as a noun but more often as a verb:

Make amends to (someone) for loss or harm suffered; compensate:
offenders should recompense their victims

There's also 'making amends' - that's usually used to mean non-financial compensation, although money could be involved.
In the context of war, reparations:

The compensation for war damage paid by a defeated state:
the Treaty of Versailles imposed heavy reparations and restrictions on Germany

Where state A has conquered state B in the past (or has shown that they are capable of doing so) and state B pays state A 'protection money' not to invade again, that money is called 'danegelt':

1911   C. R. L. Fletcher & R. Kipling School Hist. Eng. ii. 39 It is always a temptation to an armed and agile nation, To call upon a neighbour and to say:—'We invaded you last night—we are quite prepared to fight, Unless you pay us cash to go away'. And that is called asking for Dane-geld.

It's a pejorative term. Where a losing state is forced to pay money to a winning state, whether this is 'war reparations' or 'danegelt' might depend on your point of view, on whether you belive the amount is proportionate to the actual loses, on which state you believe was the aggressor, etc etc.

Ethelread the Unready. A Weak King
Rather than wait for him the Danes used to fine him large sums called Danegeld, for not being ready. But though they were always ready, the Danes had very bad memories and often used to forget that they had been paid the Danegeld and come back for it almost before they had sailed away. By that time Ethelread was always unready again.

(parody)
1066 and All That, Sellar & Yeatman, 1931.
Comment: Nice answer. I suggest you add *restitution* to your list.
Comment: @ErikKowal, good idea. done.
Answer: In the context of war the word is usually

reparation

It can also be used in contexts other than war ( http://www.merriam-webster.com/dictionary/reparation )
Answer:
Compensation -
  something, typically money, awarded to someone in recognition of loss, suffering, or injury.

[How can I reference Google define?]
Compensation is the term I'd use for your first definition, but I'm not sure it fits the second.
Comment: Cite "Google define" by knowing where it comes from: http://www.oxforddictionaries.com/definition/english/compensation
Comment: This is what I would use, in British English. But I've noticed that in American usage _compensation_ is wider, and is also used to mean _payment for doing a job_.
Answer: The best choices are "reparations" and "compensation", which have already been mentioned in other answers.
"reparations" is the best choice for money paid by a country that loses a war because of destruction, damage, deaths, etc.

reparations (noun) -  compensation or remuneration required from a defeated nation as indemnity for damage or injury during a war. The Free Dictionary
"The treaty of Versailles forced Germany to pay reparations to certain countries that had formed the Allied Powers."

When the word refers to money paid by a person who inflicts harm, damage or loss to another person, compensation fits better.

compensation - "money, given or received as payment or reparation, as for a service or loss" The Free Dictionary
"The victim received $10,000 in compensation."


Migrating Mail.app rules from 10.6 to 10.8

Question: I want to move my Mail.app filtering rules from my old 10.6 machine to a fresh 10.8 install. I've seen people talking about moving these by copying over  MessageRules.plist, but I haven't seen anyone address whether these are compatible between 10.6 and 10.8. Thanks!
Answer: I copied all of the user-created <dict>...</dict> items from my old MessageRules.plist and added them to:
~/Library/Mail/V2/MailData/UnsyncedRules.plist

When I launched Mail.app again, they were in my rules, but disabled. One click on each and they ran fine.
Note: Simply replacing the entire set of <dict>...</dict> items in UnsyncedRules.plist will not work. You must add them into the current set of items in order for it to work properly.
Comment: I also had to make various edits because the folder references needed to be changed to reflect new paths with V2.  It helped to make a dummy rules refiling to subfolders in each of my accounts, so that I could see how they should look.
Answer: For all those who tried copying the MessageRules.plist file over from 10.6 to 10.8 and got nothing here's what I did to get them working.
Essentially copy all the rules via copy/paste from  MessageRules.plist (10.6) to SyncedRules.plist (10.8) - use a text editor to copy and paste everything from the </array> tags in the old file to the new one. Then restart Mail.
Longer version:
Copy MessageRules.plist from Users>User>Library>Mail> on your 10.6 machine to anywhere your 10.8 machine. Open up the file in a text editor and copy everything between the <array></array> Tags. Then paste it all in the file SyncedRules.plist on your 10.8 machine in Library>Mail>V2>MailData inbetween the<array> tags. Restart the Mail app and all the rules should show up in preferences section.
Mail will slowly even create the folders/mailboxes to store the messages in folders that don't exist but are pointed too in your rules that you imported.


Transfer of apps from phone to sd card

Question: How to transfer apps & games from phone to sd card? As lumia 520 has only 7 GB memory space.I want to download other apps too but due to shortage of space,not able to do it.So is it possible that if i can transfer some of my apps and games to sd card.I tried but its not happening as there is no option regarding this.
Answer: That's not currently possible with Windows Phone 8 (Update 3). The SD card can only store Music, Pictures, Video, and Maps.
The Windows Phone 8.1 update is expected to add this feature, which is due for release around July/August 2014.

Transfer of apps from phone to sd card


The meaning of "Looking good!"

Question: In the US I heard "Looking good!" being used by spectators to encourage disabled participants of a race. What does it actually mean? In this context it can't possibly be a comment on their appearance as is suggested in the answers I read about the meaning of "looking good".
Comment: It usually means that they are doing good and to keep up the work.
Comment: No by no means. I submitted both questions at the same time and I was referring to the answers I read on this site before submitting. I'm sorry for the confusion.
Comment: Yeah, it's just a generic statement of encouragement.  Literally it means roughly "I like how well you're performing" or something of that nature, but may be shouted as encouragement at the kid coming up dead last in a footrace (or it could be shouted to the front-runner).
Comment: When not referring to physical appearance, it generally means the situation is looking good. It can refer to a project, schedule a person'e performance, condition of an item etc..
Comment: You didn't like the answer to your last question?
Comment: No problem. It's a reasonable question about a new construction, and I think it hasn't been discussed much in the literature yet.
Answer: The literal meaning is "You are looking good".
The implication for someone in a sporting event is that despite what the participant may think (they are tired, or the score is against them) that things are better than they seem. It is a kind of encouragement.
There is nothing special about them being disabled or in a race, one could use it for anyone who is in some sort of struggle.

The meaning of "Looking good!"


What will be the correct preposition for the blank?

Question: The soldiers held the fort ___ all attacks. What will the most suitable word be?
Comment: I would guess "against" but for future reference it helps to give some context to your questions: say what you want the meaning of the sentence to be. That way if there are several alternatives that are all grammatically correct then people can choose the one that has the meaning that you want.
Answer: Welcome to ELL Surabhi.
Kindly give us some more details such as where did you read this, what word you think in the blank and so on. Always try to give the context as it'll help us to answer the questions.
However, I feel this is the word that may go there.

The soldiers held the fort against all attacks.


Cannot boot: BusyBox (initramfs)

Question: My ubuntu 14.04 lts 64bit not booting up, it shows :
<code>BusyBox v1.21.1 (Ubuntu 1:1.21.0-1ubuntu1) built-in shell (ash)
enter 'help' for a list of built-in commands.

(initramfs)
</code>
How to solve this problem?
Answer: Looks like this issue is what several users discussed here: https://answers.launchpad.net/ubuntu/+question/247265
The discussion there is long, and people seem to have used various methods to resolve the issue for their systems. However, here's a portion of a post that seemed to be the most help to many people (since there doesn't seem to be one specific solution, you'll probably have to experiment with the various solutions proposed):

Hey, everyone. The solution that I posted has something of a major flaw: it's not that it's wrong, it just isn't a permanent fix. In order to make the changes permanent, you actually have to edit your GRUB file. Another Linux-user who found the solution I posted emailed me about it, and this is what I sent him in reply:
Hi,
I found at this link a thread in wich people discussed about exactly my problem. And you were the only one that posted an answer and I don' t understand something in that answer and that's how you found the boot commands.
  Please give me un answer my Ubuntu 14.04 is installed but I can' t acces it :(
Thanks
  Adrian Ciucanel
10:22 AM (6 hours ago)
to me
  I forgot the link: https://answers.launchpad.net/ubuntu/+question/247265
  Daniel Williams
2:20 PM (2 hours ago)
to Adrian
A couple of questions first:

When you start up, does your computer give you a couple of OS options, i.e. Windows, Ubuntu?
Assuming the answer is yes, choosing Ubuntu, are you taken to a burgundy screen titled GNU GRUB version 2.02 (or some variation thereof) ?

If yes, use the up/down arrow keys to prevent the GRUB screen from automatically choosing Ubuntu. Then, highlight the Ubuntu option. There should be an option at the bottom of the grub screen to edit commands before booting (mine has 'e' as the hot-button).
Once you hit the command edit hot-button, you should see a block of boot commands. Keep in mind that you will have separate boot commands for every boot option.
Caution: all of the information I'm sending you is stuff I've figured out through tinkering with my computer, and I am by NO means a Linux expert. I can't guarantee that this will solve your problem, and honestly, it's a solution I found on another site.
  Daniel Williams
4:57 PM (3 minutes ago)
to Adrian
  Hey, Adrian, I recently discovered that the solution I gave on the site is not a permanent fix. It works, but in order to make the changes permanent, you'll have to go into your grub.cfg file in your boot/grub folder and make the same changes in the file. It's read-only if you just try to open it, so you'll have to use this command in your terminal to access the file without restrictions: sudo gedit ... Once you open gedit, you'll have to browse for grub.cfg. Unfortunately I don't know how to open files directly from the terminal (although I'm certain there's a way to do it).

Cannot boot: BusyBox (initramfs)


execstop mysql error on stop and restart

Question: prerequisite:

os: kali-linux 2018.1
uname -r: 4.14.0-kali3-amd64
mysql version: mysql  Ver 15.1 Distrib 10.1.29-MariaDB

problem:
yesterday i had setup an apache server with this help, https://www.tecmint.com/install-wordpress-on-ubuntu-16-04-with-lamp/.
I was able to install wordpress and use it fine.
today I tried to upload a theme and got an error, changed php.ini to allow upto 20Mb, later restarted pc.
tried installing the theme again but got this error "Your PHP installation appears to be missing the MySQL extension which is required by WordPress."
systemctl restart mysql.service (also for stop and start)
mysqladmin shutdown -p
killall mysql
i tried the following with the outputs given below;
output from systemctl status mysql.service kinda bothers me, since it only appears like this after systemctl restart mysql.service and always afterwards
● mysql.service - LSB: Start and stop the mysql database server daemon
   Loaded: loaded (/etc/init.d/mysql; generated; vendor preset: disabled)
   Active: active (exited) since Tue 2018-02-13 13:01:42 EAT; 16min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 10670 ExecStop=/etc/init.d/mysql stop (code=exited, status=1/FAILURE)
  Process: 10732 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS)

Feb 13 13:01:42 user systemd[1]: Starting LSB: Start and stop the mysql database server daemon...
Feb 13 13:01:42 user mysql[10732]: Starting MariaDB database server: mysqld already running.
Feb 13 13:01:42 user systemd[1]: Started LSB: Start and stop the mysql database server daemon.
stopping the service with mysqladmin shutdown -p [and related commands for stopping the services, eg pkill, killall] after which systemctl status mysql.service gives
● mysql.service - LSB: Start and stop the mysql database server daemon
   Loaded: loaded (/etc/init.d/mysql; generated; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2018-02-13 13:41:49 EAT; 2min 24s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 11572 ExecStop=/etc/init.d/mysql stop (code=exited, status=1/FAILURE)
  Process: 11487 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 4915)
   CGroup: /system.slice/mysql.service
would appreciate your help in fixing this. thanks.
Answer: If you shut down MySQL by killing it directly, then when systemd tries to run the script to stop MySQL, it returns failure because MySQL wasn't running.
You can ignore this, but in normal circumstances you would never kill the MySQL process. You also would not use mysqladmin shutdown on a systemd-managed service. Use systemd to start and stop it instead.


How do I find the minimum magnitude of a force and apply it to get a certain displacement?

Question: I was asked this:

A force $F = [3,\,-5,\,2]$ in Newtons pulls a sled through a displacement $s = [5,\,-1,\,3]$ in metres.

How much work is done on the sled by the force?
What is the minimum
  magnitude of force that could have been applied to the sled to obtain
  the same displacement? Explain your answer.

For the first one I have no problem, I figured out the work done is $26$ joules.
For the second I'm a bit unsure though. I get the feeling that the answer is the projection of $\vec F$ on $\vec s$. I'm pretty sure that is the answer, but I can't really explain why.
So I'm wondering if I'm right, and if I am, why that is? If I'm not, what is the right answer; and why is it right?
Comment: Well, if you draw a line perpendicular to $\vec s$ which connects to the head of $\vec F$, then the point that line intersects $\vec s$ is the location of the head of projection vector. So a projection is the smallest a vector can be while having its head align with a specific point on another vector. For example if a force vector at an angle of 50 degrees from a displacement vector has its head align with the middle point of the displacement vector, then $\vec F$'s projection is the smallest the force can be while still having its head align with the displacement vectors midpoint.
Comment: That's how I would define it.. but I'm still not entirely sure how to explain exactly why the projection has the minimum magnitude. Particularly because I don't see why the work done has to still be 26 joules for the displacement to be the same.
Comment: Try to define your understanding of *projection* in mathematical terms, this will lead you to the answer.
Comment: Note that the problem statement does not require you to find the direction of the force that has the minimum magintude. In fact, the question would not provide enough information for that.
Comment: Hmm, that just confuses me more..
Comment: Sorry for the confusion. Scrap that remark of mine. While the system is not fully defined, consideration of [virtual work](http://en.wikipedia.org/wiki/Virtual_work#Constraint_forces) still applies.
Comment: This seems to have to do with mechanics, which is outside of what I'm studying at the moment. I'm just studying Canadian "Calculus & Vectors" high school level mathematics at the moment. I think maybe I just don't understand the concept of vector projection deeply enough..
Answer: The problem statement seems to assume that the displacements are
as good as infinitesimal; I will therefore omit some differential symbols
and assume that the sled's motion and the ground are approximately uncurved
in this problem. "Motion" here means displacement as a function of time.
The second question in the problem statement suggests that
different forces $\vec{F}$ can have exactly the same effect
on the motion of the sled.
In other words, there are nonzero force changes
corresponding to zero motion changes.
This implies that the system is constrained.
The constraint that comes to mind for a typical sled on the ground
is that it only follows the direction of its skids.
Since we are assuming that the geometry here is as good as infinitesimal,
this can be simplified to mean that the sled moves only along a fixed axis.
Obviously, the axis determines the direction (up to sign) of $\vec{s}$.
It will be helpful to decompose $$\vec{F} = \vec{F}_s + \vec{F}_o$$
where $\vec{F}_s$ is collinear with $s$ and
$\vec{F}_o$ is orthogonal to $\vec{s}$.
Thus, $\vec{F}_s$ is your projection of $\vec{F}$ on $\vec{s}$.
You can achieve this with the following matrix $\mathbf{S}$:
$$\begin{align}
\text{Let}\quad
\mathbf{S} &= \frac{1}{\vec{s}\cdot\vec{s}}\,\vec{s}\circ\vec{s}
= \frac{1}{35}\begin{pmatrix}5\\-1\\3\end{pmatrix}
\begin{pmatrix}5&-1&3\end{pmatrix}
\\\text{Then}\quad
\vec{F}_s &= \mathbf{S}\cdot\vec{F}
= \frac{\vec{F}\cdot\vec{s}}{\vec{s}\cdot\vec{s}}\,\vec{s}
,\quad\vec{F}_o = \vec{F}-\vec{F}_s = (\mathbf{I}-\mathbf{S})\cdot\vec{F}
\end{align}$$
where $\cdot$ denotes the dot product, $\circ$ denotes the outer product,
and $\mathbf{I}$ is the $3\times3$ identity matrix.
Note that $\mathbf{S}$ is symmetric and positive semidefinite.
Furthermore, $\mathbf{S}$ is idempotent: $\mathbf{S}\cdot\mathbf{S}=\mathbf{S}$.
This allows you to verify that $\vec{F}_s\cdot\vec{F}_o=0$.
Back to the mechanics.
The balance of forces requires that all force components orthogonal to
the sled's acceleration sum to zero.
Due to the constraint imposed,
acceleration can happen only along the axis determined by $\vec{s}$,
therefore $\vec{F}_o$ must be
counteracted by a constraint force
$$\vec{F}_c=-\vec{F}_o$$
The fact that $\vec{F}_o\cdot\vec{s}=0$ also means that $\vec{F}_o$
does not contribute to the work done. The same applies to $\vec{F}_c$
and is consistent with the general fact that constraint forces do not do work:
$$W = \vec{F}\cdot\vec{s} = \vec{F}_s\cdot\vec{s} +
\underbrace{\vec{F}_o\cdot\vec{s}}_0 = \vec{F}_s\cdot\vec{s}$$
In fact, the sled's motion can only be influenced by the sum
$$\vec{F}+\vec{F}_c = \vec{F}_s+
\underbrace{\vec{F}_o+\vec{F}_c}_0 = \vec{F}_s$$
which again points to the conclusion that preserving motion requires
preserving $\vec{F}_s$, whereas $\vec{F}_o$ can be varied arbitrarily
without effect on the sled's motion.
Now, since $\vec{F}_s$ and $\vec{F}_o$ are orthogonal by design,
we can apply the pythagorean theorem:
$$\|\vec{F}\|^2 = \|\vec{F}_s\|^2+\|\vec{F}_o\|^2$$
And this means that minimization of $\|\vec{F}\|$ while preserving $\vec{F}_s$
means minimizing $\|\vec{F}_o\|$. This is achieved with $\vec{F}_o=\vec{0}$.
Thus, the minimal required force is
$$\vec{F} = \vec{F}_s
= \frac{\vec{F}\cdot\vec{s}}{\vec{s}\cdot\vec{s}}\,\vec{s}
= \frac{26\,\mathrm{Nm}}{35\,\mathrm{m}^2}\vec{s}
\quad\text{with}\quad
\|\vec{F}\| = \|\vec{F}_s\| = \frac{26}{\sqrt{35}}\mathrm{N}$$
Comment: Oh wow, this is way beyond the scope of what I'm learning at the moment. I just someone changed my tags to say "classical mechanics", which is absolutely the wrong tag for this. I'm only learning about basic vectors, not mechanics. I'll change the tag back to "vectors".
Comment: Ignore the virtual work thing, then it's just about linear equality constraints. Are there specific pieces where you cannot follow?
Comment: The mechanical considerations are there to *prove* what you intuitively suspected to be the solution. Along the way, I have noted how to express projection formally. TL;DR: Your guess is right, and it can be proven right because the sled is essentially constrained to move in one direction only. (Without that constraint, there would not be enough information to predict what would happen when $\vec{F}$ changes.)
Comment: I see.. Well at the moment the pieces I can't follow would be most of it. Constraint forces and "outer product" are concepts completely alien to me. $\frac {26}{\sqrt(35)}$ is what I found too, though, so while my answer seems to be right, I'm still not entirely certain how I would simply explain why this is the right answer. If I'm getting you right, it as to do with the fact that the displacement has to stick to the same direction.
Comment: Hmm, I just thought of this: When the sled is supposed to move in the same direction and the same length, that ultimately means the work done has to be the same. Whenever the vector is at an angle, it has to have a large magnitude to make up for the angle, since the force isn't applied directly. So when at an angle of zero, the force requires the least magnitude to achieve the same displacement. And a vectors projection represents a zero angle vector that has the same amount of work done, thus also the least magnitude force vector. Would this be a valid explanation?
Comment: Well done! Actually, you do not even need the argument that the work needs to be the same (though it is, for mechanical reasons), just that the projected force needs to be the same (because that is the only force component that is not neutralized by the successful resistance of the skids against transversal movement). However, both arguments are equivalent here.
Comment: Okay, I get it now, then! Thanks for the help.


What are the small things, look like stars, moving in the sky?

Question: I have always been observing something that looks like a star but not as bright as a star moving from south to north at the same time every night.
What is it? It cannot be a star because I know stars do not move.
Comment: Try this: http://i.telegraph.co.uk/multimedia/archive/03020/LightInTheSky_3020904c.jpg
Comment: Uh...that could be anything. Airplanes?
Comment: Also, I don't understand what you mean by "stars don't movie".
Comment: Copy edited. Using standard grammar and checking spelling is more likely to attract quality answers.
Answer: A starlike point visibly moving across the sky is a satellite. The biggest and brightest is the international space station, but there are many others.
They can be seen any night that is clear, usually shortly after dusk, or before dawn. http://www.heavens-above.com/ allows you to see predictions of when satellites will be overhead.
Comment: Say, is it true that you can (these days) see a satellite moving on any heading at all, from anywhere on Earth?  Or have we all generally agreed that satellites should only move in one sense, or that polar satellites should not precess - - - or something?  (Surprisingly I don't know this at all!)
Comment: The OP says there's "something that looks like a star but not as bright as a star moving from south to north at the same time every night". That's certainly not the ISS, and I'm skeptical that any other satellite would appear like that.
Comment: I agree its not the ISS. I think the OP has seen satellites at about the same time and jumped to a conclusion. Clearly "not as bright as a star" means nothing.


Why Bootstrapping standard errors and 95% confidence intervals change each time I re-conducted the analysis

Question: I was using respondent-driven sampling analysis tool (RDSAT) to get bootstrapping confidence intervals. But each time I re-did the analysis, I noticed the bootstrapping standard errors and confidence intervals changed a little bit.
Is this normal for bootstrapping confidence intervals? Thank you!
Comment: How did you bootstrap?  The usual method--but not the only one--generates *random* resamples from the data.  "Random" means you should expect the results to change each time!
Answer: Bootstrapping involves resampling your data randomly. Thus, each time you bootstrap, a different (re)sample will be drawn. Therefore, the results of different bootstrap runs will be different.
If these differences are large, then you should be suspicious that your bootstrap may not be working well. If the differences are trivial, they are no problem.
You may want to set the seed value of your random number generator in order to make your bootstrap exactly replicable.
Comment: i would also add that a one way to get more similar results from bootstrap is to get more bootstrap samples. Maybe the default is 100, but you can run 1000 or 5000 instead
Comment: Thank you! This is very helpful! how large the difference would you suggest I should be suspicious. Currently, the differences lie in the third decimal place. And the number of re-samples for bootstrap I set is 16,000 in the software.
Comment: As to how large the difference "needs" to be to be problematic: that will depend on the conclusions you will draw from your results. If the conclusions would change with different bootstrap runs, then there likely is a problem. (There rarely is.) Yes, this requires thinking about the problem context.
Answer: This is totally normal and why we set a random seed (to get the same randomization each time) via set seed in R or np.random.seed in Python.
The way bootstrap works is to take many random samples, with replacement, of your data, so there should be small fluctuations in your calculated values as those random samples vary.


Authentication issue after Wubi installation

Question: I am unable to log-in to Ubuntu with the username/password combination I gave on Wubi at the time of installation (incorrect username/password error). This happened twice; the first time I really thought I forgot the password and/or the username and ran Wubi again but it happened the second time too. Guest access works fine, and strangely while the Wubi installer says I'm about to install 12.04, it actually ends up downloading and installing 13.04. Any ideas would be appreciated.
Answer: There is a bug that Wubi will install the dev release (13.04) if you are using an out of date installer e.g. for 12.04 or 12.04.1. The current Wubi for 12.04 is 12.04.2 and you need this latest version for it to work.
Some reports of it happening on the 12.10 version of Wubi.exe have not been confirmed. If yours was 12.10, please pastebin the Wubi log file (find it in the %TEMP% directory calle wubi-nn.nn-revxxx.log) so we can add it to the relevant bug report.
Note that the development release for Wubi is broken. Therefore there is nothing you can do with it and you should uninstall it and reinstall using a current and supported release such as 12.04.2 or 12.10. Both are available from http://www.ubuntu.com/download/desktop/windows-installer
For reference, here are the bug reports:
13.04 installer doesn't create user account
Wubi 12.04 installs development release
Comment: PS I see you mentioned that you installed 12.04 so ignore my 12.10 remark, but I'll leave that in if anyone else finds this.
Comment: Thank you, bcbc, I can confirm your solution worked. Downloaded the latest version of Wubi and am up and running on 12.04. Thanks!


Samba Broken after 13.04->14.04 upgrade

Question: I finally updated our in-house file server from 13.04 to 14.04 yesterday.  The upgrade went fine, but sadly, it is no longer much of a file server.  Samba will no longer allow Windows machines to browse the list of shares and only users with an account on the server itself can connect (and THAT requires them to enter their username/password).
Under 13.04 all of our shares were public and did not require users to enter any credentials.  Browsing the list of shares worked great.
I've been trying to poke at the smb.conf file to get it to work with no success.  I found out that 'service samba stop|start|restart' doesn't work, but using smbd (and nmbd, if necessary) DOES work.  I've followed several different sets of configuration instructions, including the ones on the samba wiki, and still nothing is working.  I MUST get this working again FAST.
I've ensured that ALL shared directories have permission set to 777.  Everything is owned by nobody.  The smbuser was a suggestion from one of the pages that supposedly had the steps to "make it work."
Here's the output from testparm -s:
root@fs1:~# testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[agent]"
Processing section "[backups]"
Processing section "[cr3nt4]"
Processing section "[evisd]"
Processing section "[installs]"
Processing section "[save_ak]"
Processing section "[save_dh]"
Processing section "[save_dje]"
Processing section "[save_spv]"
Processing section "[wgpo]"
Processing section "[pics3dev]"
Processing section "[pics3qvcs]"
Processing section "[cr3w2k]"
Processing section "[save_hwm]"
Processing section "[iso]"
Processing section "[mp3]"
Processing section "[save_hdy]"
Processing section "[modcomp]"
Processing section "[evidev]"
Processing section "[fpcdev]"
Processing section "[cr3qvcs]"
Processing section "[cr3ref]"
Processing section "[cr3nt4spv]"
Processing section "[Mcr3nt4]"
Processing section "[Mcr3w2k]"
Processing section "[fplref]"
Processing section "[fplqvcs]"
Loaded services file OK.
Server role: ROLE_STANDALONE
[global]
        workgroup = EVI
        server string = %h server (Samba, Ubuntu)
        interfaces = lo, eth0
        bind interfaces only = Yes
        server role = standalone server
        map to guest = Bad User
        obey pam restrictions = Yes
        pam password change = Yes
        passwd program = /usr/bin/passwd %u
        passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
        unix password sync = Yes
        log file = /var/log/samba/log.%m
        max log size = 1000
        dns proxy = No
        usershare allow guests = Yes
        panic action = /usr/share/samba/panic-action %d
        idmap config * : backend = tdb
        read only = No
        directory mask = 0777
        guest only = Yes
        guest ok = Yes

[agent]
        comment = Steve's Transient Files
        path = /home/shares/agent
        valid users = smbuser

[backups]
        comment = Other Systems' Backups
        path = /home/shares/backups/
        valid users = smbuser

[cr3nt4]
        comment = CR3 NT4 PICS
        path = /home/shares/cr3_nt4
        valid users = smbuser

[evisd]
        comment = EVI Software Development
        path = /home/shares/fs1/evisd
        valid users = smbuser

[installs]
        comment = Installation Packages
        path = /home/shares/fs1/installs
        valid users = smbuser

[save_ak]
        comment = Al Keet's Backup Area
        path = /home/shares/fs1/SAVE_AK
        valid users = smbuser

[save_dh]
        comment = Don Horsley's Backup Area
        path = /home/shares/DON
        valid users = smbuser

[save_dje]
        comment = Dave Etzold's Backup Area
        path = /home/shares/fs1/save_dje
        valid users = smbuser

[save_spv]
        comment = Steve Valliere's Backup Area
        path = /home/shares/fs1/save_spv
        valid users = smbuser

[wgpo]
        comment = Work Group Post Office
        path = /home/shares/fs1/wgpo
        valid users = smbuser

[pics3dev]
        comment = PICS III Reference Copy
        path = /home/shares/PICS_III_Dev
        valid users = smbuser

[pics3qvcs]
        comment = PICS III QVCS Repository
        path = /home/shares/PICS_III_QVCS
        valid users = smbuser

[cr3w2k]
        comment = CR3 W2K PICS
        path = /home/shares/cr3_w2k
        valid users = smbuser

[save_hwm]
        comment = Howard's Old Files
        path = /home/shares/fs1/save_hwm
        valid users = smbuser

[iso]
        comment = ISO Images
        path = /home/shares/iso
        valid users = smbuser

[mp3]
        comment = MP3 Library
        path = /home/shares/mp3
        valid users = smbuser

[save_hdy]
        comment = Butch's saved stuff.  Hands off!
        path = /home/shares/save_hdy
        valid users = smbuser

[modcomp]
        comment = MODCOMP Sources
        path = /home/shares/MODCOMP
        valid users = smbuser
        case sensitive = Yes
        map archive = No

[evidev]
        comment = CR3 2002 - EVI Sources
        path = /home/shares/fs1/fpc/evidev
        valid users = smbuser

[fpcdev]
        comment = CR3 2002 - FPC Sources
        path = /home/shares/fs1/fpc/fpcdev
        valid users = smbuser

[cr3qvcs]
        comment = CR3 PICS QVCS Repository
        path = /home/shares/cr3qvcs
        valid users = smbuser

[cr3ref]
        comment = CR3 PICS Source Reference Copy
        path = /home/shares/cr3ref
        valid users = smbuser

[cr3nt4spv]
        comment = Steve's CR3 NT4 PICS M Drive
        path = /home/shares/cr3nt4spv
        valid users = smbuser

[Mcr3nt4]
        comment = CR3 NT4 PICS M Drive
        path = /home/shares/Mcr3nt4
        valid users = smbuser

[Mcr3w2k]
        comment = CR3 Win2K PICS M Drive
        path = /home/shares/Mcr3w2k
        valid users = smbuser

[fplref]
        comment = FPL QVCS Reference
        path = /home/shares/FPL_Reference
        valid users = smbuser

[fplqvcs]
        comment = FPL QVCS Database
        path = /home/shares/FPL_QVCS
        valid users = smbuser
Help!  Please?
Answer: I got it working by making these changes to smb.conf:

add: username map = /etc/samba/username.map
username.map contains one line: nobody = *
change: map to guest = bad user to map to guest = bad password
change: valid user = smbuser to valid user = nobody (in all 27 shares)
ran: smbuser -a nobody and pressed ENTER for the password

After restarting the smbd service, I was able to browse the server's shares and connect to them without entering any credentials.  This resolves my issue because we have no private user shares on the common server -- everyone is always a guest.
Maybe someone will find my problem/solution helpful.

Samba Broken after 13.04->14.04 upgrade