79446187

Date: 2025-02-17 17:37:10
Score: 2
Natty:
Report link
for m in v:
    if v[m]=="":
        v.pop(m)

This Python code checks the dictionary named v and if the name of the key has a value of that is empty, it is removed.

Did you mean dictionaries with two or more empty fields?

count=0
for p in s:
    if s[p]=="":
        count+=1
if count>1:
    del s
count=0
for p in e:
    if e[p]=="":
        count+=1
if count>1:
    del e
count=0
for p in t:
    if t[p]=="":
        count+=1
if count>1:
    del t
count=0
for p in o:
    if o[p]=="":
        count+=1
if count>1:
    del o
#The dictionary o is deleted if it has more than one empty field i.e. more than one key with empty value.
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Hair

79446172

Date: 2025-02-17 17:32:09
Score: 1.5
Natty:
Report link

What about using openxlsx?

out

library(openxlsx)

wb <- createWorkbook() # Save the workbook
addWorksheet(wb, 1)

main_headers <- c("", "", rep("value", 10), rep("share", 10))  # Top row
sub_headers <- c("year", "type", rep(LETTERS[1:10], 2))  # Bottom row

# Write headers
writeData(wb, 1,  matrix(main_headers,ncol=length(main_headers)),
          startCol = 1,
          startRow = 1,
          colNames = FALSE)
writeData(wb, 1, 
          matrix(sub_headers,ncol=length(sub_headers)), 
          startRow = 2, 
          startCol = 1,
          colNames = FALSE)

mergeCells(wb, 1, cols = 3:12, rows = 1)  # Merge "value" columns
mergeCells(wb, 1, cols = 13:22, rows = 1) # Merge "share" columns

writeData(wb, 1, my_table, startRow = 3, colNames = FALSE) # Define headers

saveWorkbook(wb, "Multiheaded_Table.xlsx", overwrite = TRUE) # Save the workbook
Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Starts with a question (0.5): What
  • High reputation (-1):
Posted by: dog

79446156

Date: 2025-02-17 17:27:08
Score: 2.5
Natty:
Report link

I don't see a "-release" or "-optimize-size" flag in your configure command.

build options

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: mzimmers

79446149

Date: 2025-02-17 17:26:08
Score: 0.5
Natty:
Report link

If your HDS encodes boundaries by flagging boundary faces, then it is simple: find the one edge into your vertex with a boundary face, then get the next edge along the face.

If the HDS encodes boundaries by flagging boundary edges (which I'll assume is your case since you check whether a given edge has a twin) then your vertex should have exactly one in-edge with null twin, and one out-edge with null-twin. These are the edges you're looking for.

Reasons:
  • No code block (0.5):
Posted by: max

79446147

Date: 2025-02-17 17:25:07
Score: 2
Natty:
Report link

It is possible to get audio from spotify but in a complex way Heres how i did i firstly i sent a request to spotify with the app and then it got the track then after it got the track i made it search any matching on youtube and if its found it downloads the youtube video and yeah then plays it (its a discord bot)

Reasons:
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Leuartm1 Leuartm1

79446142

Date: 2025-02-17 17:24:07
Score: 3.5
Natty:
Report link

I am using RemoteWebDriver with Chrome, Edge and Firefox with .net.

In past month newly updated chrome and edge 131 and newer - in diffrent areas sterted to throw stalereference errors, without changing code - only browser has been updated. Switching to frame sometimes had to be done more than once to workaround such issues.

Now Firefox has been updated to v 135 and I have 'OpenQA.Selenium.JavaScriptException: Cyclic object value' right after element has been waited and found properly and same - only change was Firefox update....

It fails only on OpenQA.Selenium.Interactions.Actions and only on Firefox.

This is not related to finding element but to Browser update....

Right now only workaround I have came up with (and very ugly) is to override .Perform() function and all methods which are using it to call our Perform() with try{} catch{} block on JavaScriptException exception. It seems to work well even this exception is throwwed.

How to fix it globally? Some Firefox options to change latest Firefox to act as before with Actions?

Reasons:
  • RegEx Blacklisted phrase (1.5): How to fix it globally?
  • Long answer (-1):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: B8U

79446138

Date: 2025-02-17 17:22:07
Score: 2
Natty:
Report link

Instead of intersperse, you could also use intercalate

import Data.List (intercalate)

insertSpace :: String -> String
insertSpace = intercalate " " . map (:[])
Reasons:
  • Probably link only (1):
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Anton Kesy

79446136

Date: 2025-02-17 17:21:06
Score: 3
Natty:
Report link

When I tried "man return" from a Terminal, the reply was: "No manual entry for return", but I use it in BASH functions as a "break" command out of a while loop. I don't use the exit status, but it does work to return from anywhere in the function to the Script program from where I called the function.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Starts with a question (0.5): When I
  • Low reputation (1):
Posted by: RAKircher

79446127

Date: 2025-02-17 17:16:06
Score: 1
Natty:
Report link

I also encountered the same issue while trying to update the Semantic Model for Power BI Embedded SKU A1. Despite the dataset being around 300MB, it consumed 2.7GB of memory and resulted in an error.

Upon investigation, I found a thread where the following explanation was provided:

"When many relationships are defined, it consumes more memory.Additionally, if data refresh and relationship calculations are performed simultaneously, a large amount of data is loaded into memory at the same time, leading to memory exhaustion."

Based on this, I followed these steps, and I was able to successfully perform the update using PowerBI API:

  1. Perform an update using the following endpoint

    POST https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/refreshes { "type": "DataOnly" }

  2. Monitor the  endpoint and wait for the dataset refresh to complete.

    GET https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/refreshes

  3. Perform an update using the following endpoint

    POST https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/refreshes { "type": "Calculate" }

I hope this method works in your environment as well.

Reference:

https://learn.microsoft.com/ja-jp/rest/api/power-bi/datasets/refresh-dataset

https://learn.microsoft.com/ja-jp/rest/api/power-bi/datasets/get-refresh-history

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: minnya

79446125

Date: 2025-02-17 17:16:03
Score: 6.5 🚩
Natty:
Report link

im try to implement skype bot channel by bot framework and stuck in mention part, when i try to add the mention object into entities like the context receive from bot but maybe this just support for ms-team because if i hard code by insert in tag with id skype like 8:live.{something} (not id with 29:{something}), it's work. Nowaday the sdk already upgrade to very different from with the post but hope anyone can help me resolve this problem

Reasons:
  • Blacklisted phrase (1): help me
  • RegEx Blacklisted phrase (3): anyone can help me
  • RegEx Blacklisted phrase (0.5): anyone can help
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Khôi Nguyễn Vũ

79446122

Date: 2025-02-17 17:15:03
Score: 1
Natty:
Report link

To fix this, you need to add the following import to your Program.cs file:

using Microsoft.AspNetCore.SignalR;

This adds the functionality you're trying to use.

Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Self-answer (0.5):
Posted by: Connor

79446118

Date: 2025-02-17 17:14:03
Score: 1.5
Natty:
Report link

It may be due to several factors such as Kernel Launch Overhead, Memory Transfer Bottlenecks, Underutilisation of GPU Cores and Thread Divergence in GPUs. The time taken to run Kernels(functions that run on the GPU) introduces overhead, particularly for smaller workloads. If computational task isn't large enough, launch overhead outweighs the speed benefits. Also, moving data between RAM and VRAM is slow over the PCIe Bus. GPUs really shine when they can work entirely on VRAM without moving data back and forth👍

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Sylvester Bempong

79446117

Date: 2025-02-17 17:10:02
Score: 0.5
Natty:
Report link

For me it worked with using G4 WWDR, and when you create the CSR, DO NOT specify a common name.

I was having the same validation error.

Also this tool helps a lot: https://pkpassvalidator.azurewebsites.net/

It sometimes gives you suggestion for how to fix your issues. For me it was a lifesaver.

Reasons:
  • Whitelisted phrase (-1): it worked
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Condrea David Emanuel

79446114

Date: 2025-02-17 17:08:01
Score: 4.5
Natty: 4.5
Report link

How you defined pull_data_from_hdf5? I am intrested in reading from h5 files

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • Starts with a question (0.5): How you
  • Low reputation (1):
Posted by: Massimiliano Porzio

79446113

Date: 2025-02-17 17:08:00
Score: 4
Natty: 5
Report link

This is not an answer. Should've been a comment

Reasons:
  • Blacklisted phrase (1): not an answer
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: toraman

79446108

Date: 2025-02-17 17:04:59
Score: 2
Natty:
Report link

strong text Boa trade queridos resolvi o problema ao entra no site https://aka.ms/bike-rentals , ao fazer isso fez o download em zip do arquivo onde usei o arquivo local ao invez de URL. problema foi resolvido

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Douglas Arruda Douglas Arruda

79446100

Date: 2025-02-17 17:02:58
Score: 3
Natty:
Report link

Sadly, there does not seem to be a way to flash other libraries with uflash. I would recommend using the official python editor

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: BigGreenHat 14 BGH

79446092

Date: 2025-02-17 16:59:58
Score: 1
Natty:
Report link

8 years later: I was getting an error when generating the XLSX file, but I discovered that it was because I was using "barryvdh/laravel-debugbar," which added a small HTML/JS snippet at the end of every file to assist with development. After removing it or disabling it by setting APP_DEBUG=false, the XLSX file was generated normally. Check if there is any module adding texts that you cannot see.

Reasons:
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Jonas Lima

79446091

Date: 2025-02-17 16:58:57
Score: 3.5
Natty:
Report link

in the end, I decided to go with redux query. That solved it pretty well

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: dahool

79446084

Date: 2025-02-17 16:54:57
Score: 1
Natty:
Report link

com.aefyr.sai.model.filedescriptor.ContentUriFileDescriptor$BadContentProviderException: DISPLAY_NAME column is null at com.aefyr.sai.model.filedescriptor.ContentUriFileDescriptor.name(ContentUriFileDescriptor.java:30) at com.aefyr.sai.model.apksource.DefaultApkSource.getApkLocalPath(DefaultApkSource.java:47) at com.aefyr.sai.model.apksource.FilterApkSource.getApkLocalPath(FilterApkSource.java:60) at com.aefyr.sai.model.apksource.FilterApkSource.nextApk(FilterApkSource.java:28) at com.aefyr.sai.installer2.impl.rootless.RootlessSaiPackageInstaller.install(RootlessSaiPackageInstaller.java:93) at com.aefyr.sai.installer2.impl.rootless.RootlessSaiPackageInstaller.lambda$enqueueSession$0$RootlessSaiPackageInstaller(RootlessSaiPackageInstaller.java:70) at com.aefyr.sai.installer2.impl.rootless.-$$Lambda$RootlessSaiPackageInstaller$ivyAcunEgIkYlu_dB2vN6MOWZPU.run(Unknown Source:6) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:463) at java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) at java.lang.Thread.run(Thread.java:1012)

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: โก๋ ไอ้ซ์

79446078

Date: 2025-02-17 16:52:56
Score: 0.5
Natty:
Report link

gdb itself can be used to extract the AT_EXECFN from a core file using the info command. For example:

$ gdb -batch -core example.corefile -q -ex 'info auxv' 2>/dev/null | sed -n 's/.*AT_EXECFN[^"]*"\(.*\)"/\1/p'

/usr/bin/example
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: NickBroon

79446076

Date: 2025-02-17 16:50:56
Score: 0.5
Natty:
Report link

Not being fluent in C++, I followed a few examples I found and they used auto type. So did I.

auto model = tflite::FlatBufferModel::BuildFromFile(model_path.c_str());

This line is problematic. I assumed auto induced the type from the private variable declaration, but I guess it overrides it and is still accessible from other function calls.

Removing auto and just calling

model = tflite::FlatBufferModel::BuildFromFile(model_path.c_str()); works as expected.

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Maja

79446064

Date: 2025-02-17 16:45:54
Score: 2.5
Natty:
Report link

It looks like your Appwrite endpoint or project ID is either missing or incorrectly configured, which is causing an invalid URL (undefined/account).

Check Your Environment Variables Make sure your .env.local file has the correct Appwrite credentials:

NEXT_PUBLIC_APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1
NEXT_PUBLIC_APPWRITE_PROJECT=your_project_id
NEXT_PUBLIC_APPWRITE_DATABASE_ID=your_database_id
NEXT_PUBLIC_APPWRITE_COLLECTION_ID=your_collection_id

please share the code you write without your credentials so we can help you if it still exists

Reasons:
  • RegEx Blacklisted phrase (2.5): please share the code you
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Amr Mohamed

79446063

Date: 2025-02-17 16:44:54
Score: 3.5
Natty:
Report link

In the end I used dask considering a bigger chunk size and blending results for several overlapping subchunks with the size of interest.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Jean Pablo

79446049

Date: 2025-02-17 16:40:53
Score: 5
Natty: 5
Report link

https://docs.aws.amazon.com/cli/latest/reference/logs/start-live-tail.html Try : --mode=interactive Marvellous

Reasons:
  • Probably link only (1):
  • Low length (2):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Yuls

79446037

Date: 2025-02-17 16:34:51
Score: 1.5
Natty:
Report link

This was a larger problem on my laptop related to Unable to create files from dotnet processes in Mac

I gave dotnet executable full disk access and rebooted, and all the permissions problems are gone.

Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: tonsteri

79446035

Date: 2025-02-17 16:33:50
Score: 4
Natty:
Report link

Here is a script for workaround

https://github.com/klich3/sonoma-workaround-allow-services

Reasons:
  • Probably link only (1):
  • Low length (2):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Anton Sychev

79446033

Date: 2025-02-17 16:32:50
Score: 2
Natty:
Report link

According to multiple research, it seems Bluez is very flimsy with anything other than python-dbus. The same problem I got from using Tmds.dbus on c# was present when using python's dbus-next. Using python-dbus works flawlessly.

If someone is an expert on bluez's internal, I'd be glad to know what makes it less collaborative with other dbus clients. I checked the bluez source code, but couldn't find anything that might cause these problems.

Reasons:
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Kévin Isabelle

79446032

Date: 2025-02-17 16:31:49
Score: 0.5
Natty:
Report link

Storing images in cloud storage (e.g., S3) instead of as BLOBs in a database offers key advantages:

Cloud storage is purpose-built for media, making it a better overall choice.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: MrJgaspa

79446027

Date: 2025-02-17 16:30:49
Score: 0.5
Natty:
Report link

Use Literal + Union

I think, better way is to use simple from typing import Literal

def get_info(name) -> dict[Literal["my_name"] | Literal["first_letter"], str]:
    name_first_letter = name[0]
    return {'my_name': name, 'first_letter': name_first_letter}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: matt91t

79446025

Date: 2025-02-17 16:30:49
Score: 1
Natty:
Report link

I tried approach mentioned in another answer but it was not working for me as I had custom transformation which was creating a huge xml file and it was very time taking. The tool mentioned in that answer was not available as well.

This is the reason I am adding this answer may be still helpful to someone facing similar issue.

There is way to use below metadata query. I tried this on Informatica PowerCenter Informatica 9.X.

SELECT * FROM REP_MAPPING_CONN_PORTS where mapping_name LIKE '%m_MappingName%';
Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • Me too answer (2.5): facing similar issue
Posted by: Chinmay T

79446022

Date: 2025-02-17 16:29:49
Score: 0.5
Natty:
Report link

No guarantee that this works for all cases, but in a Drupal context (Drupal 9/Twig 2) I could successfully compare a variable to -1 in a for loop to differentiate numeric from non-numeric keys:

{% for i, items %}
  {% if i > -1 %}
    ...
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Konstantin

79446019

Date: 2025-02-17 16:28:48
Score: 3
Natty:
Report link

Apologies that this isn't an answer, but I have the same question and didn't want to duplicate. I tried this:

private void toggleFullScreen() {
    GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
    
    dispose();
    setUndecorated(true);
    gd.setFullScreenWindow(this);
    setExtendedState(MAXIMIZED_BOTH);
    setVisible(true);
}

The frame appears for a split second and then disappears. Absolutely no idea what I'm doing wrong.

Commenting out setFullScreenWindow and/or setExtendedState results in the same disappearing frame behaviour, just to clarify.

Reasons:
  • Blacklisted phrase (1): I have the same question
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Me too answer (2.5): I have the same question
  • Low reputation (0.5):
Posted by: Willicious

79446003

Date: 2025-02-17 16:21:47
Score: 2.5
Natty:
Report link

What you sketch as a desired table is the definition of several enums in one table. For what purpose?

I think you'll find the answer to your need in Using a table to provide enum values in MySQL?, i.e. defining enums as tables instead of using the enum type.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): What you
  • Low reputation (0.5):
Posted by: LegacyDev

79445992

Date: 2025-02-17 16:17:47
Score: 1
Natty:
Report link

<dependency>
    <groupId>org.springdoc</groupId>
    <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
    <version>${springdoc-openapi-starter-webmvc-api.version}</version>
 </dependency>

add this dep to your pom

it already exist a similar name webmvc-api add this

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Mouhamadou M Diop

79445974

Date: 2025-02-17 16:11:45
Score: 1
Natty:
Report link

I've already had the same problem with an O2Switch server. Here's how to solve your problem.

In your crontab, you need to specify the full path of PHP as well as the absolute path of your project.

* * * * * /usr/local/bin/php /home/NAME/link_to_project/artisan schedule:run >> /dev/null 2>&1

This will allow the cron job to run normally.

Reasons:
  • Blacklisted phrase (1): how to solve
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: FS-GSW

79445969

Date: 2025-02-17 16:10:44
Score: 1
Natty:
Report link

If I understand correctly, something like this loop for constructing formulae by permuting a list of variables into a response variable and predictor equations might be helpful to you:

all_variables <- c("x1", "x2", "x3", "x4", "x5")
for (i in 1:length(all_variables)){
  combo <- all_variables[-i]
  formula <- as.formula(paste(all_variables[i], "~", paste(combo, collapse = " + ")))
  #
  # use "formula" here
  # e.g.
  # print(formula)
  #
}

Hope this helps. Best regards,

Reasons:
  • Blacklisted phrase (0.5): Best regards
  • Blacklisted phrase (1): regards
  • Whitelisted phrase (-1): Hope this helps
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: patternizer

79445965

Date: 2025-02-17 16:08:44
Score: 3
Natty:
Report link

I had the same issue, fixed adding 'use client' to the top of the file.

Reasons:
  • Whitelisted phrase (-1): I had the same
  • Low length (1.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: tarsis

79445948

Date: 2025-02-17 16:04:42
Score: 1
Natty:
Report link

I can't comment, so I'm answering. I had the same problem.

I simplified the project to one basic entity. I tried both the TsMorphMetadataProvider and the ReflectMetadataProvider.

My tsconfig has:

  "compilerOptions": {
    "module": "NodeNext",
    "moduleResolution": "NodeNext",
    "target": "ES2022",
  },

The error comes from: node_modules@nestjs\core\injector\injector.js:72

It only occurs when I define:

entities: ['./dist/**/*.entity.js'],
entitiesTs: ['./src/**/*.entity.ts'],

If I use the following, it will be fine:

entities: [TestEntity],

I'm not sure what is happening in NestJs at that moment though. I narrowed it down to MikroOrm because the exception is for moduleRef.name == 'MikroOrmCoreModule'

The debug log of MikroOrm states: processing 1 files, so it definitly finds the entity file.

I can't use the autoLoadEntities in my case. So I'll add the entities manually, but if someone can narrow down what's happening and how to solve it, that would be welcome.

Reasons:
  • Blacklisted phrase (1): how to solve
  • Whitelisted phrase (-1): I had the same
  • RegEx Blacklisted phrase (1): can't comment
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Tyrghen

79445947

Date: 2025-02-17 16:03:42
Score: 3
Natty:
Report link

I have found a solution!
Thank you all!
Here is my code for any other user, facing the same issue ..
php

add_action('wp_ajax_custom_tnp', 'send_form_notification');
add_action('wp_ajax_nopriv_custom_tnp', 'send_form_notification'); // For non-logged-in users

function send_form_notification() {
    if (isset($_POST['nn']) && isset($_POST['ne'])) { 
        // Sanitize and capture form inputs
        $name = sanitize_text_field($_POST['nn']);
        $email = sanitize_email($_POST['ne']);
        $message = sanitize_textarea_field($_POST['nd']); // Optional

        // Log form data to debug.log for testing
        error_log("Form captured - Name: $name, Email: $email");

        // Email recipient and subject
        $to = get_option('admin_email');
        $subject = 'New Subscription Notification';
        $body = "Name: $name\nEmail: $email\nMessage: $message";

        // Send email notification to admin
        $headers = array('Content-Type: text/plain; charset=UTF-8');
        $mail_result = wp_mail($to, $subject, $body, $headers);

        if ($mail_result) {
            error_log('Mail sent to admin successfully.');
        } else {
            error_log('Failed to send mail to admin.');
        }

        // Check if the Newsletter plugin class exists
        if (class_exists('Newsletter')) {
            $newsletter = Newsletter::instance();

            // Prepare subscriber data
            $nl_user = [];
            $nl_user['email'] = $email;
            $nl_user['name'] = $newsletter->normalize_name($name); // Normalize the name
            $nl_user['status'] = 'C'; // Confirmed subscription
            $nl_user['surname'] = ''; // Add surname field to avoid missing key issues
            $nl_user['sex'] = 'n'; // Add a default value for sex
            $nl_user['language'] = ''; // Optional, add a fallback for language

            // Add user to forced lists
            $lists = $newsletter->get_lists();

            // Log all available lists to check "corp_customers" list ID
            error_log('Available lists: ' . print_r($lists, true));

            $corp_customers_list_id = null;
            foreach ($lists as $list) {
                if ($list->name === 'corp_customers') { // Check for your specific list
                    $corp_customers_list_id = $list->id;
                    $nl_user['list_' . $list->id] = 1; // Add to corp_customers
                }
                if ($list->forced) {
                    $nl_user['list_' . $list->id] = 1; // Add to any forced lists
                }
            }

            // Log the "corp_customers" list ID
            if ($corp_customers_list_id) {
                error_log('corp_customers list ID: ' . $corp_customers_list_id);
            } else {
                error_log('corp_customers list not found.');
            }

            // Save user to Newsletter plugin
            $result = $newsletter->save_user($nl_user);

            // Check the result and handle accordingly
            if (is_wp_error($result)) {
                error_log('Newsletter plugin error: ' . print_r($result, true));
                wp_send_json_error('Failed to save email to newsletter list.');
            } elseif (is_object($result) && isset($result->id)) {
                error_log('Email successfully saved to newsletter list.');
                wp_send_json_success('Form submitted successfully, email saved to newsletter, and notification sent!');
            } else {
                // Log the complete response from the Newsletter plugin to identify the issue
                error_log('Unknown response from Newsletter plugin: ' . print_r($result, true));
                wp_send_json_error('Failed to save email to newsletter list. Unknown error.');
            }
        } else {
            error_log('Newsletter plugin class not available.');
            wp_send_json_error('Newsletter plugin is not active.');
        }
    } else {
        error_log("Form data is missing or not captured properly.");
        wp_send_json_error('Form data is missing.');
    }
}

js
<script>
document.addEventListener('DOMContentLoaded', function() {
    const form = document.querySelector('.tnp-subscription form');

    form.addEventListener('submit', async function(event) {
        event.preventDefault(); // Prevent default form submission

        const formData = new FormData(form);

        try {
            // Send the form data using Fetch API
            let response = await fetch(form.action, {
                method: 'POST',
                body: formData
            });

            let result = await response.json();

            if (result.success) {
                alert('Form submitted successfully!');
                form.reset(); // Clear form fields after successful submission
            } else {
                console.error('Error: ' + result.data);
                alert('Error: ' + result.data);
            }
        } catch (error) {
            console.error('Error:', error);
            alert('There was an error submitting the form: ' + error.message);
        }
    });
});

</script>

html

<div class="tnp tnp-subscription"> 
    <form method="post" action="https://mylaundryroom.gr/wp-admin/admin-ajax.php?action=custom_tnp">
        <input type="hidden" name="nlang" value="">
        
        <div class="tnp-field tnp-field-firstname">
            <input class="tnp-name" type="text" name="nn" id="tnp-1" placeholder="Ονοματεπώνυμο" required>
        </div>
        
        <div class="tnp-field tnp-field-email">
            <input class="tnp-email" type="email" name="ne" id="tnp-2" placeholder="Email" required>
        </div>
        
        <div class="tnp-field tnp-field-text">
            <textarea class="tnp-text" name="nd" id="tnp-4" placeholder="Αφήστε το μήνυμα σας" required></textarea>
        </div>
        
        <div class="tnp-field tnp-field-button">
            <input class="tnp-submit" type="submit" value="Αποστολή">
        </div>
    </form>
</div>
Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Long answer (-1):
  • Has code block (-0.5):
  • Me too answer (2.5): facing the same issue
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Paris Leasetech

79445927

Date: 2025-02-17 15:55:40
Score: 2.5
Natty:
Report link

TaskManager.defineTask needs to be called in the global scope not within a function.

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
Posted by: rjdevereux

79445922

Date: 2025-02-17 15:54:40
Score: 1
Natty:
Report link

You'll probably want to have more of a delay. The API rate-limits you, as you know. The list of rate-limits can be found here.

From what I could find, it appears that Tweepy gives you Basic Access. So, no more than 15 requests per 15 minutes. Unless I'm wrong about that, your sleep time should be at least 60 seconds (I would add in a few more seconds as a buffer though to avoid accidently hitting the limit)

Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Starship

79445921

Date: 2025-02-17 15:53:39
Score: 3
Natty:
Report link

Some things to check:

Do you have the 'redirection' plugin installed? If so, turn it off temporarily by renaming it in the file structure.

If you don't, you will want to check for redirects in your WordPress database.

Reasons:
  • RegEx Blacklisted phrase (2.5): Do you have the
  • Low length (0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • High reputation (-1):
Posted by: Katinka Hesselink

79445909

Date: 2025-02-17 15:50:38
Score: 0.5
Natty:
Report link

try:

queryClient.invalidateQueries({ queryKey: ["userData"] }) so that Vue Query refetches fresh data.

and queryClient.removeQueries({ queryKey: ["userData"] }) to completely clear cached user data.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Hédi Ben Chiboub

79445905

Date: 2025-02-17 15:47:38
Score: 1
Natty:
Report link

My issue ended up being simple - I had misspelled the email address domain I was attempted to do a test send from! 🤦

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • High reputation (-1):
Posted by: Adam Nofsinger

79445904

Date: 2025-02-17 15:47:38
Score: 3.5
Natty:
Report link

That is because the assets need to be at the /public directory

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: avi

79445884

Date: 2025-02-17 15:38:35
Score: 4.5
Natty:
Report link

we are also looking into it at Sentry

https://github.com/getsentry/sentry-javascript/issues/15389

Reasons:
  • Probably link only (1):
  • Low length (2):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Steven Eubank

79445878

Date: 2025-02-17 15:37:35
Score: 2
Natty:
Report link

I inadvertently found a way to trick it that seems to work perfectly. I was cutting and pasting the "did you mean suggestion to see if it worked and accidently pasted in the "?.com? at the end. Entering "https://siteURL:9999?.com?" strangely allows the site to be saved and it it is correctly shown as "https://siteURL:9999" in the list. I think Google is assuming the ? mark is part of an unnecessary HttpGET string and truncates it leaving you with the correct URL.

Reasons:
  • Whitelisted phrase (-1): it worked
  • No code block (0.5):
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Leman

79445871

Date: 2025-02-17 15:34:34
Score: 1
Natty:
Report link

Not a specific answer, but I can't comment and thought this may be helpful enough to share.

I struggled with this exact issue for a week before finally figuring out that the file I wanted to apply inverse.transform to MUST match the original 'scaled' file regarding the number of columns. In your case above, (26768,29) (31,) (26768,29) is telling you that they aren't the same. In this case, it looks like one file is 29 columns wide while the other is '' wide. Fix that (I dropped a column that had been added between the two events) and you should be good to go.

Reasons:
  • Whitelisted phrase (-1): In your case
  • RegEx Blacklisted phrase (1): can't comment
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Richard C

79445868

Date: 2025-02-17 15:33:34
Score: 0.5
Natty:
Report link

There is no official support for Face Liveness in Flutter right now. We recently needed that feature for one of our projects, so we ended up developing it in-house (it was a bit painful). While we haven't implemented unit tests yet, we've thoroughly tested it and tried to be as detailed as possible on how to integrate it into your Flutter app. Hope it helps! If you have any feedback, we'd love to hear it. https://github.com/Webeleven/amplify-ui-flutter-liveness

Reasons:
  • Whitelisted phrase (-1): Hope it helps
  • No code block (0.5):
  • Low reputation (1):
Posted by: André Teves

79445867

Date: 2025-02-17 15:33:34
Score: 2
Natty:
Report link

In cloud shell you can run:

bq show --schema --format=prettyjson project:db.tbl
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: user27201039

79445862

Date: 2025-02-17 15:31:33
Score: 1
Natty:
Report link

There are other dependencies that React uses outside of browser compatibilities.
Some features that are part of the core features of React such as JSX utilize Babel.

React components are essentially JSX components.

Because the browser doesn't understand handling this directly (browsers do quite a bit these days), React makes use of Babel to compile the JSX into the Javascript and HTML that the browser can understand.

This of course isn't the only reason, but is a critical example of why Babel is necessary.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Nick

79445860

Date: 2025-02-17 15:30:32
Score: 5.5
Natty:
Report link

Я предполагаю, что нужно было создать одну viewModel и прокидывать зависимости и данные которые были нужны через koin module

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • No latin characters (2):
  • Low reputation (1):
Posted by: nezzuko

79445855

Date: 2025-02-17 15:28:32
Score: 3.5
Natty:
Report link

I found the problem:

Application properties

the bitness of the application is forced to 32bit even if the AnyCPU model is applied if this checkbox is checked (it translate to Perfer 32bit)

Reasons:
  • Probably link only (1):
  • Low length (1):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: weirdgyn

79445853

Date: 2025-02-17 15:27:32
Score: 1
Natty:
Report link

You must allow arbitrary loads over HTTP/HTTPS, enabling YouTube video playback.

  1. Open (or create) Info.plist file
  2. Add NSAppTransportSecurity key of type Dictionary (sets automatically)
  3. Add NSAllowsArbitraryLoads of type Boolean (it sets to String by default, be sure to check!) and its value to YES

Info.plist

Now it should work

YouTube video

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Kiryl Famin

79445843

Date: 2025-02-17 15:23:31
Score: 2.5
Natty:
Report link

Please follow the below steps:

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: U Singh

79445842

Date: 2025-02-17 15:23:30
Score: 5.5
Natty: 4
Report link

what changes i can do to my httaccess file, if im using the httpd server. My application is vite+React and getting the same error :)

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Me too answer (2.5): getting the same error
  • Starts with a question (0.5): what
  • Low reputation (1):
Posted by: Ranjith M

79445838

Date: 2025-02-17 15:21:29
Score: 2
Natty:
Report link

The first question is how your site copied were created? If it was made by some kind of a plugin, then it seems like it doesn't link pattern properly.

If you copied sites manually, you must not forget about copying patterns as well and setting appropriate pattern IDs after that. Example of doing it programmatically you can find in this tutorial: https://rudrastyh.com/wordpress-multisite/sync-patterns-and-template-parts-across-sites.html

Maybe it can also be resolved the simple way:

  1. Go to the all patterns page on your child site and check – do you have patterns copied correctly there?
  2. If yes, just hover over the pattern edit URL and find out its new ID.
  3. Do appropriate replacements in post content.

If there are not patterns copied to the child site, check the guide I provided the link above.

Reasons:
  • Blacklisted phrase (1): this tutorial
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: Misha Rudrastyh

79445834

Date: 2025-02-17 15:20:29
Score: 3
Natty:
Report link

In my case I had no option to add Content-Type header, so I found another solution. It was to implement MessageBodyReader

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Ann Z

79445824

Date: 2025-02-17 15:16:28
Score: 2.5
Natty:
Report link

As for 2025, you have to use G4 WWDR, and when you create the CSR, DO NOT specify a common name.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Condrea David Emanuel

79445823

Date: 2025-02-17 15:16:28
Score: 0.5
Natty:
Report link

Try core.ignorecase = false

I've run into this several times with Tomcat. I think one of the setup tools/scripts seems to change between Tomcat9.exe and tomcat9.exe.

Effects of core.ignorecase in tortoisegit

Reasons:
  • Probably link only (1):
  • Low length (1):
  • Has code block (-0.5):
  • High reputation (-1):
Posted by: StackzOfZtuff

79445819

Date: 2025-02-17 15:14:27
Score: 1.5
Natty:
Report link
.img-container {
height: 100%;
aspect-ratio: 16 / 9;
background: url("/example.jpg") center center / cover no-repeat;
}

works with pixel values in the height too.

Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Parviz Azimov

79445809

Date: 2025-02-17 15:10:27
Score: 1
Natty:
Report link

My problem was I was trying to download from the URL I mentioned but to get the desired response I had to add "raw" to the beginning of the url. For example: "https://raw.github.build.company.com..." Additionally I ran into another problem when I figured out that the exe file was being managed by lfs on my github repo. When making an api request for a file managed by lfs it returns a few details including the file size and sha256 not the desired file's contents. To resolve this I followed this guide https://gist.github.com/fkraeutli/66fa741d9a8c2a6a238a01d17ed0edc5.

Reasons:
  • Blacklisted phrase (1): this guide
  • Whitelisted phrase (-2): I figured out
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Mariano Gongora

79445798

Date: 2025-02-17 15:06:26
Score: 3
Natty:
Report link

Setting Sys.setenv(DB2CODEPAGE=1208) before calling dbConnect, and setting encoding = "UTF-8" (in dbConnect) solved it for me.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Johan S

79445788

Date: 2025-02-17 15:02:25
Score: 2.5
Natty:
Report link

Exception: ModuleNotFoundError: No module named 'databricks.sqlalchemy'

getting this error even tho sqlalchemy is already installed

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Kareena Beniwal

79445784

Date: 2025-02-17 15:01:25
Score: 1.5
Natty:
Report link

Assume Node.js is installed and ReactJS app is created.

If your application folder path is like this in windows eg: D:\workspace\ReactProjects\react-crud>npm start

Then Node.js will compile and open browser automatically with default set port 3000. If not started, you can browser http://localhost:3000/

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: KKA

79445765

Date: 2025-02-17 14:54:23
Score: 1
Natty:
Report link

The first query is a covered index query. The second brings in unindexed material so the engine must also go to the data.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • High reputation (-1):
Posted by: Buzz Moschetti

79445759

Date: 2025-02-17 14:50:22
Score: 1
Natty:
Report link

Found out that the ORM comments before the attribute declaration were messing all up : they're out of date.

So here's what I did :

#[ORM\Column(type:"integer", nullable: true)]
private $capacity;

And now Doctrine finally detects changes.

Basically, Sylius' documentation is out of date regarding the ORM comments. I'll do an issue on the Github so it could be solved.

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Bryan Sacrelab

79445756

Date: 2025-02-17 14:49:22
Score: 3
Natty:
Report link

You need to enable jsonws on portal-ext.properties. This option is no longer a default one since DXP 7.2

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: CasualAnouar

79445751

Date: 2025-02-17 14:46:21
Score: 2.5
Natty:
Report link

I know this post is from a few years ago, but there is a solution here that worked for me

Reasons:
  • Whitelisted phrase (-1): worked for me
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: leftielady

79445748

Date: 2025-02-17 14:46:21
Score: 3
Natty:
Report link

https://cmppartnerprogram.withgoogle.com/#partners

Here's the link I tried to recall previously from google for cookies. I hope this helps!

Reasons:
  • Whitelisted phrase (-1): hope this helps
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Sandra Cheng

79445743

Date: 2025-02-17 14:43:21
Score: 0.5
Natty:
Report link

It turned out that I was missing Asp Net Core Hosting Bundle:

"The .NET Core Hosting bundle is an installer for the .NET Core Runtime and the ASP.NET Core Module. The bundle allows ASP.NET Core apps to run with IIS."

https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/hosting-bundle?view=aspnetcore-9.0

Once I installed that and restarted IIS suddenly everything starts to work!

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • High reputation (-1):
Posted by: vldmrrdjcc

79445739

Date: 2025-02-17 14:41:20
Score: 4
Natty:
Report link

I'm facing the same issues.

As far as i understood this github: https://github.com/microsoft/vscode/issues/89758

This is a known limitation as the input replacement is a different process.

If you put: "processId": "${command:pickRemoteProcess}", behind the pipeTransport it atleast prompts the input but doesn't do the replacment in the command unfortunatly..

I had to hard code it too.

Reasons:
  • No code block (0.5):
  • Me too answer (2.5): I'm facing the same issue
  • Low reputation (1):
Posted by: Jonas Sorgenfrei

79445732

Date: 2025-02-17 14:39:19
Score: 1
Natty:
Report link

Thanks to @ThiagoAlmeida I've had confirmation that this is indeed a bug with Flex Consumption apps in Azure. His comment is below but here is the relevant section from it:

This is a known issue by the product group, the service association link is not being deleted in time and leaves that association still there (/legionservicelink is the Flex Consumption VNet integration association link).

The error only occurs for me when you deploy the Function App using Bicep and attach it to a network separately in the same script. For clarity these are the steps to reproduce the error:

  1. Use Bicep code similar to below where the networking is configured after the Function App is provisioned.
resource appHost 'Microsoft.Web/serverfarms@2021-03-01' = {
  name: hostingPlanName
  location: location
  sku: sku
  kind: 'functionapp'
  properties: {
    reserved: true
  }
}

resource functionApp 'Microsoft.Web/sites@2023-12-01' = {
  name: functionAppName
  location: location 
  kind: 'functionapp,linux'
  identity: {
    type: 'SystemAssigned'
  }
  properties: {
    reserved: true
    enabled: true
    hostNameSslStates: hostNameSslStates
    functionAppConfig: functionAppConfig
    serverFarmId: appHost.id
    siteConfig: siteConfig
  } 
}

resource hostNameBindings 'Microsoft.Web/sites/hostNameBindings@2018-11-01' = {
  parent: functionApp
  name: '${functionAppName}.azurewebsites.net'
  properties: {
    siteName: functionApp_siteName
    hostNameType: 'Verified'
  }
}

resource planNetworkConfig 'Microsoft.Web/sites/networkConfig@2021-01-01' = {
  parent: functionApp
  name: 'virtualNetwork'
  properties: {
    subnetResourceId: subnetId
    swiftSupported: true
  }
}
  1. Deploy the Bicep script once.

  2. Observe that the Function App is created and attached to the network as expected.

  3. Run the Bicep script a second time without changing or deleting the Function App.

  4. Observe a 500 error related to the networking section in the deployment script.

    • The error itself doesn't give you much information about what's happened, but if navigate to the Flex app you will observe that it is no longer connected to the network, this is expected because the Bicep script creates the Function App without the network configuration, which is applied in a secondary step, given this secondary step failed the app has been refreshed without attachment to the network. This is what corrupts the subnet. In refreshing the app the Bicep script hasn't explicitly removed it from the subnet in the same way as it does for Logic Apps and other Function Apps therefore the subnet still maintains a broken link to the app and can't be edited or removed.
    • Try to manually reattach the Function App to the same subnet and observe the actual error:

    Error: Subnet xxxx is in use by /subscriptions/xxxx/resourceGroups/xxxx/providers/Microsoft.Network/virtualNetworks/xxxx/subnets/xxxx/serviceAssociationLinks/legionservicelink

Workaround

There is one workaround that I've found which has overcome this issue for us. Before running the Bicep script add a deployment step that removes the network binding from the app. Like this:

az webapp vnet-integration remove --name $appName --resource-group $resourceGroupName

Because the network binding has been explicitly removed, running the Bicep script no longer corrupts the subnet.

Microsoft have advised they are working on a fix which should be available in the coming weeks.

Observations

If you remove a Flex Consumption app from a subnet manually via the portal, or delete it via the portal, or even via the Azure CLI, the subnet does not become corrupted.

It is also possible that combining the network binding with the module that creates the app itself does not encounter the same error because the app is refreshed along with its network configuration. I haven't tested this scenario because our specific situation requires us to bind the network after the app is created.

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @ThiagoAlmeida
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Crwydryn

79445728

Date: 2025-02-17 14:38:18
Score: 0.5
Natty:
Report link

Another viable solution to get the file-size, that works across many common-lisp implementations on a posix OS, is the package trivial-file-size.

https://github.com/ruricolist/trivial-file-size

(trivial-file-size:file-size-in-octets #P"/path/to/some/file")
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Felix Lechenbauer

79445722

Date: 2025-02-17 14:36:18
Score: 3
Natty:
Report link

I suppose the easiest way would be to have a backend (e.g. PHP) script located inside the authenticated realm that echoes back the credentials to you? Haven't tested... just an idea.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Stein Haugan

79445715

Date: 2025-02-17 14:33:17
Score: 0.5
Natty:
Report link

Finally found how to do it ! As Maneet pointed in their answer, better-sqlite3 wasn't packaged, and thus the required call would fail.

I found here and there mentions to packagerConfig.extraRessource property in forge.config.ts file, which will copy asked files outside the asar archive. However, I needed better-sqlite3 files to be inside the asar archive.

After an astronomic amount of research, I found the answer on this page. I had to adapt it a little, but it works fine. The idea is to use an Electron-forge hook to copy what we want in a temp file, before it gets archived int app.asar. This solution only requires changes on forge.config.ts file :

import type { ForgeConfig } from "@electron-forge/shared-types";
import { MakerSquirrel } from "@electron-forge/maker-squirrel";
import { VitePlugin } from "@electron-forge/plugin-vite";
import { FusesPlugin } from "@electron-forge/plugin-fuses";
import { FuseV1Options, FuseVersion } from "@electron/fuses";
import { resolve, join, dirname } from "path";
import { copy, mkdirs } from "fs-extra";

const config: ForgeConfig = {
    packagerConfig: {
        asar: true
    },
    rebuildConfig: {},
    hooks: {
        // The call to this hook is mandatory for better-sqlite3 to work once the app built
        async packageAfterCopy(_forgeConfig, buildPath) {
            const requiredNativePackages = ["better-sqlite3", "bindings", "file-uri-to-path"];

            // __dirname isn't accessible from here
            const dirnamePath: string = ".";
            const sourceNodeModulesPath = resolve(dirnamePath, "node_modules");
            const destNodeModulesPath = resolve(buildPath, "node_modules");

            // Copy all asked packages in /node_modules directory inside the asar archive
            await Promise.all(
                requiredNativePackages.map(async (packageName) => {
                    const sourcePath = join(sourceNodeModulesPath, packageName);
                    const destPath = join(destNodeModulesPath, packageName);

                    await mkdirs(dirname(destPath));
                    await copy(sourcePath, destPath, {
                        recursive: true,
                        preserveTimestamps: true
                    });
                })
            );
        }
    },
    makers: [new MakerSquirrel({})],
    plugins: [
        new VitePlugin({
            build: [
                {
                    entry: "src/main.ts",
                    config: "vite.config.ts",
                    target: "main"
                },
                {
                    entry: "src/preload.ts",
                    config: "vite.config.ts",
                    target: "preload"
                }
            ],
            renderer: [
                {
                    name: "main_window",
                    config: "vite.config.ts"
                }
            ]
        }),
        new FusesPlugin({
            version: FuseVersion.V1,
            [FuseV1Options.RunAsNode]: false,
            [FuseV1Options.EnableCookieEncryption]: true,
            [FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false,
            [FuseV1Options.EnableNodeCliInspectArguments]: false,
            [FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true,
            [FuseV1Options.OnlyLoadAppFromAsar]: true
        })
    ]
};

export default config;

For each string in requiredNativePackages list, the hook will look for a directory with the same name in node_modules, and copy this in a directory named node_modules inside the temp directory which will be turned into an archive right after. We need bindings and file-uri-to-path packages in top of better-sqlite3 because they're direct dependencies.

Reasons:
  • Blacklisted phrase (0.5): I need
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: HellNoki

79445713

Date: 2025-02-17 14:32:16
Score: 8 🚩
Natty: 5
Report link

apiName = "/auth/token/security/create"; should be "/auth/token/create" according to doc : https://openservice.aliexpress.com/doc/doc.htm?spm=a2o9m.11193531.0.0.48293b53drGoyV#/?docId=1364

I have exactly the same issue with you currently, working with python and their official SDK. Did you figure out your problem? Ali's technical support is useless for me.

Reasons:
  • RegEx Blacklisted phrase (3): Did you figure out your problem
  • Low length (0.5):
  • No code block (0.5):
  • Me too answer (2.5): I have exactly the same issue
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Chris Nam

79445701

Date: 2025-02-17 14:30:15
Score: 1.5
Natty:
Report link

hanks for contributing an answer to Stack Overflow!

Please be sure to answer the question. Provide details and share your research! But avoid …

Asking for help, clarification, or responding to other answers. Making statements based on opinion; back them up with references or personal experience. To learn more, see our tips on writing great answers.

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Inemesit Jacob

79445696

Date: 2025-02-17 14:28:15
Score: 1
Natty:
Report link

In chart.js v4+ do this:

options: {
    scales:{
      x:{
        display:false
      },
      y:{
        display:false
      }
    },
}
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Ahmad Beyranvand

79445685

Date: 2025-02-17 14:25:14
Score: 1
Natty:
Report link

just gave it a className and some some style, no rocket science

color: themify-get('body_fontColor'); // replace with desired color
<AccordionSummary expandIcon={<FontAwesomeIcon icon={faChevronDown} className={styles['expand-more-icon']} />}
>

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: adrien kowalczyk

79445679

Date: 2025-02-17 14:23:13
Score: 1.5
Natty:
Report link
aapt2 dump badging sample.apk | grep native-code

native-code: 'armeabi-v7a' //32-bit

Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Fung

79445676

Date: 2025-02-17 14:22:13
Score: 1.5
Natty:
Report link

I tried write a python formula with VBA as a workaround to bypass this issue, based on the information here https://support.microsoft.com/en-us/office/py-function-31d1c523-fb13-46ab-96a4-d1a90a9e512f With the idea to create/update objects with a small macro then import the objects in python scripts.

But I couldn't, excel raise a 1004 error which is raised when I forgot to use local formating. Not sure it helps but I think the issue lies ahead of the xl() function.

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Shimegi

79445673

Date: 2025-02-17 14:22:13
Score: 2.5
Natty:
Report link

document.getElementById("ImageID").src="image-name-dot-something"; document.getElementById("ImageID").src.reload();

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Has no white space (0.5):
  • Low reputation (0.5):
Posted by: Alain Reve

79445664

Date: 2025-02-17 14:19:11
Score: 4.5
Natty:
Report link

have you installed rust analyzer? it literally tell you what happened and how to solve it, even with a quick fix when hovering on the error

Reasons:
  • Blacklisted phrase (1): how to solve
  • Low length (1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: UsualB2U

79445646

Date: 2025-02-17 14:14:11
Score: 2.5
Natty:
Report link

Try to change locale:

spark.read.format("csv").option("delimiter", ";").option("locale", "de")

By default it is en-US, see more details https://spark.apache.org/docs/3.5.4/sql-data-sources-csv.html#data-source-option

Reasons:
  • Probably link only (1):
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Alex Shirey

79445644

Date: 2025-02-17 14:13:10
Score: 9
Natty: 8
Report link

Fala Renan, eu estou com o mesmo problema. Você conseguiu resolver isso de alguma forma?

Reasons:
  • Blacklisted phrase (3): Você
  • Low length (1.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Christopher William Lee

79445641

Date: 2025-02-17 14:13:10
Score: 1
Natty:
Report link

When you need to get the std::exception form an std::exception_ptr in a debug session on a core dump, changing the code is not an option.

For Windows, I found the following useful:

https://devblogs.microsoft.com/oldnewthing/20200820-00/?p=104097 (Inside the Microsoft STL: The std::exception_ptr) describes the members of std::exception_ptr on windows systems.

For debugging purposes, you can ignore the _Data2 and focus on the _Data1, which is a pointer to an EXCEPTION_RECORD.

https://devblogs.microsoft.com/oldnewthing/20100730-00/?p=13273 (Decoding the parameters of a thrown C++ exception (0xE06D7363)) describes that structure:

Parameter 1 is a pointer to the object being thrown (sort of).

On my dump, Parameter 2 did contain the address of the std::exception. I was able to view the exception in the debugger, read the what()-string and finally find the cause of that crash. :-)

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Starts with a question (0.5): When you
  • Low reputation (0.5):
Posted by: Mario Klebsch

79445639

Date: 2025-02-17 14:12:09
Score: 3
Natty:
Report link

If you are still in search for a Python library to use HermiT and other java reasoners for ontology reasoning (including consistency checking), you can consider owlapy

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Alkid Baci

79445633

Date: 2025-02-17 14:10:08
Score: 2.5
Natty:
Report link

Restarting VSCode worked for me, remember to restart the terminal as well.

Reasons:
  • Whitelisted phrase (-1): worked for me
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: gqxmyls

79445631

Date: 2025-02-17 14:09:08
Score: 0.5
Natty:
Report link

You could use stopinsert.nvim Neovim plugin => https://github.com/csessh/stopinsert.nvim

More complete than using an autocommand:

Reasons:
  • Low length (1):
  • No code block (0.5):
  • High reputation (-1):
Posted by: lcheylus

79445630

Date: 2025-02-17 14:09:08
Score: 1
Natty:
Report link

This may not be the answer anyone is looking for but Just to make sure why the code is not working I would like to inform that running CI3 on PHP>=8 is near impossible. Atleast it Is for me. If you have CI3 project, either downgrade your php version to less than 7 or upgrade your project to CI4. Even still there are a lot of tweaks to be performed on your code for it to work with CI4. But its better than fixing CI3 on php>8.

If anybody can provide a better answer I am willing to withdraw this as the selected answer.

That's all.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: adbury

79445628

Date: 2025-02-17 14:08:07
Score: 4.5
Natty:
Report link

Same issue with Eclipse 2024-09 (4.33.0)

Reasons:
  • RegEx Blacklisted phrase (1): Same issue
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Ertugrul Öztürk

79445625

Date: 2025-02-17 14:08:06
Score: 8.5 🚩
Natty:
Report link

I have a bug, you can help me, please Fatal error: Uncaught Error: Class "Google\Cloud\Vision\V1\ImageAnnotatorClient" not found

Reasons:
  • Blacklisted phrase (1): help me
  • RegEx Blacklisted phrase (3): you can help me
  • RegEx Blacklisted phrase (2): help me, please
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: user29680606

79445624

Date: 2025-02-17 14:06:05
Score: 1.5
Natty:
Report link

Have you tried the controls 'Enter' event?

It fires when ever the control gets focus either by using the Tab key or by using the mouse.

Reasons:
  • Whitelisted phrase (-1): Have you tried
  • Low length (1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: Neil Higgins

79445621

Date: 2025-02-17 14:05:05
Score: 1.5
Natty:
Report link

maybe it has 2 reason :

your version react native is lower 73, because your sdk upper then 23 you must update react native upper 73.3

OR

you install arm-v7 on arm-v8 phone(or inverse... something like that), you must install "universal Apk" that it install any phone

you can low size "universal apk" with Proguard or use this

ndk { abiFilters "armeabi-v7a", "arm64-v8a" /, "x86", "x86_64"/ }

Reasons:
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Samira Gheibipour

79445619

Date: 2025-02-17 14:05:05
Score: 1.5
Natty:
Report link

Note that it's now possible with Oracle 23c, using what's called Schema-level Privileges and the "GRANT SELECT ANY TABLE on SCHEMA" instruction.

See Oracle blog entry "Schema-level privilege grants with Database 23ai"

Example of this instruction in Oracle 23c (or later) could be :

GRANT SELECT ANY TABLE ON SCHEMA HR TO SCOTT;

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: R. Du

79445618

Date: 2025-02-17 14:05:05
Score: 1
Natty:
Report link

I'm dumb and I apologize for wasting your time.

The moment I wrote this I've realized I had been initializing a new modal each time I pressed a button (Next - Back).

        if (res) {
            if(initial){
                t.modal_all_news = t.modal_srv.show(t.modal_template_all_news, {
                    class: "modal-dialog modal-dialog-scrollable modal-lg"
                });
            }
            t.news_modal = res;
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Årtør

79445613

Date: 2025-02-17 14:02:03
Score: 6 🚩
Natty:
Report link

Could you share the training loop and model details as well? Little hard to tell based purely off the data.

Reasons:
  • RegEx Blacklisted phrase (2.5): Could you share
  • Low length (1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Mansi Sakarvadia

79445609

Date: 2025-02-17 14:01:02
Score: 1
Natty:
Report link

Not working beacuse when you are downlaoding the dependency then there will error showing like some security for dependency manager composer require google/apiclient:^2.0 this we will user so after running this the securty error will be showing so because of this the dependency is not downlaod properly so to fix this you will to update your composer.json file present in root directly of the file update

"require": { "google/apiclient": "^2.0", "firebase/php-jwt": "^6.0" }

it will look like this composer.json will look like this

and this run the command composer update after completing that you google login will be working fine

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Kundan Mishra