macos – Mac unity not working (error message)

Upon opening a new project or template the unity launcher dies and shows the errror message

Could not find Unity Package Manager local server application at (/Applications/Unity/Hub/Editor/2020.3.15f1/ Missing files could be the result of an antivirus action or a corrupt Unity installation.

If I diagnose it says

❓ UPM health check (UNKNOWN)
Start the UPM process and call its health endpoint

Could not find UPM executable at path ‘/Applications/Unity/Hub/Editor/2020.3.15f1/’

Anyone that cane help it would be greatly appreciated

sdl – Stride: Gamepad Input Not Working in CSharpBeginner Example

I have only Microsoft build tools and Visual Studio Code installed (not Visual Studio). The CSharpBeginner example from the Stride Game Studio seems to generate, build and run fine using the Game Studio and the project also seems to open, build, and run okay from Visual Studio Code.

It looks like the only thing that doesn’t work is controller input in the Virtual Buttons scene. The Visual Studio Code build shows a warning about SDL in the terminal:

EXEC : warning 2.150s: (YamlAssemblyRegistry) Assembly (SDL2-CS, Version=, Culture=neutral, PublicKeyToken=null) has not been processed by assembly processor with --serialization flags. (DataContract) 
aliases won't be available. (D:devStrideProjectsCSharpBeginnerCSharpBeginner.WindowsCSharpBeginner.Windows.csproj)

Anyone have any ideas on how to deal with this? Thanks.

Edit – the project is:

I just created it from the list of examples given when launching the Game Studio. The only thing I changed was the path to CSharpBeginner.Windows.dll in .vscode/launch.json. I’m not sure if these files were generated by Stride or Visual Studio Code but wherever it came from it seems to have gotten it wrong. Actually I think it worked before that change in Game Studio but not Code.

Feeds event subscriber stopped working

For some reason my feeds event subscribers have just stopped working.

My code looks like this, the dpm for debugging never gets fired so I think the function isn’t being run.

I can’t work out what’s changed.

namespace Drupalpartshub_feeds_modificationsEventSubscriber;

use DrupalfeedsEventEntityEvent;
use DrupalfeedsEventFeedsEvents;
use SymfonyComponentEventDispatcherEventSubscriberInterface;

 * Reacts to feeds events to modify feed properties.
class FeedsSubscriber implements EventSubscriberInterface {

   * {@inheritdoc}
  public static function getSubscribedEvents() {
    $events = ();
    $events(FeedsEvents::PROCESS_ENTITY_PRESAVE)() = 'presave';
    $events(FeedsEvents::PROCESS_ENTITY_POSTSAVE)() = 'postsave';

    return $events;

   * Acts on presaving an entity.
   * @param DrupalfeedsEventEntityEvent $event
   *   The feed event.
  public function presave(EntityEvent $event) {
    // Get the feed object.
    $feed = $event->getFeed();
    // Get the entity being operated on.
    if ($feed->type->entity->id() === 'parts') {
      $entity = $event->getEntity();
      // Get the unchanged entity.
      $unchanged_entity = Drupal::entityTypeManager()
      // Check if the entity is new.
      if (!$entity->isNew()) {
        // Only if part is not new check values.
        if ($feed->type->entity->label() === 'Parts') {
          if ($entity->get('title')->value === 'empty') {
            $entity->get('title')->value = $unchanged_entity->get('title')->value;

          // Part fitment/makes field.
          if ($entity->get('field_make')->isEmpty()) {
            $makes = $unchanged_entity->get('field_make')->referencedEntities();
            foreach ($makes as $index => $term) {
              $tid = $term->id();
              if ($index == 0) {
                $entity->set('field_make', $tid);
              else {
                  'target_id' => $tid,

          // Part group code.
          if ($entity->get('field_group_code')->isEmpty()) {
            $codes = $unchanged_entity->get('field_group_code')
            foreach ($codes as $index => $code) {
              $code_id = $code->id();
              if ($index == 0) {
                $entity->set('field_group_code', $code_id);
              else {
                  'target_id' => $code_id,

          // Cross references.
          if ($entity->get('field_cross_references')->isEmpty()) {
            $references = $unchanged_entity->get('field_cross_references')
            foreach ($references as $index => $reference) {
              $reference_id = $reference->id();
              if ($index == 0) {
                $entity->set('field_cross_references', $reference_id);
              else {
                  'target_id' => $reference_id,
        elseif ($feed->type->entity->label() === 'Physical attributes') {
          if ($entity->get('title')->value === 'empty') {
            $entity->get('title')->value = $unchanged_entity->get('title')->value;
          // Part weight.
          if ($entity->get('field_weight')->isEmpty()) {
            $entity->get('field_weight')->value = $unchanged_entity->get('field_weight')->value;
          // Part Height.
          if ($entity->get('field_height')->isEmpty()) {
            $entity->get('field_height')->value = $unchanged_entity->get('field_height')->value;
          // Part Width.
          if ($entity->get('field_width')->isEmpty()) {
            $entity->get('field_width')->value = $unchanged_entity->get('field_width')->value;
          // Part Depth.
          if ($entity->get('field_depth')->isEmpty()) {
            $entity->get('field_depth')->value = $unchanged_entity->get('field_depth')->value;

   * Acts on presaving an entity.
   * @param DrupalfeedsEventEntityEvent $event
   *   The feed event.
  public function postsave(EntityEvent $event) {
    $feed = $event->getFeed();
    $feeds = ('oe_references', 'sub_components', 'dimensions');
    $id = $feed->type->entity->id();
    if (in_array($id, $feeds)) {
      $entity = $event->getEntity();
      $parent_field_name = $entity->parent_field_name->value;
      $parent_id = $entity->parent_id->value;
      $vid = Drupal::entityTypeManager()->getStorage('node')->getLatestRevisionId($parent_id);
      $part = Drupal::entityTypeManager()->getStorage('node')->loadRevision($vid);
      $paragraph_references = $part->get($parent_field_name)->referencedEntities();
      $paragraph_references_id = ();
      if ($paragraph_references) {
        foreach ($paragraph_references as $paragraph_reference) {
          $paragraph_references_id() = $paragraph_reference->id();
      if (!in_array($entity->id(), $paragraph_references_id)) {
        $fields = (
          'field_oe_references', 'field_sub_components_', 'field_dimensions'
        if (in_array($parent_field_name, $fields)) {
          if ($part) {
            $part->{$parent_field_name}() = $entity;


I also have a service definition as follows.

  # Name of this service.
    # Event subscriber class that will listen for the events.
    class: Drupalpartshub_feeds_modificationsEventSubscriberFeedsSubscriber
    # Tagged as an event_subscriber to register this subscriber with the event_dispatch service.
      - { name: event_subscriber }

Windows Server 2016 schedule automatic updates not working as set in Group Policy

I have a Windows Server 2016 VPS where a web app is works fine but when windows install updates,nothing works because,in this case CPU usage is 99% and no user can access the app

I’ve setup automatic updates in Group Policy this way:

  • in Computer Configuration/Administrative Templates/Windows Components/Windows Update
    I put Enable for “Configure Automatic Updates”
  • then value 4 for auto download/install and time for every Monday at 3am;not check the automatic maintenance box
  • restart system

but Saturday on 11am no client can work on the web app because of automatic updates(CPU 99%) and I had to disable automatic update and everything went fine

how to fix schedule update to work as set in Group Policy?


transformation – Pygame rotation around center not working properly

here is the code I use to rotate an image around its center :

class Square:
    def __init__(self) :
        self.x, self.y, self.angle = 50, 200, 0
        self.image = load('redrect.png')
        self.image360 = pygame.transform.rotate(self.image, self.angle)

    def blit(self):
        self.image360 = pygame.transform.rotate(self.image, self.angle)
        # I made a center() function to calculate the center of an image/rect 
        self.center360 = center(self.x, self.y, self.image360)
        MyScreen.blit(self.image360, self.center360)

mysquare = Square()

while 1:
    for e in events:
        if e.type == KEYDOWN:
            if e.key == K_r:
                mysquare.angle += 45

When I run the code and attempt to rotate the square, I notice that the rotation isn’t smooth and isn’t really around its center though I’m blitting the image360 attribute of the square in its center coordinates.

Btw if I just flip the image by 90°, it will seem to be perfectly rotating around its center.

Here is how I created my center() function :

def center(x, y, rect) :
        return (x + rect.get_width() / 2, y + rect.get_height() / 2)
    except AttributeError:
        return (x + rect.width / 2, y + rect.height / 2)

facebook – Auto Download of photos working in WhatsApp Desktop App, but not in mobile App

A couple of months back, I was working on a project and all the collaborators were staying in touch via WhatsApp. As it is a fairly large group of about 80 people, lots of photos tend to get generated each day. Since I was working on my laptop, I decided to use the desktop application rather than the mobile app, as it was more convenient. We were required to complete a certain task, within a fairly short amount of time, so everybody was working full throttle at that moment. As the deadline was approaching, the number of photos in the WhatsApp group started to increase. Moreover, as the navigation in the desktop application was becoming difficult, I decided to switch to the android app.

To my surprise, absolutely none of the photos had been downloaded on the app. As per my knowledge, whatever auto-download settings are applied to the mobile app, are also followed by the desktop application. But that didn’t happen.

I’ve checked all my settings and everything seems to be fine. All permissions have been granted. There is no data usage check applied. But still, the auto-download feature didn’t work on my phone, while it did flawlessly on the desktop application.

After that incident, there have been several other instances wherein auto-download was only working on the desktop application, instead of working on both the desktop and mobile version of WhatsApp in tandem. This has begun to worry me a little, as it is affecting my work. Can anyone suggest any tips to fix this?

magento2 – Magento 2.4 Installation issue (setup not working)

Actually when you setup mangento, you need to point magento to pub directory.

Now that you are using localhost and you haven’t used virtual host, you need to open your project with http://localhost/magento/m24/pub/

For images and CSS, access your database and you need to update table core_config_data
execute following commands:

UPDATE core_config_data SET `value`='http://localhost/magento/m24/pub/' WHERE path='web/unsecure/base_url';
UPDATE core_config_data SET `value`='http://localhost/magento/m24/pub/' WHERE path='web/secure/base_url';
UPDATE core_config_data SET `value`='http://localhost/magento/m24/pub/media/' WHERE path='web/unsecure/base_media_url';
UPDATE core_config_data SET `value`='http://localhost/magento/m24/pub/media/' WHERE path='web/secure/base_media_url';

Flush cache at the end

Hope this will resolve the issue

Picture Comparison Code Not Working Properly

I am still very much a beginner in programming and am facing a problem with a Java code. I would be very thankful for suggestions and comments. The problem is as following:

I found a Java code online that is designed to compare two pictures and highlight the differences between them. However, the way the code works is by using a loop that compares the RGB value of each pixel of the two pictures and highlights it in a certain color if the value is equal. This however results in a problem that even the slightest shift in camera angle or lighting conditions between the two pictures leads to a different RGB value of the pixels making the code highlight them as a difference even though the pictures are mostly identical. The code is written below and i have added the link to photos showing examples of the outcome of the code. What would you suggest i change in the code? Thank you for your help in advance.

The code:

import java.awt.image.BufferedImage;

import javax.imageio.ImageIO;
public class PictureOverlayTest {
* Four variables, three for the wanted BufferedImages, one String for the
* Path of the third Image, which does not already exist.

private BufferedImage image1;
private BufferedImage image2;
private BufferedImage image3;

private String pathImage3;

public PictureOverlayTest(String filePathAndName1, String filePathAndName2,
String filePathAndName3) throws IOException {
* Constructor in order to keep this method reusable and clean. Needs
* three Strings. The paths and Filenames of all three images. Image 1
* and 2 should exist already, Image 3 will be created if all
* requirements are met. Constructor creates the first two buffered
* images, sets all needed variables and starts the checkAndCompare()
* method

File file = new File(filePathAndName1);
this.image1 =;

file = new File(filePathAndName2);
this.image2 =;

this.pathImage3 = filePathAndName3;

private void checkAndCompare() throws IOException {
* This function creates the Color blue, compares the sizes of both
* pictures and if they are the same, creates a third image. Then it
* loops through the two images and compares each pixel. If the pixels
* are the same, the third image gets a blue pixel at that point

Color blue =;
Color yellow = Color.yellow;

if (image1.getHeight() == image2.getHeight()
&& image1.getWidth() == image2.getWidth()) {

image3 = new BufferedImage(image1.getWidth(), image1.getHeight(),
for (int y = 0; y < image1.getHeight(); y++) {
for (int x = 0; x < image1.getWidth(); x++) {

int colorImage1 = image1.getRGB(x, y);
int colorImage2 = image2.getRGB(x, y);

if (colorImage1 == colorImage2) {

image3.setRGB(x, y, blue.getRGB());

} else {
image3.setRGB(x, y, yellow.getRGB());
// Whatever Color you want. By default it is black.


System.out.println(“Message: Image comparison is done”);

} else {

System.out.println(“Error: Image dimensions do not match”);



private void savePicture3() throws IOException {
* This method saves the created Image into a file onto your computer.
* The if() statement is used to check if the file was successfully
* created, in order to avoid unwanted errors. Keep in mind, that you
* have to change the “bmp” in ImageIO.write() to whatever format you
* actually want

File file = new File(pathImage3);
if (file.createNewFile()) {
ImageIO.write(image3, “bmp”, file);



public class Main {

public static void main(String() args) {
// TODO Auto-generated method stub

try {
PictureOverlayTest test = new PictureOverlayTest(
“C:\Users\Rabee Taha\Desktop\Java Test Pics\test1.png”,
“C:\Users\Rabee Taha\Desktop\Java Test Pics\test2.png”,
“C:\Users\Rabee Taha\Desktop\Java Test Pics\test3.png”);
} catch (IOException e) {
// TODO Auto-generated catch block


Here is the link to example images of the outcome ( )


plugins – Add to cart url not working for all users

I don’t know if these happened to somebody before. My add to cart url its malfunctioning, for some reason on some users when they click on the link the product isn’t added to the cart and for others users (in the same time without changing anything)its working the product is added to the cart
Any idea on how to solve this ?