## untagged – Bitcoin: How does Proof of Work and single transactions align?

untagged – Bitcoin: How does Proof of Work and single transactions align? – Bitcoin Stack Exchange

## plotting – How to align axes with major gridlines

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

## How to align a network graph to an image?

An arbitrary example:

Create a random image

``````Image[RandomReal[{0, 1}, {10, 10}], ImageSize -> Medium]
``````

Define some points and a graph to align

``````c = PixelValuePositions[%, White, .1]
RandomGraph[Table[Length[c], 2]]
``````

``````Out[1]: {{2, 9}, {1, 8}, {1, 7}, {2, 7}, {9, 6}, {2, 2}}
``````

How can I align the nodes of a graph to coordinates on an image?

Ideally this would be a graph from a correlation matrix

``````RandomReal[{-1, 1}, Table[Length[c], 2]] // MatrixForm

``````

## microsoft excel – How to align data in a Google Sheets spreadsheet?

I have two tables.

Table:

``````ID            NAME
A01           John
A02           Peter
B01           Marta
``````

Then I have a second table (note that this table purposely has more entries).

``````ID             SURNAME
A02            Smith
B01            Clevens
A03            Rogers
A01            Brown
``````

Both tables represent the same people with Names and Surnames, identified by ID. How I can join the data into one table and align the people correctly?

Desired results

``````ID          NAME        SURNAME
A01         John        Brown
A02         Peter       Smith
A03                     Rogers
B01         Marta       Clevens
``````

## Unity – Align 2 gameObjects by their center point

I’m trying to align 2 game objects using their respective center points at runtime in Unity. The goal is to center my new generated object (SKY) to my map (terrain) which represents the center of my scene. What I already achieved is:

• create my game object (terrain)
• create 2 float values `xCubes` and `zCubes` based on the terrain `bounds`
• create a new Game Object (SKY)
• spawning a prefab on each xCubes and zCubes to create the ceiling

Now I need to center SKY on my terrain gameobject with `bounds.min.x` but the new object results aligned by its origin point, not by its center. SKY has to be aligned by x and z values but not on the Y, for which i need to specify my own value (that’s why i cannot use simply `bounds.center`.

``````    private void GenerateCeiling(int xMax, int zMax)
{
GameObject landscape = new GameObject("SKY");

for (int z = 0; z < zMax; z++)
{
for (int x = 0; x < xMax; x++)
{
var newCeiling = Instantiate(skyTile, new Vector3(x * 10, 0, z * 10), Quaternion.Euler(0, 0, 0));
newCeiling.transform.parent = landscape.transform;
}
}

var skyCenter = SkyRenderer.bounds.center;
//landscape.transform.position = new Vector3(terrain.bounds.min.x, 50, terrain.bounds.min.z);
skyCenter = new Vector3(terrain.bounds.min.x, 50, terrain.bounds.min.z);

Debug.Log(terrain.bounds.size.x.ToString());
Debug.Log(terrain.bounds.size.z.ToString());

}
``````

i tried to deal with different `renderer.bounds` `min`, `max`, `center`, `extents` etc. and to create new Rendere component on the SKY game Object but it doesn’t work.

## dnd 5e – Does the wording of Darkvision align with accepted rules?

I think that it fits the published rules appropriately, and I haven’t seen an errata entry suggesting otherwise.

There is no fundamental, explicit limitation on how far any character can see under ideal conditions. There are implicit limitations, such as one suggested by the Barbarian class’ level 6 feature Aspect of the Beast (Eagle totem variety) which allows a character to see up to one mile away as though it were no more than 100 feet away. This suggests that typical characters’ visual ability is not good enough to allow them to see so far or well.

With regard to lighting, darkness creates a heavily obscured area, and heavily obscured areas block vision entirely. It doesn’t matter how far the darkness extends because darkness blocks all vision anyhow. Nearsighted people, farsighted people, and sharpshooters all see equivalently in pitch darkness, which is to say “not at all”.

This is what Darkvision overcomes: darkness no longer creates heavily obscured areas (for the creature with that trait). Darkness never blocks your vision, because you can see without the benefit of illumination. But you are still presumably limited by your visual ability in general; 5e just doesn’t simulate that range. Most characters with Darkvision can see as far as the DM feels is appropriate. A Barbarian with Darkvision and Aspect of the Beast (Eagle totem) could presumably see things a mile away even in pitch darkness.

So as far as they can see in darkness, they have a chance to perceive things visually (albeit with Disadvantage)– it still counts as lightly obscured for them. Dim light, in turn, goes from lightly obscured to not obscured at all for them. This seems consistent, as it is the obscuring nature of dim lighting and darkness that blocks vision for most. With Darkvision every mundane darkness is effectively at least a little bit illuminated for you.

It’s always questionable to apply reality to ambiguities in D&D rules, but the real-world mechanics of vision absolutely require some light to bounce off of something and into an observer’s eye. Light from a single source eventually fades to darkness at some distance. Darkvision, by allowing sight in total mundane darkness at all, doesn’t have such a limitation. If darkness (and its accompanying heavy obscurity) doesn’t totally prevent vision within 60 feet, I don’t have a good sense of why it would (non-arbitrarily) prevent vision at 120 feet. There certainly isn’t a defined mechanism for it.

So why the distance limitation on dim lighting? I can only speculate. It could be that, because that darkness is the lack of illumination and dim lighting is a limited amount of illumination, dim lighting can only illuminate darkness to a certain distance. Darkness may continue indefinitely, but lighting from a single source cannot.

I don’t find that totally satisfying, but as far as I can tell in officially published material there is nothing that delineates ability to see from one patch of darkness to some other patch of darkness.

## mobile – How to correctly align label to clarify information?

On the image below, that is NOT a button but juste a bubble to display information on a day planner, I’m trying to find the best way to align the labels 7h30mn today and 30h this week.

Currently, I aligned both labels to the right. Don’t you think the durations are not well aligned and so not enough visible ? I actually do and I’ve already tried to left align labels.

Can anyone help me to enhance the user experience by improving my two labels design ?

## unity – How to align cards in hand in a circular way?

I am working on a card game in Unity, and by now I instantiated my cards on a canvas. Now I would like to align them like I am holding them in real life.

``````using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;

(System.Serializable)
public class GameManager : MonoBehaviour
{
public Sprite() Cards;
public GameObject CardPrefab;
public static string() TypeOfCard = { "tref", "herc", "pik", "kara" };
public static string() ValueOfCard = { "_sedam", "_osam", "_devet", "_deset", "_decko", "_baba", "_kralj", "_as" };
public List<string> Deck;
public GameObject CardDeck;
public GameObject Player1;
public GameObject Player2;
public GameObject Player3;
public GameObject Player4;

public List<string> Player1Hand;
public List<string> Player2Hand;
public List<string> Player3Hand;
public List<string> Player4Hand;
void Start()
{
GameStart();
}

public void GameStart()
{
CreatingDeck();
Deck = CreatingDeck();
Shuffle(Deck);
DeckOfCards();
CardSpawn();

}
public static List<string> CreatingDeck()
{
List<string> newdeck = new List<string>();
foreach (string x in TypeOfCard)
{
foreach(string y in ValueOfCard)
{
}
}
return newdeck;
}

void Shuffle<T>(List<T> list)
{
System.Random random = new System.Random();
int n = list.Count;

while(n>1)
{
int k = random.Next(n);
n--;

T temp = list(k);
list(k) = list(n);
list(n) = temp;
}
}
private static System.Random rng = new System.Random();
public static void Shuffle<T>(IList<T> list)
{
int n = list.Count;
while (n > 1)
{
n--;
int k = rng.Next(n + 1);
T value = list(k);
list(k) = list(n);
list(n) = value;
}
}
void DeckOfCards()
{

foreach (string CardName in Deck)
{
GameObject cards = Instantiate(CardPrefab, CardDeck.transform);
cards.name = CardName;
}

}

void CardSpawn()
{

for (int i = 0; i < 8; i++)
{
}
Player1Hand.Sort();
foreach (var cardname in Player1Hand)
{
CardDeck.transform.Find(cardname).gameObject.transform.SetParent(Player1.transform);
Player1.transform.Find(cardname).gameObject.GetComponent<CardInfo>().IsFaceOn = true;

Player1.transform.Find(cardname).gameObject.transform.position = newPos;
}

for (int i = 0; i < 8; i++)
{
}
Player2Hand.Sort();
foreach (var cardname in Player2Hand)
{
CardDeck.transform.Find(cardname).gameObject.transform.SetParent(Player2.transform);
Player2.transform.Find(cardname).gameObject.GetComponent<CardInfo>().IsFaceOn = true;
Player2.transform.Find(cardname).gameObject.transform.Rotate(Vector3.forward*90);
}

for (int i = 0; i < 8; i++)
{
}
Player3Hand.Sort();
foreach (var cardname in Player3Hand)
{
CardDeck.transform.Find(cardname).gameObject.transform.SetParent(Player3.transform);
Player3.transform.Find(cardname).gameObject.GetComponent<CardInfo>().IsFaceOn = true;
}

for (int i = 0; i < 8; i++)
{
}
Player4Hand.Sort();
foreach (var cardname in Player4Hand)
{
CardDeck.transform.Find(cardname).gameObject.transform.SetParent(Player4.transform);
Player4.transform.Find(cardname).gameObject.GetComponent<CardInfo>().IsFaceOn = true;
Player4.transform.Find(cardname).gameObject.transform.Rotate(Vector3.forward * 270);
}
}
}
``````

## html – Making text in second div flexbox align evenly?

This is my actual code that works correctly:

``````body {
font-family: Helvetica, Arial, sans-serif;
font-size: 14px;
}

background-color: black;
color: white;
margin-bottom: 20px;
}

footer {
margin-left: 140px;
}

.content {
width: 950px;
margin-left: 100px;
margin-right: 100px;
}

.flex-grid {
display: flex;
border: 2px solid;
}

.flex-grid .col {
flex: 1;
}

.flex-grid-thirds {
display: flex;
justify-content: space-between;
}
.flex-grid-thirds .col {
width: 32%;
}

.price {
width: 50px;
text-align: right;
}

.col .vehicleinfo {
background-color: #FFFFFF;
}

.autoinfo {
background-color: red;
color: white;
}

.autoimg img {
background-color: #FFFFFF;
height: 240px;
}

@media (max-width: 400px) {
.flex-grid,
.flex-grid-thirds {
display: block;
.col {
width: 100%;
margin: 0 0 10px 0;
}
}
}

* {
box-sizing: border-box;
}
body {
}
.flex-grid {
margin: 0 0 20px 0;
}
.col {
}

.sidebar {
background-color: yellow;
width: 90px;
height: 600px;
float: left;
position: absolute;
overflow: hidden;
z-index: 99999;
left: 0;
top: -100;
display: flex;
margin-left: 20px;
margin-right: 40px;
}

/*
.sidebar {

height: 9000px;
overflow: hidden;
display: flex;
background-color: yellow;
float: left;
margin-left: 20px;
margin-right: 40px;
}
*/``````
``````<!DOCTYPE html>
<html>
<meta charset="utf-8" />
<title>Used Cars Chicago | City center cars cheaply</title>
<body>
USED CARS CHICAGO

<div class="sidebar">
12
</div>

<div class="content">

<div class="flex-grid vehicleinfo">
<div class="col autoimg"><img src="https://www.cstatic-images.com/car-pictures/xl/USC40BUC042C021001.png"></div>
<div class="col"><h3>2017 Buick Regal 2.0T 1SV 4dr Sedan</h3>
<p>Dark Sapphire Blue, 30,000 miles</p></div>
<div class="col price"><h3>\$19,990</h3></div>
</div>

<div class="flex-grid vehicleinfo">
<div class="col autoimg"><img src="https://www.cstatic-images.com/car-pictures/xl/CAC40MBC685A021001.png"></div>
<div class="col"><h3>2017 Mercedes-Benz E400 Coupe 2dr</h3>
<p>Brilliant Blue Metallic</p></div>
<div class="col price"><h3>\$43,990</h3></div>
</div>

</div>

<footer>
</footer>

</body>
</html>``````

Depending on what size I make the image for .autoimg img the text goes onto another line, as seen with this example:

``````body {
font-family: Helvetica, Arial, sans-serif;
font-size: 14px;
}

background-color: black;
color: white;
margin-bottom: 20px;
}

footer {
margin-left: 140px;
}

.content {
width: 950px;
margin-left: 100px;
margin-right: 100px;
}

.flex-grid {
display: flex;
border: 2px solid;
}

.flex-grid .col {
flex: 1;
}

.flex-grid-thirds {
display: flex;
justify-content: space-between;
}
.flex-grid-thirds .col {
width: 32%;
}

.price {
width: 50px;
text-align: right;
}

.col .vehicleinfo {
background-color: #FFFFFF;
}

.autoinfo {
background-color: red;
color: white;
}

.autoimg img {
background-color: #FFFFFF;
height: 340px;
}

@media (max-width: 400px) {
.flex-grid,
.flex-grid-thirds {
display: block;
.col {
width: 100%;
margin: 0 0 10px 0;
}
}
}

* {
box-sizing: border-box;
}
body {
}
.flex-grid {
margin: 0 0 20px 0;
}
.col {
}

.sidebar {
background-color: yellow;
width: 90px;
height: 600px;
float: left;
position: absolute;
overflow: hidden;
z-index: 99999;
left: 0;
top: -100;
display: flex;
margin-left: 20px;
margin-right: 40px;
}

/*
.sidebar {

height: 9000px;
overflow: hidden;
display: flex;
background-color: yellow;
float: left;
margin-left: 20px;
margin-right: 40px;
}
*/``````
``````<!DOCTYPE html>
<html>
<meta charset="utf-8" />
<title>Used Cars Chicago | City center cars cheaply</title>
<body>
USED CARS CHICAGO

<div class="sidebar">
12
</div>

<div class="content">

<div class="flex-grid vehicleinfo">
<div class="col autoimg"><img src="https://www.cstatic-images.com/car-pictures/xl/USC40BUC042C021001.png"></div>
<div class="col"><h3>2017 Buick Regal 2.0T 1SV 4dr Sedan</h3>
<p>Dark Sapphire Blue, 30,000 miles</p></div>
<div class="col price"><h3>\$19,990</h3></div>
</div>

<div class="flex-grid vehicleinfo">
<div class="col autoimg"><img src="https://www.cstatic-images.com/car-pictures/xl/CAC40MBC685A021001.png"></div>
<div class="col"><h3>2017 Mercedes-Benz E400 Coupe 2dr</h3>
<p>Brilliant Blue Metallic</p></div>
<div class="col price"><h3>\$43,990</h3></div>
</div>

</div>

<footer>
</footer>

</body>
</html>``````

I also can’t quite get the box to get image and text aligned evenly enough, but the code works well, and the template nearly does its job as intended.

This is what happens and isn’t quite the intended result:

Any advice is welcomed on this, as I’m aiming for this with my flexbox layout:

only without the additional things, and for the text to be at the side as in the screenshot above:

This is intended as a simple-to-use template, and is nearly working; constructive criticism is welcomed.

## filters – Gutenberg – Add align controls to a custom block

I want to add align controls to a custom block.

I wrote this code thad adds the code that adds the default block alignment toolbar to the block, but I select and change the align, I get an the following error:

``````react-dom.min.js?ver=16.13.1:32 Uncaught TypeError: n is not a function
at Object.controls.l.map.w.onClick (block-editor.min.js?ver=ee2642fa39827fa8f0de00446089caf1:12)
at Object.ki (react-dom.min.js?ver=16.13.1:176)
at ji (react-dom.min.js?ver=16.13.1:13)
at mi (react-dom.min.js?ver=16.13.1:13)
at lf (react-dom.min.js?ver=16.13.1:13)
at wi (react-dom.min.js?ver=16.13.1:187)
at Kd (react-dom.min.js?ver=16.13.1:32)
at pc (react-dom.min.js?ver=16.13.1:32)
at Wf (react-dom.min.js?ver=16.13.1:34)
Object.controls.l.map.w.onClick @ block-editor.min.js?ver=ee2642fa39827fa8f0de00446089caf1:12
ki @ react-dom.min.js?ver=16.13.1:176
ji @ react-dom.min.js?ver=16.13.1:13
mi @ react-dom.min.js?ver=16.13.1:13
lf @ react-dom.min.js?ver=16.13.1:13
wi @ react-dom.min.js?ver=16.13.1:187
Kd @ react-dom.min.js?ver=16.13.1:32
pc @ react-dom.min.js?ver=16.13.1:32
Wf @ react-dom.min.js?ver=16.13.1:34
(anonymous) @ react-dom.min.js?ver=16.13.1:236
uf @ react-dom.min.js?ver=16.13.1:15
Qd @ react-dom.min.js?ver=16.13.1:42
sc @ react-dom.min.js?ver=16.13.1:41
unstable_runWithPriority @ react.min.js?ver=16.13.1:25
Da @ react-dom.min.js?ver=16.13.1:60
mk.Events.current @ react-dom.min.js?ver=16.13.1:236
Ei @ react-dom.min.js?ver=16.13.1:41
``````

My code:

``````const CustomButtonsToolbar = () => {
const currentBlock = useSelect(
select => select('core/editor').getSelectedBlock()
);
if(!currentBlock){
return <BlockControls/>
}

const currentBlockIsSmallCta = currentBlock.name ==='create-block/my-custom-button'
if(currentBlockIsSmallCta){
return (
<BlockControls>
<ToolbarGroup>
<BlockAlignmentToolbar/>
</ToolbarGroup>
</BlockControls>
);
} else {
return <BlockControls/>
}

}

registerPlugin(
'custom-buttons-toolbar-mods',
{
render: CustomButtonsToolbar
}
);
``````

I want to save the alignment as an attribute “block_alignment”

What is the correct way to add align toolbar to a custom block?