networks: domains that do not work in the new ip block

I have two domains that don't work:

  • ko-bookmaker.com 176.31.75.117
  • 1x2bukkumeka.com 176.31.75.118

I added the IP block 176.31.75.116/30 to the network configuration but the domain still does not work. I am using this tutorial https://docs.ovh.com/pl/dedicated/network-ip-alias/#debian-9-ubuntu-17-fedora-26-i-arch-linux_1 to add IP blocking on my server where I have Debian 9. This is my interface configuration https://bbbet-fr.com/interface.png

I have few Ip blocks with assignment domains and it works fine. But I have a problem with this domain and the block of ip 176.31.75.116/30.

Domains have the appropriate name servers configured like the others. I don't know what's wrong 🙁

some help?

c # – Good solution to handle multiple wire access to the same block

I am writing a game server, recently I found an error that occurs when two requests arrive at my server at the same time.

Here is the method:

public async Task<(Game game, string error)> AddWinner(Game game, GameUser user, int card)
{
    if (game.Winners.Count < game.MaxWinners)
    {
        // check if we added this user before or not
        if (game.Winners.Any(x => x.Id == user.Id && x.Card == card))
        {
            return (null, "You have already got reward for this card");
        }

        // add user to winners
        game.Winners.Add(new WinnerUserCard
        {
            Card = card,
            Id = user.Id,
            Username = user.UserName
        });

        // update GameDb
        await gameRepository.UpdateGameAsync(game.Id, game);

        return (game, null);

    }
    return (null, "too late!");
}

I know there are several ways to handle this error, but I want a standard solution, a better practice. Some kind of structure to handle it because I know that I will face this again and again in this project.

altcoin development: how can I extract the first block of my custom litecoin fork?

Actually, you don't need to be connected to any other node to extract your first block, or any block from the core. Simply use youraltcoin-cli generate nblocks in a terminal with the kernel running, or use generate nblocks from within the console integrated in the kernel (in the debug window).

If you want to use a mining group or extract only your currency externally with mining software (such as cpuminer), you will need at least 2 nodes in the network that are synchronized.

dnd 5e: would it block an antimagic field to the user targets of the Dragon Breath spell?

Consider that someone has dragon breath throw on them.

Until the spell is over, the creature can use an action to exhale energy of the chosen type in a 15-foot cone.

What happens if this creature exhales energy into targets within an antimagic field?

Does the effect pass as if it were a dragon breath weapon?

html: Firefox and Safari show online block elements aligned differently within another block

I have an online block element (red circle) inside another block with some fills. In Firefox this looks correctly and the circle is in the middle of the block occupied by equal fillings. However, in Safari this is incorrectly seen: the circle moved a little upwards and did not focus vertically. I tried differently vertical alignment and line height configuration, but this does not help, in Safari it still looks different, not like in Firefox.

enter the description of the image here

HTML:

Uncategorized

CSS:

body {
  line-height: 1.7;
  font-family: Arial;
}
.post-categories {
    position: relative;
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: bold;
    text-transform: lowercase;
    display: flex;
    flex-wrap: wrap;
}
.post-categories a {
    font-weight: normal;
    text-decoration: none;
    padding: 1px 15px 1px 10px;
    background-color: #ffffff;
    border: 1px solid #000;
    margin-bottom: 5px;
    margin-right: 10px;
    border-radius: 5px;
}
.post-categories .cat-dot {
    display: inline-block;
    width: 13px;
    height: 13px;
    position: relative;
    top: 1px;
    line-height: 14px;
    border-radius: 100%;
    margin-right: 10px;
    background-color: red;
}

Codepen Where you can verify this: https://codepen.io/dedalx/pen/xxbbMOo

Question: How can I make the circle and text vertically centered in the main block in the same way in all modern browsers?

Format of the contents of a block key in the Bitcoind LevelDB?

This topic made me look a lot since this publication is almost everything there is as a form of documentation (thanks to Pieter for that). The missing piece, at least from my perspective, is that those fields are encoded using base 128 / Varint. To make things more difficult, this is no the same Varint as in representations of serialized Bitcoin block sizes (as explained here).

So, in an attempt to clarify this issue, here are 2 pieces of code, one in python and the other in golang, which will decode and read those fields using a base128 Decoder function The first is adapted from the book "The undocumented internal parts of Bitcoin, Ethereum and blockchains."
The Golang version is my own adaptation of this Python code.

Python version:

import leveldb
import sys

def reverse(hash):
    return "".join(reversed((hash(i:i+2) for i in range(0, len(hash), 2))))

def base128(ans, off):
    n = 0
    while True:
        ch = ord(ans(off:off+1))
        print ch
        off = off + 1
        n = (n << 7) | (ch & 0x7f)
        if ch & 0x80 == 128:
            n = n + 1
        else:
            return(n, off)

hash = "62" + reverse(sys.argv(1))
hash = hash.decode('hex')
db = leveldb.LevelDB('./testindex')
ans = db.Get(hash)

v, o = base128(ans, 0)
print v, o
v, o = base128(ans, o)
print v, o
# etc ...

golang version:

package main

import (
    "encoding/hex"
    "fmt"
    "log"
    "os"

    "github.com/syndtr/goleveldb/leveldb"
)

func reverse(s ()byte) ()byte {
    for i, j := 0, len(s)-1; i < j; i, j = i+1, j-1 {
        s(i), s(j) = s(j), s(i)
    }
    return s
}

// binary.Uvarint is supposed to do this, except it doesn't.
// And it is not the same varint as in bitcoin serialized varints.
// this is ported from "The Undocumented Internals of The Bitcoin
// and Ethereum Blockchains" python code
func base128(b ()byte, offset uint64) (uint64, uint64) {
    for n := 0; ; n++ {
        ch := int(b(offset))
        offset++
        n = (n << 7) | (ch & 0x7f)
        if ch&0x80 != 128 {
            return uint64(n), offset
        }
    }
    return 0, 0
}

func main() {
    db, err := leveldb.OpenFile("./testindex", nil)
    if err != nil {
        log.Fatal(err)
    }
    defer db.Close()

    h, err := hex.DecodeString(os.Args(1))
    if err != nil {
        log.Fatal(err)
    }

    b := append(()byte("b"), reverse(h)...)

    data, err := db.Get(b, nil)
    if err != nil {
        log.Fatal(err)
    }

    v, o := base128(data, 0)
    fmt.Printf("%d %dn", v, o)
    v, o = base128(data, o)
    fmt.Printf("%d %dn", v, o)
    // etc...
}

Hth

Block outgoing calls but allow text

I would like to know if it is possible to block outgoing calls to a specific contact but still allow text messages and incoming calls.

Caching: Problem configuring user-specific cache tags in a custom block with user context

I have a simple custom block with a user cache context and a specific user specific cache tag:

/**
 * Provides a 'User example' block.
 *
 * @Block(
 *   id = "user_example_block",
 *   admin_label = @Translation("User example block"),
 *   category = @Translation("Blocks")
 * )
 */
class UserExampleBlock extends BlockBase implements BlockPluginInterface {

  /**
   * {@inheritdoc}
   */
  public function build() {
    return (
      '#markup' => 'Current User ID: ' . Drupal::currentUser()->id() . '',
    );
  }

  /**
   * {@inheritdoc}
   */
  public function getCacheContexts()  {
    return Cache::mergeContexts(parent::getCacheContexts(), ('user'));
  }

  /**
   * {@inheritdoc}
   */
  public function getCacheTags() {
    return Cache::mergeTags(parent::getCacheTags(), ('example_user:' . Drupal::currentUser()->id()));
  }
}

The block output varies correctly depending on the connected user, but the user-specific cache tag is not set correctly.

It seems that the cache tag is only set once for users with the same role or permissions.

Here is how to reproduce it:

  1. Rebuild cache (drush cr)
  2. Log in with user 100 -> The block output is correct. The correct cache tag is set (example_user: 100).
  3. Sign off
  4. Log in with user 101 (same role as user 100) -> The output of the block is correct, but the cache tag was not modified, it is still example_user: 100. In fact, the getCacheTags, getCacheContexts methods were not even called .

What works is when I put the metadata of caching capacity in the compilation method (with the "#cache" element in the representation matrix).

What could be the reason for this?

Thanks for any help.

Software engineering: how do you create a block where, if you hit them, restore the game as if it were a geometry board?

Thank you for contributing a response to Game Development Stack Exchange!

  • Please make sure answer the question. Provide details and share your research!

But avoid

  • Ask for help, clarifications or respond to other answers.
  • Make statements based on opinion; Support them with references or personal experience.

Use MathJax to format equations. Reference MathJax.

For more information, see our tips on how to write excellent answers.