## bitcoin core – Why is the data format for block height in coinbase scriptSigs inconsistent for heights 1-16?

BIP-34 claims that in coinbase transactions, the scriptSig should contain the block height. It says the format of this is “serialized CScript”, i.e. a byte indicating the length of the number (`n`), and then `n` bytes in little-endian format.

This works if you look at e.g. the most recent block as of this writing—block 640037—whose coinbase scriptSig begins with these 4 bytes: `0x0325c409`. `0x03` indicates the length, and then we have `(0x25=37 * 256^0) + (0xc4=196 * 256^1) + (0x09=9 * 256^2)`, or `37 + 50176 + 589824 = 640037`.

For obvious reasons mainnet and testnet will never need to encode heights 1-16 in their coinbase. But regtest nodes will. When I run a fresh regtest node (`v0.19.1`) and generate a couple blocks, I get coinbase scriptSigs that look like this:

``````height 1: 0x510101
height 2: 0x520101
...
height 16: 0x600101
``````

Clearly it’s not serialized CScript, at least in the format described in BIP-34. If it were, those first bytes would indicate data lengths of 81, 82, and 96 respectively, clearly ridiculous. The actual encodings of 1, 2, and 16 in serialized CScript are `0x0101`, `0x0102`, and `0x0110`. It looks to me like the format is `height+80` followed by `0x0101`. And for some reason this only persists for the first 16 blocks, as 17’s scriptSig is `0x01110101`.

I tried looking through the bitcoin source code, but I don’t write much C++ so it’s hard to tell what’s going on. No documentation—in the source (as far as I can tell) or the PR for BIP-34 or in the BIP itself seems to indicate that heights 1-16 would have a different format from every other height.

Why is this happening?

## Scatter diagram of diamonds of different heights and widths based on values ​​in Python or R.

I have these 2 lists in Python:

``````x = [1, 2, 3, 4, 5]
y = [1.5, 1.7, 3.2, 4.1, 4.9]
``````

I want to create a scatter plot of y on the vertical axis versus x on the horizontal axis, and I want the marks to be diamonds that are proportional to their size.

``````x_size = [5, 7, 5, 6, 9]
y_size = [10, 9, 11, 13, 12]
``````

The width of the diamond is x_size and the height of the diamond is y_size.

I prefer this in Python with Matplotlib or Seaborn, but I'm willing to do this in R.

How do I do that?

## Mining theory – BIP34, BIP66 and BIP65 should have been enforced in clear block heights. Why do different sources claim different block heights for enforcement?

Inconsistent consensus / activation of GDPs

GDP 34

Activated block height 227,835 (BitMEX reference)

Activated block height 227,930 (Bitcoin developer reference)

Activated block height 227,931 (github reference)

BIP66

Activated block height 363,724 (previous question)

Activated block height 363.725 (github reference)

Activated block height 363.731 (BitMEX reference)

GDP 65

Activated block height 388.380 (BitMEX reference)

Activated block height 388.381 (github reference)

Confusing documentation

BIP34 indicates that it will be activated when 950 out of 1000 blocks signal for version 2. It is not clear whether this contains the current block or references previous blocks

BIP66 indicates that it is activated when 950 of the previous 1000 blocks signal for version 3. However, 951 of the previous 1001 blocks are specified in the client instructions. Then BIP66 says that it is activated using the BIP34 protocol. We now have three possible methods. They do not fit together.

Any advice on what's going on here?

## Code Review – How can I map edge heights from one matrix to edges along the paths generated by another matrix?

Suppose we have two matrices with identical dimensions: `matA` and `matB`, I want to identify a number of paths `matA`, but then map the respective edge weights `matB` identified by the ways `matA`, I like to do this with an MMA function such as `map[matA_, matB_, t1_,t2_]:=`

``````ClearAll[n, matA, matB, map];
<< IGraphM`;
<< BoolEval`;
SeedRandom[4];
n = 10;
matA = RandomReal[{0.1, 0.5}, {n, n}];
matB = RandomReal[{0.1, 0.4}, {n, n}];
map[matrixA_?MatrixQ, matrixB_?MatrixQ, t1_Real, t2_Real] := {
selectBetween[t1, t2] = BoolEval[t1 <= matrixA < t2];
subgraphBetween[t1, t2] =
pindex = FindPath[subgraphBetween[t1, t2], 1, 4, Infinity];
paths =
Graph[pindex, EdgeWeight -> Flatten[matrixB],
DirectedEdges -> True, VertexLabels -> "Name",
EdgeLabels -> "EdgeWeight"]
``````

I think everything works fine `Graph[..]` in the code above. `pindex` is identified, but I cannot assign the corresponding edge weights `matB` on to `pindex`,

Needless to say, improvements have been made in this regard `code` is very welcome. Thank you for your help.

## Remove excess heights from the SharePoint list

Hello developers, we had a SharePoint list and adapted the list according to our requirements. However, we have a problem with the amount of extra space on the list. Please note the attached picture. We want to remove the height "style =" display: block; Height: 318.4px ". Can someone please suggest how to remove the excess height? Please let us know if you need additional information.

The SharePoint Online environment we use.

## Plane geometry – Pythagorean triangles with integer heights

have Pythagorean triangles with integer heights "noticed", or has it been noticed that for Pythagorean triangles the height on the hypotenuse is always rational?

Since the two cathets are two of the heights and are therefore in one piece, it remains to bring the height to the hypotenuse integral as well, but since this height divides the triangle into two triangles that are similar to the original one, it is easy to see how to do it it makes a Pythagorean triangle with integer heights:

for a Pythagorean triangle with cathets $$a$$ and $$b$$ and hypotenuse $$c, (a, b, c in mathbb {N})$$ we have $$a ^ 2 + b ^ 2 = c ^ 2$$ and $$a & # 39; = frac { operatorname {lcm} (a, b)} {b} ! cdot c, b & # 39; = frac { operatorname {lcm} (a, b)} {a} ! cdot c, c & # 39; = frac { operatorname {lcm} (a, b)} {b} ! cdot a + frac { operatorname {lcm} (a, b)} {a} ! cdot b$$
is a Pythagorean triangle with integer heights

## java – How can Box2D best manage collisions at different (simulated) heights?

I'm working on a 2D top down game, but we're also using a Z coordinate. This simulates the effect of 3D / height. Now the player can walk under and over a bridge. The next thing I did was manage the collision at these different heights. I managed to get the player to collide with the edge of the bridge when he walks over it, but when he walks under it he doesn't collide. But I'm not sure I did it right.

As I am doing it, I use different bits for different heights:

``````public static final short ENTITY_Z0_BIT = 1;
public static final short ENTITY_Z1_BIT = 2;
public static final short ENTITY_Z2_BIT = 4;
public static final short COLLISION_Z0_BIT = 8;
public static final short COLLISION_Z1_BIT = 16;
public static final short COLLISION_Z2_BIT = 32;
``````

And then a collision body in Z 1 (or on the second floor) has the following filter:

``````fixtureDef.filter.categoryBits = COLLISION_Z1_BIT;
fixtureDef.filter.groupIndex = (short) 0;
``````

This means that the wall on the second floor only collides with an entity on the second floor, since I also change the filter of the entity depending on whether its Z coordinate increases / decreases. This means that I need to add more bits if I need a higher simulated Z-axis, and that doesn't allow dynamic Z-axis machining either, because I do a large switch case or if statement for each Z-axis and then adjust the filter accordingly.

My second option was to set the groupIndex to be identical to the Z axis + 1 of the collision / entity. If a collision body and an entity body both have groupIndex 1, they ALWAYS collide. However, if the object moves up on the Z axis, its groupIndex is set to 2 and no longer collides. This also seemed like a nice and dynamic idea. But then everything that has to collide with a wall or an object automatically collides with all other bodies that need the same groupIndex for the same reason. This doesn't allow for much flexibility.

Which of these two options is the best? And if there is another better way, let me know!

## Cairnhill 16 | Former Cairnhill heights

Cairnhill 16 is a new condominium facility from Tiong Seng Holdings and Ocean Sky International. It is located on Cairnhill Rise in Singapore, District 19. It will be able to reach its TOP in 2023. This upcoming condominium consists of a good selection of equipment mixes with good finishes and efficient sizes. The hotel is close to the Orchard Shopping Belt, Robinson The Heeren, Paragon Shopping Center, Ngee Ann City and so on.
Register your interest now to view the exhibition space, receive current information such as start date, e-brochure, price, floor plan and invitation to the VVIP priority preview.

## Use inline CSS styles in the "Text" section of a page to set different heights per screen size

I've embedded a 360 Virtual Tour with the following code in a WordPress page:

``````

``````

Everything works pretty well, but I have to be able to get different heights per screen size.
Example:
Laptop / desktop screen ->

``` ```

Mobile device screen -> ``` ```

I was told that this is possible using CSS with inline styles. So far I can not find any instructions. I found about media queries, but this seems to be a simple CSS element.
Can someone help? I've been searching for 5 hours and I'm desperate: /