gambling – How to deal with bitcoin/crypto volatility as an online casino?

Let’s say an online casino has btc as a deposit and withdrawal method.
Assuming A player deposits 1 btc, plays and does neither win nor lose much and then cashes out the balance, which happens to be exactly 1 btc. I am using simple values to focus on the main issue.

However, the btc price was 15% volatile since the deposit was made.

Technically, the player has neither won nor lost based on game play, but he would get a free 15% in value just due to the btc price increase.

The opposite applies if btc loses 15% of value.

Of course it is a nice thing for the casino if the btc price plummets, but potentially disastrous if the price goes up, assuming an average 4% house edge for the casino.

What would be a fair solution for both parties?

pathfinder 1e – Do thistle arrows deal their bleed damage in addition to the normal effects of a bow shot, or instead of it?

Thistle arrows “deal damage as a bleed effect for 1d6 rounds after a hit”. Does it cancel their normal damage, or does it essentially double the total damage dealt on the round when the arrow is shot?

Is using such arrows at least once on every potentially vulnerable enemy optimal?

architecture – How to deal with data that needs to be accessed by all objects?

I have a World class that currently only has one instance. It has data and methods that need to be accessed by all other game objects. Right now I’m hardcoding a reference to the global variable world in all of my methods, and this doesn’t seem to be the right approach.

Another idea I tried was a dependency-injection-esque approach, where each object stores its own reference to the world object, but this clutters memory with unnecessary references, so I don’t think this is the right approach either.

Another approach I tried was passing world as an argument directly into the method call, but this led to repetitive code as I was constantly passing world into any function that needed it.

A bit of research hasn’t worked for me because it’s hard to summarise my problem into a few words that can return Google search results. It seems this isn’t a problem in the majority of applications, so I’m wondering if this is mainly a gamedev situation.

What is the best way to solve this problem?

a generic way to deal with intermittent non-numerical values in arrays

Sometimes when dealing with arrays with intermittent non-numerical values (e.g., NaNs imported from external sources), the common arithmetic functions (e.g., Median) may break annoyingly.
Although it’s possible to replace those NaNs with Indeterminate and then carefully remove them before applying the arithmetic functions, such operations are rather tedious compared to other computing environments (e.g., numpy) where similar functions would quietly ignore those NaNs and produce results.

I’m wondering if we can create a similar pure numeric environment in Mathematica that can do such jobs more easily?

For example, for an arbitrary array generated using the code below:

arNaN = Array(
  RandomChoice({RandomReal(), Indeterminate}) &, {4, 2, 3, 5})

How can we apply the common arithmetic functions (e.g., Median, Quartiles, etc.) without deliberately removing the non-numerical items?

dnd 5e – Do Player Characters in 5e with a powerful build deal more melee damage like a monster would?

I have a player in one of the games I’m running that’s a Goliath Paladin. He uses a greataxe and recently asked me if he could deal more damage like a “Large” monster could since he has a powerful build.

According to the DMG, On p.278 it says:

Big monsters typically wield oversized weapons that deal extra dice of damage on a hit. Double the weapon dice if the creature is Large, triple the weapon dice if the creature is Huge, quadruple the weapon dice if it’s Gargantuan…

So since he counts as one size larger than medium, I thought that this rule could apply to him, HOWEVER, according to the powerful build mechanic, it states;

You count as one size larger when determining your carrying capacity and the weight you can push, drag, or lift.

(Technically nothing more or less.)

My players are usually good, and don’t try to “break the game,” but before I make a decision, I would like to know what a community of other players and GMs would think about this. Would he be able to deal extra damage? Would it “Break the Game?”

javascript – How to deal with minification

Sorry for such a noob question, I just started learning web development. But I am confuse on how do you handle minification on JS and CSS.

For example you minify your JS, CSS files for release but where do you keep the unminified version of the codebase? Because apparently you only have to release the minified versions of the copy.

Should you have two codebase? Simply because having the minified version only is not something you can work on when debuggging.

And I think having two codebase for the same project is a disaster because you now have to keep everything in sync.

dnd 4e – How do you deal with metagaming based on die results?

1. How do I discourage players using the knowledge that they have a low roll to influence character decisions?

Be up front and honest with them about not Meta gaming. It is meta-gaming using the knowledge of a low roll to influence your in-character actions/reactions/thoughts/etc. I usually say just what you said, something along the lines of, “You think she seems to be telling the truth.” If my player then goes on to think she is lying, I do one of two things:

  • Either gently remind them, “Your character thinks she is telling the truth and would not remain suspicious.”
  • Or, allow them to roll insight again, but on a different bit of information hoping for a higher roll so it’s definitive that the NPC is truthful (or not).

The first option is always better, and usually in the long run makes for more engaging role playing when players can accept the cards their characters have been given. One major tip, when they roll low and you tell them they believe the NPC, try not to act devious or suspicious, your tone and demeanor can influence player thoughts tremendously.

2. Should I, and if so how, tell my players if somebody is actually telling the truth even if they have a very low roll to avoid them thinking they are being lied to and their characters are too stupid to figure it out?

This is a bit tougher… first I refer you back to the first part of my answer to the first question. Players acting on the knowledge of low or high rolls in a way that is discordant with the information you give them is Meta gaming. So, if the 2 options above don’t work, then you have to ask yourself one question.

“How will having this player remain suspicious of the information affect the narrative?”

This situation is good for on the fly story development!

  • The player remains suspicious, doesn’t heed the warnings of the NPC and their actions either result in an extremely challenging fight, or worse may even lead to the death of the NPC. This could cause the player to be more careful in the future or become deeply regretful of his stubbornness.
  • The player remains suspicious but the NPC pleads with them, “I can tell you don’t believe me, and if I were you I might not believe someone like me either… but please good sir knight, proceed with caution!” This could also lead to the outcomes in the previous example if the Player still ignores the warning. Or they may uncover, incrementally, that the NPC was truthful, after which they might go back, apologize and make a new friend.

If the story really is better served with the character believing 100% that the NPC is not lying and there is no in game way to work around the suspicious nature of the player… as a last resort (and I personally would not do this), just tell them out of character that the NPC is being truthful. I can’t think of a reason that you would need to have the character believing that the NPC was honest given the ad-libbed scenarios above, but if you find it imperative, it’s your call to make.

…and nothing says the player won’t suspect you of lying just because you are the DM. 😉 Some players will always be suspicious no matter what as they will always believe the DM is “out to get them”.

(And to quote another answer here after reading the stuff posted as I was typing this novel length answer… do be up front with your players that anything you say as a DM to the player will always be the truth. Lies might come from NPCs, but never the DM. And always make sure you are consistent in upholding these promises to your players.)

8 – How to deal with block cached for anonymous user?

I have placed in the site’s home, via twig, a views block of nodes with a random sort and obliviously no cache active.
Therefore, at each page reload different nodes appear.

The problem is that block get still cached for anonymous users.

For now, we can’t yet do performance test of the site, so we’d rather not disable the Internal Page Cache module.

The Internal page documentation says:

Websites that serve personalized content to anonymous users (dynamic, per-session, e.g. a shopping cart) will want to disable the Internal Page Cache module. This module assumes pages are identical for all anonymous users. Those websites can still take advantage of the Dynamic Page Cache module though, or can alternatively do their personalization using JavaScript + AJAX.

So after failing to find anything else useful, I’ve tried this solution to solve the issue.

Unfortunately I found no module that let “load” the block via ajax, or something similar. For now I’ve implemented a custom route that render the block view:

<?php

namespace Drupalmy_moduleController;

use DrupalCoreControllerControllerBase;
use DrupalCoreLoggerLoggerChannelFactoryInterface;
use DrupalCoreRenderRenderer;
use DrupalCoreSessionAccountProxyInterface;
use Drupalsdm_userSdmUserSalesforceClient;
use SymfonyComponentDependencyInjectionContainerInterface;
use SymfonyComponentHttpFoundationResponse;

/**
 * Provides route responses for the Example module.
 */
class myController extends ControllerBase {

  

  /**
   * @var DrupalCoreRenderRenderer
   */
  private  $renderer;

  /**
   * @param DrupalCoreRenderRenderer $renderer
   */
  public function __construct(Renderer $renderer){
    $this->renderer = $renderer;
  }

  /**
   * {@inheritdoc}
   */
  public static function create(ContainerInterface $container) {
    return new static(
      $container->get('renderer')
    );
  }

  /**
   * @return array
   *   A simple renderable array.
   */
  public function render($id, $display) {
    $view = DrupalviewsViews::getView($id);
    $render_array = $view->buildRenderable($display);
    $rendered = $this->renderer->renderRoot($render_array);
    $response = new Response();
    $response->setContent($rendered);
   
    return $response;

  }
}

And then in a custom js, load the necessary block via ajax:

(function ($, Drupal, drupalSettings) {
    Drupal.behaviors.products_in_home = {
        attach: function (context, settings) {
            $(document, context).once('products_in_home').each(function () {
                jQuery.ajax({
                    url: drupalSettings.path.currentLanguage + '/ajax/views/prodotti/products',
                    method: 'GET',
                    success: function (data) {
                        $(".products-container-home").html(data);
                    }
                });
            });
        }
    }
}(jQuery, Drupal, drupalSettings));

This works, but I’m kinda baffled: is this the only approach possible?

I mean, do I need to manually load via ajax every blockthing in the site that will suffer this problem?

Isn’t there a moduleAPIsome approach that can generally solve this problem, without custom specific code for every element?

Looking for a good workflow to deal with large file sizes after Photoshop

I recently upgraded to a Nikon D850 which produces RAW files on the order of 37MB in size. I take these as DNG files into Lightroom. When I edit an image in Photoshop and then return to Lightroom with the image saved as either 16 bit lossless compressed TIFF or PSD (all layers flattened into a single layer), I wind up with a file size that exceeds 200MB. I do understand why this is happening, and if it is an image that is of really fine quality that I might want to someday print or do more with than post on the internet, then the file size is ok with me.

The problem is that I travel a lot to dance festivals and take lots and lots of social dance photos, perhaps 500 or more images in a weekend. And I will wind up retouching a lot of these images in Photoshop for one reason or another. In most cases the images are only posted as exported JPEG on the internet, e.g. on Facebook or Flickr, and so it seems to be a massive overkill to have the 200+ MB TIFF files lying around. On the other hand, I would like to retain all the retouching that I did in Photoshop, just in case I decide to do some more changes on the images later.

Can anyone who also has run into this same situation recommend a good workflow so that I can avoid spending my life savings on external memory storage? Is there an alternative file format after Photoshop that can be used? Should I save the Photoshop files as high quality JPEG instead? Or go down to 8 bit? Or does it make sense just to resize in Photoshop from the huge image sizes, say by 50% or 25%? What do people normally do in this situation?

Thanks for any good tips!

client – A wrong deal: the status is “0 / unacknowledged, not in memory pool “

I started a transaction with bitcoin-0.21.0-win64, a Windows client. It may be that the fee is set too low, which leads to the unsuccessful transaction. What should I do in the future? What do I need to do? How to implement the specific operation steps? Below is the transaction details, please help! Thank you very much!

Status: 0 / unacknowledged, not in memory pool
Date: 2021 / 3 / 8 12:31
To: coin an 1kgsxf7krv1ab99tex1wjm643tsilczbg6
Expenditure: – 0.05193365 BTC
Transaction fee: – 0.00120000 BTC
Net amount: – 0.05313365 BTC
Transaction ID: aceea84e8a72b24654cba7b1d042561d8a9d36f7828855b52012de8a5a0b9c12
Total transaction size: 11767 bytes
Transaction Virtual Size: 11767 bytes
Output index: 0