问:
Django 'Makemigrations' are unable to access the database
When running

python manage.py makemigrations
```
<p>I'm all of a sudden running into an error about being unable to connect to the database. The application itself is running perfectly fine and can connect with no issues, but <code>manage.py</code> is broken.</p>
<p>This is the error in question:</p>
<blockquote>
<p>/Users///.venv/lib/python3.10/site-packages/django/core/management/commands/makemigrations.py:143: RuntimeWarning: Got an error checking a consistent migration history performed for database connection 'default': connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory
Is the server running locally and accepting connections on that socket?</p>
</blockquote>
<p>I've tried restarting everything, the database, application, computer, etc. I've nuked the venv and created a new one, double checked the database settings in settings.py and they are listed below:</p>
<pre class="lang-json prettyprint-override"><code>
DATABASES = {
    "default": {
        "ENGINE": "django.db.backends.postgresql",
        "NAME": os.getenv("DB_NAME"),
        "USER": os.getenv("DB_USER"),
        "PASSWORD": os.getenv("DB_PASSWORD"),
        "HOST": os.getenv("DB_HOST"),
        "PORT": os.getenv("DB_PORT"),
    }
}
</code>```

Body:
When running

python manage.py makemigrations

I'm all of a sudden running into an error about being unable to connect to the database. The application itself is running perfectly fine and can connect with no issues, but manage.py is broken.

This is the error in question:

/Users///.venv/lib/python3.10/site-packages/django/core/management/commands/makemigrations.py:143: RuntimeWarning: Got an error checking a consistent migration history performed for database connection 'default': connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory
Is the server running locally and accepting connections on that socket?

I've tried restarting everything, the database, application, computer, etc. I've nuked the venv and created a new one, double checked the database settings in settings.py and they are listed below:

DATABASES = {
    "default": {
        "ENGINE": "django.db.backends.postgresql",
        "NAME": os.getenv("DB_NAME"),
        "USER": os.getenv("DB_USER"),
        "PASSWORD": os.getenv("DB_PASSWORD"),
        "HOST": os.getenv("DB_HOST"),
        "PORT": os.getenv("DB_PORT"),
    }
}


来源: stackexchange

问:
How would i catch a GET 404 (Not Found) Error in JavaScript?
```<code>videoplayer.src = "vids/video" + count.toString() + ".mp4"
</code>```

My code makes a request for the specified file and it returns

```<code>GET http://127.0.0.1:5500/vids/video3.mp4 404 (Not Found)
</code>```

As it should because that file does not exist, but how do i catch this? I want to do something when it is caught.

I have tried with a try/catch but it didn't seem to catch it at all
I have also tried with

```<code>window.onerror = function(error) {
    document.location.reload(true)
  };
</code>```

Which also did not catch the bad request

ContentLicense: CC BY-SA 4.0

Body:
videoplayer.src = "vids/video" + count.toString() + ".mp4"

My code makes a request for the specified file and it returns

GET http://127.0.0.1:5500/vids/video3.mp4 404 (Not Found)

As it should because that file does not exist, but how do i catch this? I want to do something when it is caught.

I have tried with a try/catch but it didn't seem to catch it at all
I have also tried with

window.onerror = function(error) {
    document.location.reload(true)
  };

Which also did not catch the bad request


问:
Create custom page template for product taxonomy
I created custom product taxonomy with woocommerce. But when I open that taxonomy page it not display the sidebar filter. So I want to create such a template which layout is same as product category page.

For example I want to display (example.com/occassion/diwali) same as (example.com/product-category/mens)

I tried some code using "template_include" hook. But I not get any result.
I hope you get my questions.

I want to display for each custom taxonomy for woocommerce product.


问:
Python send content-type: multipart/form-data with json and files
Hi I'm looking for send multipart/form-data requests with python.
But it must contain json and file :

json content is only a some bytes equal to 1
and the file is a jpeg image

body:

```<code>--some_boundary
Content-Disposition: form-data; name="photo"; filename="myfile"
Content-Type: image/jpeg
Content-Length: 1175
IMAGE_BYTES
--some_boundary
Content-Disposition: form-data; name="media_number"
Content-Transfer-Encoding: binary
Content-Type: application/json; charset=UTF-8\x0d\x0aContent-Length: 1
1
--some_boundary
</code>```

I'm trying to send it like :

```<code>        [...]
        json_file = open("temp.json", "w")
        json_file.write("1")

        files = [
            ('photo', ("myfile", 'image/jpeg')),
            ('media_number', ("", open("temp.json", 'rb'), 'application/json'))
        ]

        r = self.session.post(url, headers=headers, files=files)
</code>```

but my json seems not considered
Content-Transfer-Encoding: binary is not set maybe

Thanks for your help!

Body:
Hi I'm looking for send multipart/form-data requests with python.
But it must contain json and file :

json content is only a some bytes equal to 1
and the file is a jpeg image

body:

--some_boundary
Content-Disposition: form-data; name="photo"; filename="myfile"
Content-Type: image/jpeg
Content-Length: 1175
IMAGE_BYTES
--some_boundary
Content-Disposition: form-data; name="media_number"
Content-Transfer-Encoding: binary
Content-Type: application/json; charset=UTF-8\x0d\x0aContent-Length: 1
1
--some_boundary

I'm trying to send it like :

        [...]
        json_file = open("temp.json", "w")
        json_file.write("1")

        files = [
            ('photo', ("myfile", 'image/jpeg')),
            ('media_number', ("", open("temp.json", 'rb'), 'application/json'))
        ]

        r = self.session.post(url, headers=headers, files=files)

but my json seems not considered
Content-Transfer-Encoding: binary is not set maybe

Thanks for your help!


Title: How to disply output as a table in jupyter notebook

Body:
Usually, when i do df.head() on jupyter notebote, it gives me a nice table format, but suddenly it is giving me the following.

I am sure what changed? can you help with displaying output as a table on jupyter notebook?

data

                                       address    date  \
0  0x0000000000000000000000000000000000000000  2016Q3
1  0x0000000000000000000000000000000000000000  2016Q4
2  0x0000000000000000000000000000000000000000  2017Q1
3  0x0000000000000000000000000000000000000000  2017Q2
4  0x0000000000000000000000000000000000000000  2017Q3

     tokens_USD
0  3.990440e+01
1  3.869824e+03
2  8.905545e+03
3  7.586588e+04
4  1.413279e+08


问:
How to handle tags and hierarchies in ag-grid table data structure?
I would like to use the pivot feature, but since my data has a lot of tags (1-level nested), I'm not sure how to make ag-grid parse this data and recognize it.

Here's the data for example:

```<code>[
    {
        "_id": "1",
        "symbol": "sym1",
        "open_date": "2019-04-23",
        "_type": "t1",
        "currency": "USD",
        "quantity": 456,
        "tags": [
            {
                "tag": "G_TAG1",
                "group_name": "Group_1",
            },
            {
                "tag": "G_TAG2",
                "group_name": "Group_1",
            }
        ],
    },
    {
        "_id": "2",
        "symbol": "sym2",
        "open_date": "2029-01-11",
        "_type": "t2",
        "currency": "EUR",
        "quantity": 312,
        "tags": [
            {
                "tag": "G3_TAG-ABC",
                "group_name": "Group_3",
            },
            {
                "tag": "G2_TAG-DEF",
                "group_name": "Group_2",
            },
            {
                "tag": "G_TAG3",
                "group_name": "Group_1",
            }
        ],
    },
    {
        "_id": "3",
        "symbol": "sym3",
        "open_date": "2010-12-01",
        "_type": "t3",
        "currency": "AUD",
        "quantity": 123,
        "tags": [
            {
                "tag": "G_TAG3",
                "group_name": "Group_1",
            }
        ],
    }
]
</code>```

In columnDefs, I defined tags column like this:

```<code>{field:'tags',
    enablePivot: true,
    children: [
        {
            headerName: "Tag", valueGetter: params => params.data.tags.map(x => x.tag),
            enablePivot: true,
        },
        {
            headerName: "Tag Group", valueGetter: params => params.data.tags.map(x => x.group_name),
            enablePivot: true,
        },
    ]
},
</code>```

Each data point has a list of tags and each tag can belong to a group or not. So the top-most hierarchy is the tag group and below that are the individual tags.

Is there a way aggrid can recognize this or a way I can transform the data so visualize per-tag or per-group statistics? For example, can I view stats grouped by tag group > tag > symbol?

Body:
I would like to use the pivot feature, but since my data has a lot of tags (1-level nested), I'm not sure how to make ag-grid parse this data and recognize it.

Here's the data for example:

[
    {
        "_id": "1",
        "symbol": "sym1",
        "open_date": "2019-04-23",
        "_type": "t1",
        "currency": "USD",
        "quantity": 456,
        "tags": [
            {
                "tag": "G_TAG1",
                "group_name": "Group_1",
            },
            {
                "tag": "G_TAG2",
                "group_name": "Group_1",
            }
        ],
    },
    {
        "_id": "2",
        "symbol": "sym2",
        "open_date": "2029-01-11",
        "_type": "t2",
        "currency": "EUR",
        "quantity": 312,
        "tags": [
            {
                "tag": "G3_TAG-ABC",
                "group_name": "Group_3",
            },
            {
                "tag": "G2_TAG-DEF",
                "group_name": "Group_2",
            },
            {
                "tag": "G_TAG3",
                "group_name": "Group_1",
            }
        ],
    },
    {
        "_id": "3",
        "symbol": "sym3",
        "open_date": "2010-12-01",
        "_type": "t3",
        "currency": "AUD",
        "quantity": 123,
        "tags": [
            {
                "tag": "G_TAG3",
                "group_name": "Group_1",
            }
        ],
    }
]

In columnDefs, I defined tags column like this:

{field:'tags',
    enablePivot: true,
    children: [
        {
            headerName: "Tag", valueGetter: params => params.data.tags.map(x => x.tag),
            enablePivot: true,
        },
        {
            headerName: "Tag Group", valueGetter: params => params.data.tags.map(x => x.group_name),
            enablePivot: true,
        },
    ]
},

Each data point has a list of tags and each tag can belong to a group or not. So the top-most hierarchy is the tag group and below that are the individual tags.

Is there a way aggrid can recognize this or a way I can transform the data so visualize per-tag or per-group statistics? For example, can I view stats grouped by tag group > tag > symbol?


问:
DBeaver Denodo data access issue: 'user does not have EXECUTE privileges'
I am managing to connect to data in my organisation via Denodo Design Studio fine, but when I try to do it through DBeaver, I get the following error: SQL Error [20100] [HY000]: The user does not have EXECUTE privileges on the view XXXX

Any idea where I should look to fix this? I am just doing a simple SELCT * FROM XXXX table query for a small table.

I also have no issues connecting to the database, and can navigate the schemas and see the table/view names.

Using Denodo denodo-vdp-jdbcdriver-8.0-update-20220815 via the DBeaver Denodo connector.


问:
Strange tensor dimension of feature from pretrained DenseNet
I'm using pretrained DenseNet to obtain image features with 1024 dimensions. However, when I use model.features(images), i get a output with strange dimensionality:

```<code>torch.Size([100, 1024, 2, 2])
</code>```

I don't understand what the last two dimensions stand for. It should be a 100 times 1024 feature matrix, as the downstream clssifier is only a 1024 to 10 linear classifier.

What's wrong with my code to get representations, please?

```<code>def representation_display(model, data_iter, head = 1):
    with torch.no_grad():
        for cnt, data in enumerate(data_iter):
            if cnt >= head:
            return 0
            images, labels = data
            images, labels = images.to(device), labels.to(device)
            representation = model.features(images)
            return(model.features(images))
return 0
</code>```

Body:
I'm using pretrained DenseNet to obtain image features with 1024 dimensions. However, when I use model.features(images), i get a output with strange dimensionality:

torch.Size([100, 1024, 2, 2])

I don't understand what the last two dimensions stand for. It should be a 100 times 1024 feature matrix, as the downstream clssifier is only a 1024 to 10 linear classifier.

What's wrong with my code to get representations, please?

def representation_display(model, data_iter, head = 1):
    with torch.no_grad():
        for cnt, data in enumerate(data_iter):
            if cnt >= head:
            return 0
            images, labels = data
            images, labels = images.to(device), labels.to(device)
            representation = model.features(images)
            return(model.features(images))
return 0


问:
gnome-keyring GPG integration in headless Ubuntu server not working
I'm trying to use gnome-keyring to memorize my GPG passphrase in a headless Ubuntu server (22.04.1 LTS GNU/Linux 5.15.0-57-generic x86_64). The reason I'm trying to do this with gnome-keyring and not using the gpg-agent cache is that I'd like for the GPG certificate to be immediately accessible to be used by some systemd cronjobs when I reboot my server.

I've followed the Gnome/Keyring instructions but using pinentry-gnome3 doesn't seem to work:

```<code>No Gcr System Prompter available, falling back to curses
</code>```

I've also tried using pinentry-gtk-2 like it is mentioned in GnuPG instructions and although I don't get any error, the passphrase is not stored.

When doing some debugging, I've found some weird behavior. Trying to store something in my keyring gives me this error:

```<code>$ secret-tool store --label='test' foo bar
secret-tool: Cannot create an item in a locked collection
</code>```

Anyone can help me? I'm also willing to drop using gnome-keyring for something else, but I haven't found anything that would fit my use case.

Body:
I'm trying to use gnome-keyring to memorize my GPG passphrase in a headless Ubuntu server (22.04.1 LTS GNU/Linux 5.15.0-57-generic x86_64). The reason I'm trying to do this with gnome-keyring and not using the gpg-agent cache is that I'd like for the GPG certificate to be immediately accessible to be used by some systemd cronjobs when I reboot my server.

I've followed the Gnome/Keyring instructions but using pinentry-gnome3 doesn't seem to work:

No Gcr System Prompter available, falling back to curses

I've also tried using pinentry-gtk-2 like it is mentioned in GnuPG instructions and although I don't get any error, the passphrase is not stored.

When doing some debugging, I've found some weird behavior. Trying to store something in my keyring gives me this error:

$ secret-tool store --label='test' foo bar
secret-tool: Cannot create an item in a locked collection

Anyone can help me? I'm also willing to drop using gnome-keyring for something else, but I haven't found anything that would fit my use case.


问:
the image is not diplayed in pygame
Hi in my game i should display a conect 4 image that is 640 x 480 but my game doesn't work
so i wanted to know what should i do

import pygame
from sys import exit

class Board(pygame.sprite.Sprite):
    def __init__(self):
        super().__init__()
        self.image = pygame.image.load("connect4.png").convert_alpha()
        self.rect = self.image.get_rect(topleft=(0,0))

def main():
    pygame.init()

    screen = pygame.display.set_mode((800, 400))

    board = pygame.sprite.GroupSingle()
    board.add(Board())

    _image  = pygame.image.load("connect4.png").convert_alpha()

    while True:
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                pygame.quit()
                exit()

        screen.blit(_image, (0,0))
        board.draw(screen)

if __name__ == "__main__":
    main()
```

i was expected the image to show but i didn't get any result only a balck screen with out any errors

Title: the image is not diplayed in pygame

Body:
Hi in my game i should display a conect 4 image that is 640 x 480 but my game doesn't work
so i wanted to know what should i do

import pygame
from sys import exit

class Board(pygame.sprite.Sprite):
    def __init__(self):
        super().__init__()
        self.image = pygame.image.load("connect4.png").convert_alpha()
        self.rect = self.image.get_rect(topleft=(0,0))

def main():
    pygame.init()

    screen = pygame.display.set_mode((800, 400))

    board = pygame.sprite.GroupSingle()
    board.add(Board())

    _image  = pygame.image.load("connect4.png").convert_alpha()

    while True:
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                pygame.quit()
                exit()

        screen.blit(_image, (0,0))
        board.draw(screen)

if __name__ == "__main__":
    main()

i was expected the image to show but i didn't get any result only a balck screen with out any errors


问:
Converting local images to base64
I have a problem converting local image inside my angular project folder to base64 and displaying it.
I have this structure:
src > app > screenA > components > gallery > mock > images (here I store images image_1.jpg, image_2.jpg ...)
I then have this structure:
src > app > screenA > components > gallery > mock > mock_images.ts:

```<code>import {Image} from '....';

export const mockImages: Image[] = [
  {
    imageSrc: 'image_1.jpg',
    imageDesc:'Description of the first picture',
  },
  {
    imageSrc: 'image_2.jpg',
    imageDesc: 'Description of the second picture.',
  },
  {
    imageSrc: 'image_3.jpg',
    imageDesc: 'Description of the third picture.',
  },
  {
    imageSrc: 'image_4.jpg',
    imageDesc: 'Description of the fourth picture.',
  },
  {
    imageSrc: 'image_5.jpg',
    imageDesc: 'Description of the fifth picture.',
  },
  {
    imageSrc: 'image_6.jpg',
    imageDesc: 'Description of the sixth picture.',
  },
];
</code>```

Then, inside my service I define:

```<code>mockImagesPath = '.mock/images';
mockImages: Image[] = JSON.parse(JSON.stringify(mockImages));
data: Image[] = [];
</code>```

My html:

```<code><div *ngFor="let img of imgs">
  <img [src]="img.imageSrc" />
</div>
</code>```

In the ngOnInit I will call the service method and then fill the imgs with data coming from service:

```<code>convertImg(): void {
    const numberOfFiles = this.mockImages.length;
    for (let i = 0; i < numberOfFiles; i++) {
      const reader = new FileReader();
      const url = reader.readAsDataURL(`${this.mockImagesPath}/${this.mockImages[i].imageSrc}`);
      this.data.push(new Image(url, this.mockImages[i].imageDesc));
    }
  }
</code>```

Although this doesn´t work. Can you suggest some fix?

Title: Converting local images to base64

Body:
I have a problem converting local image inside my angular project folder to base64 and displaying it.
I have this structure:
src > app > screenA > components > gallery > mock > images (here I store images image_1.jpg, image_2.jpg ...)
I then have this structure:
src > app > screenA > components > gallery > mock > mock_images.ts:

import {Image} from '....';

export const mockImages: Image[] = [
  {
    imageSrc: 'image_1.jpg',
    imageDesc:'Description of the first picture',
  },
  {
    imageSrc: 'image_2.jpg',
    imageDesc: 'Description of the second picture.',
  },
  {
    imageSrc: 'image_3.jpg',
    imageDesc: 'Description of the third picture.',
  },
  {
    imageSrc: 'image_4.jpg',
    imageDesc: 'Description of the fourth picture.',
  },
  {
    imageSrc: 'image_5.jpg',
    imageDesc: 'Description of the fifth picture.',
  },
  {
    imageSrc: 'image_6.jpg',
    imageDesc: 'Description of the sixth picture.',
  },
];

Then, inside my service I define:

mockImagesPath = '.mock/images';
mockImages: Image[] = JSON.parse(JSON.stringify(mockImages));
data: Image[] = [];

My html:

In the ngOnInit I will call the service method and then fill the imgs with data coming from service:

convertImg(): void {
    const numberOfFiles = this.mockImages.length;
    for (let i = 0; i < numberOfFiles; i++) {
      const reader = new FileReader();
      const url = reader.readAsDataURL(`${this.mockImagesPath}/${this.mockImages[i].imageSrc}`);
      this.data.push(new Image(url, this.mockImages[i].imageDesc));
    }
  }

Although this doesn´t work. Can you suggest some fix?


问:
Android/iOS: Launcher.CanOpenAsync always returns false
I tried using Launcher.CanOpenAsync to see if it can detect gmail and facebook on emulator. It always returns false, even if the apps are installed.

I tried three apps in total, all three installed in emulator:

```<code>bool supportsUri = await Launcher.Default.CanOpenAsync("lyft://");

bool supportsUri = await Launcher.Default.CanOpenAsync("fb://");

bool supportsUri = await Launcher.Default.CanOpenAsync("gmail-inbox://");
</code>```

Why does it always return false? Any suggestions? I tried on iOS also, and modified the Info.plist accordingly but to no avail.

This two lines of code work fine, but i dont want to compose an email, I want to see the inbox, so mailto doesnt really help.

```<code> await Launcher.OpenAsync("mailto:example@gmail.com");
 await Browser.OpenAsync("https://www.facebook.com/RingotanApp");
</code>```

Body:
I tried using Launcher.CanOpenAsync to see if it can detect gmail and facebook on emulator. It always returns false, even if the apps are installed.

I tried three apps in total, all three installed in emulator:

bool supportsUri = await Launcher.Default.CanOpenAsync("lyft://");

bool supportsUri = await Launcher.Default.CanOpenAsync("fb://");

bool supportsUri = await Launcher.Default.CanOpenAsync("gmail-inbox://");

Why does it always return false? Any suggestions? I tried on iOS also, and modified the Info.plist accordingly but to no avail.

This two lines of code work fine, but i dont want to compose an email, I want to see the inbox, so mailto doesnt really help.

 await Launcher.OpenAsync("mailto:example@gmail.com");
 await Browser.OpenAsync("https://www.facebook.com/RingotanApp");


问:
labeling tool for keypoint detection images
everyone! I have a question about labeling images. Except for CVAT, which labeling tool is superior for keypoint detection annotation in images? Please inform me. Your suggestion is highly appreciated. Thanks.</p>


问:
Android Studio's search scope for files located in certain directories (in particular androidTest)
I have a very big android project and I want to search for all the entries in androidTest for certain lines of code. In this project I have a separate folder with a big amount of modules grouped up in different directories.
I'm trying to write a scope that will show only entries located in folders called androidTest.

The scope, I suppose, is file:*androidTest*/, but it does not find all the entries (does not search through all the files in project)

Did someone entered this problem?

I tried to use file:*androidTest*/ pattern but it definitely does not work properly.


问:
Jobs are failing due to Kerberos issues
I'm getting the following error in my cluster (HDP 3.1, NameNode HA, Kerberos security via AD integration):</p>
```<code>23/01/12 05:03:13 INFO HiveMetaStoreClient: HMSC::open(): Could not find delegation token. Creating KERBEROS-based thrift connection.
23/01/12 05:03:13 ERROR TSaslTransport: SASL negotiation failure
javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)]
    at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:211)
    at org.apache.thrift.transport.TSaslClientTransport.handleSaslStartMessage(TSaslClientTransport.java:94)
    at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:271)
    at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37)
    at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:51)
    at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:48)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:422)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1730)
    at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport.open(TUGIAssumingTransport.java:48)
    at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.open(HiveMetaStoreClient.java:544)
    at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:225)
    at org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.<init>(SessionHiveMetaStoreClient.java:96)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.apache.hadoop.hive.metastore.utils.JavaUtils.newInstance(JavaUtils.java:84)
    at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:95)
    at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:148)
    at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:119)
    at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:4656)
    at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:4724)
    at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:4704)
    at org.apache.hadoop.hive.ql.metadata.Hive.getAllFunctions(Hive.java:4995)
    at org.apache.hadoop.hive.ql.metadata.Hive.reloadFunctions(Hive.java:311)
    at org.apache.hadoop.hive.ql.metadata.Hive.registerAllFunctionsOnce(Hive.java:294)
    at org.apache.hadoop.hive.ql.metadata.Hive.<init>(Hive.java:464)
    at org.apache.hadoop.hive.ql.metadata.Hive.create(Hive.java:393)
    at org.apache.hadoop.hive.ql.metadata.Hive.getInternal(Hive.java:380)
    at org.apache.hadoop.hive.ql.metadata.Hive.get(Hive.java:351)
    at org.apache.spark.sql.hive.client.HiveClientImpl.org$apache$spark$sql$hive$client$HiveClientImpl$$client(HiveClientImpl.scala:249)
    at org.apache.spark.sql.hive.client.HiveClientImpl$$anonfun$withHiveState$1.apply(HiveClientImpl.scala:271)
    at org.apache.spark.sql.hive.client.HiveClientImpl.liftedTree1$1(HiveClientImpl.scala:216)
    at org.apache.spark.sql.hive.client.HiveClientImpl.retryLocked(HiveClientImpl.scala:215)
    at org.apache.spark.sql.hive.client.HiveClientImpl.withHiveState(HiveClientImpl.scala:261)
    at org.apache.spark.sql.hive.client.HiveClientImpl.databaseExists(HiveClientImpl.scala:345)
    at org.apache.spark.sql.hive.HiveExternalCatalog$$anonfun$databaseExists$1.apply$mcZ$sp(HiveExternalCatalog.scala:195)
    at org.apache.spark.sql.hive.HiveExternalCatalog$$anonfun$databaseExists$1.apply(HiveExternalCatalog.scala:195)
    at org.apache.spark.sql.hive.HiveExternalCatalog$$anonfun$databaseExists$1.apply(HiveExternalCatalog.scala:195)
    at org.apache.spark.sql.hive.HiveExternalCatalog.withClient(HiveExternalCatalog.scala:97)
    at org.apache.spark.sql.hive.HiveExternalCatalog.databaseExists(HiveExternalCatalog.scala:194)
    at org.apache.spark.sql.internal.SharedState.externalCatalog$lzycompute(SharedState.scala:114)
    at org.apache.spark.sql.internal.SharedState.externalCatalog(SharedState.scala:102)
    at org.apache.spark.sql.internal.SharedState.globalTempViewManager$lzycompute(SharedState.scala:138)
    at org.apache.spark.sql.internal.SharedState.globalTempViewManager(SharedState.scala:133)
    at org.apache.spark.sql.hive.HiveSessionStateBuilder$$anonfun$2.apply(HiveSessionStateBuilder.scala:54)
    at org.apache.spark.sql.hive.HiveSessionStateBuilder$$anonfun$2.apply(HiveSessionStateBuilder.scala:54)
    at org.apache.spark.sql.catalyst.catalog.SessionCatalog.globalTempViewManager$lzycompute(SessionCatalog.scala:91)
    at org.apache.spark.sql.catalyst.catalog.SessionCatalog.globalTempViewManager(SessionCatalog.scala:91)
    at org.apache.spark.sql.catalyst.catalog.SessionCatalog.isTemporaryTable(SessionCatalog.scala:702)
    at org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveRelations$.isRunningDirectlyOnFiles(Analyzer.scala:681)
    at org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveRelations$.resolveRelation(Analyzer.scala:615)
    at org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveRelations$$anonfun$apply$8.applyOrElse(Analyzer.scala:647)
    at org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveRelations$$anonfun$apply$8.applyOrElse(Analyzer.scala:640)
    at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$transformUp$1.apply(TreeNode.scala:289)
    at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$transformUp$1.apply(TreeNode.scala:289)
    at org.apache.spark.sql.catalyst.trees.CurrentOrigin$.withOrigin(TreeNode.scala:70)
    at org.apache.spark.sql.catalyst.trees.TreeNode.transformUp(TreeNode.scala:288)
    at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$3.apply(TreeNode.scala:286)
    at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$3.apply(TreeNode.scala:286)
    at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$4.apply(TreeNode.scala:306)
    at org.apache.spark.sql.catalyst.trees.TreeNode.mapProductIterator(TreeNode.scala:187)
    at org.apache.spark.sql.catalyst.trees.TreeNode.mapChildren(TreeNode.scala:304)
    at org.apache.spark.sql.catalyst.trees.TreeNode.transformUp(TreeNode.scala:286)
    at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$3.apply(TreeNode.scala:286)
    at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$3.apply(TreeNode.scala:286)
    at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$4.apply(TreeNode.scala:306)
    at org.apache.spark.sql.catalyst.trees.TreeNode.mapProductIterator(TreeNode.scala:187)
    at org.apache.spark.sql.catalyst.trees.TreeNode.mapChildren(TreeNode.scala:304)
    at org.apache.spark.sql.catalyst.trees.TreeNode.transformUp(TreeNode.scala:286)
    at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$3.apply(TreeNode.scala:286)
    at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$3.apply(TreeNode.scala:286)
    at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$4.apply(TreeNode.scala:306)
    at org.apache.spark.sql.catalyst.trees.TreeNode.mapProductIterator(TreeNode.scala:187)
    at org.apache.spark.sql.catalyst.trees.TreeNode.mapChildren(TreeNode.scala:304)
    at org.apache.spark.sql.catalyst.trees.TreeNode.transformUp(TreeNode.scala:286)
    at org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveRelations$.apply(Analyzer.scala:640)
    at org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveRelations$.apply(Analyzer.scala:586)
    at org.apache.spark.sql.catalyst.rules.RuleExecutor$$anonfun$execute$1$$anonfun$apply$1.apply(RuleExecutor.scala:87)
    at org.apache.spark.sql.catalyst.rules.RuleExecutor$$anonfun$execute$1$$anonfun$apply$1.apply(RuleExecutor.scala:84)
    at scala.collection.LinearSeqOptimized$class.foldLeft(LinearSeqOptimized.scala:124)
    at scala.collection.immutable.List.foldLeft(List.scala:84)
    at org.apache.spark.sql.catalyst.rules.RuleExecutor$$anonfun$execute$1.apply(RuleExecutor.scala:84)
    at org.apache.spark.sql.catalyst.rules.RuleExecutor$$anonfun$execute$1.apply(RuleExecutor.scala:76)
    at scala.collection.immutable.List.foreach(List.scala:381)
    at org.apache.spark.sql.catalyst.rules.RuleExecutor.execute(RuleExecutor.scala:76)
    at org.apache.spark.sql.catalyst.analysis.Analyzer.org$apache$spark$sql$catalyst$analysis$Analyzer$$executeSameContext(Analyzer.scala:124)
    at org.apache.spark.sql.catalyst.analysis.Analyzer.execute(Analyzer.scala:118)
    at org.apache.spark.sql.catalyst.analysis.Analyzer.executeAndCheck(Analyzer.scala:103)
    at org.apache.spark.sql.execution.QueryExecution.analyzed$lzycompute(QueryExecution.scala:57)
    at org.apache.spark.sql.execution.QueryExecution.analyzed(QueryExecution.scala:55)
    at org.apache.spark.sql.execution.QueryExecution.assertAnalyzed(QueryExecution.scala:47)
    at org.apache.spark.sql.Dataset$.ofRows(Dataset.scala:74)
    at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:642)
    at com.virginvoyages.dimension.SurveyQuestionsDimLoad$.main(SurveyQuestionsDimLoad.scala:53)
    at com.virginvoyages.dimension.SurveyQuestionsDimLoad.main(SurveyQuestionsDimLoad.scala)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.spark.deploy.yarn.ApplicationMaster$$anon$4.run(ApplicationMaster.scala:721)
Caused by: GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)
    at sun.security.jgss.krb5.Krb5InitCredential.getInstance(Krb5InitCredential.java:147)
    at sun.security.jgss.krb5.Krb5MechFactory.getCredentialElement(Krb5MechFactory.java:122)
    at sun.security.jgss.krb5.Krb5MechFactory.getMechanismContext(Krb5MechFactory.java:187)
    at sun.security.jgss.GSSManagerImpl.getMechanismContext(GSSManagerImpl.java:224)
    at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:212)
    at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:179)
    at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:192)
    ... 101 more
23/01/12 05:03:13 WARN HiveMetaStoreClient: Failed to connect to the MetaStore Server...
23/01/12 05:03:13 INFO HiveMetaStoreClient: Waiting 5 seconds before next connection attempt.
23/01/12 05:03:18 INFO HiveMetaStoreClient: Trying to connect to metastore with URI thrift://Metastorehostname:9083
23/01/12 05:03:18 INFO HiveMetaStoreClient: HMSC::open(): Could not find delegation token. Creating KERBEROS-based thrift connection.
23/01/12 05:03:18 ERROR TSaslTransport: SASL negotiation failure
javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)]
    at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:211)
    at org.apache.thrift.transport.TSaslClientTransport.handleSaslStartMessage(TSaslClientTransport.java:94)
    at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:271)
    at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37)
    at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:51)
    at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:48)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:422)
</code>```

Title: Jobs are failing due to Kerberos issues

Body:
I'm getting the following error in my cluster (HDP 3.1, NameNode HA, Kerberos security via AD integration):

23/01/12 05:03:13 INFO HiveMetaStoreClient: HMSC::open(): Could not find delegation token. Creating KERBEROS-based thrift connection.
23/01/12 05:03:13 ERROR TSaslTransport: SASL negotiation failure
javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)]
    at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:211)
    at org.apache.thrift.transport.TSaslClientTransport.handleSaslStartMessage(TSaslClientTransport.java:94)
    at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:271)
    at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37)
    at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:51)
    at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:48)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:422)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1730)
    at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport.open(TUGIAssumingTransport.java:48)
    at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.open(HiveMetaStoreClient.java:544)
    at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:225)
    at org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.<init>(SessionHiveMetaStoreClient.java:96)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.apache.hadoop.hive.metastore.utils.JavaUtils.newInstance(JavaUtils.java:84)
    at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:95)
    at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:148)
    at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:119)
    at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:4656)
    at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:4724)
    at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:4704)
    at org.apache.hadoop.hive.ql.metadata.Hive.getAllFunctions(Hive.java:4995)
    at org.apache.hadoop.hive.ql.metadata.Hive.reloadFunctions(Hive.java:311)
    at org.apache.hadoop.hive.ql.metadata.Hive.registerAllFunctionsOnce(Hive.java:294)
    at org.apache.hadoop.hive.ql.metadata.Hive.<init>(Hive.java:464)
    at org.apache.hadoop.hive.ql.metadata.Hive.create(Hive.java:393)
    at org.apache.hadoop.hive.ql.metadata.Hive.getInternal(Hive.java:380)
    at org.apache.hadoop.hive.ql.metadata.Hive.get(Hive.java:351)
    at org.apache.spark.sql.hive.client.HiveClientImpl.org$apache$spark$sql$hive$client$HiveClientImpl$$client(HiveClientImpl.scala:249)
    at org.apache.spark.sql.hive.client.HiveClientImpl$$anonfun$withHiveState$1.apply(HiveClientImpl.scala:271)
    at org.apache.spark.sql.hive.client.HiveClientImpl.liftedTree1$1(HiveClientImpl.scala:216)
    at org.apache.spark.sql.hive.client.HiveClientImpl.retryLocked(HiveClientImpl.scala:215)
    at org.apache.spark.sql.hive.client.HiveClientImpl.withHiveState(HiveClientImpl.scala:261)
    at org.apache.spark.sql.hive.client.HiveClientImpl.databaseExists(HiveClientImpl.scala:345)
    at org.apache.spark.sql.hive.HiveExternalCatalog$$anonfun$databaseExists$1.apply$mcZ$sp(HiveExternalCatalog.scala:195)
    at org.apache.spark.sql.hive.HiveExternalCatalog$$anonfun$databaseExists$1.apply(HiveExternalCatalog.scala:195)
    at org.apache.spark.sql.hive.HiveExternalCatalog$$anonfun$databaseExists$1.apply(HiveExternalCatalog.scala:195)
    at org.apache.spark.sql.hive.HiveExternalCatalog.withClient(HiveExternalCatalog.scala:97)
    at org.apache.spark.sql.hive.HiveExternalCatalog.databaseExists(HiveExternalCatalog.scala:194)
    at org.apache.spark.sql.internal.SharedState.externalCatalog$lzycompute(SharedState.scala:114)
    at org.apache.spark.sql.internal.SharedState.externalCatalog(SharedState.scala:102)
    at org.apache.spark.sql.internal.SharedState.globalTempViewManager$lzycompute(SharedState.scala:138)
    at org.apache.spark.sql.internal.SharedState.globalTempViewManager(SharedState.scala:133)
    at org.apache.spark.sql.hive.HiveSessionStateBuilder$$anonfun$2.apply(HiveSessionStateBuilder.scala:54)
    at org.apache.spark.sql.hive.HiveSessionStateBuilder$$anonfun$2.apply(HiveSessionStateBuilder.scala:54)
    at org.apache.spark.sql.catalyst.catalog.SessionCatalog.globalTempViewManager$lzycompute(SessionCatalog.scala:91)
    at org.apache.spark.sql.catalyst.catalog.SessionCatalog.globalTempViewManager(SessionCatalog.scala:91)
    at org.apache.spark.sql.catalyst.catalog.SessionCatalog.isTemporaryTable(SessionCatalog.scala:702)
    at org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveRelations$.isRunningDirectlyOnFiles(Analyzer.scala:681)
    at org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveRelations$.resolveRelation(Analyzer.scala:615)
    at org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveRelations$$anonfun$apply$8.applyOrElse(Analyzer.scala:647)
    at org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveRelations$$anonfun$apply$8.applyOrElse(Analyzer.scala:640)
    at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$transformUp$1.apply(TreeNode.scala:289)
    at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$transformUp$1.apply(TreeNode.scala:289)
    at org.apache.spark.sql.catalyst.trees.CurrentOrigin$.withOrigin(TreeNode.scala:70)
    at org.apache.spark.sql.catalyst.trees.TreeNode.transformUp(TreeNode.scala:288)
    at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$3.apply(TreeNode.scala:286)
    at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$3.apply(TreeNode.scala:286)
    at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$4.apply(TreeNode.scala:306)
    at org.apache.spark.sql.catalyst.trees.TreeNode.mapProductIterator(TreeNode.scala:187)
    at org.apache.spark.sql.catalyst.trees.TreeNode.mapChildren(TreeNode.scala:304)
    at org.apache.spark.sql.catalyst.trees.TreeNode.transformUp(TreeNode.scala:286)
    at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$3.apply(TreeNode.scala:286)
    at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$3.apply(TreeNode.scala:286)
    at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$4.apply(TreeNode.scala:306)
    at org.apache.spark.sql.catalyst.trees.TreeNode.mapProductIterator(TreeNode.scala:187)
    at org.apache.spark.sql.catalyst.trees.TreeNode.mapChildren(TreeNode.scala:304)
    at org.apache.spark.sql.catalyst.trees.TreeNode.transformUp(TreeNode.scala:286)
    at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$3.apply(TreeNode.scala:286)
    at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$3.apply(TreeNode.scala:286)
    at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$4.apply(TreeNode.scala:306)
    at org.apache.spark.sql.catalyst.trees.TreeNode.mapProductIterator(TreeNode.scala:187)
    at org.apache.spark.sql.catalyst.trees.TreeNode.mapChildren(TreeNode.scala:304)
    at org.apache.spark.sql.catalyst.trees.TreeNode.transformUp(TreeNode.scala:286)
    at org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveRelations$.apply(Analyzer.scala:640)
    at org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveRelations$.apply(Analyzer.scala:586)
    at org.apache.spark.sql.catalyst.rules.RuleExecutor$$anonfun$execute$1$$anonfun$apply$1.apply(RuleExecutor.scala:87)
    at org.apache.spark.sql.catalyst.rules.RuleExecutor$$anonfun$execute$1$$anonfun$apply$1.apply(RuleExecutor.scala:84)
    at scala.collection.LinearSeqOptimized$class.foldLeft(LinearSeqOptimized.scala:124)
    at scala.collection.immutable.List.foldLeft(List.scala:84)
    at org.apache.spark.sql.catalyst.rules.RuleExecutor$$anonfun$execute$1.apply(RuleExecutor.scala:84)
    at org.apache.spark.sql.catalyst.rules.RuleExecutor$$anonfun$execute$1.apply(RuleExecutor.scala:76)
    at scala.collection.immutable.List.foreach(List.scala:381)
    at org.apache.spark.sql.catalyst.rules.RuleExecutor.execute(RuleExecutor.scala:76)
    at org.apache.spark.sql.catalyst.analysis.Analyzer.org$apache$spark$sql$catalyst$analysis$Analyzer$$executeSameContext(Analyzer.scala:124)
    at org.apache.spark.sql.catalyst.analysis.Analyzer.execute(Analyzer.scala:118)
    at org.apache.spark.sql.catalyst.analysis.Analyzer.executeAndCheck(Analyzer.scala:103)
    at org.apache.spark.sql.execution.QueryExecution.analyzed$lzycompute(QueryExecution.scala:57)
    at org.apache.spark.sql.execution.QueryExecution.analyzed(QueryExecution.scala:55)
    at org.apache.spark.sql.execution.QueryExecution.assertAnalyzed(QueryExecution.scala:47)
    at org.apache.spark.sql.Dataset$.ofRows(Dataset.scala:74)
    at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:642)
    at com.virginvoyages.dimension.SurveyQuestionsDimLoad$.main(SurveyQuestionsDimLoad.scala:53)
    at com.virginvoyages.dimension.SurveyQuestionsDimLoad.main(SurveyQuestionsDimLoad.scala)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.spark.deploy.yarn.ApplicationMaster$$anon$4.run(ApplicationMaster.scala:721)
Caused by: GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)
    at sun.security.jgss.krb5.Krb5InitCredential.getInstance(Krb5InitCredential.java:147)
    at sun.security.jgss.krb5.Krb5MechFactory.getCredentialElement(Krb5MechFactory.java:122)
    at sun.security.jgss.krb5.Krb5MechFactory.getMechanismContext(Krb5MechFactory.java:187)
    at sun.security.jgss.GSSManagerImpl.getMechanismContext(GSSManagerImpl.java:224)
    at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:212)
    at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:179)
    at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:192)
    ... 101 more
23/01/12 05:03:13 WARN HiveMetaStoreClient: Failed to connect to the MetaStore Server...
23/01/12 05:03:13 INFO HiveMetaStoreClient: Waiting 5 seconds before next connection attempt.
23/01/12 05:03:18 INFO HiveMetaStoreClient: Trying to connect to metastore with URI thrift://Metastorehostname:9083
23/01/12 05:03:18 INFO HiveMetaStoreClient: HMSC::open(): Could not find delegation token. Creating KERBEROS-based thrift connection.
23/01/12 05:03:18 ERROR TSaslTransport: SASL negotiation failure
javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)]
    at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:211)
    at org.apache.thrift.transport.TSaslClientTransport.handleSaslStartMessage(TSaslClientTransport.java:94)
    at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:271)
    at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37)
    at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:51)
    at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:48)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:422)


问:
How to preserve function names when compiling with clang to wasm and optimizing
When using optimisation options clang removes the name section.

Clang successfully emits a wasm custom name section containing the function names when compiling with the -g option, however I found no way to keep the name section when combining clang with optimization flags such as -Oz. Is there such an option, or an open ticket to preserve the progress of this feature?


问:
python github api to lock the github branch of perticular repo
Want pygithub api to lock the branch as indicated in the image.enter image description here

branch.edit_protection to edit protection rule


问:
How can I click on a button which open in pop up window when cypress is not providing the suggested selector
For a website to login , login page open up in a pop up window.
email, and passwords are being entered successfully, but ' Sign In' button is not being captured neither cypress is suggesting any selector.
IF anyone knows please share

tried to used cy.window() and then cy.get('form').contains('Sign in').
But the problem is that pop up windows form does contains sign in text also other than that sign in button.

I have also tried this but problem is there is a sign in button on main page also which is opened in back ground.
cy.get('#join-neu-form > .wt-grid > .wt-grid__item-xs-12').as('Sign');
cy.find('button').contains('Sign in');


问:
Cordova: Error subscribing to characteristic: [object Object]
Im trying to code an App for an School project. For this I need to connect the phone via bluethooth to an HM-10. So I use cordova and randdusing/cordova-plugin-bluetoothle.

I managed to scan for devices and connect with them. Now im trying to subscribe to recieve data but it isnt working.

First of all what i noticed is that wehn i do the .discover it give me from time to time just all informations

Most of the time there is a lot missing.
But it doesnt matter at all. The subscription wont work over all.

```<code>function discoverSuccess(result) {
  console.log("Discovered services and characteristics: " + JSON.stringify(result));

  var serviceUuid = "FFE0";
  var characteristicUuid = "FFE1";
  // Subscribe to the characteristic
  window.bluetoothle.subscribe(subscribeSuccess, subscribeError, {
  address: result.address,
  service: "FFE0",
  characteristic: "FFE1"
});
}
</code>```

I tryed it that way and changed the service or characterisitic not to be static. Also tryed to set static values. So far Im out of Ideas.... any suggestions?

With this static values i get this error and i dont get it why...

Im a completly beginner so I hope you all dont mind.

Body:
Im trying to code an App for an School project. For this I need to connect the phone via bluethooth to an HM-10. So I use cordova and randdusing/cordova-plugin-bluetoothle.

I managed to scan for devices and connect with them. Now im trying to subscribe to recieve data but it isnt working.

First of all what i noticed is that wehn i do the .discover it give me from time to time just all informations

Most of the time there is a lot missing.
But it doesnt matter at all. The subscription wont work over all.

function discoverSuccess(result) {
  console.log("Discovered services and characteristics: " + JSON.stringify(result));

  var serviceUuid = "FFE0";
  var characteristicUuid = "FFE1";
  // Subscribe to the characteristic
  window.bluetoothle.subscribe(subscribeSuccess, subscribeError, {
  address: result.address,
  service: "FFE0",
  characteristic: "FFE1"
});
}

I tryed it that way and changed the service or characterisitic not to be static. Also tryed to set static values. So far Im out of Ideas.... any suggestions?

With this static values i get this error and i dont get it why...

Im a completly beginner so I hope you all dont mind.


问:
Is it possible to hide or encrypt the display name after login into the WordPress admin panel?
Today, one of my clients asked the below question:

I have login into the WordPress admin panel using the email id and
password shared by you. Now what I did, after login right clicks on the
page and click on inspect element then I search for my email id and I
found my email id (shared screenshot below). I don't want to show my
email like this. Either encrypt my email id or remove it from the
inspect element. This is a security issue.

I explained to him that this will only show to the login user not everyone on the website and then the argument started.

I believe that this is the WordPress default functionality. I want to know if is there any way to handle this issue.


问:
How to instantiate generics dart ffi pointer?
Is there a way to implement function with following signature?

CB getCallback<CB extends Pointer<NativeFunction>>()
{
  CB cb = CB.fromAddress(33333);
  return cb;
}
```
<p>I was not able to find any so far. No casting (<code>Pointer.cast<>()</code>) or <code>as</code> is helping. Is there some trick that could give me access to actual NativeFunction type passed in <code>CB</code>? An unwrapping from <code>Pointer<...></code> in order to use <code>Pointer<Inner>.fromAddress()</code>?
If <code>malloc()</code>/<code>calloc()</code> accepted CB as type parameter, that I could live with that. But they do not.</p>
<p>I have callback types generated by ffigen like the first line below and wanted to have a function that would use these typedefs as type parameter:</p>
<pre class="lang-dart prettyprint-override"><code>typedef callback1 = Pointer<NativeFunction<Void Function(IntPtr)>>;
var cb = getCallback<callback1>();
</code>```

The following one is easily done, but I would probably need to generate a second set of typedefs, just for that.

Pointer<Fun> getCallback2<Fun extends NativeFunction>()
```

Body:
Is there a way to implement function with following signature?

CB getCallback<CB extends Pointer<NativeFunction>>()
{
  CB cb = CB.fromAddress(33333);
  return cb;
}

I was not able to find any so far. No casting (Pointer.cast<>()) or as is helping. Is there some trick that could give me access to actual NativeFunction type passed in CB? An unwrapping from Pointer<...> in order to use Pointer<Inner>.fromAddress()?
If malloc()/calloc() accepted CB as type parameter, that I could live with that. But they do not.

I have callback types generated by ffigen like the first line below and wanted to have a function that would use these typedefs as type parameter:

typedef callback1 = Pointer<NativeFunction<Void Function(IntPtr)>>;
var cb = getCallback<callback1>();

The following one is easily done, but I would probably need to generate a second set of typedefs, just for that.

Pointer<Fun> getCallback2<Fun extends NativeFunction>()


问:
How to restrict update API and allow only viewData API to non-admin whereas allow both these to Admin in the backend(Spring Boot)
In an Interview, Interviewer asked this..

Admin should be able to access viewData API as well as update API but non-admin should be able to access only  viewData API and not update API, how will you implement this in the backend?

That's all the info he provided.
I am novice in Web development, REST API in Spring Boot. I couldn't figure out what exactly he is expecting.
If anyone knows about this, please help.


问:
pycharm does not print box data in plot
pycharm does not print box data.

My python code is:-

```<code>import os
pio.renderers.default = "colab"
box = go.Figure()
pio.templates.default = "plotly_white"
print(os.getcwd())
os.chdir(r"/Users/apple/Desktop/Employedata")
print(os.getcwd())
pio.templates.default = "plotly_white"
data = pd.read_csv("/Users/apple/Desktop/Employedata/EmployeeSampleData.csv",       encoding='windows-1252')
print(data)
fig = px.box(data,
         x="Occupation",
         color="Credit_Score",
         title="Credit Scores Based on Occupation",
         color_discrete_map={'Poor':'red',
                             'Standard':'yellow',
                             'Good':'green'})
   fig.show()
</code>```

The console prints:-

```<code>     /Users/apple/PycharmProjects/pythonProject4/venv/bin/python /Users/apple /PycharmProjects/pythonProject4/main.py
     /Users/apple/PycharmProjects/pythonProject4
     /Users/apple/Desktop/Employedata
        EEID        Full Name  ...       City   Exit Date
   0    E02387      Emily Davis  ...    Seattle  10/16/2021
   1    E04105    Theodore Dinh  ...  Chongqing         NaN
   2    E02572     Luna Sanders  ...    Chicago         NaN
   3    E02832  Penelope Jordan  ...    Chicago         NaN
   4    E01639        Austin Vo  ...    Phoenix         NaN
    ..      ...              ...  ...        ...         ...
   995  E03094     Wesley Young  ...   Columbus         NaN
   996  E01909     Lillian Khan  ...    Chengdu    1/8/2018
   997  E04398      Oliver Yang  ...      Miami         NaN
   998  E02521      Lily Nguyen  ...    Chengdu         NaN
   999  E03545      Sofia Cheng  ...      Miami         NaN

   [1000 rows x 14 columns]

    Traceback (most recent call last):
    File "/Users/apple/PycharmProjects/pythonProject4/main.py", line 18, in <module>
    fig = px.box(data,
      ^^^^^^^^^^^^
     File "/Users/apple/PycharmProjects/pythonProject4/venv/lib/python3.11/site-packages/plotly/express/_chart_types.py", line 666, in box
     return make_figure(
       ^^^^^^^^^^^^
      File "/Users/apple/PycharmProjects/pythonProject4/venv/lib/python3.11/site-packages/plotly/express/_core.py", line 1990, in make_figure
      args = build_dataframe(args, constructor)
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/apple/PycharmProjects/pythonProject4/venv/lib/python3.11/site-packages/plotly/express/_core.py", line 1405, in build_dataframe
      df_output, wide_id_vars = process_args_into_dataframe(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/apple/PycharmProjects/pythonProject4/venv/lib/python3.11/site-packages/plotly/express/_core.py", line 1207, in process_args_into_dataframe
      raise ValueError(err_msg)
      ValueError: Value of 'x' is not the name of a column in 'data_frame'. Expected one of ['EEID', 'Full Name', 'Job Title', 'Department', 'Business Unit', 'Gender', 'Ethnicity', 'Age', 'Hire Date', 'Annual Salary', 'Bonus %', 'Country', 'City', 'Exit Date'] but received: Occupation

 Process finished with exit code 1
</code>```

why is the compiler not showing box (boxplot) though it prints data when I do print(data) ?
It is supposed to show the following image:-

What is wrong

Title: pycharm does not print box data in plot

Body:
pycharm does not print box data.

My python code is:-

import os
pio.renderers.default = "colab"
box = go.Figure()
pio.templates.default = "plotly_white"
print(os.getcwd())
os.chdir(r"/Users/apple/Desktop/Employedata")
print(os.getcwd())
pio.templates.default = "plotly_white"
data = pd.read_csv("/Users/apple/Desktop/Employedata/EmployeeSampleData.csv",       encoding='windows-1252')
print(data)
fig = px.box(data,
         x="Occupation",
         color="Credit_Score",
         title="Credit Scores Based on Occupation",
         color_discrete_map={'Poor':'red',
                             'Standard':'yellow',
                             'Good':'green'})
   fig.show()

The console prints:-

     /Users/apple/PycharmProjects/pythonProject4/venv/bin/python /Users/apple /PycharmProjects/pythonProject4/main.py
     /Users/apple/PycharmProjects/pythonProject4
     /Users/apple/Desktop/Employedata
        EEID        Full Name  ...       City   Exit Date
   0    E02387      Emily Davis  ...    Seattle  10/16/2021
   1    E04105    Theodore Dinh  ...  Chongqing         NaN
   2    E02572     Luna Sanders  ...    Chicago         NaN
   3    E02832  Penelope Jordan  ...    Chicago         NaN
   4    E01639        Austin Vo  ...    Phoenix         NaN
    ..      ...              ...  ...        ...         ...
   995  E03094     Wesley Young  ...   Columbus         NaN
   996  E01909     Lillian Khan  ...    Chengdu    1/8/2018
   997  E04398      Oliver Yang  ...      Miami         NaN
   998  E02521      Lily Nguyen  ...    Chengdu         NaN
   999  E03545      Sofia Cheng  ...      Miami         NaN

   [1000 rows x 14 columns]

    Traceback (most recent call last):
    File "/Users/apple/PycharmProjects/pythonProject4/main.py", line 18, in <module>
    fig = px.box(data,
      ^^^^^^^^^^^^
     File "/Users/apple/PycharmProjects/pythonProject4/venv/lib/python3.11/site-packages/plotly/express/_chart_types.py", line 666, in box
     return make_figure(
       ^^^^^^^^^^^^
      File "/Users/apple/PycharmProjects/pythonProject4/venv/lib/python3.11/site-packages/plotly/express/_core.py", line 1990, in make_figure
      args = build_dataframe(args, constructor)
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/apple/PycharmProjects/pythonProject4/venv/lib/python3.11/site-packages/plotly/express/_core.py", line 1405, in build_dataframe
      df_output, wide_id_vars = process_args_into_dataframe(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/apple/PycharmProjects/pythonProject4/venv/lib/python3.11/site-packages/plotly/express/_core.py", line 1207, in process_args_into_dataframe
      raise ValueError(err_msg)
      ValueError: Value of 'x' is not the name of a column in 'data_frame'. Expected one of ['EEID', 'Full Name', 'Job Title', 'Department', 'Business Unit', 'Gender', 'Ethnicity', 'Age', 'Hire Date', 'Annual Salary', 'Bonus %', 'Country', 'City', 'Exit Date'] but received: Occupation

 Process finished with exit code 1

why is the compiler not showing box (boxplot) though it prints data when I do print(data) ?
It is supposed to show the following image:-

What is wrong


问:
zxing-ngx-scanner throws TypeError: Cannot read properties of null (reading 'firstCreatePass')
Using the zxing-ngx-scanner to scan QR codes in my Angular (v15.0.0) application causes an error in the log

```<code>core.mjs:9095 ERROR Error: Uncaught (in promise): TypeError: Cannot read properties of null (reading 'firstCreatePass')
TypeError: Cannot read properties of null (reading 'firstCreatePass')
    at Module.ɵɵviewQuery (core.mjs:21939:15)
    at ZXingScannerComponent_Query (zxing-ngx-scanner.mjs:647:107)
    at executeViewQueryFn (core.mjs:12357:5)
    at renderView (core.mjs:11058:13)
    at renderComponent (core.mjs:12237:5)
    at renderChildComponents (core.mjs:10924:9)
    at renderView (core.mjs:11089:13)
    at renderComponent (core.mjs:12237:5)
    at renderChildComponents (core.mjs:10924:9)
    at renderView (core.mjs:11089:13)
    at resolvePromise (zone.js:1214:31)
    at resolvePromise (zone.js:1168:17)
    at zone.js:1281:17
    at _ZoneDelegate.invokeTask (zone.js:409:31)
    at core.mjs:25299:55
    at AsyncStackTaggingZoneSpec.onInvokeTask (core.mjs:25299:36)
    at _ZoneDelegate.invokeTask (zone.js:408:60)
    at Object.onInvokeTask (core.mjs:25607:33)
    at _ZoneDelegate.invokeTask (zone.js:408:60)
    at Zone.runTask (zone.js:178:47)
</code>```

I checked the detail of the error where the run fails and see that minVersion: "12.0.0", version: "15.0.0" so this should be ok. The application compiles but the error in the console stops the load of the page

```<code>ZXingScannerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ZXingScannerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
ZXingScannerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0", type: ZXingScannerComponent, selector: "zxing-scanner", inputs: { autofocusEnabled: "autofocusEnabled", timeBetweenScans: "timeBetweenScans", delayBetweenScanSuccess: "delayBetweenScanSuccess", autostart: "autostart", previewFitMode: "previewFitMode", device: "device", formats: "formats", videoConstraints: "videoConstraints", torch: "torch", enable: "enable", tryHarder: "tryHarder" }, outputs: { autostarted: "autostarted", autostarting: "autostarting", torchCompatible: "torchCompatible", scanSuccess: "scanSuccess", scanFailure: "scanFailure", scanError: "scanError", scanComplete: "scanComplete", camerasFound: "camerasFound", camerasNotFound: "camerasNotFound", permissionResponse: "permissionResponse", hasDevices: "hasDevices", deviceChange: "deviceChange" }, viewQueries: [{ propertyName: "previewElemRef", first: true, predicate: ["preview"], descendants: true, static: true }], ngImport: i0, template: "<video #preview [style.object-fit]=\"previewFitMode\">\n  <p>\n    Your browser does not support this feature, please try to upgrade it.\n  </p>\n  <p>\n    Seu navegador n\u00E3o suporta este recurso, por favor tente atualiz\u00E1-lo.\n  </p>\n</video>\n", styles: [":host{display:block}video{width:100%;height:auto;object-fit:contain}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
</code>```

Body:
Using the zxing-ngx-scanner to scan QR codes in my Angular (v15.0.0) application causes an error in the log

core.mjs:9095 ERROR Error: Uncaught (in promise): TypeError: Cannot read properties of null (reading 'firstCreatePass')
TypeError: Cannot read properties of null (reading 'firstCreatePass')
    at Module.ɵɵviewQuery (core.mjs:21939:15)
    at ZXingScannerComponent_Query (zxing-ngx-scanner.mjs:647:107)
    at executeViewQueryFn (core.mjs:12357:5)
    at renderView (core.mjs:11058:13)
    at renderComponent (core.mjs:12237:5)
    at renderChildComponents (core.mjs:10924:9)
    at renderView (core.mjs:11089:13)
    at renderComponent (core.mjs:12237:5)
    at renderChildComponents (core.mjs:10924:9)
    at renderView (core.mjs:11089:13)
    at resolvePromise (zone.js:1214:31)
    at resolvePromise (zone.js:1168:17)
    at zone.js:1281:17
    at _ZoneDelegate.invokeTask (zone.js:409:31)
    at core.mjs:25299:55
    at AsyncStackTaggingZoneSpec.onInvokeTask (core.mjs:25299:36)
    at _ZoneDelegate.invokeTask (zone.js:408:60)
    at Object.onInvokeTask (core.mjs:25607:33)
    at _ZoneDelegate.invokeTask (zone.js:408:60)
    at Zone.runTask (zone.js:178:47)

I checked the detail of the error where the run fails and see that minVersion: "12.0.0", version: "15.0.0" so this should be ok. The application compiles but the error in the console stops the load of the page

ZXingScannerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: ZXingScannerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
ZXingScannerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0", type: ZXingScannerComponent, selector: "zxing-scanner", inputs: { autofocusEnabled: "autofocusEnabled", timeBetweenScans: "timeBetweenScans", delayBetweenScanSuccess: "delayBetweenScanSuccess", autostart: "autostart", previewFitMode: "previewFitMode", device: "device", formats: "formats", videoConstraints: "videoConstraints", torch: "torch", enable: "enable", tryHarder: "tryHarder" }, outputs: { autostarted: "autostarted", autostarting: "autostarting", torchCompatible: "torchCompatible", scanSuccess: "scanSuccess", scanFailure: "scanFailure", scanError: "scanError", scanComplete: "scanComplete", camerasFound: "camerasFound", camerasNotFound: "camerasNotFound", permissionResponse: "permissionResponse", hasDevices: "hasDevices", deviceChange: "deviceChange" }, viewQueries: [{ propertyName: "previewElemRef", first: true, predicate: ["preview"], descendants: true, static: true }], ngImport: i0, template: "<video #preview [style.object-fit]=\"previewFitMode\">\n
\n    Your browser does not support this feature, please try to upgrade it.\n
\n
\n    Seu navegador n\u00E3o suporta este recurso, por favor tente atualiz\u00E1-lo.\n
\n</video>\n", styles: [":host{display:block}video{width:100%;height:auto;object-fit:contain}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });


问:
Kendo UI Grid Issue in core
Issue in using Kendo Grid Column Template in .Net Core, works fine in .net mvc

```<code>@(Html.Kendo().Grid<Model>().Method()
.Columns(c => {
  c.Template(m => null).Title("").Width(10)
  .ClientTemplate();
})
</code>```

Error in m => null: Cannot convert lambda expression to type string because it is not a delegate type

Please help

Title: Kendo UI Grid Issue in core

Body:
Issue in using Kendo Grid Column Template in .Net Core, works fine in .net mvc

@(Html.Kendo().Grid<Model>().Method()
.Columns(c => {
  c.Template(m => null).Title("").Width(10)
  .ClientTemplate();
})

Error in m => null: Cannot convert lambda expression to type string because it is not a delegate type

Please help


问:
Merging multiple CSV files using unique ID with Python
I have a lot of different CSV files from two different locations, and I need to merge them using a unique id and another header name then write the data into another CSV file. Only the unique Id and each of the file headers.

So I have two files in different locations like that with a lot of different headers however I need only the name header to be written into another csv file.

unique id
name

1
a

2
b

At the end I want to get this:

```<code>| unique id| Name from file one || Name from file two |
| -------- | ------------------ ||--------------------|
| 1        | a                  || a                  |
| 2        | b                  || b                  |
</code>```

I need to merge these field into another CSV file with unique id.

Body:
I have a lot of different CSV files from two different locations, and I need to merge them using a unique id and another header name then write the data into another CSV file. Only the unique Id and each of the file headers.

So I have two files in different locations like that with a lot of different headers however I need only the name header to be written into another csv file.

unique id
name

1
a

2
b

At the end I want to get this:

| unique id| Name from file one || Name from file two |
| -------- | ------------------ ||--------------------|
| 1        | a                  || a                  |
| 2        | b                  || b                  |

I need to merge these field into another CSV file with unique id.


问:
smile detection when running the code of NN
I have an error when I launch the training of the model indicating the existence of more than one element is ambiguous

I try to detect the smile of faces from RGB images by CNN using python and KERAS

```<code>from google.colab import drive
drive.mount('/content/drive')

rom imutils import paths
import cv2
from tensorflow.keras.utils import img_to_array
data = []
labels = []

imagePaths = list(paths.list_images("/content/drive/MyDrive/dataset/SMILEs"))

for imagePath in sorted(list(paths.list_images("/content/drive/MyDrive/dataset/SMILEs"))):
 # load the image, pre-process it, and store it in the data list
  image = cv2.imread(imagePath)
  image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
  image = imutils.resize(image, width=28)
  image = img_to_array(image)
  data.append(image)
# extract the class label from the image path and update the labels list
  label = imagePath.split(os.path.sep)[-3]
  label = "smiling" if label == "positives" else "not_smiling"
  labels.append(label)

data = np.array(data, dtype="float") / 255.0
labels = np.array(labels)

le = LabelEncoder().fit(labels)
labels = np_utils.to_categorical(le.transform(labels), 2)

classTotals = labels.sum(axis=0)
classWeight = classTotals.max() / classTotals

(trainX, testX, trainY, testY) = train_test_split(data,labels, test_size=0.20, stratify=labels, random_state=42)

class LeNet:
  def build(width, height, depth, classes):
    model = Sequential()
    inputShape = (height, width, depth)
    #if K.image_data_format() == "channels_first":
        #inputShape = (depth, height, width)

  # premiere couche de CONV==>RELU==>POOL:
    model.add(Conv2D(20, (5, 5), padding="same",input_shape=inputShape))
    model.add(Activation("relu"))
    model.add(MaxPooling2D(pool_size=(2, 2), strides=(2, 2)))

  # Deuxieme couche CONV==>RELU==>POOL:
    model.add(Conv2D(50, (5, 5), padding="same"))
    model.add(Activation("relu"))
    model.add(MaxPooling2D(pool_size=(2, 2), strides=(2, 2)))

# La couche fully connected et d'applatissement:
    model.add(Flatten())
    model.add(Dense(500))
    model.add(Activation("relu"))

    model.add(Dense(classes))
    model.add(Activation("softmax"))
    return model

model = LeNet.build(28, 28, 1,2)

from tensorflow import keras
print("[INFO] compiling model...")
model.compile(loss="categorical_crossentropy",optimizer="adam",metrics=['accuracy'])

print("[INFO] training network...")
H = model.fit(trainX, trainY, validation_data=(testX, testY),class_weight=classWeight, batch_size=64, epochs=15, verbose=1)
</code>```

and here is the error displayed
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

Body:
I have an error when I launch the training of the model indicating the existence of more than one element is ambiguous

I try to detect the smile of faces from RGB images by CNN using python and KERAS

from google.colab import drive
drive.mount('/content/drive')

rom imutils import paths
import cv2
from tensorflow.keras.utils import img_to_array
data = []
labels = []

imagePaths = list(paths.list_images("/content/drive/MyDrive/dataset/SMILEs"))

for imagePath in sorted(list(paths.list_images("/content/drive/MyDrive/dataset/SMILEs"))):
 # load the image, pre-process it, and store it in the data list
  image = cv2.imread(imagePath)
  image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
  image = imutils.resize(image, width=28)
  image = img_to_array(image)
  data.append(image)
# extract the class label from the image path and update the labels list
  label = imagePath.split(os.path.sep)[-3]
  label = "smiling" if label == "positives" else "not_smiling"
  labels.append(label)

data = np.array(data, dtype="float") / 255.0
labels = np.array(labels)

le = LabelEncoder().fit(labels)
labels = np_utils.to_categorical(le.transform(labels), 2)

classTotals = labels.sum(axis=0)
classWeight = classTotals.max() / classTotals

(trainX, testX, trainY, testY) = train_test_split(data,labels, test_size=0.20, stratify=labels, random_state=42)

class LeNet:
  def build(width, height, depth, classes):
    model = Sequential()
    inputShape = (height, width, depth)
    #if K.image_data_format() == "channels_first":
        #inputShape = (depth, height, width)

  # premiere couche de CONV==>RELU==>POOL:
    model.add(Conv2D(20, (5, 5), padding="same",input_shape=inputShape))
    model.add(Activation("relu"))
    model.add(MaxPooling2D(pool_size=(2, 2), strides=(2, 2)))

  # Deuxieme couche CONV==>RELU==>POOL:
    model.add(Conv2D(50, (5, 5), padding="same"))
    model.add(Activation("relu"))
    model.add(MaxPooling2D(pool_size=(2, 2), strides=(2, 2)))

# La couche fully connected et d'applatissement:
    model.add(Flatten())
    model.add(Dense(500))
    model.add(Activation("relu"))

    model.add(Dense(classes))
    model.add(Activation("softmax"))
    return model

model = LeNet.build(28, 28, 1,2)

from tensorflow import keras
print("[INFO] compiling model...")
model.compile(loss="categorical_crossentropy",optimizer="adam",metrics=['accuracy'])

print("[INFO] training network...")
H = model.fit(trainX, trainY, validation_data=(testX, testY),class_weight=classWeight, batch_size=64, epochs=15, verbose=1)

and here is the error displayed
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()


问:
WAL Disk Space is grown very large during the Alter Column Statement CDC Debezium Connector
We are running a PostGres CDC Debezium Connector and we were running an alter statement in multiple Tables which caused the WAL Disk Space to grow huge.This made the connector not able to communicate to the DB and we need to manually delete the replication slot lag to recover and reprocessing the lost messages was tedious. We already have heartbeat.interval.ms=6000 enabled in our Connector Config.I would like to know if adding "heartbeat.action.query" will help to keep the replicationSlotLag in such cases?</p>


问:
ttkbootstrap - Not able to add button inside a tableview module
I have created a table in ttkbootstrap using tableview module but I also want to add a button in each row so that user can click on that button to edit the data in that row. But there seems to be no way to add a button inside a table.

Anyone know any workaround to add a button in row?


问:
Microsoft Solver Foundation - Register a constraint as string on a root model referencing a submodel variable
i have this code to solve a simple problem with Msf

```<code>var solver = SolverContext.GetContext();
var model = solver.CreateModel();
//define two simple variables
var decisionX = new Decision(Domain.Set(0,1,2,3,4,8), "X" );
var decisionY = new Decision(Domain.IntegerRange(10,15), "Y" );
//Add decisions to model
model.AddDecision(decisionZ);
model.AddDecision(decisionZ1);
//add an example of Implies condition
model.AddConstraint("constraint2", "Implies[X == 2, Y != 13]");

//now create a simple submodel with simple decision
Model submodel = model.CreateSubModel("submodel");
var subDecision = new Decision(Domain.IntegerRange(20, 22), "Z");
submodel.AddDecision(subDecision);

//Create an instance of the model
var subInstance = submodel.CreateInstance("submodel1");
//now add constrain to rootmodel referencing a variable in child model
//THIS WORKS CORRECTLY
model.AddConstraint("constraint3", subInstance[subDecision] != 21);
//THESE BELOW raise parser exceptions
//model.AddConstraint("constraint3", "submodel1[Z] != 21");
//model.AddConstraint("constraint3", "submodel1.Z != 21");
</code>```

How can i use string to suggest constraint in submodel instances?

Body:
i have this code to solve a simple problem with Msf

var solver = SolverContext.GetContext();
var model = solver.CreateModel();
//define two simple variables
var decisionX = new Decision(Domain.Set(0,1,2,3,4,8), "X" );
var decisionY = new Decision(Domain.IntegerRange(10,15), "Y" );
//Add decisions to model
model.AddDecision(decisionZ);
model.AddDecision(decisionZ1);
//add an example of Implies condition
model.AddConstraint("constraint2", "Implies[X == 2, Y != 13]");

//now create a simple submodel with simple decision
Model submodel = model.CreateSubModel("submodel");
var subDecision = new Decision(Domain.IntegerRange(20, 22), "Z");
submodel.AddDecision(subDecision);

//Create an instance of the model
var subInstance = submodel.CreateInstance("submodel1");
//now add constrain to rootmodel referencing a variable in child model
//THIS WORKS CORRECTLY
model.AddConstraint("constraint3", subInstance[subDecision] != 21);
//THESE BELOW raise parser exceptions
//model.AddConstraint("constraint3", "submodel1[Z] != 21");
//model.AddConstraint("constraint3", "submodel1.Z != 21");

How can i use string to suggest constraint in submodel instances?


问:
DateTime.Now Giving UTC on Linux AWS EC2-Instance
I am using Dot Net Core 3 and inside my code using this to get the current Date

```<code>DateTime.Now
</code>```

Trying out with this logs

```<code>Console.WriteLine("----- Local Time : " + DateTime.Now + "UTC : " + DateTime.UtcNow);
Giving OutPut Like : ----- Local Time : 01/12/2023 11:27:49 UTC : 01/12/2023 11:27:49
</code>```

But, when i am checking my logs it's prining the UTC time now the Local Time.
Below i have attached the screen showing time on my server . This output i have received using

```<code>timedatectl
</code>```

Anyone knows what's going here ?

Body:
I am using Dot Net Core 3 and inside my code using this to get the current Date

DateTime.Now

Trying out with this logs

Console.WriteLine("----- Local Time : " + DateTime.Now + "UTC : " + DateTime.UtcNow);
Giving OutPut Like : ----- Local Time : 01/12/2023 11:27:49 UTC : 01/12/2023 11:27:49

But, when i am checking my logs it's prining the UTC time now the Local Time.
Below i have attached the screen showing time on my server . This output i have received using

timedatectl

Anyone knows what's going here ?


问:
torch.einsum to matmul conversion
I have the following line:

```<code>torch.einsum("bfts,bhfs->bhts", decay_kernel, decay_q)
</code>```

I have a codebase where I need to convert these einsums to primitive methods like reshape, matmul, multiplication, sum, and so on. Is it even possible? I had bunch of other einsums that I could convert them just fine but I can't seem to understand what's going on in this case. Does anyone have a clue? Thanks in advance.

Title: torch.einsum to matmul conversion

Body:
I have the following line:

torch.einsum("bfts,bhfs->bhts", decay_kernel, decay_q)

I have a codebase where I need to convert these einsums to primitive methods like reshape, matmul, multiplication, sum, and so on. Is it even possible? I had bunch of other einsums that I could convert them just fine but I can't seem to understand what's going on in this case. Does anyone have a clue? Thanks in advance.


问:
after using an Embedding layer in Keras why do I get: Input to reshape is a tensor with 2 values, but the requested shape has 4 [Op:Reshape]
So I created below sample polars data frame. I want to use Keras's normalisation and Embedding layers to preprocess my data. sum_cost and sum_gmv are my numerical columns and I normalize each individual column by using normalization layer.category is my categorical column and I want to use embedding layer to get embedding vectors for each category.

```<code>import polars as pl
import tensorflow as tf

df = pl.DataFrame(
    {'sum_cost':[1.,4.,7.,3.,2.],
     'category':[311,210,450,311,567],
     'sum_gmv':[-4.,-2.,0.,2.,4.],
    }
)

numeric_col = ['sum_cost','sum_gmv']
categorical_col = ['category']

all_inputs = []

inputs = {}
for col in numeric_col + categorical_col:

    if col in numeric_col:
        inputs[col] = tf.keras.Input(shape=(), name=col,dtype=tf.float32)
        normalizer = tf.keras.layers.Normalization(axis=None)
        normalizer.adapt(df[col].to_numpy())
        all_inputs.append(normalizer(inputs[col])[:,tf.newaxis])

    elif col in categorical_col:
        inputs[col] = tf.keras.Input(shape=(), name=col,dtype=tf.int32)
        embedding = tf.keras.layers.Embedding(
            567 + 1,
            output_dim=2,
            name='cat_embedding')(inputs[col])
        em_model = tf.keras.layers.Reshape((2,))(embedding)

        all_inputs.append(em_model)

outputs = tf.keras.layers.Concatenate(axis=1)(all_inputs)

model=tf.keras.Model([inputs[col] for col in numeric_col+categorical_col],outputs)
</code>```

When I want to test my preprocessing model by using a single data point model(dict(df.to_pandas().iloc[1,:])) I receive the following error.

on the other hand when I pass this input:

```<code>model({'sum_cost':1.,'sum_gmv':1,'category':np.array([[1.]])})
</code>```

it works well. I dont understand why i should provide an array for category but scalar for numerical columns. In the original dataset they are all scalar. Also I dont deifne a shape for my Input tensors. Why does this happening and how can I solve it?

Thanks!

Body:
So I created below sample polars data frame. I want to use Keras's normalisation and Embedding layers to preprocess my data. sum_cost and sum_gmv are my numerical columns and I normalize each individual column by using normalization layer.category is my categorical column and I want to use embedding layer to get embedding vectors for each category.

import polars as pl
import tensorflow as tf

df = pl.DataFrame(
    {'sum_cost':[1.,4.,7.,3.,2.],
     'category':[311,210,450,311,567],
     'sum_gmv':[-4.,-2.,0.,2.,4.],
    }
)

numeric_col = ['sum_cost','sum_gmv']
categorical_col = ['category']

all_inputs = []

inputs = {}
for col in numeric_col + categorical_col:

    if col in numeric_col:
        inputs[col] = tf.keras.Input(shape=(), name=col,dtype=tf.float32)
        normalizer = tf.keras.layers.Normalization(axis=None)
        normalizer.adapt(df[col].to_numpy())
        all_inputs.append(normalizer(inputs[col])[:,tf.newaxis])

    elif col in categorical_col:
        inputs[col] = tf.keras.Input(shape=(), name=col,dtype=tf.int32)
        embedding = tf.keras.layers.Embedding(
            567 + 1,
            output_dim=2,
            name='cat_embedding')(inputs[col])
        em_model = tf.keras.layers.Reshape((2,))(embedding)

        all_inputs.append(em_model)

outputs = tf.keras.layers.Concatenate(axis=1)(all_inputs)

model=tf.keras.Model([inputs[col] for col in numeric_col+categorical_col],outputs)

When I want to test my preprocessing model by using a single data point model(dict(df.to_pandas().iloc[1,:])) I receive the following error.

on the other hand when I pass this input:

model({'sum_cost':1.,'sum_gmv':1,'category':np.array([[1.]])})

it works well. I dont understand why i should provide an array for category but scalar for numerical columns. In the original dataset they are all scalar. Also I dont deifne a shape for my Input tensors. Why does this happening and how can I solve it?

Thanks!


问:
Godot 4(and3) collision issue,created collision from sprite, character gets stuck on certain slopes
What settings to change so godot collision behaves like in Construct Classic?

In construct classic, I selected "new template" > "simple platformer" ; added a new sprite, imported the texture(bitmap7.png); ticked "solid" for the texture in groups > "attributes"; and it just works, the character moves smoothly on the slopes.

In godot I added a sprite node(to StaticBody2D), loaded the texture and created CollisionPolygon2d sibbling with simplification 0.2; shrink 0, growth 0.
Character(capsule collision shape) gets stuck on slopes.I tried to change certain settings but I could not make it work like in Construct Classic.

character collision shape and slope

here is a short video with construct classic and godot: https://www.dropbox.com/s/7lxkqi0v7b7t4p1/Godot_v4.0-beta10_win64_oiKl2mtt1Y.mp4?dl=0

godot project with the texture(bitmap7.png): https://www.dropbox.com/s/v6vad0bt0124jmm/tt.zip?dl=0

(certain settings as= Increase/lower:Snap Length, Safe Margin, physics tics per second)
Rayshape2d with certain settings works like Construct classic, but I want a 'normal shape' and with rayshape2d when I jump and land it looks like it goes 1-2 pixels into the ground and snaps back and its visible.


问:
FastAPI: Transfering large files (200MB images) fast
Looking to transfer a large (200MB) TIFF image to FastAPI backend, the normal fileupload takes 5sec to do it.

What are good practices on having a fast transfer of large files??

Used this approach to have a quicker way, but seems to be only working for smaller files (tested with 1.5 MB TIFF). With the small file I already went from 200 ms to 100ms:

Server side:

@app.post('/upload_tiff_V2')
async def upload_tiff_V2(request: Request):
    start = time.time()
    body = b''
    try:
        filename = request.headers['filename']
        async with aiofiles.open(filename, 'wb') as f:
            async for chunk in request.stream():
                await f.write(chunk)
                body += chunk

        arr = np.frombuffer(body, dtype=np.uint8)
        img = cv2.imdecode(arr, cv2.IMREAD_COLOR)

        arr = add_text(img, "AVERNA")

        success, im = cv2.imencode('.tif', arr)
        headers = {'Content-Disposition': 'inline; filename="test.tif"'}
        # record end time
        end = time.time()
        print("The time of execution of the TIFF program is :",
        (end-start) * 10**3, "ms")
    except Exception:
        return {"message": "There was an error uploading the file"}
    return Response(im.tobytes(), headers=headers, media_type='image/tif')

```
<p>Client Side:</p>
```#############################################
## UPLOAD BIG FILE TIFF
#############################################
with open("big_image.tif", "rb") as f:
    data = f.read()

url = 'http://192.168.199.130:2123/upload_tiff_V2'
headers = {'filename': 'big_image.tif'}

# record start time
start = time.time()

resp = requests.post(url=url, data=data, headers=headers)

# record end time
end = time.time()

print("The time of execution of upload BIG (200Mb) TIFF image program is :",
      (end-start) * 10**3, "ms")
```

Body:
Looking to transfer a large (200MB) TIFF image to FastAPI backend, the normal fileupload takes 5sec to do it.

What are good practices on having a fast transfer of large files??

Used this approach to have a quicker way, but seems to be only working for smaller files (tested with 1.5 MB TIFF). With the small file I already went from 200 ms to 100ms:

Server side:

@app.post('/upload_tiff_V2')
async def upload_tiff_V2(request: Request):
    start = time.time()
    body = b''
    try:
        filename = request.headers['filename']
        async with aiofiles.open(filename, 'wb') as f:
            async for chunk in request.stream():
                await f.write(chunk)
                body += chunk

        arr = np.frombuffer(body, dtype=np.uint8)
        img = cv2.imdecode(arr, cv2.IMREAD_COLOR)

        arr = add_text(img, "AVERNA")

        success, im = cv2.imencode('.tif', arr)
        headers = {'Content-Disposition': 'inline; filename="test.tif"'}
        # record end time
        end = time.time()
        print("The time of execution of the TIFF program is :",
        (end-start) * 10**3, "ms")
    except Exception:
        return {"message": "There was an error uploading the file"}
    return Response(im.tobytes(), headers=headers, media_type='image/tif')

Client Side:

#############################################
## UPLOAD BIG FILE TIFF
#############################################
with open("big_image.tif", "rb") as f:
    data = f.read()

url = 'http://192.168.199.130:2123/upload_tiff_V2'
headers = {'filename': 'big_image.tif'}

# record start time
start = time.time()

resp = requests.post(url=url, data=data, headers=headers)

# record end time
end = time.time()

print("The time of execution of upload BIG (200Mb) TIFF image program is :",
      (end-start) * 10**3, "ms")


问:
How to make an application license check based on receiving cookies from the user in Angular
You need to somehow check the cookies received on a successful request to identify the user's license.

Created an interceptor to test and installed the "ngx-cookie-service" package.

But I can't figure out how to write the condition correctly. Prompt knowledgeable people)

import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from "@angular/common/http";
import { Injectable } from "@angular/core";
import { Observable } from "rxjs";

@Injectable()
export class LicenseInterceptor implements HttpInterceptor {
   intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
      return next.handle(req);
   }
}
```

Basically, there are solutions on the network through the JWT Token, but this option is not suitable for me, since it is used for authorization.

In my case, authorization is not required.

Body:
You need to somehow check the cookies received on a successful request to identify the user's license.

Created an interceptor to test and installed the "ngx-cookie-service" package.

But I can't figure out how to write the condition correctly. Prompt knowledgeable people)

import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from "@angular/common/http";
import { Injectable } from "@angular/core";
import { Observable } from "rxjs";

@Injectable()
export class LicenseInterceptor implements HttpInterceptor {
   intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
      return next.handle(req);
   }
}

Basically, there are solutions on the network through the JWT Token, but this option is not suitable for me, since it is used for authorization.

In my case, authorization is not required.


问:
ansi c realtime surface bitmap packing
I am interested in the question of how to pack pixels into a buffer in a certain specified format like RGB 565, RGB 888, BGR 888, RGBA 8888, immediately change the values of one pixel if necessary, and not convert all or part of the buffer?

Would it be good practice to edit a void* bitmap buffer into a specific format using different functions that handle different formats and a single pointer to them?
For example, I have four functions that fill the buffer in RGB888, RGBA8888, BGRA8888 and RGB565 formats, and if I have defined the RGB565 buffer format, I simply set the corresponding function to the pointer responsible for filling the buffer. Or is this bad and I need to look for another approach?

Title: ansi c realtime surface bitmap packing


问:
Django Oscar - Override form - AddToBasketForm
Alright,

To be able to add another field to the "AddToBasketForm" in Django Oscar, I created a fork for the basket app and tried overriding the default "AddToBasketForm".

```<code>#forms.py

import datetime

from django import forms

from oscar.apps.basket.forms import AddToBasketForm as CoreAddToBasketForm  # noqa isort:skip

class AddToBasketForm(CoreAddToBasketForm):
    pass

    def __init__(self, basket, product, *args, **kwargs):
        # Note, the product passed in here isn't necessarily the product being
        # added to the basket. For child products, it is the *parent* product
        # that gets passed to the form. An optional product_id param is passed
        # to indicate the ID of the child product being added to the basket.
        self.basket = basket
        self.parent_product = product

        super().__init__(*args, **kwargs)

        # Dynamically build fields
        if product.is_parent:
        self._create_parent_product_fields(product)
        self._create_product_fields(product)

        # Create an aditional DateField
        self.fields['date'] = forms.DateField(initial=datetime.date.today)
</code>```

Now by overriding the form, I get an error saying:

```<code>TypeError at /catalogue/product_1/

__init__() missing 2 required positional arguments: 'basket' and 'product'
</code>```

So by overrriding the form, I lost the initial form data, basket and product. It feels like this isn't the correct way to modify a form within Django Oscar.

Anyone any ideas?

Best regards,

Kevin

Body:
Alright,

To be able to add another field to the "AddToBasketForm" in Django Oscar, I created a fork for the basket app and tried overriding the default "AddToBasketForm".

#forms.py

import datetime

from django import forms

from oscar.apps.basket.forms import AddToBasketForm as CoreAddToBasketForm  # noqa isort:skip

class AddToBasketForm(CoreAddToBasketForm):
    pass

    def __init__(self, basket, product, *args, **kwargs):
        # Note, the product passed in here isn't necessarily the product being
        # added to the basket. For child products, it is the *parent* product
        # that gets passed to the form. An optional product_id param is passed
        # to indicate the ID of the child product being added to the basket.
        self.basket = basket
        self.parent_product = product

        super().__init__(*args, **kwargs)

        # Dynamically build fields
        if product.is_parent:
        self._create_parent_product_fields(product)
        self._create_product_fields(product)

        # Create an aditional DateField
        self.fields['date'] = forms.DateField(initial=datetime.date.today)

Now by overriding the form, I get an error saying:

TypeError at /catalogue/product_1/

__init__() missing 2 required positional arguments: 'basket' and 'product'

So by overrriding the form, I lost the initial form data, basket and product. It feels like this isn't the correct way to modify a form within Django Oscar.

Anyone any ideas?

Best regards,

Kevin


问:
Parsing a column of old dates (other precision needed)
I have a column in a DataFrame consiting of string of the form '2023-01-12'. Usually, this column can be parsed by

```<code>pd.to_datetime(df['dates'],format='%Y-%m-%d')
</code>```

or even

```<code>pd.to_datetime(df['dates'])
</code>```

However, I have dates in there which are a long time ago, for example '1444-02-20'. This results in a OutOfBoundsDatetime exception. The reason is because pandas tries to parse it with a ns precision. A daily precision would be enough for my purpose. How do I use another precision to make the parsing work?

Body:
I have a column in a DataFrame consiting of string of the form '2023-01-12'. Usually, this column can be parsed by

pd.to_datetime(df['dates'],format='%Y-%m-%d')

or even

pd.to_datetime(df['dates'])

However, I have dates in there which are a long time ago, for example '1444-02-20'. This results in a OutOfBoundsDatetime exception. The reason is because pandas tries to parse it with a ns precision. A daily precision would be enough for my purpose. How do I use another precision to make the parsing work?


问:
Gdbserver: "Port already in use" in Delphi 11 when trying to launch with debugger
I am trying to run an Android app in Delphi 11 with the debugger, but it doesn't work.

When starting with the debugger, the progress dialogue gets stuck at the end. When canceling it, the following message appears:

Unable to start gdbserver on port '64311'. Port already in use

The app is getting launched on the device and runs normally, but without attaching the debugger.

Something to note is that the debugger works on fresh new projects, but not on my existing project. The existing project was originally created in Delphi 10.4.

I have found several threads and posts trying to deal with this issue, but nothing has worked for me. I tried different ports with start parameters, but that just changed the above message to whatever port I used. Restarting the device and PC didn't help, and neither did switching to a different device.

Are there other ways I can try to make it work on my main project?


问:
Apache virtualhost config for Vite urls
I've got a remote development server configured with Virtualmin. My current project is reachable via https://mydomain.tld

In my vite (asset building) config i've added the host directive so the asset links are now generated as https://mydomain.tld:5173/resources/css/app.css

I've allowed incoming traffic to port 5173 but my css file is still unreachable.

I guess I have to update my Apache directives but so far I've been unable to get them right :s

Please advise

Title: Apache virtualhost config for Vite urls