Data Science Interview FAANG 2021 Question

Question: You have four tests that benchmark how much power we expect to draw from the servers in a rack: A (5 minutes), B (10 minutes), C (15 minutes) and D (30 minutes) that are conducted sequentially over the course of an hour on 10 servers in a rack. The test are run in random order on each server and all 10 server initiate the benchmark test at the same time. What is the probability that test B is running at any given time on at least 50% of the servers?
Comment: If someone gave me a question worded this poorly at a job interview I might walk out
Comment: Please clarify the question: does "at any given time" mean "as a function of time $t$" or does it mean "at some time during the hour"?
Answer: This is quite an interesting question, since it involves probability pertaining to overlapping random sets.  I'm going to solve this for a more general problem where we have $K$ servers.  The solution turns out to relate to the maximum-count statistic in a multinomial distribution.  By my calculations, the probability that at least half the servers are running Test B at some random time in the hour is approximately $0.45214$ ---i.e., you have a little over a 45% chance.

Simplify the problem: To simplify the problem, let's break the hour down into 5-minute blocks, and denote these blocks of time as $t=1,...,12$.  Denote the set of time blocks taken up by test B as $\mathscr{B}$.  Based on the stipulated times for the tests, here are the possible outcomes for test B based on the test order, and the number of ways of getting that outcome (for convenience, I have ordered these cases by the lower bound of the set $\mathscr{B}$).
$$\begin{matrix}
\text{Test order} & & & & \text{Result of Test }B & & & & \text{Number of ways} \\[6pt]
B,... & & & & \mathscr{B} = \{ 1, 2 \} & & & & 6 & & & & \text{*} \\[6pt]
A,B,... & & & & \mathscr{B} = \{ 2, 3 \} & & & & 2 & & & & \text{*}  \\[6pt]
C,B,... & & & & \mathscr{B} = \{ 4, 5 \} & & & & 2 & & & & \text{**}  \\[6pt]
...,B,D & & & & \mathscr{B} = \{ 5, 6 \} & & & & 2 & & & & \text{**}  \\[6pt]
D,B,... & & & & \mathscr{B} = \{ 7, 8 \} & & & & 2 & & & & \text{***}  \\[6pt]
...,B,C & & & & \mathscr{B} = \{ 8, 9 \} & & & & 2 & & & & \text{***}  \\[6pt]
...,B,A & & & & \mathscr{B} = \{ 10, 11 \} & & & & 2 & & & & \text{****}  \\[6pt]
...,B & & & & \mathscr{B} = \{ 11, 12 \} & & & & 6 & & & & \text{****}  \\[6pt]
\end{matrix}$$
(Note that there are $4! = 24$ total cases that can occur from the ordering of the four tests.  This matches the total of the last column shown here.)  Now, let's look at the overlapping cases.  We can see that there are pairs of overlapping cases shown by the stars in the table.  So, the total highest number of servers running Test B at a given time is going to be equal to the highest number of servers that have an outcome within one of the stipulated pairs of outcomes for the test order.
We can see from the above that all that matters for the purposes of our question are the four groups of outcomes denoted by the stars.  So, let us now denote the test outcome for a single server by four possibilities $X = 1, 2, 3, 4$, corresponding to the number of stars in the table above.  Using the number of ways of getting the test orders in the table, we have the probabilities:
$$\begin{align}
\mathbb{P}(X=1) &= \frac{6+2}{24} = \frac{8}{24} = \frac{1}{3}, \\[12pt]
\mathbb{P}(X=2) &= \frac{2+2}{24} = \frac{4}{24} = \frac{1}{6}, \\[12pt]
\mathbb{P}(X=3) &= \frac{2+2}{24} = \frac{4}{24} = \frac{1}{6}, \\[12pt]
\mathbb{P}(X=4) &= \frac{6+2}{24} = \frac{8}{24} = \frac{1}{3}. \\[12pt]
\end{align}$$
For a single server, the categorical random variable $X$ encapsulates all that really matters in terms of the test-order.  If two different servers have the same value for this random variable then they are both running Test B at some point in time, and if two different servers have a different value for this random variable then they never run Test B at the same time.

Solve the problem: Now that we have established the random variable of interest for a single server, we can solve the problem.  Suppose we have $K$ servers and let the test-order outcomes for these servers be denoted by the categorical random variables:
$$X_1, ..., X_K \sim \text{IID Categorical}(\mathbf{p})
\quad \quad \quad \mathbf{p} = (\tfrac{1}{3}, \tfrac{1}{6}, \tfrac{1}{6}, \tfrac{1}{3}).$$
Letting $N_{x, K} \equiv \sum_{i=1}^K \mathbb{I}(X_i = x)$ denote the counts for outcomes $x=1,2,3,4$, the count vector for all servers and test-orders is a multinomial random vector:
$$\mathbf{N}_K = (N_{1, K}, N_{2, K}, N_{3, K}, N_{4, K}) \sim \text{Mu}(K, \mathbf{p}),$$
and the highest number of servers that run Test B at any given time is the maximum-count value:
$$M_K \equiv \max \{ N_{1, K}, N_{2, K}, N_{3, K}, N_{4, K} \}.$$
The probability of interest in this question is $\mathbb{P}(M_K \geqslant K/2)$, which is the probability that Test B runs on at least half the servers at some point in the hour.  This is something you can obtain from the distribution of the maximum-count statistic.  This distribution is fairly complicated, and it is usually approximated by an asymptotic form such as the Gumbel distribution.  However, for small values (as in the present case) it can be simulated reasonably easily, and this is generally how you would proceed from this point.

Simulate the distribution: It is fairly simple to get a simulated estimate for the distribution of the maximum-count statistic using R.  In the code below I will simulate ten-million outcomes for the case with $K=10$ servers (as in your problem).  The simulated probability of having Test B running on at least half the servers simultaneously is $\mathbb{P}(M_{10} \geqslant 5) \approx 0.45214$.
#Set the parameters
K <- 10
SIMS <- 1e7

#Set up the count matrix
COUNTS <- matrix(0, nrow = SIMS, ncol = 5)
rownames(COUNTS) <- sprintf('Simulation[%s]', 1:SIMS)
colnames(COUNTS) <- c(sprintf('Outcome[%s]', 1:4), 'MaxCount')

#Generate a large number of count vectors
set.seed(418184220)
for (i in 1:SIMS) {
   SAMPLE <- sample.int(4, size = K, replace = TRUE, prob = c(2, 1, 1, 2)/6)
   for (x in 1:4) { COUNTS[i, x] <- sum(SAMPLE == x) }
   COUNTS[i, 5] <- max(COUNTS[i, 1:4]) }

#Compute approximate distribution
DIST <- rep(0, K+1)
names(DIST) <- sprintf('MaxCount[%s]', 0:K)
for (M in 0:K) { DIST[M+1] <- sum(COUNTS[, 5] == M)/SIMS }

#Plot the simulated distribution
barplot(DIST, names.arg = 0:K, ylim = c(0, 0.5), col = 'blue',
        main = 'Simulated MaxCount Distribution',
        xlab = 'Maximum-Count', ylab = 'Probability')

#Compute the probability of interest
sum(DIST[6:11])

[1] 0.45214

Comment: My interpretation of the question is "if you pick a time at random, what is the probability that at least half the servers are running B at that time?" rather than "what is the probability that there will exist a time at which at least half the servers are running B?"
Comment: The 24 combinations are explicitly:
ABBCCCDDDDDD
ABBDDDDDDCCC
ACCCBBDDDDDD
ACCCDDDDDDBB
ADDDDDDBBCCC
ADDDDDDCCCBB
BBACCCDDDDDD
BBADDDDDDCCC
BBCCCADDDDDD
BBCCCDDDDDDA
BBDDDDDDACCC
BBDDDDDDCCCA
CCCABBDDDDDD
CCCADDDDDDBB
CCCBBADDDDDD
CCCBBDDDDDDA
CCCDDDDDDABB
CCCDDDDDDBBA
DDDDDDABBCCC
DDDDDDACCCBB
DDDDDDBBACCC
DDDDDDBBCCCA
DDDDDDCCCABB
DDDDDDCCCBBA
Looking at overlaps of B by position 1..12, I count the following:
1: 6,
2: 8,
3: 2,
4: 2,
5: 4,
6: 2,
7: 2,
8: 4,
9: 2,
10: 2,
11: 8,
12: 6
Not sure how this meshes with your test order/result of B table?
Comment: The grouping approach is quite elegant. I think to proceed from there instead of using maximum-count statistic the approach I will proceed with is to use the inclusion-exclusion principle.
Answer: Let's interpret the question as asking "At any given time $t,$ what is the chance that $k=5$ or more out of $n=10$ servers are running Task B?"  This interpretation is interesting due to the strange-looking behavior of the answer: there are times at which it's impossible (or highly improbable) to find many servers running Task B and other times at which it is much more likely to find many servers running Task B.
The solution is straightforward to obtain, albeit potentially terrible to compute, because the general solution requires time proportional to the number of permutations of the tasks.  (Any speedup would require exploiting the summation relationships among the times; namely $5+10=15$ and $5+10+15=30.$)
In general, order the task times into an array $d=(d_1,d_2, \ldots, d_m)$ where $m$ is the number of tasks and "Task B" is indexed at position $1.$  First consider any specific server.  The chance that Task B is running at time $t$ is the chance that this task began in the interval of times $(t-d_1, t].$  Suppose Task B was $k^\text{th}$ in the order, so that $k-1\ge 0$ tasks preceded it and ran to completion.  Let those task indexes be the subset $S\subset \{2,3,\ldots, m\}$ and define
$$d(S) = \sum_{i\in S} d_i$$
to represent the total time taken by those tasks.  We have to count the number of permutations $\sigma$ of $\{1,2,\ldots, m\}$ for which $d(\{\sigma(1),\sigma(2),\ldots,\sigma(k-1)\}\}\in (t-d_1,t]$ and $\sigma(k) = 1.$  When the $d_i$ are arbitrary durations, potentially there are as many distinct values of these $d(S)$ as there are permutations of $\{2,3,\ldots, m\}$ and $m$ cases have to be considered (for $k=1,2,\ldots, m).$ Thus the computing time cannot, in general, be reduced below $m!.$
It remains only to find a reasonably clear, efficient, and correct implementation of this calculation.  One way is to generate all $(m-1)!$ of the permutations of the remaining tasks $\{2,3,\ldots, m\}.$  For each such permutation $\sigma$ find the cumulative sums of the sequence $0, d_{\sigma(2)}, d_{\sigma(3)}, \ldots, d_{\sigma(m)}.$  The value of their empirical cumulative distribution function, $F,$ at time $t$ gives the chance that a randomly chosen ordered subset of the remaining tasks will be completed by time $t$ before "Task B" is run. Let's call this the "permutation ECDF."  The relevant part of its graph for the data in the question looks like this:

Thus (because time is continuous), the chance that Task B is running at time $t$ must be $F(t) - F(t-d_1).$
Here is an R implementation.  Given an array of times times and the index of "Task B," it returns the permutation CDF (as a function):
p.F <- function(times, index=1) {
  # Standardize the input
  d <- times
  if(isTRUE(index != 1) && isTRUE(length(d) > 1)) d[c(1, index)] <- d[c(index, 1)]

  # Return the CDF
  require(e1071) # Exports `permutations` to create an array of all permutations
  ecdf(apply(cbind(0, matrix(d[permutations(length(d) - 1) + 1], ncol=length(d)-1)), 1, cumsum))
}

Assuming the tasks are independently ordered in each server, this chance defines a Bernoulli$(F(t)-F(t-d_1))$ distribution.  Any questions about how many servers are running "Task B" at time $t$ can therefore be answered in terms of the Binomial$(n, F(t)-F(t-d_1))$ distribution.  Here is a plot of those chances for the specifics of the question (on a log probability axis):

It is the graph of this R function g determined by k (equal to 5 servers), d (equal to 10 minutes), and n.servers (equal to 10 servers):
g <- function(x) pbinom(k-1, n.servers, f(x) - f(x-d), lower.tail = FALSE)

For instance, the expression g(23) returns $0.01546197$ for the chance at least $5$ of the $10$ servers are running Task B when the time is $t=23$ minutes.
I checked this by simulating the experiment 10,000 times, in each iteration noting at which times on a fine grid "Task B" was running on five or more of the servers.  The next figure plots those results in blue over the preceding chart (shown now on a linear probability scale).  The agreement is good:

The structure of these plots is curious, but a little thought suggests the huge variations in probabilities are correct: after all, for half or more of the servers to be running a ten-minute task at a given intermediate time, there aren't many combinations of the remaining task times that would permit that: the occurrence of one or more of the longer tasks makes it almost impossible for this ten-minute task to be running then.  And since the entire problem is the same when time is run backwards, these graphs must be symmetrical.
To see what the situation might look like without such a nice discretization of task times (into multiples of five minutes in the present case), here are the results (theoretical and simulated) for five randomly generated times of lengths $d=(3.4, 0.7, 0.3, 4.2, 3.9, 1.2)$ (so that "Task B" lasts 3.4 minutes).
Answer: I am interested in knowing if there are more elegant solutions.
My approach to the question is to discretize the time frame into 12 time frames, and then calculate the probability of each possibility (e.g. the probability that time frame {2,3} is occupied by B is (2!/4!))
Then I try to calculate the probability in which a time frame having 50% of occupation, and then the probability of each consecutive time frame having 50% of occupation time (which will be quite tedious)
Then I can use probability inclusion-exclusion principle to do the final calculation.
Comment: How are you interpreting the question?


How can I specify filenames of animation renders as [SCENE NAME] + [FRAME] when rendering an image sequence?

Question: I'm rendering out products from different angles. I set up keyframes to rotate the product to the desired angles, then I'm doing an image sequence animation render for each angle. Is there a way to specify the filenames to the scene name followed by either a custom name, or the frame number? Thank You!
Comment: Have you tagged the question with 'python' and 'scripting' because you are triggering the rendering by code?
Answer: This answer already explains how to render certain frames.
bpy.context.scene.name             ...   the scene's name
bpy.context.scene.frame_start      ...   the scene's starting frame

import bpy

scene = bpy.context.scene
fp = scene.render.filepath # get existing output path

for frame_nr in range(scene.frame_start, scene.frame_end):

    # set current frame
    scene.frame_set(frame_nr)

    # set output path
    scene.render.filepath = "//render/" + scene.name + "_folder/" + scene.name + "_customName_" + '{0:03d}'.format(frame_nr)
    bpy.ops.render.render(write_still=True)
 scene.render.filepath = fp

Refer to:

padding ints with python
the range function
Answer: For what I needed, I just specified the file path names, starting with the product name and then it added the frame name to the end.


Where do passengers of refuelling stay?

Question: If, for example, you're travelling to the US, and the plane makes a stop in China to refuel, can you enter China even without a Chinese Visa? If not where do passengers of refuelling planes stay?
Comment: Possible duplicate of [Flight diversion + visa issues](https://travel.stackexchange.com/questions/40073/flight-diversion-visa-issues)
Comment: It is not exactly a duplicate but close enough https://travel.stackexchange.com/questions/40073/flight-diversion-visa-issues
Comment: China is one of those countries with strict immigration requirements, so airlines avoid diverting there if it's not an emergency. For example, I know for Hong Kong arriving flights, Cathay Pacific will divert to Macau, Taiwan, Japan, or South Korea if there's a foreseeable issue.
Comment: The duplicate does answer the visa question but I think that the OP wants to know about a general fuel stop. In my experience, for a planned fuel stop, the passengers who were to get out at that destination deplane, new passengers board the plane but continuing travelers stay on the plane and they are directed specifically not to wear their seatbelts. This was on a domestic flight.
Answer: Technical stops just for refueling are no longer particularly common in commercial aviation in most of the world. Long-range aircraft often make them unnecessary, and full on ordinary stops and, where legally possible, connections provide more flexibility for airlines and passengers.
Many are unscheduled (planned, but not routinely part of flight schedules) stops due to high winds. A number of transatlantic 757 flights in 2012 needed to make such stops, and it can occasionally happen on unfavorable weather on transpacific routes too. In such cases, passengers generally remain on board the aircraft while fueling takes place; no visas are required. If passengers are allowed off the plane, they won't pass through immigration controls.
However, there are some regularly scheduled stops that work differently. These stops do involve taking on required fuel, but serve other purposes. British Airways operates a flagship service from London City Ariport to JFK with an all business class A318 aircraft. Due to LCY's short runway, the aircraft takes off from London with limited fuel, stops at Shannon, discharges all its passengers so they can go through US immigration preclearance, fuels up, boards, and completes its journey to New York (you can read about that process in a review). Kuwait Airways makes a stop at Shannon between Kuwait and New York. Passengers get off the plane and clear security (but do not go through US preclerance or any other immigration control) and wait in the departure lounge before re-boarding (after fuel and a fresh crew). Qantas operates an LAX-JFK flight to provide onward connections for their flights from Australia (they do not have the cabotage rights to sell tickets on this flight to solely domestic passengers).
There are a few other examples of such flights. Whether or not a visa is required for these scheduled stops depends on the exact circumstances of the flight, the country's immigration rules, the passenger's nationality, and sometimes whether they already possess other visas, so that's a specific thing that would have to be researched for a given flight.
In summary: passengers on unexpected fuel stops generally stay on board or near the gate, while the experience for passengers on regularly scheduled stops will vary.
I'm not aware of any flights to the US that routinely make a fuel stop in China. If a stop were necessary in an emergency, provisions can be made to keep passengers in the terminal building. In case of long emergency stays, countries can and often do waive visa requirements in emergency situations, sometimes holding passports while passengers go to a hotel (see, for instance, the US rules authorizing waiver of the visa requirement in case of an "unforeseen emergency").
Comment: @Yap S. consider the case of a long flight that would get diverted to an alternate airport on a small island due to bad weather or a technical issue. Flight crew will usually reach their maximum allowed time, so a new crew needs to be flown in. This may take a little while, especially if there is persistent bad weather (think hurricane) at the base/main airports of the airline where they have the reserve crews. You might in such circumstances have to stay overnight, which often means getting you to a hotel. But such cases are rare, the flight will usually not depart at all.
Comment: What are some example of "unforseen emergencies" wherein passengers are allowed to stay for long in the country without a visa?
Answer: Umm they stay on the airplane.
Comment: Even if they let people get to the airport they will be confined to a controlled space and not be free to roam around at the airport. Unless it's a properly scheduled layover which allows airside transit.
Comment: Is it possible to stay in the airport?
Comment: @YapS.  See  https://en.wikipedia.org/wiki/List_of_people_who_have_lived_at_airports
Answer: It depends on the flight and local procedures.
In general the passengers are disembarked (see it as a two connecting flights).
Sometime passengers could remain on the plane (but usually when most of people disembark. Refueling is considered a dangerous activity, so there are various special procedures and how many flight attendants should be ready (and where). On pilot should check from outside.  In any case the airplane should be ready to evacuate.  As far I know, because time constrain, it is not possible to have a refueling plane full of passengers.
Comment: I've been on a plane sitting at the gate when the pilot said we need to fly around some weather, which means we need to load more fuel.  And they re-fueled the plane without letting us off.

Where do passengers of refuelling stay?


Is "earn" different from "be paid"?

Question: I had an English test at my school and there was an English composition question.
And the answer was "Kate doesn't earn as much as her husband", but I answered as
"Kate isn't paid as much as her husband".Though I think it's correct, my teacher said "earn" is different from "be paid". What do you think? Are they the same or different? Could you explain how.
Comment: I respectfully disagree with @HotLicks: the difference is that to *earn* a sum of money is to deserve it, morally, as just compensation for one's labor, while to *be paid* it is simply to receive it.
Comment: It would help, I think, to know what the test question was.
Comment: I could pay you $1,000 for asking this question here, but would you have *earned* it?
Comment: @BrianDonovan - There are many possible interpretations, depending on context.
Comment: There are subtle differences.  Generally "paid" is considered to refer to the gross amount, while "earned" is sometimes used to refer to the after-taxes, after-deductions amount.  But they basically mean the same.
Comment: also I think _earn_ can refer to money you get from different resources probably any type of work you do in a way that when we say _he earns some amount of money_ we mean this is the amount he can _make_, but _be paid_ does more imply money you get through a salary or a type of fixed job.
Answer: I think that the teacher may have been nitpicking. It is a colloquial usage. Many people use earn as paid in everyday language.

"Kate doesn't earn as much as her husband", but I answered as "Kate isn't paid as much as her husband."

I'd be interested in what the teacher said was the correct answer. If you are an English speaking college level student, I agree with the teacher. If you are learning English or are in elementary/primary school, I think he or she is being too persnickety.
To earn something means we've put some work into it.
Examples:
I earned my paycheque by working forty hours week at my job.
I am paid an amount from my trust fund. I did nothing to earn the trust fund money. I was born into a wealthy family.
English is a peculiar language. Many of us commonly use it incorrectly but we are understood perfectly in spite of it.
It would be great to see the actual test question and the 'correct' answer.
Answer: In the context of financial compensation, to "earn" and to "be paid" are essentially synonymous.  This is particularly true when comparing wages or salaries.  There can be subtle differences in meaning between the two, but in general, they are synonymous.
For example, if I am asked what salary I make, I could reply "I earn $100,000 per year." This is synonymous with "I am paid $100,000 per year."  This does not mean that the terms "earn" and "paid" are synonymous - indeed they are not.  However, the answer you gave is technically correct, assuming that the question was about Kate and her husband's relative wages.
If, however, I am discussing my employer shorting me on my paycheck (a very special context indeed), I might say "I earned $100 last pay period, but I was only paid $80."  Really, though, to use "earn" here muddles things up a bit.  It would be better to say "I was supposed to be paid $100 last pay period, but I was only paid $80."
If the question was about how much interest Kate earns on a loan as compared to her husband, then the answer "Kate isn't paid as much as her husband." would no longer be accurate, because in the context of investments, it is possible to earn interest without taking a payment.  This context seems unlikely in your case, though.
Answer: Earn would refer to a activity over time, paid an instance of financial transaction.
Over a week, I earn 100. At the end of the week I am paid 100 for the work I did.
In reference to your teacher,  the context would refer to a continuous process, rather than one off instance, but a little nick picky imho.
Paid can also refer to transfer of money for something. I was paid 100 for my old bike.

Is "earn" different from "be paid"?


Do multiple operating systems affect the performance of a computer?

Question: I have both Linux and Windows installed in my laptop. I want to know whether it affects my computer's performance to have multiple operating systems. Can this reduce performance, or is it fine?
Comment: How is this in any way opinion based? There is no question of opinion here: of course there is no effect other than disk space used, the OSs are completely independent of one another.
Comment: In the olden days of spinning hard disks, read speeds in the outer and inner sectors were different, see e.g. [here](https://superuser.com/q/643013/110631). So installing your OS in a different location on the disk could affect performance. In particular, this affects dual-booting, since one of the OSes has to reside in the outer partition of the disk.
Comment: @C.S.Cameron no, of course not. But that would be a very different situation. Since the OP clearly stated "installed" and did not mention VMs, I don't see why we would assume they ment to write something completely different to what they actually wrote.
Comment: Does this answer your question? [Multiple OS in a Laptop or Desktop](https://askubuntu.com/questions/79406/multiple-os-in-a-laptop-or-desktop)
Comment: @terdon I'm reluctant to close as this question seems clearer, more specific and has more detailed answers
Comment: @XuMuK Even on a "modern fast HDD", you will see a difference in performance between both OSes.
Comment: @terdon: Not if one of them is running as a virtual machine on the other.
Comment: If you are using the SSD or modern fast HDD there should not be much difference if your hardware is completely supported (the performance can be downgraded if some OS if there is problem with your hardware support).
Answer: No, it only affects your Disk Space.
While you are using an OS, the other OS is just a bunch of folders and files, often in an unmounted partition, to it does not affect performance
Performance is controlled by CPU, GPU, RAM, and Disk I/O speed, and ONLY the active OS has access to it.
Comment: This is not true for an HDD. If the new OS is installed on the slower section of the HDD, performance will be severely affected. An HDD read/write speed can vary by 20-50% depending on where it is reading/writing. This can cause the OS to be more sluggish, because everything takes a lot longer to load. If things are bad, this can cause the whole system to lock up a lot more, just waiting for all the I/O to get done.
Comment: Thank you :)
Your help is appreciated!
Comment: Well, while "CPU, GPU, RAM, and Disk I/O speed" determine the overall computer speed, the question was obviously whether a second OS *uses* some of those resources even when not in use, resulting in less performance being *available* for the current OS. Your answer is correct, but the last sentence is misleading, or rather, misses the question.
Answer: If you are using a virtual machine to provide multiple operating systems running at the same time, they must share system resources.
In that case both OS's performance may suffer.
If you have a traditional dual boot system there should be no drag on performance.
Answer: If one of your systems is a reasonably modern Windows, it has a feature known as "Fast Boot", which may prevent you from accessing Windows drives from other systems, and in some cases may even cause trouble when booting. See Is there a way to make Windows Fastboot and Ubuntu work together?
On the other hand, disabling the feature will make your Windows boot longer, although I've got no data on the exact timing. See also "Is it necessary to disable Fast Boot in Windows to dual boot with linux(EFISTUB)?" over at Unix&Linux.
Comment: Note that this applies to systems installed on bare metal, and not to virtualisation software such as VirtualBox.
Comment: Fastboot also causes a number of other issues even without dealing with multiple OS installations, and is a rather questionable feature in the first place, IMO.
Comment: I haven't heard of other issues, what are they?
Comment: Fastboot doesn't (at least for all purposes) really count as a proper "reboot," which means some of the time you think you're restarting your computer (to allow some update, to fix some problem, whatever), but you're actually not.
Comment: That makes sense
Answer: No.
No matter how many operating systems you have installed on a drive, only one of them can be loaded at any given time, with the others simply sitting on the drive doing nothing.
Thus, as others have noted, the only resources having extra operating systems would consume is disk space.
Comment: I generally agree with this except that if the drive were a traditional hard-disk drive with spinning platters and moving heads, the location of the individual OS files on the drive (outer edge vs middle vs inner) can change performance due to how fast the platters are moving and how fast they can be accessed. These days, this isn't a problem, but OSes still offer to put themselves somewhere fast or slow leaving the slow or fast remainder to the user. I don't think there are any locale specific issues with solid-state media that are really measurable and matter.
Answer: It would be better to have one computer with one OS, so you can manage it better, but what I did, was I got an external hard disk and I install Linux on it while my main hard disk was on the computer. In that, I can manage my hard disk space and use the same hardware e.g. CPU, GPU, etc,
Comment: I don't think many people will agree that it's 'better' to have one os per computer - dual boot is used to good effect by many people.


SagePay integration from Windows Forms

Question: I've been asked to integrate a windows form application with SagePay to take payments directly from the application. The SagePay documentation talks about ASP.NET so I'm not sure whether this is possible. Has anyone integrated a WinForm application with SagePay before? Is it possible?
Answer: I know some payment processors have a connection option where the payment part is hosted on a form on their server. You could try embedding a web browser control into your app to display the payment page.
Usually there is another type of connection option where you can send your information via HttpWebRequest, but I'm not sure that this would work as it requires SSL. Since you are running your app as a desktop client, I'm not sure what you would have available.
Answer: I am not sure this is possible given that sagepay needs to redirect users to Mastercard securecode or Verified by Visa, I think they would need to redirect to the bank which then redirects back to a supplied URL. I would think this needs to be within a browser environment.
Answer: You can post to urls and get back a response via .net objects and parse the results to display on a form.
You can also ask SagePay to create a Vendor account with 3d secure switched off. This allows you to take payments in house in your winforms app without the customers password however most card vendors if you bypass 3d secure will not protect you if someone calls and uses a card fraudulently.
However it can definitely be done.
You can normally post to secure servers from non secure pages so again this isn't usually an issue.

SagePay integration from Windows Forms


Xubuntu 16.04 - optirun bumblebee error [ERROR]Cannot access secondary GPU - error: [XORG] (EE)

Question: So, before I start or you calling out duplicate question, there is no such thing as xserver-xorg-legacy here. I have tried this solution here and found out that it does not exist in my version of driver. There is one similar package called xserver-xorg-legacy-hwe-16.04 but removing it will revert the driver back to version 304, in which break the whole laptop upon installing Bumblebee at boot start up - in which I have to apt remove them. I have tried to use apt-mark to prevent them from automatically uninstalled, but the system detects it as an impossible situation.
Anyway, continuing on. I am running Nvidia GeForce GTX 950M and uses Nvidia driver version 384. However, when I tried the test, it returns this:
[ERROR]Cannot access secondary GPU - error: [XORG] (EE)
This is the error:
$ optirun -vv -debug glxgears
[ 1855.586234] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[ 1855.586631] [INFO]Configured driver: nvidia
[ 1855.586952] [DEBUG]optirun version 3.2.1 starting...
[ 1855.586976] [DEBUG]Active configuration:
[ 1855.587048] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[ 1855.587065] [DEBUG] X display: ebug
[ 1855.587082] [DEBUG] LD_LIBRARY_PATH: /usr/lib/nvidia-384:/usr/lib32/nvidia-384
[ 1855.587098] [DEBUG] Socket path: /var/run/bumblebee.socket
[ 1855.587112] [DEBUG] Accel/display bridge: auto
[ 1855.587122] [DEBUG] VGL Compression: proxy
[ 1855.587136] [DEBUG] VGLrun extra options:
[ 1855.587151] [DEBUG] Primus LD Path: /usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus
[ 1855.587299] [DEBUG]Using auto-detected bridge primus
[ 1855.594388] [INFO]Response: No - error: [XORG] (EE)

[ 1855.594399] [ERROR]Cannot access secondary GPU - error: [XORG] (EE)

[ 1855.594402] [DEBUG]Socket closed.
[ 1855.594414] [ERROR]Aborting because fallback start is disabled.
[ 1855.594417] [DEBUG]Killing all remaining processes.

primusrun also returns with the same error. I do not know what is causing this error because it does not seem to show one.
This is my bumblebee.conf:
## Server options. Any change made in this section will need a server restart
# to take effect.
[bumblebeed]
# The secondary Xorg server DISPLAY number
VirtualDisplay=:8
# Should the unused Xorg server be kept running? Set this to true if waiting
# for X to be ready is too long and don't need power management at all.
KeepUnusedXServer=false
# The name of the Bumbleblee server group name (GID name)
ServerGroup=bumblebee
# Card power state at exit. Set to false if the card shoud be ON when Bumblebee
# server exits.
TurnCardOffAtExit=false
# The default behavior of '-f' option on optirun. If set to "true", '-f' will
# be ignored.
NoEcoModeOverride=false
# The Driver used by Bumblebee server. If this value is not set (or empty),
# auto-detection is performed. The available drivers are nvidia and nouveau
# (See also the driver-specific sections below)
Driver=nvidia
# Directory with a dummy config file to pass as a -configdir to secondary X
XorgConfDir=/etc/bumblebee/xorg.conf.d

## Client options. Will take effect on the next optirun executed.
[optirun]
# Acceleration/ rendering bridge, possible values are auto, virtualgl and
# primus.
Bridge=auto
# The method used for VirtualGL to transport frames between X servers.
# Possible values are proxy, jpeg, rgb, xv and yuv.
VGLTransport=proxy
# List of paths which are searched for the primus libGL.so.1 when using
# the primus bridge
PrimusLibraryPath=/usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus
# Should the program run under optirun even if Bumblebee server or nvidia card
# is not available?
AllowFallbackToIGC=false

# Driver-specific settings are grouped under [driver-NAME]. The sections are
# parsed if the Driver setting in [bumblebeed] is set to NAME (or if auto-
# detection resolves to NAME).
# PMMethod: method to use for saving power by disabling the nvidia card, valid
# values are: auto - automatically detect which PM method to use
#         bbswitch - new in BB 3, recommended if available
#       switcheroo - vga_switcheroo method, use at your own risk
#             none - disable PM completely
# https://github.com/Bumblebee-Project/Bumblebee/wiki/Comparison-of-PM-methods

## Section with nvidia driver specific options, only parsed if Driver=nvidia
[driver-nvidia]
# Module name to load, defaults to Driver if empty or unset
KernelDriver=nvidia-384
PMMethod=auto
# colon-separated path to the nvidia libraries
LibraryPath=/usr/lib/nvidia-384:/usr/lib32/nvidia-384
# comma-separated path of the directory containing nvidia_drv.so and the
# default Xorg modules path
XorgModulePath=/usr/lib/nvidia-384/xorg,/usr/lib/xorg/modules
XorgConfFile=/etc/bumblebee/xorg.conf.nvidia

## Section with nouveau driver specific options, only parsed if Driver=nouveau
[driver-nouveau]
KernelDriver=nouveau
PMMethod=auto
XorgConfFile=/etc/bumblebee/xorg.conf.nouveau

Before this, I got another error where it says [ERROR]Cannot access secondary GPU, secondary X is not active.. However, I manage to fix it by editing all the nvidia-current into nvidia-384 in bumblebee config. nvidia-current does not exist here anymore.
This is my xorg.conf.nvidia looks like:
Section "ServerLayout"
    Identifier  "Layout0"
    Option      "AutoAddDevices" "false"
    Option      "AutoAddGPU" "false"
EndSection

Section "Device"
    Identifier  "DiscreteNvidia"
    Driver      "nvidia"
    VendorName  "NVIDIA Corporation"

#   If the X server does not automatically detect your VGA device,
#   you can manually set it here.
#   To get the BusID prop, run `lspci | egrep 'VGA|3D'` and input the data
#   as you see in the commented example.
#   This Setting may be needed in some platforms with more than one
#   nvidia card, which may confuse the proprietary driver (e.g.,
#   trying to take ownership of the wrong device). Also needed on Ubuntu 13.04.
    BusID "PCI:01:00:0"

#   Setting ProbeAllGpus to false prevents the new proprietary driver
#   instance spawned to try to control the integrated graphics card,
#   which is already being managed outside bumblebee.
#   This option doesn't hurt and it is required on platforms running
#   more than one nvidia graphics card with the proprietary driver.
#   (E.g. Macbook Pro pre-2010 with nVidia 9400M + 9600M GT).
#   If this option is not set, the new Xorg may blacken the screen and
#   render it unusable (unless you have some way to run killall Xorg).
    Option "ProbeAllGpus" "false"

    Option "NoLogo" "true"
    Option "UseEDID" "false"
    Option "UseDisplayDevice" "none"
EndSection

Some more info about what I'm dealing with:
$ lspci -vnn | grep '3D'
01:00.0 3D controller [0302]: NVIDIA Corporation GM107M [GeForce GTX 950M] [10de:139a] (rev a2)
$ lspci -vnn | grep 'VGA'
00:02.0 VGA compatible controller [0300]: Intel Corporation Skylake Integrated Graphics [8086:191b] (rev 06) (prog-if 00 [VGA controller])

If there is any help on solving this, it will be appreciated.
Answer: Try an older driver, I had problems with 384, I don't remember exactly my problem, but 375 and 378 are working fine for me now.


Would it be acceptable to ask a question about pencil cases here?

Question: There is a certain style of pencil case where I'm not sure what it's called, or where to find one because I got one for a present once, and I was wondering if it would be acceptable to be asked on this site, otherwise which site I should ask it on? This seemed to be the closest site for this topic, but I'm not sure if it completely matches the "theme" of this site...
Comment: *goes to Stack Overflow....asks for help figuring out what brand of keyboard he once had...it had keys, was made of plastic...*
Comment: LMAO This is probably the best question I've ever seen on Stack Exchange.
Answer: Questions on "where to find Product X" are generally considered a poor fit for Stack Exchange sites - they're very limited in their usefulness, and the store selling them today might not be selling them in another couple of months.
As for identification - well, product-identification is not really our thing, and writing tools and implements are really borderline here... I would say that if by "what the style is called" you mean a certain kind of pencil case, easily distinguishable from other types, whose use and utility are somewhat different... then that's a question about tools, and I think we'd be OK with it. But if it's a particular design or visual style, then that's not really a writing issue, IMHO.
By means of analogy, I'd say "What kind of tool should I use for hitting things together?" would be OK, whereas "Where can I find a hammer with a red wooden handle?" would be too localized.
Thanks for checking for such a borderline case!
Comment: I understand...I was trying to find out more about a pencil case that I got a long time ago as a gift, and I have never seen anything like it, it has a trifold design with different things on each flap


used in layered naviation (Filterable with results) stopped showing comparable attributes on frontend

Question: For the product with a attribute which is used in layer navigation = 'Filterable with results' Suddenly stopped showing attributes to filter on frontend. How to check this ? where should i lookup ?
Comment: are u using any extension for this layered navigation.or default magento navigation
Comment: @PradeepSanku No, i'm using default magento navigation.
Answer: Just Check following for a attribute to be seen in the layered navigation
1) Attribute's Catalog Input Type for Store Owner should be Dropdown.
2) Use In Layered Navigation should be Yes
3) if everything is above is their.now go to cache and clear the cache.
Comment: 1) yes. 2) yes 3) cleared and tested. It's not showing up. did i mess core files ? This core functionality isn't working :(
Answer: Your question isn't quite clear on exactly what happened. Did a specific attribute disappear from the layered navigation (i.e. the filters), or did the layered navigation disappear altogether?
The visibility of the layered navigation depends on the category. Unless you've changed the layout, you should find that layered navigation appears in the search results page, and in categories where "Is Anchor" is set to "Yes". So if there are no filters at all, perhaps you need to set "Is Anchor" on your category.
To my knowledge, the layered navigation doesn't appear anywhere else - home page, product page, account pages, cart/checkout - because it just wouldn't make any sense. Well maybe on the home page, it could act as a filter against all products, but AFAIK it doesn't do that.
On the other hand, if just one attribute has disappeared from the layered navigation, it might just be because that attribute isn't relevant to the contents of that category. If you set an attribute as "filterable (with results)", Magento will only show that attribute in the filters if it's applicable to the products listed. Whereas if you set it "filterable (no results)" it will appear as a filter whether relevant or not.


Old Minecraft Versions not in Launcher

Question: I am wondering, is there a way to play old Minecraft versions such as Indev/survival test? For example, there was a mod called MCnostalgia, but I don't know if it's still available. I know, half of you are probably going to say, use the edit profile option in the new launcher, but I want to play some versions that the edit profile option does not contain. Is the mod out there? If so, where? Also, is there is any way to legally get old jar files for minecraft and put them In the versions folder? If so where from?
Comment: I reworded some of your question so it's less likely to be closed. We won't run off and find mods for you, but we will help you solve a problem (and if that's done by using a mod, so be it)
Comment: Heh... deleted my answer, as my reading comprehension fails.
Comment: Well, I really am not looking for people to run off and spend all of there time looking for resources, I am just looking to see if there is a way to get more old versions than the launcher provides, and if so, how?
Answer: I'm not sure about using old jars and the version directory, but I do know this - there is a way to run the old Minecraft.exe in such a way that it downloads to a specific directory - this was originally designed to that one could place a valid Minecraft installation on his or her thumb drive or other removable media and run it from there. Also out there is a little Java application called Minecraft Version Changer. Using the custom-directory technique, the old launcher, and MVC, it is possible to go back as far as Indev or Classic. A tutorial on the thumb-drive technique which we will be using here can be found at http://en.kioskea.net/faq/9814-portable-minecraft-minecraft-on-your-usb-key - This will work with the new Launcher, but MVC will only work for the old one, so you'll want to get your hands on a copy of that, which can most likely be found on numerous file-sharing sites. If not, contact me personally and I will gladly be of assistance as soon as possible. Also, the MVC may be found at http://mcvc.in. The procedure for setting up MVC is the same as described for setting up a portable directory, only you must make another Batch file exclusively for the MVC so that it does not alter your system's AppData folder. moving along with that, the MVC executable itself will be placed in the same folder as the Minecraft.exe launcher. Again, if you need assistance, you are very welcome to contact me. I'll be glad to help. Have a nice day.
Comment: Apologies, that slipped my mind, unless you're thinking of something else. I am speaking of the older version of the Minecraft Launcher, not the game itself. [Edit:] As far as I know of, it is in no way illegal to distribute the launcher, considering one would need a paid MC account to even use it.
Comment: Oh, my apologies.  I read that as distributing an older version of Minecraft.  My bad.
Comment: That's alright, I'd never do such a thing like that anyways. :P
Comment: That sounds good.
Comment: This seems like a good idea, although I was pondering the idea of if the MCnostalgia mod would still work with some messing around... I will try your methods first, since I don't want to accidentally corrupt my minecraft with an out-of-date mod.
Answer: To get to the old versions of Minecraft do this:
Step 1. Open Minecraft
Step 2. Go to Settings
Step 3. Click Add New
Step 4. Put Your Username
Step 5. Put Version By Scrolling to the version you want
Step 6. Enjoy!
Answer: You can find some versions of Minecraft using this: https://sites.google.com/site/luigi2600sgamehackingsite/minecraft-the-lost-versions
Though, if you don't have the jar file of another version you wanna play, or somebody else hasn't found the jar file, or if it does not exist anymore at all, there's no way to play that version then, just to note.
Here are the step to install the versions into Minecraft so you can play them.
Step 1: Go to your search bar
Step 2: Search "Run" and click on the "Run" program.
Step 3: Type in %appdata% and click on Ok.
Step 4: Go to the ".minecraft" folder and then to the "versions" folder.
Step 5: Open "The Hidden Versions" zip thing with either WinRAR or 7zip.
Step 6: Select any folder of the version of the game that you want to play.
Step 7: Drag that folder into the "versions" folder in ".minecraft".
Step 8: Close everything down and open up the Minecraft launcher.
Step 9: Go to launch options and make sure that you have enabled historic versions.
Step 10: Edit a profile and then change version to the version you put in.
Step 11: Launch Minecraft.
If you've followed my steps correctly, this should work. I hope you're happy with the versions that we have found and is able to be played.
Hope this article helps!

Old Minecraft Versions not in Launcher


Should I be changing gear at every level up?

Question: Just like the title says, should I be changing my gear every time I level up? Is it worth it? I just started Nightmare mode with my Wizard last night and have kept the same gear on since about the beginning of Act IV of normal mode. I seem to be doing alright on Act I - Nightmare, haven't died yet knock on wood. But I'm afraid I'm going to have to start changing gear again soon. I have plenty of gold to where I could hit up the blacksmith or the AH.
Comment: I removed your question about the fast gear switch. It was a separate, unrelated question, so you should ask it as it's own question.
Answer: This depends heavily on whether you are playing hardcore or softcore. In softcore, there is no pressure. If you find yourself in trouble and dieing, then you can still lean back and get better gear from the AH (you don't even have to repair the old one ;)
In hardcore, things are very different. You don't get the chance to die once as a reminder to upgrade your gear, so you have to do it more often based on how much life you have left in dangerous encounters and how much damage you did.
Generally, it would be best to have the best gear for your current level. But most players simply can't afford paying outrageous prices in the AH for top-of-the-line gear at every level-up. Therefore, you have to strike a compromise and continuously improve your gear. It might very well happen that you still run with an item that is 10+ levels below your current level, but that item is bound to be replaced as soon as you find something decent in the AH.
Comment: One thing I find is that upgrading you weapon can really help you a lot. Getting a weapon with high dmg as early as possible (without being priced too high) can really help a lot. That is probably the most important one to keep updating, and once in a while look for new items for the items you are having a hard time replacing or you've used in a long while. You can often get some decently priced things on the AH.
Comment: +1 I forgot to consider Hardcore mode when writing up my answer.
Answer: No, you don't need to change gear every time you level up. The only time you need to worry about upgrading your gear is when you start running into problems advancing due to under leveled gear, which will be obvious due to the fact you keep dying.
Answer: You certainly don't need to keep upgrading on every level up. Periodically review your equipment and look to replace the worst piece you have, simplest to look on AH with a small buyout - it won't break your wallet and can give a nice boost.
The only item you want to upgrade more often is your weapon, as your damage will suffer a lot if you are using something from 10 levels earlier. Again, just search for something with your main stat & other preferred traits (for e.g. Life on Hit, Vit) with a reasonable buyout (I'd say 2-5k will get you a decent weapon really cheap)
Also, on using gold for the blacksmith: Note that esp. with weapons, the chances of getting a good roll is quite low. You could try to have some armor crafted, if you're really lucky that can make you rich (or usually, won't be worth what it cost). You can look in the Blizzard crafting forums to find someone who is cheap & has live streaming.


Is Smite Literally Sight Based?

Question: Let's say that a Paladin is fighting against an invisible opponent. Can they target it with their Smite Evil ability, even if they have identified what square the enemy is residing in? The particularly confusing part lies in the "the paladin chooses one target within sight to smite" of the abilities description. The Paladin might not be able to actually see their invisible enemy, but they know what square they're in and, presumably, it is within their sight.
Answer: You are correct.  The only restriction on what creatures can be targeted with Smite Evil is that the paladin must be able to see the creature to be targeted.
Another way of phrasing that restriction would be to say that the target must be within line of sight.  The line of sight rules state:

A line of sight is the same as a Line of Effect but with the additional restriction that that it is blocked by fog, darkness, and other factors that limit normal sight (such as Concealment).

The invisibility rules say that, when attacking an invisible creature:

the invisible creature still benefits from full concealment

I think it's pretty fair to say that, based on these rules, a paladin would not have line of sight to an invisible creature, and thus wouldn't be able to target them with a smite.

Is Smite Literally Sight Based?


Hard reset and restore of iPad from a 2nd desktop computer?

Question: I'm maintaining a series of iPads used in kiosk context for a client. Occasionally the  iPads become 'locked' and require a hard reset and restore from my Mac which was used for the original deploy.
My question is, can I somehow allow the unlocking and restore on a 2nd desktop (the client's) Mac? Isn't the iPad 'tied' to just one Mac, the one used for the original deploy? Or am I mistaken?
Answer: If you are resetting these things and then restoring then from a saved local backup that second part is tied to your Mac.
You can reset an iPad to its "factory fresh" state from any Mac/PC, but you might not be able to reset an iPad to your desired "factory fresh eco_bach kiosk" state from any but yours.
Answer: You are definitely mistaken ;) it can be done by any computer, Mac or PC! As long as you have the IPSW file you can restore it from iTunes on any platform. It's only 'tied' when you sync your iPhone with iTunes library.


Galvanised fire bins and ash?

Question: I bought a new galvanised fire bin and burnt a shed load of garden waste ...just leaves and branches. I want to use the ash in the compost when preparing my raised beds but I'm worried about the galvanised coating that was on the bin. It's completely burnt off now, but has it contaminated the ash? I'm not sure how much zinc would release into the ash or how much would just float away with the smoke ...or how much zinc is good/bad in soil or compost. Does anyone have any info or experience with this issue??
Answer: Presuming this happened more than a few hours ago - no problem. Fresh zinc oxide (like an hour old) can give one the "oxide shakes" , "zinc chills" , " brass founder ague". I am the only one at Stack Exchange that has has this condition , and I can promise you would recover quickly even if you had the condition. Some zinc reacted with iron/steel and is now inert. Some zinc vaporized and immediately oxidized . No problem , zinc oxide is used in skin cremes. Zinc is a trace element used by many plants ( years ago , Amoco added zinc to fertilizer for some corn fields that were deficient in zinc). Zinc can cause liquid metal embrittlement of steel in special circumstances but I doubt that will be a problem.
Comment: Thank you ...I'll be sure to use it then. I'm going to store it anyway and mix it with the next load of ash, which won't have any zinc in it, so it will thin out a bit anyway. Thanks again for sharing.

Galvanised fire bins and ash?


How can I model a monorail robot in Webots by importing a Solidwork CAD model of robot?

Question: I am new to Webots. I have not good idea about the considerations what should I consider when import a SolidWork CAD model to the Webots. I have a SolidWork model of robot. But I have not good idea to how should I place the coordinate systems and make relations between movements. Can anyone give some rough idea about the steps I should follow to correctly import a model to Webots?
Comment: This is an answer here, [How to import a 3D model in Webots_R2022b?](https://robotics.stackexchange.com/q/24227/9176). This question would be a duplicate of that question, except that, unfortunately, the answer has not been marked as the accepted answer.
Comment: What are the versions of SolidWorks and Webots? Please [edit] your question to include that information (do not place it in the comments).
Comment: the title question of your post does not match the rest of the post ... one is `how do I model?` ... the other is `how do I import?`
Answer: Some tips when importing designs from Solidworks:

Stick to the Webots recommendation for the objects's orientation FLU (x-Forward, y-Left, z-Up) for example the front facing the positive X-axis and the left side aligned with the positive Y-axis.

Keep it simple; try to minimize the number of parts, especially with
ball bearings, nuts, and bolts. Too many faces can slow down the
simulation.

Keep degrees of freedom straightforward. Stick to Standard mates; if
it gets more complex, use a combination of simpler ones.

Group moving parts together in subassemblies, and do the same for
non-moving parts.

Use a main Assembly to arrange subassemblies and establish a base frame incorporating non-moving components.

In Solidworks, position the robot where you want it will be the origin position of the simulation in Webots . Use visualization modes to help with this.

Pay attention to joints axis orientation for consistency. for example if a motor rotates in counterclockwise (positive) but is mounting upsidedowm the move result be clockwise (negative) you can flip this in Webots too.

Create additional geometries for collision and import as separate mesh. You can do this manually using basic shapes.

take this tips make life easier, using the Solidwork to URDF plugin and then URDFtoProto to seamlessly bring it into Webots. Happy robot importing!


Is finance complex?

Question: I am reading a book that is describing a group of people in the middle ages. It says "[they] had managerial and financial jobs, jobs of high complexity, and were neither farmers nor craftsmen". I am not trying to be PC but I do not understand the complexity of managerial and financial jobs. I am hopeless as an artisan, measure things wrong and can get irritated when facing problem-solving puzzles when home-fixing. I have no experience in finance (I have mostly worked in healthcare and science) so I am genuine when I ask: what is the "high complexity" of financial jobs in the middle ages? I see it as writing down who owes who, maybe calculating percentages... not much more.
Answer: "Writing down who owes who, maybe calculating percentages" may seem trivial to you, but that is because you have had the benefit of several years of modern education. In middle age Europe, there were essentially no schools. Education was reserved almost exclusively for those wealthy enough to employ a teacher (meaning aristocrats) and for clergy who needed to be able to read (and sometimes write) scripture. Thus, it's not clear where you propose that people should have learnt to write and calculate in the way necessary to do these jobs. Some estimates put the literacy levels at the time as low as 6%, so we are really talking about the intellectual elite of society at the time.
As an aside, modern-day financial jobs can be extremely complex. Some of the top jobs at modern financial institutions are occupied by so-called "quants"—PhD-holding mathematicians, economists, and scientists whose job is to build complicated mathematical models of markets and asset prices.

Is finance complex?


Quadratic Equations to Describe SBox

Question: I am using a 8 bit Sbox having 16 entries with a lookup table of 4x4 in cryptographic algorithm. Sbox is constructed on subgroup of galois field 2^8. I want to calculate number of quadratic equations used to describe this Sbox over GF(2) so I can calculate resistance of algorithm against algebraic attacks.Since AES Sbox can be described by 23 quadratic equations and my Sbox is also 8 bit but its size is small having 16 entries only. So kindly if anyone can tell by how many quadratic equations my Sbox can be represented over GF(2)?
Answer: You cannot, without fully specifying the Sbox table. The equations are determined by something like a grobner basis algorithm or some other means which require input of the Sbox specification.
See https://eprint.iacr.org/2017/007.pdf

Quadratic Equations to Describe SBox


How much bandwidth do I really need (to stream video)?

Question: I'm looking to get an internet connection for my place (I have been using work, school and coffee shops) and I'm wondering how much bandwidth I really need to do different kinds of things? Google turns up lots of stuff but more than 1/2 are for servers and none of the rest give a "To do A you need X Mb" list. I'm looking for a general answer but, merely as a for example, what about streaming video from hulu or reasonably painless (aka HTTP limited by something I don't control) downloading of large files?
Answer: You don't need a ton, but you do need a good amount. In general 1 Mb/sec is enough for low quality stuff.
For the 480p Hulu videos and YouTube videos you'll want at least 3 Mb/sec, and even then it might get a little choppy if you don't have a very solid connection. For the extreme streaming video (1080i or whatever YouTube is offering now) I don't think there is a connection big enough. I've been on 30 Mb/sec high bandwidth connections and still get delays.
The best experience I have is with 5 Mb/sec. No delays, always fully buffered, and I can choose the highest quality I want.
Comment: Torrents suck bandwidth by nature, even when you try and limit them they flood the routers IP lookup table with requests. Hundreds of peers *per torrent* will kill just about any network setup bar commercial routers and switches with some very specialized settings.
Comment: I can say for sure that an OC-48 (the 2.5Gb up-link that my University had) can give you all you could ever want and then some. OTOH they need $.25M in new hardware to get it up and running and the targeted-at-students apartments that went in had some kind of 10Gb link so who knows :).
Comment: Yeah, but I don't think I could handle that much bandwidth. I'd be too tempted to torrent everything. :)
Comment: Ahhh. Torrents. The bane of IT. I knew the guy who set up the filtering and he said that if they didn't restrict torrents as far as they could (to zero where they could) there wouldn't be room for anything else :)
Comment: 30mbps should be plenty for 1080p. YouTube 1080 is somewhere around 8mbps average, with higher peaks.
Answer: Bandwidth is not as important as latency.
Wireless connections are typically high latency.  That means it takes a long time for the connection to get data and confirm it was received.
Wi-fi and 3G connections are usually not as good for streaming video as a wired connection that plugs directly into your computer.
Satellite and microwave connections are also poor applications for streaming video.
The reason for this is that most video streaming servers expect your computer to go "I got it" after each chunk of video sent to you.  If it takes a long time for your computer to get back to the server and say "I got it," the server will wait until it hears back from your computer to send more video, so your video may stop and start a lot.
Comment: No, latency is not the determining factor. It can help, but unless you have serious network problems it won't have the effect it will have on say VOIP or networked games.


Out-of-the-money options at expiration

Question: It's taught that out-of-the money options that expire at the end of the last trading day expire worthless yet I see many expired options in trading hours that hold their value and continue to trade. Shouldn't they become worthless with a bid and ask price of zero?
Comment: [Please note the following options will trade from 9:30 a.m. ET to 4:15 p.m. ET](https://www.nasdaqtrader.com/Trader.aspx?id=optionshours): DBA, DBB, DBC, DBO, DIA, EEM, EFA, GAZ, IWM, IWN, IWO, IWV, JJC, KBE, KRE, MDY, MNX, MOO, NDX, OEF, OIL, QQQ, SLX, **SPY**, SVXY, UNG, UUP, UVXY, VIIX, VIXY, VXX, VXZ, XHB, XLB, XLE, XLF, XLI, XLK, XLP, XLU, XLV, XLY, XME, XRT
Comment: If the options that you are looking at are ITM, you may be looking at closing quotes.  Are you sure that they are actively trading? Equity options cease trading at 4:00 PM EST.  Index options and some ETF options trade until 4:15PM EST on expiration day.  If not looking at them, please indicate  what contracts you are observing.
Comment: @BobBaerker I was watching the SPY contracts, could that be the reason? Even so, why do ETF contracts continue on trading?
Comment: @BobBaerker oh Alright got it, thank you so much I appreciate the help, have a good night :)
Answer: There will only a bid or ask price of zero if an exchange participant or one of their customers wishes to buy or sell at that price.  Furthermore, most options exchange API interfaces do not allow bids or asks at zero in regular option contracts.  Perhaps $0.01 or $0.05 but not zero.
Furthermore, it is possible that a market participant could sell an out-of-the-money option at $0.01 and between the time the market closes and the final exercise deadline at 5:30 pm Eastern (though earlier in practice) something could happen (e.g. an earthquake).
As a result, other market participants may not be willing to buy and sell at such a low price - the risk and administrative overhead may not be worthwhile.
The timeline:

4:00pm Regular US listed options finish trading.
4:15pm Index-based options and ETFs finish trading.
5:00pm CBOE Global Trading Hours options finish trading (VIX, SPX)
5:30pm Final OCC exercise (or contrary exercise) deadline.
Answer: Your question is a favorite dessert of the algos running just after 4:14:01 . I can only answer to the 1 strike OTM which they will hold back from touching until just after the cutoff for most of the unsuspecting populous.
These OTM options hold value into the settlement period that follows because SPY is actually higher or lower than the last prices that are printed seconds into 4:14 ...they already know well in advance (around 3:00pm...or on low volume days 9:32am), what the 4:14 SPY close is going to be. This allows ample time to ensure that the ATM option in the future (4:14) is primed to not be to hot or cold ...so the OTM I previously mentioned will be maybe .01 at 4:14:01 ....but after that during settlement it can be worth much more and will be acted on...but only by the key players.
The argument surrounding this practice of intentionally blocking daytime traders from profiting off this intentional holdback is frequently countered by the plausible deniability explanation, that in some way the market Close is unpredictable, and these overwhelming number of settlements are just running late, and they are just trying to catch up is absurd.

Out-of-the-money options at expiration


Is Komamura the only shinigami who has an animal-like appearance?

Question: Is Komamura the only shinigami who has an animal-like appearance?
Comment: Yeah.. This really made me very curious.. I wonder what he was in his past life. A dog?
Comment: Very interesting question. I never thought of that.
Answer: From the List of Shinigami, Komamura Sajin with his wolf/dog-like appearance is the only one, although:

 Yoroichi comes close, with her cat-form, that she "prefers" to be in.
Comment: how were you able to do that?
Comment: @Cyberson If you were referring to how I added the spoiler text, well, that's done using the >! markup. For future reference, you could read the formatting help or click on 'edit' to see the markup.


What references to "The Man from U.N.C.L.E." are present in Randall Garrett's "Too Many Magicians?"

Question: I was recently rereading Too Many Magicians (A Lord D'Arcy novel) by Randall Garrett and the introduction said that there were punnish references to The Man From U.N.C.L.E.. Of course the Nero Wolfe references were obvious, but I could not identify the Man From U.N.C.L.E. puns. Can someone help with pointing out the references.
Answer: It's just one, basically: a subplot of the book involving character's relative who comes from the Isle of Man. So, the Uncle from Man
Comment: OK thanks. I just realized the Uncle Nepelear is also a pun on Uncle Napoleon who is the only relative Lady Tia has left thus Uncle Napoleon Solo. Also the Man from the Isle Of Man is Goodman Colin Mac David. David MacCallum played Ilya Kuryakin the associate of Napolean Solo.
Answer: I just realized the Uncle Nepelear Einzig is also a pun on Uncle Napolean Solo. He is the only relative Lady Tia has left thus another way to show Uncle Napoleon Solo. Also the Man from the Isle Of Man who carries the message is Goodman Colin MacDavid, The (Manx)Man from Uncle. David MacCallum played Ilya Kuryakin the associate (and friend) of Napoleon Solo.
Thanks to @JdeBP who pointed out that Einzig is Solo in German and Tia is Aunt (female Uncle) in Portuguese (or Spanish).
Comment: https://en.wiktionary.org/wiki/einzig#German https://en.wiktionary.org/wiki/tia#Portuguese https://en.wiktionary.org/wiki/Neapel#German https://en.wiktionary.org/wiki/Napoleone#Italian
Comment: Note that this means there's a good chance that Nepelear is Tia's uncle's first name and his last is Einzig, making him Nepelear Einzig, once again Napoleon Solo.
Comment: @MarkOlson Yes I had realized that as well.
Answer: Good answers! Let me toss in a few other easter eggs (besides the Uncle and Nero Wolf references) from the novel:

The Grand Master of the Guild of Sorcerers is Sir Lyon Gandalphus Grey.  His description is a match for Gandalf, but he is also a deliberate play on L. [Lyon] Sprague de Camp, a major fantasy and SF writer of the time.

The previous grandmaster of the Guild was Sir Edward Elmer, ThD (Doctor of Thaumaturgy) who invented a jewel which King's Messengers can use to ID themselves -- it glows when the messenger touchers it.  This is, of course, Edward Elmer Smith, PhD who wrote of the Lensmen.
Comment: (And now I'm off to re-read the book!)
Comment: Thanks I have the Lord Darcy book which contains the entire corpus inluding "The Napoli Express" in which the wrong answer is the answer to "The Orient Express" by Agatha Christie
Comment: I see also that Gandolphus (Gandalf) Grey extends that to be the *Grey Magician(


How do I take a combined shape that's outlined and subtract another shape from it?

Question: I created a folder icon with two outlined shapes and combined them and also converted to outlines. I want to now subtract from the right side of the folder. However, every time I try to subtract, it gives me weird outlines.
The first image is how I want the final icon to look like. The second image shows what happens when I try to subtract from the folder shape.
Answer: I don't use Sketch, but if it's like other vector image editors, then it looks like the folder is in fact a single path with a thick stroke.
So, you need to convert the stroke to a filled shape made up of paths (called Expand in Illustrator, or Stroke to Path in Inkscape).  Looking it up on the internet, the equivalent seems to be Layers > Convert to Outlines in Sketch, although I'm not entirely sure if that's right. Perhaps a Sketch user can confirm this.
If you don't convert the stroke to outlines (or paths) first, then when you do the Boolean command, it will only cut into the stroked path.
Comment: Sounds right to me


System Settings won't open – Gdk-ERROR **: The program 'switchboard' received an X Window System error

Question: I'm having trouble opening System Settings. I get this error code when I try and run switchboard in the terminal (as it won't open by clicking):

(switchboard:16560): Gdk-ERROR **: The program 'switchboard' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadValue (integer parameter out of range for operation)'.
  (Details: serial 159 error_code 2 request_code 154 (GLX) minor_code 24)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
/usr/bin/gnome-control-center: line 20: 16560 Trace/breakpoint trap   (core dumped) switchboard $switchboard_options $requested_plug

Any help would be much appreciated.
Answer: A previous report linked this error to a video card drivers issue. It would be helpful to add more details about your drivers to the original post. Next, I would try uninstalling and reinstalling your video card drivers. If you can, avoid AMD's proprietary drivers.


Calculating covariances

Question: Currently I am preparing for my exam. Therefore, we have a sample exam with the answers included. Unfortunately, even with the answers it not all makes sense to me. This is the question with the answer provided:
Let $\bf{x}$ be a random vector with expectation $E(\textbf{x})=\boldsymbol{\mu}$ and covariance matrix $Var(\textbf{x})=\bf{\Sigma}$. Let $\textbf{x}=(x_1, \boldsymbol{x_2'})$, where $x_1$ is a scalar and $\boldsymbol{\mu}$ and $\boldsymbol{\Sigma}$ are partitioned conformably. Let $y=x_1-\bf{b'x_2}$$=(1, -\bf{b}')x$ for some conformable nonrandom vector $\textbf{b}$.
The question: Derive $\textbf{b}$ that minimizes the variance of y. Show the covariances between y and the elements of $\bf{x_2}$ are zero for this choice of $\textbf{b}$.
I know that $\boldsymbol{\Sigma}=
\begin{bmatrix} \sigma^2 & \boldsymbol{\sigma_{12}} \\
 \boldsymbol{\sigma_{21}} & \boldsymbol{\Sigma_{22}}
\end{bmatrix}$ (where $\boldsymbol{\sigma_{21}}=\boldsymbol{\sigma_{12}'}$) and that $\boldsymbol{\mu}=(\mu_1, \boldsymbol{\mu_2})'$. Now the variance of y is given as $Var(y)=(1, -\mathbf{b'})\begin{pmatrix} \sigma^2 & \boldsymbol{\sigma_{12}} \\
 \boldsymbol{\sigma_{21}} & \boldsymbol{\Sigma_{22}}\end{pmatrix}\begin{pmatrix}1 \\ -\mathbf{b}\end{pmatrix}$. Solving and taking the derivative with respect to $\mathbf{b}$ yields that it is minimized by $\mathbf{b}=\boldsymbol{\Sigma_{22}}^{-1}\boldsymbol{\sigma_{21}}$. Then it is said that the covariances between y and the elements of $\mathbf{x_2}$ are given by:
$E\{y(\mathbf{x_2}-\boldsymbol{\mu_2})\}=(1, -\mathbf{b'})\begin{pmatrix} \sigma^2 & \boldsymbol{\sigma_{12}} \\
 \boldsymbol{\sigma_{21}} & \boldsymbol{\Sigma_{22}}\end{pmatrix}\begin{pmatrix}\mathbf{0} \\ \mathbf{I}\end{pmatrix}=\mathbf{0}$
Now I need help here, what is happening? I know that the covariance is given as: $cov(y, \mathbf{x_2})=E\{[y-E(y)][\mathbf{x_2}-E(\mathbf{x_2})]\}$ and $E(\mathbf{x_2})=\boldsymbol{\mu_2}$, but why is $E(y)$ disappearing? And what happens after that first equality sign when it has been set equal to zero?
Hopefully I have clarified the problem enough. Thanks in advance.
Answer: Hint (if I understand your question correctly): another formula for covariance is
$$
\text{Cov}(y,\mathbf{x_2}) = E[y\mathbf{x_2}] - E[y](E[\mathbf{x_2}])'
$$

Calculating covariances


Normalize data for transfer function determination?

Question: I have the input and the output of a system and I want to determine the transfer function of it. I am using Ident Tool from Matlab.
How is it more ok: to normalize the output and the input between 0 and 1 or to leave it as they are?
Comment: Why would you change the output at all for a given input? If you do before running the system ID functions, you'll get the wrong gain (at least).  Selecting the right level of input is probably OK... but normalizing it to be between 0 and 1 is probably not the right thing to do either: you'll over-emphasize the DC component of the system to the system ID function.
Answer: For what I know there is no reason to normalize data in general, if you use least squares like methods, all you need is that your input is persistently exciting, in the sense that the Hankel matrix $H$ of the observations must be such that $H^T H$ is nonsingular.
Answer: If you system is linear, the linear property holds: multiplying the input by $\lambda$ should yield an output multiplied by $\lambda$. So you should not normalize I/Os independently, which happens when you normalize them between $0$ and $1$, since you will be using the $\min$ and $\max$ separately.
However, it is possible to normalize them to the same units, if for some reason, inputs are in mV and output in V, for instance.


Are airliners shielded from cosmic radiation?

Question: Are airliners shielded from cosmic radiation, what materials can blocked this type of radiation?
Answer: No.
Airliners aren't radiation-shielded. Even high-altitude spy planes like the U-2 and SR-71 weren't shielded.
The problem with shielding is that it's heavy. The goal is to put as much mass as possible between you and the source of whatever type of radiation you're worried about. But engineers go to great lengths to keep aircraft weight down. 1 cm of lead shielding around a 737 would weigh about 13,000 kg, about 20% of its maximum takeoff weight. This amount of lead would block about 50% of gamma radiation and cosmic ray doses.
Now, is this bad?
For passengers, definitely not. Even frequent flyers don't spend enough time at cruising altitude for the increased dose to matter.
Sea level cosmic ray doses are about 0.06 µSv/hr. At 35,000 it's about 6 µSv/hr. So a person who stays on the ground for a year gets a cumulative annual cosmic ray dose of 0.5 mSv. A frequent flyer who spends 100 hours in the air in a year gets a dose of 1 mSv. A twofold increase may sound like a lot, but a chest CT scan is about 7 mSv, and the normal background radiation dose (including cosmic rays as well as other forms of ionizing radiation) is 2-4 mSv.
For pilots, who spend a lot more time in the air, it matters more. A pilot who flies 1,000 hours in a year gets a cosmic ray dose of about 6.5 mSv, about a chest CT scan's worth. Over a few decades this does in fact add up to an observable, but not dramatic, increase in cancer rates.
Still, this increased risk for aircrew has not (yet) economically or politically outweighed the cost of shielding.
Comment: @user0422 that's correct (I've seen estimates ranging from 35 to 100x higher "at altitude" depending on what is being measured, where and how). But don't forget that "100 times more than _almost nothing_ is still _almost nothing_. The ratio isn't important. The total dose and the effects of that dose are.
Comment: @TypelA Comparing to CT chest is not high, but from your data, radiation is a hundred times bigger at flight than on sea level.
Comment: @TypeIA - Let's also not forget that most people spend almost all of their time at sea level and maybe a small handful of hours a year in a plane
Comment: I read that commercial aviation avoids the magnetic North pole, because of the radiation risk. This isn't cosmic rays, but what comes out of the sun during a solar storm. The magnetic poles are "holes" in the protection afforded elsewhere by the Earth's magnetic field. Of course, there's also the fact that magnetic compasses don't work there.
Answer: No, they are not, and this is not a concern for regular passengers (extreme frequent flyers might want to estimate their exposure, though).
For pilots it is a concern, and at least some companies/jurisdictions will have regular checks and possibly compensation for the exposure that is accumulated during service.
Source: I am very close to a recently retired airline pilot and we went over this exact topic.
Comment: @user0422 some of the compensation measure involve early retirement to prevent over-exceeding exposure limits (kind of equating it to hard labour), compensation is not necessarily monetary in nature in my understanding.
Comment: "possibly compensation for the exposure " Compensate with money? Health must be on first place.
Answer: This is potentially a concern for airplane electronics, and even more so for spacecraft electronics. Cosmic rays can flip a bit in RAM or cause other problems, which can result in software crashing or doing something different from design. It really doesn't matter if one passenger a day has their in-flight entertainment system crash. But it does matter if the auto-pilot or the engine controls don't work as expected.
There are a number of things done to harden critical systems. One of the most important is redundant systems are used. This helps minimize (nothing can totally eliminate computer problems - that's why we have humans in the loop) computer problems, whether due to cosmic rays, faulty parts, software bugs, loose wires, electrical surges or any other causes from taking the systems offline. The odds of one flight computer having a problem on a particular flight due to a cosmic ray is very, very low. The odds of multiple flight computers on the same flight having similar problems due to cosmic rays is really, really, really low.
In theory the flight computers could be shielded really well to protect from cosmic rays - much as the flight records ("black boxes") are built to withstand a typical crash - but there are plenty of other reasons why computers can fail, so putting the extra weight into redundant computers instead makes a lot of sense.
Comment: In the aerospace world so called [*radiation hardened*](https://en.m.wikipedia.org/wiki/Radiation_hardening) electronic components can be used if needed, so this is not really an issue.


Were there any prophets who were sent to places other than the middle east?

Question: For example, are there any records of prophets being sent by Allah to China, Europe, India, or Africa?
Answer: Clear answers from the qur'an
According the qur'an certainly "yes" read for example:

[We sent] messengers as bringers of good tidings and warners so that mankind will have no argument against Allah after the messengers. And ever is Allah Exalted in Might and Wise. (4:165)

... You are only a warner, and for every people is a guide. (13:7)

And We certainly sent into every nation a messenger, [saying], "Worship Allah and avoid Taghut." And among them were those whom Allah guided, and among them were those upon whom error was [deservedly] decreed. So proceed through the earth and observe how was the end of the deniers. (16:36)

Indeed, We have sent you with the truth as a bringer of good tidings and a warner. And there was no nation but that there had passed within it a warner. (35:24)

All the above verses say that Allah has sent to every nation warners (prophets or messengers).
Not all messengers and prophets have been mentioned
One may ask why all the known prophets () are only sent to middle east, here some answers:
One within the qur'an, Allah the almighty said:

And [We sent] messengers about whom We have related [their stories] to you before and messengers about whom We have not related to you. And Allah spoke to Moses with [direct] speech. (4:164)

And We have already sent messengers before you. Among them are those [whose stories] We have related to you, and among them are those [whose stories] We have not related to you. And it was not for any messenger to bring a sign [or verse] except by permission of Allah . So when the command of Allah comes, it will be concluded in truth, and the falsifiers will thereupon lose [all]. (40:78)

So not all messengers () and prophets () are quoted by name in the qur'an.
Many ahadith quoted high amounts of messenger of hundred of thousands.
Why  mainly only prophets from middle east have been mentioned
And Allah further told the prophet () their stories for some reasons among them:

And certainly were messengers denied before you, but they were patient over [the effects of] denial, and they were harmed until Our victory came to them. And none can alter the words of Allah . And there has certainly come to you some information about the [previous] messengers. (6:34)

And each [story] We relate to you from the news of the messengers is that by which We make firm your heart. And there has come to you, in this, the truth and an instruction and a reminder for the believers. (11:120)

To help Muhammad() to support his task by quoting people (prophets and messengers) he knew or might have heard from and to remind the believers too.
The first verse above also shows that disbelievers deny messengers and prophets, so they could hide about having received a message or revelation via prophets, and don't mention them!
Sheikh ibn 'Ashur for example said:

Allah did not tell the Prophet (blessings and peace of Allah be upon him) the names of many of the Messengers, and only told him the names of a few, because those who are mentioned are the greatest of the Messengers and Prophets and greater lessons may be learned from their stories. End quote.
At-Tahreer wa't-Tanweer, 6/35 (Source: islamqa #138770)

Further in the same fatwa as above you may find the explanations:

It is well known that most of the civilisations that were established throughout history were in this area, which is known as the Mediterranean basin, and nearby, in Syria, Egypt, Iraq and Arabia. Hence the most populated areas were mostly in these lands. So it is very appropriate that most of the Messengers should have been sent to the people of these lands.
...
Because those Messengers had lived in the region inhabited by the Arabs and thereabouts, their stories were known to the Arabs and to the People of the Book who lived in those regions. This was more effective in establishing proof against them and the lessons of what befell those people has a greater impact.
Answer: And that there is no nation in which there is no warner; The life of my nation is Nazir and Hashdar Dhandah, i.e., the presence of Dard."
Nez: "We have sent a messenger to every nation to worship God and avoid the tyrants;" We sent to every nation a messenger (to tell the people) that you should worship God and turn away from idols. "(1)
The divine prophets were trained human beings who had been commissioned by God to convey the commands of God and to guide human beings. The tradition of God was to motivate a person to lead them among each group and ethnic group. As he says in the Holy Qur'an: "We have raised a messenger in every nation [". [2] This theme has been mentioned in other verses of the Holy Quran. [3] So it is certain that prophets have been sent to guide people everywhere in the world, [4]
Therefore, from the beginning of creation, wherever human beings lived, God sent many prophets to express their duties to them, but the names and stories of all of them are not described in detail in the scriptures, including the Qur'an. . [12]
[2].Nahl, 36.
[3]. Fatir, 24; اسراء, 15; Taha, 134.
[4]. In addition, divine wisdom and justice require the guidance of individuals in every age and generation.
[12]. Existence of Prophets in Non-Asia and the Middle East, 2503; "Names of the Prophets", 32102; "The burial place of some prophets", 12648.
Ref: https://www.yjc.news/fa/news/6620357/


Eddy currents induced throughout the volume of the material or only the surface?

Question: If a conductive slab has induced Eddy currents to oppose the change in magnetic flux, is the induced current uniformly distributed throughout the slab's volume or only at the surface? I might have confused myself with a room temperate copper vs. superconductor.
Comment: That depends on the ratio between skin depth and slab dimensions. If the skin depth is small compared to the dimensions, the currents will be mostly near the surface, otherwise a (weak) current might be induced almost homogeneously in the volume.
Comment: All electrons travel on the surface
Answer: Practically, it cannot remain uniform due to the skin effect (even assuming a uniform material, a uniform magnetic field). You will have a depth which calculates as:
https://wikimedia.org/api/rest_v1/media/math/render/svg/503e00af2636a217d5c8be7d58ffce4a50e088dc


Number of matrices with no repeated columns or rows

Question: If you consider all $10$ by $15$ matrices with entries that are either $0$ or $1$, there are ${2^{15} \choose 10}$ with no repeated rows (up to row permutation) and ${2^{10} \choose 15}$ with no repeated columns (up to column permutation).  How many are there with neither any repeated rows or columns (up to either row or column permutation)?
Answer: This can actually be worked out in a much more straight-forward manner than it seems, through a bit of reasoning.
Suppose that we construct a $10\times15$ matrix such that there are no repeated columns. Now, we must necessarily have that the number of repeated rows is somewhere between 0 and 9 (assuming that one row has to be "unique" first before there is a repeat). And so, we go about finding the number of possibilities for each repeat-count starting with the highest.
It is easy enough to see that there cannot be 9 repeats, as that would require all 15 columns to be either all-zeros or all-ones, and thus at most two would be "unique". Similarly, with 8 repeats, there would be only two "unique" rows, and thus only four possible columns. We can say the same thing about 7 repeats, which would provide only eight possible columns. Thus, we begin with the case of 6 repeats.
If there are 6 repeats, then there are four "unique" rows. In order to satisfy the conditions, these four "unique" rows must contain 15 of the 16 possible 4-bit combinations. The remaining 6 rows can be chosen from amongst the four "unique" rows.
If there are 5 repeats, then there are five "unique" rows, and we can find the number of these by observing that this is proportional to the number of $5\times15$ matrices with no repeated column, for which there are no repeating rows (and thus you subtract off a number proportional to the one we obtained for 6 repeats).
This can then be repeated until we get to $10\times15$, by working out how many $n\times15$ matrices can be made without repeats based on the value for $n-1$.
With the $n\times15$ case, there are ${2^n}\choose{15}$ possible matrices (up to column permutation). From these, we must subtract off the number of matrices that have $k$ repeated rows, with $k$ running from $1$ to $n-4$. We will call the number of $n\times15$ matrices without repeats $M_n$.
Now, we can see that
$$
M_n ={2^n\choose15} - \sum_{k=4}^{n-1} S(n,k)M_k
$$
where $S(n,k)$ is a Stirling number of the second kind. This is because we are partitioning our set of $n$ rows into non-empty subsets such that there are $k$ unique subsets, and for which order is irrelevant (that is, we take the subset containing the first row to be subset "1", then the subset containing the first row not in the first subset to be subset "2", and so on).
Now, we can do our calculations...
$$
M_4 = {16\choose15}\\
M_5 = {32\choose15} - S(5,4) M_4 = {32\choose15} - 10\times 16\\
M_6 = {64\choose15} - S(6,4) M_4 - S(6,5) M_5 = {64\choose15} - 65 M_4 - 15 M_5\\
\vdots
$$
and so on.
Once you have $M_{10}$, you must finish the process by dividing out the possible row permutations - that is, divide by $10!$. Of course, the actual number is going to be very close to ${2^{10}\choose15}/10!$, as one would expect repeats to be far less common than non-repeats.
(Through use of a spreadsheet, I find that the number is roughly $2.709912\times10^{26}$, although some small truncation error may have made its way into that expression)
Comment: What is $P_{15}$?
Comment: Oops, sorry - that's a leftover from when I was working out the actual number of permutations, before I realised that I could work with column combinations. Will be fixed in a moment. (it was meant to be the permutation, $^{2^n}P_{15}$)
Comment: I am trying to use your formula, however $M_4$ isn't divisible by $4!$ and $M_5$ isn't divisible by $5!$.
Comment: @abuzittingillifirca - you're right; on thinking about it, there's a flaw in that final step - my reasoning works correctly for finding the number of ways up to column permutation, but it does not correctly deal with row permutations, as row permutations can overlap with column permutations. I can think of a way to fix the approach, but it will take a little more time for me to think it through. In simple terms, you enforce an order on the rows (and possibly columns, too).
Answer: Edit: I misread the question and tried to answer a different question! I am trying here to get the number of matrices $10\times15$ with no repeated rows or columns but I don't do the identification up to permutation of rows or columns. This is probably a question harder then the original one.
This is just an attempt. This does not give an answer to the problem but I think the following observations are interesting and might help to find an answer.
At the end I explain the limit of this attempt. This limit is also the reason why I think the answer of @clintonmonk does not work.
Call $\hat{M}_{n, m}$ the subset of $M_{n, m}(\mathbb{Z}_2)$ of matrices with no repetated rows nor columns.
My first observation is that

Lemma: For any $n\in\mathbb{N}, $ $\mathrm{Card}\hat{M}_{n, 2^n}=\mathrm{Card}\hat{M}_{n, 2^n-1}=2^n!$

Proof:
We have $2^n$ possible vectors with $n$ binary entries. We have $2^n!$ ways to order them without repetition. That is why $\mathrm{Card}\hat{M}_{n, 2^n}=2^n!$
Now, we can define a bijection beetween $\hat{M}_{n, 2^n}$ and $\hat{M}_{n, 2^n-1}$, given by removing the last column. The inverse is adding in the end of the matrix the (unique) missing vector.
If we apply this lemma with $n=4$ we obtain:

Corollary: $\mathrm{Card}\hat{M}_{4, 16}=\mathrm{Card}\hat{M}_{4, 15}=16!$

If we complete a matrix $M$ in $\hat{M}_{4, 15}$ by $6$ lines different from the $4$ lines of $M$ and different between each other then we obtain a matrix in $\hat{M}_{10, 15}$.
So for each  $M$ in $\hat{M}_{4, 15}$ we have $(2^{15}-4)!/(2^{15}-10)!$ possibilities to complete it and obtain a matrix in $\hat{M}_{10, 15}$.
Hence:

$\mathrm{Card}\hat{M}_{10, 15}\geq 16! \frac{(2^{15}-4)!}{(2^{15}-10)!} \simeq 10^{40} $

The problem is that this is probably not an equality. Indeed if $N\in\hat{M}_{10, 15}$, we don't necessarily have that the first $4$ columns of $N$ form a matrix in $\hat{M}_{4, 15}$. It can happen that $2$ rows of $M$ have the same first $4$ entries and differ somewhere in the $6$ next. So we are not going to list all the matrices by this procedure.
Comment: Your lower bound is about $2.6 * 10^{40}$. But this is already bigger than ${2^{10} \choose 15}$.
Comment: @felix ${2^{10} \choose 15}$ is the number of matrices with no repeated columns **up to permutation of the columns**. There is no contradiction here: ${2^{10} \choose 15} 15! \simeq 10^{45}$
Comment: @felix sorry I just realise now that you ask to count matrices up to permutation of either rows or columns. Now I understand your comment and our misunderstanding. My answer is about counting matrices without identification when we do permutation of the columns or row.
Answer: Consider splitting the problem into two separate ones: Finding a $10 \times 10$ matrix with no repeated rows or columns and then finding $10 \times 5$ extra values.
To find a $10 \times 10$ matrix with no repeated rows or columns, look for all possible {0,1}-matrices that are nonsingular. Row-space and column-space have the same rank and a nonsingular $n \times n$ matrix will have full rank (why this works). You therefore need to calculate the number of nonsingular $n \times n$ {0,1}-matrices $N_{nonsingular}$.
We can use the algorithm A046747 to find the (asymptotic) probability a random $n \times n$ {0,1}-matrix is singular. (A055165 is better, but it depends on A046747.) It looks like $N_{nonsingular}$ may need to be calculated by brute-force, unless someone else finds a better approach. For now, assume $N_{nonsingular}$ for $n=10$ is known.
Next, because we know the rows and columns in the $10 \times 10$ are distinct, the remaining 5 columns can be anything as long as they're different from the first 10 columns.
$$
Possible\ combinations = N_{combos} = \frac{(2^{10} - 10)!}{(2^{10} - 15)!} \\
$$
Therefore, our number of matrices is:
$$
N = N_{nonsingular} * N_{combos}
$$
NOTE: I tried this originally with the formulas from the linked algorithms, but my answers were higher than expected. I imagine this was due to error on my part and also to not quite knowing what ordering the last 5 "free" columns should have with respect to the other 10 columns. I instead hope this answer provides some insight on a good technique to try.
Comment: I am not sure this works. If I understand it right. You are assuming that if $M$ is a $10\times15$ matrix with different lines then the first $10\times10$ extracted matrix have different lines. I don't think this is true. One couple lines of $M$ may differ only on the 5 last numbers and not on the 10 first.
Comment: what about splitting it into a 5x5 matrix of 2x3 blocks. Then you can have a square matrix whose entries are in 1-64. You get ${64^5 \choose 5}$, rows or columns, I think, up to permutations of rows or columns. But it has it's own problems though...
Comment: Unfortunately, the matrix need not be nonsingular. Any one row or column could be all zeros, or a row or column could be the sum of two other rows or columns (whose dot product is zero) - in both cases, the matrix is singular, but still satisfies the conditions being applied.
Comment: @Glen O - Good points. The first I would argue could be solved by mapping {0,1} to some other digits, but the second does invalidate the nonsingular approach.
Comment: @GillesBonnet The assumption was that if you have a nonsingular matrix (rows/columns different), then you could add in the different columns later. So your example of the last 5 columns being the different ones could be interpreted as the 10x10 nonsingular matrix being in columns 6-15. Columns 1-5 would then be the "free" columns that could be identical across the rows. As GlenO pointed out, this approach won't work anyway.


What are dynamic networks.

Question: From my understanding, dynamic networks are similar to traditional models except that they function in continuous time and have edges and nodes that evolve over time? Is this a correct understanding? Also why are they probabilistic?
Answer: I'd suggest you to read this link. It explains very well what a Dynamic Network is:
http://www.ccs.neu.edu/home/rraj/Talks/DynamicNetworks/DYNAMO/IntroDynamicNetworks.pdf
Answer: A dynamic network is any time-dependent network $G_{t} := \left(V_{t},E_{t}\right)$, whose vertex and/or edge sets undergo some variation as time evolves.
A myriad of deterministic and stochastic real-world processes have been successfully modelled using dynamics networks, and the possibilities for defining complex dynamic behaviours in terms of varying $V_{t}$ and $E_{t}$ sets is truly endless.
You are indeed correct in thinking that dynamics networks "have edges and nodes that evolve over time", but you need not restrict it to probabilistic or continuous time functions. Discrete time evolution is common within neural network models, and deterministic networks play a role in information theory research.
However, if a dynamic network does display stochastic variation, probabilistic network metrics and/or structures are considered, in order to gain insights into the average/predicted behaviours of the modelled real-world process.

What are dynamic networks.