Using javascript I need to highlight a row if it is within 14 days of becoming due via due date, and red it if is past due or today

So I have this code that I found here at Stack Exchange that lets me highlight rows based on date:

SP.SOD.executeFunc("clienttemplates.js", "SPClientTemplates", function() { 

SPClientTemplates.TemplateManager.RegisterTemplateOverrides({
OnPostRender: function (ctx) {

    // get today's date
    var today = new Date();
    // zero out the time portion so we will only compare days
    today.setHours(0,0,0,0);
    var tenDaysAgo=new Date(-864000000);
    tenDaysAgo.setHours(0,0,0,0);

    var rows = ctx.ListData.Row;
    for (var i = 0; i < rows.length; i++) {

        // get the date set in your date YourDateField
        var itemDate = new Date(rows(i)('Due_x0020_Date'));
        // zero out the time portion so we only compare days
        itemDate.setHours(0,0,0,0);

        var rowId = GenerateIIDForListItem(ctx, rows(i));
        var row = document.getElementById(rowId);

        if (itemDate <= today) {
            row.style.backgroundColor = '#ED9898';
        }
        if (itemDate >= tenDaysAgo && itemDate >today ) {
            row.style.backgroundColor = 'yellow';
        }
    }
}

});
});

The problem I am having is in this line, where I want to check if the due date is within ten days of today.

    if (itemDate >= tenDaysAgo && itemDate >today ) {
            row.style.backgroundColor = 'yellow';
        }

Everything is working except this line, which basically looks at the due date and if it is less than today, it highlights it in yellow. I am at wits end trying to figure this out. I really hope someone here can help with this. I am using a script editor below the list, if that matters. I am very new to javascript. We are using sharepoint online, but I can’t use JSON because we are using the classic view on this site.

Apple Watch Series 3 “Cannot Install Update” due to available storage

I’m attempting to update an Apple Watch Series 3 to watchOS 7.4 via Software Update.

When I Download and Install the update, I get the error message:

Cannot Install Update

To install the watchOS update, your Apple Watch needs to have at least 2.5 GB of available storage. You can free up storage by deleting apps using the Apple Watch app on your iPhone.

I had this same issue when attempting to install watchOS 7 last year. I went through the process of deleting apps and data, however I was never able to delete enough to proceed with the software update.

Research indicates that this may be an issue with the Apple Watch Series 3. The watch has 8 GB of available storage, which may not be enough to ever download a new watchOS update.

Can an Apple Watch Series 3 be updated normally by deleting apps and data? Or is there a hard limit with the 8 GB that does not allow this?

How else can I update the Apple Watch Series 3?

18.04 – Running Python script on WSL causes error due to ^M

Running Ubuntu 18.04 under WSL, I have one .py file that if I do:

$ ls -la foo.py 
-rwxrwxrwx 1 ken ken 6778 Apr 25 15:16 foo.py
$ ./foo.py
bash: ./foo.py: /usr/bin/python3^M: bad interpreter: No such file or directory

If I do the full:

$ python ./foo.py

The script runs as normal. Also, this works:

$ touch bar.py
$ chmod +x bar.py
$ ./bar.py

This happens both in the raw bash shell and the VSCode terminal window. Why might my file cause such an error?

germany – Can one apply for German visa from a country other than country of residence due to non availability of appointment

As a general rule, if there is a German consulate in your country of residence, you must apply there. An application may be accepted from a person legally present – but not residing – in another jurisdiction of the consulate where the application is submitted, if the applicant can justify why the application could not be lodged at a consulate in his place of residence. It is for the consulate to appreciate whether the justification presented by the applicant is acceptable. See 2.8 https://ec.europa.eu/home-affairs/sites/homeaffairs/files/policies/borders/docs/c_2010_1620_en.pdf#page23. Unavailability of appointments is unlikely to be accepted as a reason for not applying in your country of residence.

2d – How to handle player slowness while moving up and down in a Top Down game with angled ortho camera and angled sprite due to stretching of ground?

enter image description here

So i’m making a 2D top down game setup in 3D using tilted Sprites and angled orthographic camera.

My camera setup is as shown.

In my game I have the floor flat on the X/Z plane with walls/characters rotated +45 degrees about the X axis. The orthographic camera is pointing down also at 45 degrees about the x axis, parallel with my walls/characters.

As a result, I dont see any distortion for players/characters since they face the camera directly on, while the ground however sees a distortion of sqrt(2) shorter. This makes sense considering how an orthographic camera works. To fix this, I’ve made my Tilemap set up with X:1 Y:1 Z:Sqrt(2) so that each tile is stretched on the Z axis by Sqrt(2) to compensate for this distortion.

All looks well with only one problem now… foreshortening with regards to movement: Forward and backwards movements of objects/characters along the z axis are perceived to be slower than movements left/right on the x axis. This makes sense because while each tile is perceived to be a square in the camera view thanks to scaling Z on the tilemap by sqrt(2), the real world tile is, well, sqrt(2) times taller than its width, so obviously it takes longer to travel forwards / backwards.

How do i correct this?

java – Optional int parameter ‘id’ is present but cannot be translated into a null value due to being declared as a primitive type

me encuentro con un error que no sé por donde cogerlo. Estoy realizando un api/rest de android studio (RetroFit) con SpringBoot (como servidor).
Resulta que me encuentro con este error:

 Optional int parameter 'id' is present but cannot be translated into a null value due to being declared as a primitive type. Consider declaring it as object wrapper for the corresponding primitive type.

Expongo retrofit interface:

 @PUT("editPlayer{id}")
    Call<PlayerDto> editPlayer(@Body PlayerDto player, @Path("id") int id);

Expongo llamada al servidor:

Settings.RESPONSE_CLIENT.getService()
.editPlayer(editedPlayer, 53)
.enqueue(new Callback<PlayerDto>() {
   @Override
   public void onResponse(Call<PlayerDto> call, Response<PlayerDto> response) {
      editedPlayer = response.body();
      typeError = 0;
   }

   @Override
   public void onFailure(Call<PlayerDto> call, Throwable t) {
      Log.e("Error: ", t.getMessage());
      typeError = 2;
   }
});

Expongo servidor Controller:

@PutMapping("/editPlayer{id}")
    public Player editPlayer(@RequestBody Player player, @Param("id") int id) {
        return service.editPlayer(player.getUsername(), id);
    }

Expongo servidor PlayerService:

public Player editPlayer(String username, int id) {

        repoPlayer.editUserNamePlayer(username, id);
        Optional<Player> player = repoPlayer.findById(id);

        return player.get();
    }

Expongo IPlayerRepository, aunque solo es la “Query” :

@Modifying
    @Query("UPDATE Player p SET p.username= :username WHERE p.id= :id")
    public void editUserNamePlayer(@Param("username")String username, @Param("id") Integer id);

Realizo pruebas con Insomnia y no tengo ningún problema adjunto imagen:
imagen de captura test insomnia put api/rest

Pero no tengo manera de enviar la id desde android studio, parece que se le envia “null”.
Ni ingresandolo a mano ni recogiendolo por parámetro.

Necesito ayuda, muchas gracias de antemano.

repair – Is my image exposure off due to shutter problems?

I’ve recently noticed an issue with my dslr regarding exposures. Most of my time is spent using shutter speeds under 1/100s for landscape photography but the other day I was trying to under expose a shot early on a sunny morning and found I could not do so using shutter speeds. As I am an Olympus four thirds user I’m restricted to low ISO’s (due to noise), and larger apertures (due to diffraction and depth of field) than other larger formats.
My initial experiments showed that shutter speeds faster than the camera’s flash sync speed weren’t working. The exposure didn’t change as I took shots in shutter priority mode from about 1/160s to max at 1/4000s, and I wondered if the sync speed setting was somehow stuck on despite the built in flash being set off and the display showing fast shutter speeds.
I took the camera out again recently when snow had fallen and as the light increased I started to struggle again, being forced to use small apertures and eventually ND filters to get images in the strong light.

I found that in burst mode the camera would take a sequence of four or five pictures as follows (all at f/18 1/160s ISO 100 19mm):

  1. Totally over exposed.image 1 f/18 1/160s ISO 100 19mm
  2. Correctly exposed but with an overexposed strip at the bottom of the frame.image 2 f/18 1/160s ISO 100 19mm
  3. Correctly exposed.image 3 f/18 1/160s ISO 100 19mm

Is this a sticky second curtain? It has been cold recently but I suspect this is the end for my much loved, 12 year old Olympus E-520. Are there any possible fixes I can try before finally put my hand in my pocket to replace this now defunct system (Oly gave up support before selling the imaging division to JIP)?

magento2.3 – Composer can’t install any module due to “Your requirements could not be resolved to an installable set of packages”

Running 2.3.6
When I try to install any module via composer I get the following error:

 ()$ COMPOSER_MEMORY_LIMIT=-1 composer require stripe/stripe-php:^7
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2
./composer.json has been updated
Loading composer repositories with package information
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: remove magento/product-community-edition 2.3.6
    - Conclusion: don't install magento/product-community-edition 2.3.6
    - Installation request for magento/product-community-edition 2.3.6 -> satisfiable by magento/product-community-edition(2.3.6).
    - Installation request for veriteworks/cookiefix ^3.0 -> satisfiable by veriteworks/cookiefix(3.0.0).
    - Conclusion: don't install magento/framework 102.0.6-p1
    - magento/product-community-edition 2.3.6 requires laminas/laminas-code ~3.3.0 -> satisfiable by laminas/laminas-code(3.3.2, 3.3.0, 3.3.1).
    - Can only install one of: laminas/laminas-code(3.4.1, 3.3.0).
    - Can only install one of: laminas/laminas-code(3.4.1, 3.3.1).
    - Can only install one of: laminas/laminas-code(3.4.1, 3.3.2).
    - Can only install one of: laminas/laminas-code(3.4.1, 3.3.2).
    - Can only install one of: laminas/laminas-code(3.4.1, 3.3.2).
    - Conclusion: install magento/framework 102.0.6-p1|install laminas/laminas-code 3.4.1


Installation failed, reverting ./composer.json to its original content.

What is composer telling me to do?

Is it possible i made a mess since few days ago (before that I think
everything was working fine) and then I launched “composer
dump-autoload -o” for some reason?

Edit:
i ran same command and got different error

     composer require stripe/stripe-php:^7
The "magento/magento-composer-installer" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
The "dealerdirect/phpcodesniffer-composer-installer" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
The "magento/inventory-composer-installer" plugin was skipped because it requires a Plugin API version ("^1.1") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
The "laminas/laminas-dependency-plugin" plugin was skipped because it requires a Plugin API version ("^1.1") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
The "magento/composer-root-update-plugin" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
./composer.json has been updated
The "magento/magento-composer-installer" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
The "dealerdirect/phpcodesniffer-composer-installer" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
The "magento/inventory-composer-installer" plugin was skipped because it requires a Plugin API version ("^1.1") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
The "laminas/laminas-dependency-plugin" plugin was skipped because it requires a Plugin API version ("^1.1") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
The "magento/composer-root-update-plugin" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
Running composer update stripe/stripe-php
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - magento/composer-root-update-plugin is locked to version 1.0.0 and an update of this package was not requested.
    - magento/composer-root-update-plugin 1.0.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api(2.0.0) but it does not match the constraint.
  Problem 2
    - Root composer.json requires veriteworks/cookiefix ^3.0 -> satisfiable by veriteworks/cookiefix(3.0.0).
    - veriteworks/cookiefix 3.0.0 requires magento/framework ~102.0.6-p1||~103.0.1 -> found magento/framework(102.0.6-p1, 103.0.1, 103.0.1-p1, 103.0.2) but the package is fixed to 102.0.6 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
  Problem 3
    - dealerdirect/phpcodesniffer-composer-installer is locked to version v0.5.0 and an update of this package was not requested.
    - dealerdirect/phpcodesniffer-composer-installer v0.5.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api(2.0.0) but it does not match the constraint.
  Problem 4
    - laminas/laminas-dependency-plugin 1.0.4 requires composer-plugin-api ^1.1 -> found composer-plugin-api(2.0.0) but it does not match the constraint.
    - magento/product-community-edition 2.3.6 requires laminas/laminas-dependency-plugin ^1.0 -> satisfiable by laminas/laminas-dependency-plugin(1.0.4).
    - magento/product-community-edition is locked to version 2.3.6 and an update of this package was not requested.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.