## microsoft excel – Write variating numbers after specific text

I have a standardized text with different information. I would like Excel to automatically extract that information. The text can be:

Bietet (schriftlich): KP 10.700.000 EUR / Maklerhonorar nicht geklärt

I would like Excel to extract the “schriftlich”, “10.700.000” and “nicht geklärt”
It would always stand like this, and the data I want extracted can vary.

Is it possible?

## list manipulation – Replace points on a grid with numbers to maintain order

I am DMing a game of DnD and one of my players is really into fear effects, which is cool, but the effect of having monsters suffer from the “panicked” condition gets tedious to render via dice rolls.

The rule is, on the battle grid the monster will run for 1 square in a random direction, then from that new position it will move into another random adjacent square. repeat this process until its moved its full move speed.

``````movespeed = 6;
points = Point(
NestList({(#((1)) + RandomChoice({-1, 0, 1})), #((2)) +
RandomChoice({-1, 0, 1})} &, {11/2, 11/2}, movespeed));
Graphics({PointSize(Large), points},
GridLines -> {Range(0, 11), Range(0, 11)},
PlotRange -> {{0, 11}, {0, 11}}, Axes -> True)
``````

I have written some code that shows me the squares the monster moves through, but I would love to replace the little black dots with numbers like “1”, “2”,…,”6″ so that I know the path it actually took.

## Discrete Math(COUNTING NUMBERS)

#counting

Passwords of length 4 or 5 made up of letters where repeats are not allowed. count the possible numbers?

## differential equations – time dependent hamiltonian with random numbers

I have a Hamiltonian (Z) in matrix form, I solved it for time independent random real numbers, now want to introduce time dependent in such a way at any time the random real numbers change between the range {-Sqrt(3sigma2), Sqrt(3sigma2)}, here is my code

``````Nmax = 100; (*Number of sites*)

tini = 0; (*initial time*)

tmax = 200; (*maximal time*)

(Sigma)2 = 0.1; (*Variance*)

n0 = 50; (*initial condition*)

ra = 1; (*coupling range*)

(Psi)ini = Table(KroneckerDelta(n0 - i), {i, 1, Nmax});

RR = RandomReal({-Sqrt(3*(Sigma)2), Sqrt(3*(Sigma)2)}, Nmax);

Z = Table(
Sum(KroneckerDelta(i - j + k), {k, 1, ra}) +
Sum(KroneckerDelta(i - j - k), {k, 1, ra}), {i, 1, Nmax}, {j, 1,
Nmax}) + DiagonalMatrix(RR);

usol = NDSolveValue({I D((Psi)(t), t) ==
Z.(Psi)(t), (Psi)(0) == (Psi)ini}, (Psi), {t, tini, tmax});
``````

What can I do for introduce this time dependent and solve the differential equation(usol)? I hope my question is clear

## How do I change the page numbers?

so I put in page numbers for a book I’m making, but it starts the page count on the cover! Please tell me how to fix this

## performance – Creating a specific distribution of random numbers in Powershell

I originally posted this on StackOverflow but was requested to post it here instead as it relates to optimization/performance of the code rather than a specific problem.

TL;DR: Get-Random produces an even distribution of numbers where every number in the pool has an even chance of appearing. I’m looking for a way to generate random numbers where every individual number appears with a frequency that I myself specify.

If I run

``````for(\$i=1;\$i -le 1000;\$i++){
Get-Random -Minimum 0 -Maximum 10
}
``````

I get a very evenly distributed count for each number (roughly 100 for each number between 0 and 9). Using Get-Random allows me to get a random number every time but on average, every individual result will appear roughly an equal amount of times. I want to decide the frequency for how often any specific number appears, and then generate random numbers that fit that distribution. As an example:

``````Number   Probability
0        10
1        11
2        19
3        12
4        3
5        10
6        6
7        7
8        4
9        18
``````

I’m looking for a way to use the above list to randomly generate a number between 0 to 9, but with the probability of each individual number appearing using the Probability column.

My very hard-coded and not so generic solution so far is that I thought of doing something like adding a cumulative percentage column:

``````Number   Probability   CumulativeProbability
0        10            10
1        11            21
2        19            40
3        12            52
4        3             55
5        10            65
6        6             71
7        7             78
8        4             82
9        18            100
``````

And from here, run the object through a filter. Something like:

``````\$RandomNumber = Get-Random -Minimum 0 -Maximum 100
\$MyProbabilityObject | Where-Object {\$RandomNumber -ge \$_.CumulativeProbability}
``````

This gives me all numbers with a lower Cumulative probability than the random number. Let’s say the \$RandomNumber was 42, that would result in:

``````Number   Probability   CumulativeProbability
0        10            10
1        11            21
2        19            40
``````

From here, I could pipe the result to

``````Select-Object CumulativeProbability | Measure-Object -Property CumulativeProbability -Maximum
``````

Which gives me the highest value, and then use that column as a reference to find the number with

``````Where-Object {\$_.CumulativeProbability -eq \$TheNumberIGetAbove}
``````

While this kinda works, it feels like I’m doing several laps around a problem that should be easier and more straightforward to solve. Are there any better ways of generating random numbers that fit a distribution you specify yourself instead of using an even distribution such as Get-Random?

## Are there any good guidelines around the formatting and display of amounts and numbers in UI, especially for high-density tables?

This might include the alignment of numbers in tables based on type of numerical data, and how to show multi-currency, and negative numbers on a variety of form factors.

## recreational mathematics – Why dividing negative numbers gives positive outcomes

How comes that when we divide two negative numbers we get a positive answer? Consider that negative numbers are nonexistent in real life, for instance there are no -10 apples. So when we divide -10 apples among -2 people, why should we get 5 apples?? Does it mean real substances can exist from nowhere?

## nt.number theory – Natural numbers in the form \$lfloorfrac{a^2+b^2}2+frac{c^3+d^3}6rfloor\$

Let $$mathbb N={0,1,2,ldots}$$. Several years ago I proved that
$${aw^3+bx^3+cy^3+dz^3: w,x,y,zinN}not=mathbb N$$
for any positive integers $$a,b,c,d$$ (cf. http://maths.nju.edu.cn/~zwsun/179b.pdf ).

I’m curious whether there positive integers $$m$$ and $$n$$ such that
$$leftlfloorfrac{a^2+b^2}m+frac{c^3+d^3}nrightrfloor=N.$$
My computation suggests that $$(m,n)=(2,6)$$ might meet my purpose. Moreover, I have formulated the following conjecture.

Conjecture. Each $$ninN$$ can be written as the integral part of
$$(a^3+b^3)/2+(c^3+d^3)/6$$ with $$a,b,c,dinN$$, $$agemax{b,1}$$ and $$cge{d,1}$$.

I have verified this for all $$n=0,ldots,60000$$. For example, $$219$$ has a unique required representation:
$$219=leftlfloor frac{4^3+0^3}2 +frac{10^3+5^3}6rightrfloor.$$
For the number of ways to write $$ninN$$ in the given form, one may consult http://oeis.org/A343326.

QUESTION. Is the above conjecture true? How to prove it?

I learned recently about the `&` and `""` and their usage in making an autoupdating formula.
What I mean is, for example I have `3` numbers, `1`, `2` and `3` and I sum them in a cell with `=B3+B4+B5`, then the cell shows `6`. But with & and “” used like this `=B3&"+"&B4&"+"&B5`, the cell shows `1+2+3`.