drush – DrupalVM not working

I followed the DrupalVM installation for windows 10. I got the following message when I ran “vagrant up” after installation, and it seems Drupal VM box is ready to use, but when I enter “http://dashboard.drupalvm.test” in browser, the page does not load. Please suggest.

==> drupalvm: Machine 'drupalvm' has a post `vagrant up` message. This is a message
==> drupalvm: from the creator of the Vagrantfile, and not from Vagrant itself:
==> drupalvm:
==> drupalvm: Your Drupal VM Vagrant box is ready to use!
==> drupalvm: * Visit the dashboard for an overview of your site: http://dashboard.drupalvm.test (or http://192.168.88.88)
==> drupalvm: * You can SSH into your machine with `vagrant ssh`.
==> drupalvm: * Find out more in the Drupal VM documentation at http://docs.drupalvm.com

pip – sudp apt update not working to load python3 module

I am a grad student working with MCNP for my research project. I am using Ubuntu to run a Python3 automation script developed by my research partner.

However, the python3 that comes with Ubuntu does not have the modules I need to run the automation, namely numpy and matplot.

To load these, I need to load pip for python3. But Ubuntu will not allow this.

I looked for help in various website and they all say to use sudo apt update and then sudo apt install python3-pip.

However, when I use the sudo apt update command in my terminal, I get a series of errors; they are:

Hit:1 http://old-releases.ubuntu.com/ubuntu disco-security InRelease
Err:2 http://us.old-releases.ubuntu.com/ubuntu disco InRelease
Could not resolve ‘us.old-releases.ubuntu.com’
Err:3 http://us.old-releases.ubuntu.com/ubuntu disco-updates InRelease
Could not resolve ‘us.old-releases.ubuntu.com’
Err:4 http://us.old-releases.ubuntu.com/ubuntu disco-backports InRelease
Could not resolve ‘us.old-releases.ubuntu.com’
Reading package lists… Done
Building dependency tree
Reading state information… Done
192 packages can be upgraded. Run ‘apt list –upgradable’ to see them.
W: Failed to fetch http://us.old-releases.ubuntu.com/ubuntu/dists/disco/InRelease Could not resolve ‘us.old-releases.ubuntu.com’
W: Failed to fetch http://us.old-releases.ubuntu.com/ubuntu/dists/disco-updates/InRelease Could not resolve ‘us.old-releases.ubuntu.com’
W: Failed to fetch http://us.old-releases.ubuntu.com/ubuntu/dists/disco-backports/InRelease Could not resolve ‘us.old-releases.ubuntu.com’
W: Some index files failed to download. They have been ignored, or old ones used instead.

Because of this, I cannot add pip, which means I cant add numpy or matplot and cannot run the program that is driving my research.

Any help on this would be greatly appreciated. I am kind of lost on this and the internet has not been helpful.

Thank you

Chris

unity – .isGrounded is not working reliably

New to Unity and C#, though, I got the code from the official doc page for Character Controller and thought that should work by default.

When pressing the Jump button here it doesn’t always work. When checking if the player is grounded the variable groundedPlayer not always provides true when idle/not moving. Instead, the value is constantly changing between true and false.

Below is my current code which was modified a little:

public class PlayerController : MonoBehaviour
{
  private CharacterController controller;
  private Vector3 playerVelocity;
  private bool groundedPlayer;
  private float jumpHeight = 1.0f;
  private float gravityValue = -9.81f;

  private void Start()
  {
    controller = gameObject.AddComponent<CharacterController>();
  }

  void Update()
  {
    groundedPlayer = controller.isGrounded;
    //this will constantly return both false and true while idle
    print(groundedPlayer + ", " + playerVelocity + ", " + gameObject.transform.position.y.ToString("f8"));
    if (groundedPlayer && playerVelocity.y < 0)
    {
      playerVelocity.y = 0f;
    }

    if (Input.GetButtonDown("Jump") && groundedPlayer)
    {
      playerVelocity.y += Mathf.Sqrt(jumpHeight * -3.0f * gravityValue);
    }

    playerVelocity.y += gravityValue * Time.deltaTime;

    controller.Move(playerVelocity * Time.deltaTime);
  }

}

It’s just that I feel dumb since basic jumping is this difficult to implement for me. I feel like I’m missing something very obvious. I found 1 working solution for me which is implementing coyote time, but it looks like a workaround and might provide more glitches in the future. I also could try working on creating my own character controller, though that’s a whole different field.

Anyone had this issue before? How did you fix it?

Are airport car rentals always open until the last flight has landed, regardless of the official working hours?

Recently I had a flight to Kona/Hawaii that arrived at 10pm. The local car rentals all appeared to close at 10:30pm and there’s now a secondary COVID test in Hawaii that can take up a lot of time, so I’ve decided I’ll just get a taxi and come back for the car the next day. But to my surprise, I saw a car rental shuttle at 10:45pm and was in fact able to pick up my car. Their employee told me that they’re always open until the last flight has landed and picked up their luggage, so their hours vary.

Is this the case for all airport car rentals, at least in the US? Can I always book a car without worrying about my flight being delayed?

“`ResourceFunction“` not working on my system

When I try to use ResourceFunction it doesnt find a file. I’m afraid it’s because my user name on Windows include spaces and an "é".

In[1] := ResourceFunction["AbundantNumber"][1] returns

ResourceFunction::lfail: Failed to load resource function from LocalObject[file:///C:/Users/Juan%20Jos%C3%A9%20Alba/AppData/Roaming/Wolfram/Objects/Resources/6eb/6ebae805-287b-40a4-b883-c9c6330d8a61/download/1-0-0/DefinitionData].

Out[1] = $Failed[1]

It’s not the first time I have problems because of my user name.

Anyone knows a work around for this?

magento2 – Filter on custom attributes – elasticsearch – not working on simple products

I have a project where I have a lot of configurable products and I need to make some filters there. I’ve manage to make the filters and everything related but the issue is that when I apply filters

Filters

I am getting that for size 34 there are 22 products in total and from those, there are 22 products with stock_custom filter on “In stock” and 18 with “Out of stock”. The “Out of stock” value is ok, but the “In stock” value is not because is showing me the total count of products and is not taking into consideration the size filter.

I want to mention that the size filter is the super attribute for configuration so it should get the simple products with “stock_custom” values.

What do I do wrong here?

Safely shutting down seemingly misconfigured (but working) PostgreSQL replication/archiving

I’m helping administer two PostgreSQL servers (one primary, one replica) plus a separate server running Barman for WAL archiving. I was not originally involved in setting up the replication and archiving. The configuration is rather old, some of it dating back to 2015 and PostgreSQL 9.3, although we’re now running 9.5. The history of configuration changes is sadly not documented. The person who built the setup is still around, but this was their first time setting up replication as well.

Some time ago we ran into a mysterious data corruption issue on our primary server after some storage system troubles at our VPS provider. These issues were present even when restoring a Barman backup to a fresh server. This was preventing us from cleanly upgrading to PostgreSQL 12, but we determined that we were able to cleanly dump our actual production database in the main cluster and restore it to a newly created recovery cluster.

We decided to shut down our replication + Barman archiving setup and start them over from scratch as well, and in researching how to do this I ran into some interesting configuration issues. tl;dr: the current setup is working, but not how I thought it was, and now I need guidance on how to cleanly shut it off.

The first clue that something was off was when I was looking at what replication slots were configured on the primary server with select * from pg_replication_slots. This produced no results, to my confusion. My assumption (based on the description of the person who built the setup) was that we were slots at least for Barman, and I thought we would be doing so for the replication as well.

Before I go further, here are the relevant settings from the three servers, with sensitive details altered:

# Primary server's postgresql.conf
wal_level = hot_standby
max_wal_senders = 4

archive_mode = on
archive_command = 'rsync -a %p companyuser@backup-server:/backup/thingamabob/incoming/%f'
max_replication_slots = 2
# Replica server's postgresql.conf
wal_level = hot_standby
hot_standby = on
# Replica server's recovery.conf
standby_mode = 'on'
primary_conninfo = 'host=primary-server user=postgres'
trigger_file = '/tmp/trigger_file0'
# /home/companyuser/.barman.conf on the backup server
(barman)
barman_home = /backup
barman_user = companyuser
log_file = /backup/barman.log
minimum_redundancy = 1

(thingamabob)
description = "Thingamabob"
archiver = on
# 5436 is the SSH tunneled port to our primary DB server, which has
# a 'barman' user
conninfo = host=localhost port=5436 user=barman dbname=postgres
backup_method = postgres
slot_name = backup
retention_policy = RECOVERY WINDOW OF 4 DAYS
retention_policy_mode = auto

Let’s look at the Barman WAL archiving side first, which I think I’ve figured out. archive_mode and archive_command are rsyncing the completed WAL segments from the primary server to the backup server, and Barman has the requisite control connection to the primary server. Apparently due to a misunderstanding, .barman.conf has slot_name = backup set, even though we’re using traditional WAL archiving only, and slot_name is used by the more recent WAL streaming functionality of Barman. The dead giveaway here is the lack of the streaming_archiver and streaming_conninfo settings. So, the setting is useless, but fortunately harmless in this setup.

What I don’t really understand is the replication setup. We’re not using slots here (recovery.conf doesn’t have the primary_slot_name setting), and the documentation for the standby_mode and primary_conninfo settings is not telling me how the replication is actually functioning correctly.

Finally, some concrete questions based on the information presented so far:

  1. We’re not using replication slots, nor wal_keep_segments, nor restore_command. My assumption is that our replication setup is working through sheer luck: the replica server has not had significant downtime, and therefore whatever the default WAL file retention period of the primary server is has been sufficient for our replication to never fail due to the primary server removing an old WAL file that the replica has not yet received. Is this assumption correct?

  2. How does the replica server know when and from where to retrieve WAL files from the primary server? What in our settings is actually doing this, or are PostgreSQL defaults just achieving this? Is it polling something over primary_conninfo?

  3. I assume that the simple way to end the Barman WAL archiving is to remove the archive_mode and archive_command settings from the primary server’s configuration, and then to stop barman cron from running once per minute on the backup server. Is this correct? Based on my reading of the documentation, archive_mode is not involved in the replication side of things.

  4. What is the correct way of terminating the replication? My current assumption is to do one of the two things below, but is either one of these actually correct?

  • shut down Postgres on the replica server, remove the standby_mode setting, remove recovery.conf and upon starting Postgres again, it’ll act like the primary server.
  • create the trigger file and wait for recovery to be done, and then possibly remove standby_mode and restart Postgres..? I’m not quite sure how standby_mode behaves after recovery has ended.

sound – Speakers stop working after plugging/unplugging headphones – Ubuntu 20.04.1 LTS

i updated my laptop to Ubuntu 20.04.1 LTS with XFCE4 last year. Since then I’ve had the following problem:

after booting the machine the speakers function correctly – i can skype, listen to films, etc.
However if i plug in a pair of headphones and then unplug them again, the speakers stop working until after the next reboot.

Does anyone have an idea where the problem might beß

Thanks in advance,
Martin.