## distributions – TransformedDistribution does not seem to work correctly in this case

I'm trying to get the distribution of the random variable defined by

$$Y_n: = left | sum_ {k = 1} ^ n e ^ {i X_k} right |$$

for arbitrary $$n$$, or $$X_k sim U[0,2pi]$$ i.i.d. Then I had written the code

``````iid[k_] : = TransformedDistribution[Abs[Sum[Exp[2 Pi I a[i]], {i, k}

],
Table[Distributed[a[i], Uniform Distribution], {i, k}

]
``````

However, mathematica does not compute it, I mean, it just repeats the definition once executed. I've tried to plot the probability distribution handwriting

``````Ground[PDF[iid[5]X], {x, 0,5}
``````

but mathematica shows me an empty graph. I can not calculate either `PDF[iid[2], 0.5]`, the code above which defines the distribution does not seem to work. Then I tried this definition

``````iid[k_] : = TransformedDistribution[Norm[Sum[{Cos[a[i]], Peach[a[i]]}, {i, k}

],
Table[Distributed[a[i], Uniform Distribution], {i, k}

]
``````

However, it did not work. There is a way to get the distribution of $$Y_n$$?

## to solve – Solve does not work with this equation, case of trigonometry

I was trying to solve this equation, but Mathematica 12 continues to try but does not give an answer.

Is there a problem in my system or something with Mathematica 12?

``````Solve[E^((-Log[5]/ 2) * t) * 3 * Cos[330*Pi*t]== 6, t]
``````

I entered this equation as part of a problem and wanted to draw a point, but it turned out that Mathematica did not respond. It is curious to see that such a complex software is connected to it.

Thank you all for your help.

## What is the best case for iPhone XR?

I am upgrading my 6 (!!) to an XR player and I think for the first time to give up the Apple Care system and invest in a great case.

Obviously, the OtterBox is the best, even if it's ugly and it's not like I'm running in the forest, etc.

Looking at Amazon, I find a million cases, all claiming to be the most durable – but I thought it was better to ask experts for your overall recommendation.

This is the best slim case that still gives the iPhone a look similar to that of an iPhone, but that allows it to survive a 5 'drop and the trials and tribulations of sharing your life with a toddler.

Thank you so much.

## [ Politics ] Open question: After making fun of Trump, does the women's football team have a case to invite to the White House?

The liberal left will use it to make fun of Trump, conservatives, Christians and all the healthy people of this country that the left is vain to make fun of and denigrate because of their own immorality. Healthy people are respectful of their parents, country, people and gender without denigrating others.
Do you have this TB12? Tribeca thinks she's better than us and thinks it gives her a chance to make fun of Obama to make fun of whites and make fun of America.
Looks like everything is about the race card. Tribeca, you hate Trump because he's white.
Rapinoe said he took Kaepernick's side against white and racist white cops.

Apparently, you are not aware of the problem, but rather boring and narrow-minded. .

## Google Foobar Challenges Python Partial Test Case Errors "Queue"

I started the foobar challenge a few days ago, and I am now at the first issue of the third step, and I have the challenge "Queue to do" . The problem is that I receive partial errors in the verification process. There are 10 test cases with 2 open cases and 8 hidden cases, and I had a problem with three hidden test cases.
This is the question:

``````Queue to do
===========

You are almost ready to destroy the LAMBCHOP Domsday device, but the security checkpoints that protect the underlying systems of LAMBCHOP will be problematic. You managed to shoot one without triggering alarms, which is great! Except that as assistant commander Lambda, you learned that the checkpoints are about to be subject to automatic control, which means that your sabotage will be discovered and your cover stolen - unless you can fool the automatic control system.

To deceive the system, you will have to write a program that will return the same amount of security check that the guards would have after controlling all the workers. Fortunately, Commander Lambda's desire for efficiency does not allow waiting times of several hours. Guards at checkpoints have therefore found ways to speed up the rate of transmission. Instead of checking every incoming worker, the guards check all people online while noting their security ID, and then let the line fill up. Once done, they go back to the line, this time leaving the last worker. They continue as well, leaving an extra worker on the line each time but saving the security IDs of those they check, until they jump the entire line, then they record the IDs of all the workers that they wrote down in a checksum and then leave for lunch. Fortunately, the orderly nature of the workers forces them to always align in a numerical order without gaps.

For example, if the first operator of the line has ID 0 and the security checkpoint line contains three employees, the process will look like this:
0 1 2 /
3 4/5
6/7 8
where the checksum XOR (^) of the guards is 0 ^ 1 ^ 2 ^ 3 ^ 4 ^ 6 == 2.

Similarly, if the first operator is identified by ID 17 and the checkpoint contains four, the process would look like this:
17 18 19 20 /
21 22 23/24
25 26/27 28
29/30 31 32
which produces the checksum 17 ^ 18 ^ 19 ^ 20 ^ 21 ^ 22 ^ 23 ^ 25 ^ 26 ^ 29 == 14.

All worker IDs (including the first worker) are between 0 and 200,000,000 inclusive, and the checkpoint line will always have a minimum length of 1 worker.

With this information, write a feature solution (start, length) that will cover the missing security checkpoint by generating the same checksum that the guards would normally submit before lunch. You just have time to find the ID of the first operator to check (start) and the length of the line (length) before the automatic review. Your program must therefore generate the appropriate checksum with these two values ​​only.

Languages
=========

To provide a Java solution, edit Solution.java
To provide a Python solution, edit solution.py

Test case
==========
Your code must pass the following tests.
Note that it can also be run on hidden test cases not shown here.

- Java case -
Contribution:
Solution.solution (0, 3)
Exit:
2

Contribution:
Solution.solution (17, 4)
Exit:
14

- Python cases -
Contribution:
solution.solution (0, 3)
Exit:
2

Contribution:
solution.solution (17, 4)
Exit:
14
``````

## TEST1

I have tested my first code:

``````def solution (start, length):
checksum = 0
for j in the beach (length):
for i in the range (length-j):
checksum ^ = (start + j * length + i)
return the checksum
``````

This code has returned three hidden test errors: Test # 5, # 6, # 9.

## TEST2

I have therefore tried to reconstruct the answer using a table.

``````def solution (start, length):
checksum = 0
strin = []
for j in the beach (length):
for i in the range (length-j):
strin.append (start + j * length + i)
for i in strin:
checksum ^ = i
return the checksum
``````

But now, this one throws me another failure of test case in test n ° 3, n ° 5, n ° 6, n ° 9

I would like to know why this difference in Test # 3 was made. And if possible, I would like to know what would be the cause of failures in other test cases (# 5, # 6, # 9).

## Buckle in case of injury – JAVASCRIPT

** I'm sorry for the beginner's question, but for a long time without using logic, I just forget the syntax **

I would like the user to be prompted to enter a message to enter a number. If this number is true, a screen will be displayed to inform the entered number.

If the user types a letter, a message appears stating that he has entered an invalid number and then typed again.
But I do not know how to stay in loop until he has entered a real number, can someone fix me?

code:

``````                var num1 = prompt (# type a number);
if (isNaN (num1)) {
document.write (& # 39; retype invalid number & # 39;)
}
``````

## How to pass a test in case of failure

I want a test method in a test case in unittest to pass when it fails. Is it possible to do it. I have tried to use

``````@ unittest.expectedFailure
``````

but did not work.

## Temporal Complexity – Average Case Analysis of Linear Search

Based on question 2.2 of the TCLS:

Consider the linear search again. How many elements of the entry
sequence should be checked on average, assuming that the element is
searched is also likely to be any element of the array? And in the worst case? What are the average times and the worst cases of linear search in $$theta$$-notation? Justify your answers.

I have a question regarding the average case.

"assuming that the element being
searched is also likely to be any element of the painting "
– What does that mean exactly? Does this mean that the probability that each one will happen is $$frac {1} {n}$$?

Or maybe the element is not at all in the table – is a case that probability the same as the rest (and then they are all $$frac {1} {n + 1}$$)?

In the average case, how many duplicates are there? Are we assuming that there are no duplicates?

A good explanation on what exactly is the average case would be helpful.

Thank you so much!!!

## Case studies – How to hypothesize, evaluate and report UI changes

I am looking to compile a spreadsheet to compare React frameworks. (UI Semantic React, UI Material, Ant Design …).

``````Frame, metric ...
Semantic interface
Hardware UI
Ant design
``````

Some metrics are tangible metrics without opinion (file size, Webpack tree shake, components #), but they do not necessarily communicate the value to the user.

Some things such as Material UI (to which I am biased) have very good animations for user comments. I would love to practice UX and pragmatically evaluate these frameworks for our business use case.

How can I measure these types of very opinion-oriented behaviors? Preferably without pushing to production. And communicate these results to stakeholders?

Perhaps a more basic form of my question is: "How to assume that the color blue is better suited to our needs", how can I build an argument for a project also oriented design?

## mistletoe design – Prevents items from jumping in case of error

I am working on a video editing application. It can have multiple layers and when a layer has an error, such as a corrupted image, it displays an error message under the layer name. The problem is that when I play the video, the panel with the layer names starts to jump in case of error: (the gif is only a simplified version of the interface user)

What I tried before was:

• shows the empty parent container even if there is no error, but it seems strange because of the space:

• instead of an entire message, only display an icon next to the name of the layer and the message displayed in the tooltip This is not good because my users should see the message directly in the user interface without any action (move the mouse over an icon to display the message).

EDIT: I can not put the message next to the name of the layer. In some cases, it is too long and can produce the same jump behavior.

Any other idea, how can I solve this jump problem?