## How is a bitwise operator useful to the larger of two numbers in a c

I'm learning c. I went through the bit operators and found a program that could find the larger of the two numbers using XOR operators at the bit level. How is this possible and how is it executed?

## google sheets – Column of numbers. If one of the numbers equals another number in the column, excluding itself, put a "T" in front of it

I am so close to getting it. I have tried several things. My wheelhouse is in python. Unfortunately, Excel is not my forte.

``````=IF(OR(U2=(U3:U32)),"T"&U2,U2)
``````

First try.
Yes `U2` is in `U3:U32`, put one `T` in front of `U2`, other `U2`.

``````=IF(OR(countif(U3:U32,U2)),"T"&U2,U2)
``````

Second trial.
Try to compare all the other numbers using `countif` at `U2`, if `U2` exists in `U3:U32`, put one `T` in front of `U2`, other `U2` himself.

Quick solutions?

## macos – How can I automatically fill a formula in Numbers while maintaining some referenced values?

So I have a chart in Numbers that contains a formula that refers to some values ​​in the chart, as well as some values ​​in another chart. I want to automatically fill out this formula, while keeping the references of the previous graph.

I want A2 to change for each line, A3, A4, etc. But I want the values ​​in Table 2 to remain referenced to B2.

I'm using the iOS version, but I can use the macOS version if necessary.

## How to find the probability that none of your numbers are among the 4 selected by the lottery

It was a question about my first course in probability.

Question:

In lottery 4-26, the lottery chooses 4 numbers (without replacement) from 1 to 26. Before this draw is completed, you choose 4 numbers (without replacement) from 1 to 26. Find the probability that no of your numbers do not 4 selected by the lottery.

My attempt

Let $$D$$ the number of results in $$S$$ (sample space) and $$C$$ the number of results in $$E$$(events) Probability = $$frac {C} {D}$$

$$D = 26 * 26 * 26 * 26$$ (The reasoning behind this is that there are 4 numbers each with the possibility of being one of the 26 numbers)

$$C = event$$ (I do not know how I could find this part)

$$1 – frac {C} {26 * 26 * 26 * 26}$$ (the reasoning behind the subtraction of 1 was because the question asked the probability that no of my numbers have been selected.)

Is this the right approach?

## release management – Transition to the semantic version from simple version numbers

There is a software / application / framework library that currently uses "simple version numbers". So he is currently at the version (let's say) `135` and publications are made at irregular intervals whenever "there is enough for a new publication". The next version would be `136` in this scheme.

I want to use this option to use semantic versioning (version numbers and release behavior, of course).

Which version should I use for the "first" semantic version?

That is, if the next version should be `135.1.0` … or `136.0.0`. Or `1.0.0`? What is the "correct" approach and which approach breaks the least number of version comparison algorithms?

## nt.number theory – Sorting natural numbers according to a Jaccard metric?

I asked this question on mathstackexchange (https://math.stackexchange.com/questions/3357151/sorting-natural-numbers-based-on-metric) but I did not get an answer.
I hope that it will go to ask it here:

Let

$$d ^ J_k (a, b) = 1- frac { sigma_k ( gcd (a, b))} { sigma_k (a) + sigma_k (b) – sigma_k ( gcd (a, b ))}$$ for $$a, b$$ two natural numbers $$k 0$$.
Then, it is a metric (Jaccard) on natural numbers.
Consider $$d (a, b) = d ^ J (a, b) = sum_ {k = 0} ^ infty frac {1} {2 ^ k} d ^ J_k (a, b)$$ and define $$a unlhd b$$ Yes Yes $$d (a, 1) the d (b, 1)$$

Questions:

1. Yes $$a unlhd b$$ and $$c$$ is a natural number, so $$ac unlhd bc$$?

2. Yes $$a unlhd b$$ and $$b illhd a$$then $$a = b$$?

3. Yes $$a unlhd b$$ and $$c unlhd e$$then $$ac unlhd be$$?

4. Yes $$gcd (a, c) = gcd (b, c) = 1$$ then $$d (a, b) = d (ca, cb)$$. (It's easy to prove, since $$sigma_k$$ is multiplicative.)

It seems that the command is lexicographic. I mean, build the vector:

$$V (a) = (d_0 (a, 1), d_1 (a, 1), d_2 (a, 1) ldots d_k (a, 1) ldots)$$

Then, it seems that $$a unlhd b$$ Yes Yes $$V (a) the V (b)$$ or $$the$$ is the lexicographic order of the given vectors.

Some Sage scripts:

``````def dd(a,b,k):
return 1-sigma(gcd(a,b),k)/(sigma(a,k)+sigma(b,k)-sigma(gcd(a,b),k))

def dvec(a,K=10):
return (dd(a,1,k).n() for k in range(K+1))

def d(a,b,K=10):
return sum((1/(2.0**k)*dd(a,b,k) for k in range(K+1)))

sorted(( (d(a,1,10),a) for a in range(1,100)))

((0.000000000000000, 1),
(1.26352353560690, 2),
(1.34364319712592, 3),
(1.40497170796791, 5),
(1.43113204316485, 7),
(1.45520927484247, 11),
(1.46177941791487, 13),
(1.47035738224924, 17),
(1.47331411564775, 19),
(1.47770790490320, 23),
(1.48205464375133, 29),
(1.48313429769773, 31),
(1.48568055948408, 37),
(1.48696820697958, 41),
(1.48752307533606, 43),
(1.48849243175490, 47),
(1.48967436265919, 53),
(1.49061769251944, 59),
(1.49089119792606, 61),
(1.49161439830309, 67),
(1.49202905783214, 71),
(1.49221945289014, 73),
(1.49273313109042, 79),
(1.49303455213995, 83),
(1.49343614594272, 89),
(1.49389469153245, 97),
(1.58038164357392, 4),
(1.62430622092945, 9),
(1.64916894831869, 25),
(1.65681510482431, 49),
(1.70181166355779, 6),
(1.71251996065963, 8),
(1.71920616143290, 10),
(1.72714814044250, 14),
(1.72719187491448, 15),
(1.73288513480220, 21),
(1.73471402834227, 22),
(1.73621232562853, 27),
(1.73681810775224, 26),
(1.73839844837180, 33),
(1.73841153706667, 35),
(1.73958889336088, 34),
(1.73994574914563, 39),
(1.74054992940204, 38),
(1.74198349871905, 46),
(1.74199186845917, 51),
(1.74199942675375, 55),
(1.74270372005527, 57),
(1.74301404059068, 65),
(1.74340792482690, 58),
(1.74376265890517, 62),
(1.74376756472425, 69),
(1.74377384596954, 77),
(1.74436044828411, 85),
(1.74452957378555, 91),
(1.74460070007059, 74),
(1.74482689550047, 87),
(1.74483006361155, 95),
(1.74502525419037, 82),
(1.74509104929573, 93),
(1.74520835591782, 86),
(1.74552845631242, 94),
(1.78213363982812, 16),
(1.79485710740475, 81),
(1.81324507872647, 12),
(1.81896789031508, 18),
(1.81998016814039, 20),
(1.82318502936399, 28),
(1.82423371804470, 32),
(1.82583952513618, 45),
(1.82630550851183, 44),
(1.82690273055893, 50),
(1.82718391487045, 52),
(1.82749364950621, 63),
(1.82828582492105, 75),
(1.82834711474068, 68),
(1.82875220479996, 76),
(1.82912899954912, 99),
(1.82935797699558, 92),
(1.82941227603807, 98),
(1.85218308685392, 64),
(1.86538817693823, 24),
(1.86688267571898, 30),
(1.86835304078615, 40),
(1.86871364331448, 42),
(1.86979510882916, 54),
(1.86979732014398, 56),
(1.87050985618865, 66),
(1.87051243084219, 70),
(1.87101760800471, 78),
(1.87122139031876, 88),
(1.88228470237312, 36),
(1.89491690092618, 48),
(1.89630685447653, 80),
(1.91266763629169, 60),
(1.91309339654707, 72),
(1.91343397284113, 84),
(1.91353207281394, 90),
(1.91368754226931, 96))

# checking numerically if lexicographic sorting:
(x(1) for x in sorted(((dvec(a),a) for a in range(1,100)))) == (x(1) for x in sorted(((d(a,1),a) for a in range(1,100))))

True
``````

Also a related question:

How are the sequences called in a metric space where the distance between two consecutive points converges? (For Cauchy sequences, this distance converges to 0). (We could call them Cauchy-like)

I ask this question because it seems that with the metric above, if we have a sequence $$a_1 unlhd a_2 unlhd ldots a_n ldots$$ as for each $$n$$ there are no natural numbers $$x$$ with $$a_n unlhd x unlhd a_ {n + 1}$$. We could call such a "complete" sequence. It now seems (numerically) that each "complete" sequence of this type with the given metric resembles that of Cauchy. For example, it seems that prime numbers are complete sequences of Cauchy type.

Of course, if anyone had a proof or glimpse of the above statements, it would be very interesting!

## Algebraic Theory of Numbers – How Can We Justify the Use of Example 5.4 (from Cohen, Lenstra) Assuming Their Heuristics

These days, I study Cohen-Lenstra's heuristics to understand René Schoof's paper titled "Number of Classes of Real Cyclotomic Fields of First Driver".

On page 932 of Schoof's paper, there is a sentence "According to Cohen-Lenstra, the probability that M does not happen" $$mathbb {Z} ( zeta_ {d})$$-module modulo a random principal ideal "is equal to $$prod_ {2 leq k} (1-q ^ {- k})$$. "

First of all, I do not understand the exact meaning of the sentence. I hope so that someone can explain it to me.

I checked the example 5.4 by myself and tried to understand the sentence as "The probability that $$mathbb {Z} ( zeta_ {d})$$-module to trivial $$rho$$-composing ($$rho$$ is the primordial ideal of $$mathbb {Z} ( zeta_ {d})$$ correspond to $$M$$) is $$eta _ { infty} ( rho) / eta_ {1} ( rho)$$. "

Even if this interpretation is true, I do not know how to deduce it from the fundamental hypothesis 8.1 of the Cohen-Lenstra document. $$d$$ is not necessarily a bonus, so there might not be an abelian group $$Gamma$$ with $$A _ { Gamma}$$ isomorphic to $$mathbb {Z} ( zeta_ {d})$$.

In the text of Schoof, there is a line "The heuristics of Cohen-Lenstra do not really apply to our situation". I hope someone can ask my question and explain the meaning of Schoof's paper.

Thank you very much!

## Run the python script file in Matplotlib using the Jupyter notebook, but still do not display any numbers. Why?

Question: I have a problem while running the python script file myplot.py using ! python3 in the Jupyter notebook.

this is to say: ! python3 myplot.py

The myplot.py code that flows:

import matplotlib

import matplotlib.pyplot as a plt

import numpy as np

x = np.linspace (0, 10, 100)

plt.plot (x, np.sin (x))
plt.plot (x, np.cos (x))

plt.show ()

But that does not always show the number. He shows this "Figure (640×480)". I need your help to solve this trobule.

## forms – Should we allow special characters or numbers in the name field?

I'm not sure of the code you use, but I think if you have a little tooltip on the guidelines that will say that you should not use special characters in the first name and the name, it will be a good UX, although I do not know what application you are using .. and you do not know how you are going to apply it there .. (this forum has a tooltip like this one for the type of password here, I found this very useful)

## sql – Associate multiple ID numbers to a single product in Access

I have a database with the following structure:

ID Product Name
1 product A
2 product B
3 product C
4 product A
T5 Product A

Some products have multiple numeric and alphanumeric identifiers. If a product has only a numeric string and an alphanumeric string, I have solved the problem. However, some products contain a few dozen.

My final goal is to produce a report as follows

Product name ID
Product A 1 4 T5
Product B 2
Product C 3