javascript – As imagens do meu site não carregam quando eu mudo para o dark mode

Eu percebi que logo ao entrar no meu site e trocar para o dark mode, as imagens não carregam. Mas se eu atualizar a página, as imagens aparecem normalmente. Esse problema só acontece na primeira vez que eu acesso a página e só no celular.
Esse é o meu site: https://hannahneves.github.io
Esse é o problema no meu celular: https://youtu.be/3zESMLQuOWc
Eu fiz o toggle do dark mode dessa forma:

const html = document.querySelector('html');
const checkbox = document.querySelector('.switch');


let check;

(() => {

  check = localStorage.getItem('check');

  if(check) {
    html.classList.toggle('dark-mode');
  }

})();

checkbox.addEventListener('change', function(){

  check = html.classList.toggle('dark-mode');

  if(check == true) {
    localStorage.setItem('check', check);
  } else {
    localStorage.clear();
  }

});

E fiz o upload das imagens com variáveis no CSS:

:root {
--portfolio: url('/assets/LightMode/portfolio.svg');
}
.dark-mode:root {
--portfolio: url('/assets/DarkMode/portfolio.svg');
}
.portfolio-animation{
  background: var(--portfolio);
  background-size: 100%;
  background-repeat: no-repeat;
  width: 267.5px;
  height: 182px;
  margin: 0 auto;
}

linux – Samba force create mode not working with Write bit

Hello I have a problem with force create mode on Ubuntu samba I am trying to add write permission to group and other but I can´t get it.

This is my folder samba config

[files]
comment = files
path = /var/shared/web/files
writeable = yes
browsable = yes
create mask = 0700
force create mode = 0711
force user = admin
force group= publishers
valid users = admin

If I use this config

create mask = 0700
directory mask = 0711

I can get execution permission for the group and others

-rwx--x--x  1 iisadmin publishers    0 Apr 19 17:32 'New Text Document.txt'

or this, I Can get read permission for the group and others

create mask = 0700
directory mask = 0744

It´s works

 -rwxr--r--  1 iisadmin publishers    0 Apr 19 17:32 'New Text Document.txt'

But if I try with this to get write permission nothing happend

   create mask = 0700
directory mask = 0722

The result is

-rwx------  1 iisadmin publishers    0 Apr 19 17:32 'New Text Document.txt'

Why not working when I use 0722?

What is needed to have an Android app as a copy for test mode [migrated]

Is there a way to have same app twice on same device using some simple patch?

  1. One copy is current version downloaded from the store
  2. A testing copy is an APK coming out of a CI/CD system (built using React Native)

What I have tried so far:

  • Replace app name in the source file src/main/res/values/strings.xml; but on one device the copy replaces the original, on another device the install routing reports a general error without further detail.

Mirroring display in Recovery Mode with faulty lid sensor and LCD?

Today I bought a 2017 Macbook that has a water damaged LCD and a faulty closed-lid sensor. My intention is to factory reset it and use it as a build system (i.e. develop my app on my desktop, then remotely connect into the machine to compile / distribute).

When in MacOS, I can ⌘ Command+F1 to mirror to an external display, but obviously that doesn’t work in recovery mode. One suggestion was to boot to recovery, then simply close the lid to make the external display the primary display, but with a faulty “lid closed” sensor, I can’t do that.

Another suggestion was to close the lid, then run a fridge magnet over the corner of the unit to activate the closed-lid sensor. I tried this, but it just puts the unit to sleep, and I need to open the lid to start it back up.

Someone else suggested attempting to drag the window over from one screen to another, but I tried a bunch of times and had no luck because it’s a bit of a stab in the dark to hit something that thin.

I have a dock at work that I intend to try (so I can close the lid, do the magnet, then use an external keyboard to try and wake the device), but until I can get to it, I’m wondering if there’s a way to mirror the display, or at least move the window so I can proceed with reinstallation of MacOS?

canon – Auto focus won’t work in viewfinder on Aperture priority mode

My camera (Canon Rebel t7i) won’t auto focus in manual or aperture priority mode in viewfinder. (It works perfectly in liveview)

Maybe it’s important to say that I’ve never shot in manual mode so I wanted to learn how to shoot in Aperture Priority mode. Auto focus isn’t working in viewfinder though. I used 2 different lenses (canon 50 mm 1.8 and the kit lens) It doesn’t work on both. I tried resetting the camera. Still nothing.

It does work in auto mode in the viewfinder.

Am I doing something wrong or is something broken?

linux – Docker host networking mode: how to expose ports only to other containers

I’m having a situation where I have to use the host networking mode for a container because this container has to expose a big number of ports (in the range of thousands) for streaming connections to clients. Using the normal networking mode would make the container initialization very slow because of Docker’s proxy/NAT.

However I now face a different issue. There’s also one port on this container that is used to communicate with a different container in the same machine, so ideally I should not expose this port to all interfaces.

The problem is that if I listen in 127.0.0.1 for this port, then the other container can’t communicate with it when I try to use the special host.docker.internal hostname. It works when I listen on 0.0.0.0, however when I do this the port can be accessed from the outside.

Is there a way to use the host networking mode and open a port only accessible to other containers?

Word VBA: Hyperlink .Range.Font.TextColor.RGB and compatibility mode

Could someone please let me know why the first line of code below throws error 445 (Object doesn’t support this action) when run on a Word document saved in compatibility mode? The second line works just fine.

ActiveDocument.Hyperlinks(1).Range.Font.TextColor.RGB = RGB(1, 2, 3)

ActiveDocument.Hyperlinks(1).Range.Font.Color = RGB(1, 2, 3)

As a follow-on to this question, how does the second line even work? Per the VBA reference, the Font object doesn’t even have a ‘Color’ property, just the ‘ColorIndex’, ‘ColorIndexBi’ and ‘TextColor’ ones.

How can I see the exposure meter on my Nikon D3200 when shooting in manual-focus mode?

I suppose your are shooting in both manual exposure mode AND manual focus. In this case, the telemeter replaces the lightmeter in the viewfinder and will not show on the info display.

You have 3 options :

  1. Use Aperture (A) or Shutter speed (S) priority exposure mode instead of Manual (M). This way you won’t need the lightmeter.
  2. Switch to autofocus to read the lightmeter, set the manual exposure, then switch back to manual focus,
  3. Use a hand-held lightmeter (Sekonic or Minolta)

EDIT

Keep in mind that the Nikon D3200 is an entry-level camera designed to work only with modern motorized focus lenses (AF-S G series). Its support of previous lenses (AF-S D and older) is not the standing point of this marketing range. Solutions to your issue with manual lenses will always be workarounds and tweaks unless you switch to a “prosumer” camera body, with more options and control.