## Python list building rules

Good afternoon,

I need to abide by some rules when generating my list.

These are:

1. Have at least one repeated value

2. Have at least 6 unique values

3.All numbers cannot be repeated

How can I do this?

``````import numpy as np
import statistics as st
import random

def lista_random():
lista = random.sample(range(0, 50), 12)
lista.sort()
return lista

lista = lista_random()
print('A sua lista é: ', lista)
print('A média dos índices é: {:.4f} '.format(np.mean(lista)))
print('A moda é: {:.4f} '.format(st.mode(lista)))
print('A Mediana é: {:.4f} '.format(st.median(lista)))
print('A variância amostral é: {:.4f}'.format(st.pvariance(lista)))
print('O desvio padrão amostral é: {:.4f}'.format(st.stdev(lista)))
print('O coeficiente de variação é: {:.4f}'.format(st.variance(lista)))
``````

## How can I associate a "document" with a SharePoint list and make the workflow wait for the document to be registered?

I have a SharePoint list workflow running on the latest / best SharePoint OnLine. I am using SharePoint Designer 2013. Unfortunately, PowerApps Flow is not an option.

I would like to add some new steps to the workflow:

1. The workflow should initiate a Process Task for the Sales Representative ("Current Item: Created By") asking him to complete a "Customer Form".
2. An MS Word document, "Client Form Template", exists in the Document Library.
The email that the Process Task sends to the Sales Representative has a link to the template.
3. The sales representative must complete the template, "Save As" in a new .doc, and send it to the company's DocuSign team for the customer's signature.

Q: Is there a way to make it easier for the Sales Representative to save the entire form in the Document Library (instead of "Save As" in a .docx file on your hard drive)?

Q: If so, how can I associate the completed .doc file with the list item of that specific workflow?

Q: Are there any SharePoint workflow events or actions that I can use to automate some or all of these steps?

Q: Can I somehow take advantage of SharePoint version control (for example, enable document registration to automatically send an email to the DocuSign team)?

## Add multiple conditional formulas to a single custom list

Conditional formulas? Have a formula that works to compare 2 items to see if one is not larger than the other, but I need to add multiple validations in a single custom list. How I do this?

= (Item01) <= (Item02)

= (Item03) <= (Item04)

= (Item05) <= (Item06)

= (Item07) <= (Item08)

These work one at a time, but errors still appear when joining them. (SharePoint 2013 On-Prem)

## usability: shows that the entry in the list is editable

I have a list with items that can be changed.
When the user clicks on the item, it can be edited.

What is the most intuitive way to show the user that they can edit the elements?

The following options come to mind:

1. Show an edit icon when the cursor is over an item
2. Always show an edit icon. When the user clicks on it, the item's text field is highlighted
3. Show a gray frame when the cursor is over an element
4. Show a gray square when the cursor is over an element
5. Leave it like this

## Sharepoint REST API: Get items from a list. If they do not exist, retrieve the ListItemEntityTypeFullName value from the List. All with one call

I have a small app that, when initialized, fetches information from a Sharepoint list through a REST call.

That information should eventually be modified from within the application, again through the REST API, and saved in the same List.
That is why, when I originally get that information, I also store the ListItemEntityTypeFullName value of the List in a global scope variable, which will then be passed in the POST function.

My code to get the list items is as follows:

``````    \$.ajax({
url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('" + listName + "')/items",
type: "GET",
}).done(function(data) {
});
``````

If no item is found, the only way I know how to store the ListItemEntityTypeFullName value would be to make a second ajax call as follows:

``````    \$.ajax({
url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('" + listName + "')/?\$select=ListItemEntityTypeFullName",
type: "GET",
}).done(function(data) {
listType = data.d.ListItemEntityTypeFullName
});
``````

Now my question is: is there a way to make both requests in a single call, so if no items were found in the List, can I still get the ListItemEntityTypeFullName value somewhere? I am trying to optimize the amount of calls I have to make to keep the application fast and smooth.

Thank you!

## Could you give me a list of basic JavaScript exercises?

I am learning Java Script and right now I am learning about objects and looping: while, for.

## Google Search Console domain property is not in the list of properties that I can add to Google Analytics

I am trying to connect a domain property to a google analytics domain. But when the property I added is not in the property list where I can choose.

All other properties are. The big difference is that the newly added property is a domain property. All the rest are regular properties. Is there a new way to connect the properties of this domain to google analytics?

## How to force YouTube to list the most recently used apps at the top of the sharing menu?

How can I customize the list of services that appears when I choose to "share" something in an application? is what I need to do, but specifically for the YouTube app, because the list of apps listed in the share menu seems to be quite random. It seems best to always sort the share menu to list the most used apps at the top of the list. The answers there are outdated.

I examined an app that claims to modify the list, but found an answer in a comment about that app implying that other apps can't control it:

Everything is great, I love the dark theme and pinning skills, for some reason, doesn't it work in the YouTube app? It is set as my default, and I can share articles and links from Reddit etc., but not YouTube links through the app. I'm using Oxygen OS if that's helpful

Hi Barking (is that your real name? :)). Youtube uses its own dialog box for sharing (just like other Google applications like Maps, Photos, News, etc.). There is nothing I can do about it, I'm afraid. You could send feedback via the YouTube app and ask them to drop their ridiculous home sharing dialog, which tends to put frequently used apps at the bottom.

Is that the case, or is there some other way you can use to control the order of the shared menu list? I'm not really interested in rooting the phone, but if that's the only way, I'd like to know.

## Provide code to remove duplicate entries from a list

Let's say I have a dimension R list $$n$$. I want to (efficiently, presumably) create a new dimension R1 list $$n1 leq n$$ from which all duplicate entries have been removed from R, that is, each entry in R1 must be unique. (Quite fundamental question, I suppose).

## mathematical optimization – Iterate Minimize in a list of functions

I have a function $$f$$ defined in $$(- 1,1)$$.
For a minimal example, it is sufficient to define

``````f(z_):=z^2 - 1
``````

I need to find a list of points so that $$f (z_0) = f (z_1)$$, points whose image "is at the same height".
I continued to find the minimum through

``````  min = First@Minimize(f(z), {z})
``````

what happens for $$z$$ equal to

``````argmin = Values@Last@Minimize(f(z), {z})
``````

Also I created a list with

``````  rang = Subdivide(a, 0,10)
``````

spanning the range from minimum to predefined value.

Now I would like to find, for each item on this list, points such that $$f (z_0) = f (z_1) = rang_j$$, for each item in the list.

I couldn't find a better plan than defining a list of features $$fun_j = (f (z) + rang_j) ^ 2$$. By changing the original function and squaring, I am sure that the functions $$fun_j$$, one for each item in the list $$rang$$ they are positive everywhere except the roots.

So I wanted to iterate over the list of functions a restricted minimization through the commands (the argument $$f_j$$ just to clarify my question, I understand that the syntax will be different, that's exactly what the question is about):

``````   Minimize({f_j, z > argmin}, {z})
Minimize({f_j, z > argmin}, {z})
``````

that is, run two minimizations one on the left and one on the right of the $${arg , min}$$. I know for mathematical reasons that there are two unique solutions.

I create my list of functions as

`````` f1(z_,c_):=f(z)+c
``````

and then using

`````` f1(z,rang)
``````

but I find it hard to iterate Minimize, any suggestion would be helpful.

Annoying

``````  Minimize({f1( z, rang), z > b}, z)
``````

produces an error message, since the Minimize function argument is expected to be a scalar function.
I'd also like to hear about better methods, in general and in reference to Mathematica.
Health