79073190

Date: 2024-10-10 07:33:08
Score: 1.5
Natty:
Report link

Disclosure: EventBridge PM here.

Yes, you're correct. API destinations today cannot target private endpoints. Please contact us through your support/account team to discuss this request further. A common workaround today is to use a Lambda function as a VPC "proxy".

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

79073182

Date: 2024-10-10 07:30:07
Score: 2
Natty:
Report link

Apart from everything already mentioned, use pypy as a compiler usually makes vanilla python code much faster.

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

79073168

Date: 2024-10-10 07:24:05
Score: 3
Natty:
Report link

The method onActivityPreCreated is added in API level 29 , so im assuming the users who are facing this issue are below API level 29 i.e less than Android 10. Docs : https://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks#onActivityPreCreated(android.app.Activity,%20android.os.Bundle)

Reasons:
  • Probably link only (1):
  • Low length (1):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Sai Dilip

79073165

Date: 2024-10-10 07:23:05
Score: 1
Natty:
Report link

Common Kotlin Code

Define an expected function in your shared module:

expect fun hexColor(hex: String): Color
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Mohammad Faizan

79073151

Date: 2024-10-10 07:17:03
Score: 3.5
Natty:
Report link

In Xcode, right-click on the folder, select Convert to Group from the context menu, and then it can be used normally.

original answer - CocoaPods pod init Fails with “Unknown ISA PBXFileSystemSynchronizedRootGroup” Error on Xcode 16

Reasons:
  • Probably link only (1):
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: vasylchenko.a

79073145

Date: 2024-10-10 07:15:03
Score: 3.5
Natty:
Report link

ALT + F10 is shortcut for hot reload

Reasons:
  • Low length (2):
  • No code block (0.5):
  • Low reputation (1):
Posted by: hetaxi

79073143

Date: 2024-10-10 07:14:03
Score: 3
Natty:
Report link

For my servo, the magic value is 92

Reasons:
  • Low length (2):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: R TheWriter

79073140

Date: 2024-10-10 07:14:03
Score: 3
Natty:
Report link

The code finally compiles!

The partial solution in the comment by @trueequalsfalse uses transmute() to turn the mutable reference to the diesel connection into a ConnectionToSpecificDbType without the necessity of adding a lifetime to ConnectionToSpecificDbType.

The transaction() function in diesel-async uses boxed futures and the async-trait crate to encapsulate the lifetimes of the transaction there.

I combined both approaches to wrap the diesel transaction into a generic transaction.

I also added a mock for the diesel connection at the end, so that the code can be executed without db.

For completeness, the reason I wanted to use generic connection is that I wanted to try out this guide on Hexagonal Architecture, but needed transactions in my Service impl, which were not covered in the guide.

# Cargo.toml

[dependencies]
tokio = { version = "1.0.0", features = ["rt", "rt-multi-thread", "macros"] }
diesel = { version = "2.2.4", features = ["postgres"] }
diesel-async = { version = "0.5.0", features = ["postgres"] }
async-trait = "0.1.83"
scoped-futures = "0.1.3"

All changes to the original code in the question are marked with ***.

#[deny(unsafe_code)] // *** added
use std::future::Future;

use scoped_futures::{ScopedBoxFuture, ScopedFutureExt}; // ** changed

use crate::diesel_async_mock::{AsyncConnection, AsyncPgConnection}; // *** changed to use diesel mock


// Business logic as async functions that can be shared between threads
trait Service: Send + Sync + 'static {
    /// Update value of item if new value is larger than current value.
    /// Example functino that needs multiple repo functions
    fn maximize_item(&self, id: i32, value: i32) -> impl Future<Output=Result<i32, String>> + Send;
}

// Persist the data in e.g. a database
// The repository provides a new connection and expects that repo methods are called with
trait Repository: Send + Sync + 'static {
    type Conn: Connection;

    /// Connect to data storage, or throw error if attempt failed
    fn connect(&self) -> impl Future<Output=Result<Self::Conn, String>> + Send;

    /// Get current value for item, or throw error if item doesn't exist or value is not retrievable
    fn get_item_value(&self, conn: &mut Self::Conn, id: i32) -> impl Future<Output=Result<i32, String>> + Send;

    /// Update value for item, or throw error if item doesn't exist or can't be updated
    fn update_item_value(&self, conn: &mut Self::Conn, id: i32, value: i32) -> impl Future<Output=Result<i32, String>> + Send;
}


// Connection to some data storage
#[async_trait::async_trait] // *** added
trait Connection: AsMut<Self::SpecificConn> + Send + Sync + 'static {
    type SpecificConn: Send + Sync;

    /// Provide a generic transaction as closure that is agnostic to the underlying db or ORM.
    /// Commit if closure returns Ok`, rollback on `Err`
    // THe lifetimes are wrong, and possibly more, but I don't know how to fix this method
    async fn transaction<'a, R, F>(&mut self, callback: F) -> Result<R, String> // *** changed
    where
        F: for<'r> FnOnce(&'r mut Self) -> ScopedBoxFuture<'a, 'r, Result<R, String>> + Send + 'a, // *** changed
        R: Send + 'a; // *** changed
}

struct ServiceImpl<R: Repository> {
    repo: R, // service holds a generic repository to persist date
}

// implementation for Service while keeping the repository generic
impl<R: Repository> Service for ServiceImpl<R> {
    // The service methods sometimes need to call multiple repository functions, but need
    // to ensure this is done as an atomic transaction. Instead of writing business logic to roll
    // back failed attempts on my own, I rather want to use a database transaction for this
    async fn maximize_item(&self, id: i32, value: i32) -> Result<i32, String> {

        // get new db connection wrapped into a generic object
        let mut conn = self.repo.connect().await?;

        // wrap repository tasks into an atomic but generic transaction. The repo needs
        // to ensure a transaction is atomic
        conn.transaction(|conn: &mut R::Conn| async move {

            // get value and update value are different methods, but
            // should be executed as atomic transaction here
            let current = self.repo.get_item_value(conn, id).await?;
            if value > current {
                let updated = self.repo.update_item_value(conn, id, value).await?;
                println!("Maximized item [{id}] from {current} to {updated}"); // *** added
                Ok::<i32, String>(updated)
            } else {
                println!("Kept item [{id}] at {current}, because {value} is smaller"); // *** added
                Ok::<i32, String>(current)
            }
        }.scope_boxed()).await // *** added scope_boxed
    }
}

struct RepositoryForSpecificDbType;

// implement the repository for a specific database and ORM (or a mock for testing).
// In this case it is Postgres with Diesel
impl Repository for RepositoryForSpecificDbType { // *** lifetime removed
    type Conn = ConnectionToSpecificDbType; // *** lifetime removed

    // wrap diesel connection to postgres db into a generic connection object
    async fn connect(&self) -> Result<ConnectionToSpecificDbType, String> {
        let dsn = "postgres:://root:****@localhost:my_db";
        let conn = AsyncPgConnection::establish(dsn).await.map_err(|_| "Connection failed".to_string())?;
        Ok(ConnectionToSpecificDbType::new(conn))
    }

    async fn get_item_value(&self, _conn: &mut Self::Conn, id: i32) -> Result<i32, String> {
        // mocking some database lookup
        Ok(id * 2)
    }

    async fn update_item_value(&self, _conn: &mut Self::Conn, _id: i32, value: i32) -> Result<i32, String> {
        // mocking some database update
        Ok(value)
    }
}

#[repr(transparent)] // *** added
struct ConnectionToSpecificDbType(AsyncPgConnection); // *** struct def changed

impl ConnectionToSpecificDbType { // *** lifetime removed
    fn new(conn: AsyncPgConnection) -> Self { // *** function changed
        Self(conn)
    }

    fn new_from_mut(conn: &mut AsyncPgConnection) -> &mut Self { // *** function changed
        #[allow(unsafe_code)]
        unsafe {
            // Transmutes a diesel connection into a ConnectionToSpecificDbType.
            // Source and result are both mutable references, lifetime of source is copied (I guess)
            // SAFETY: transparent repr is used for Self
            core::mem::transmute::<&mut AsyncPgConnection, &mut Self>(conn)
        }
    }
}

// get mutable reference to connection
impl AsMut<AsyncPgConnection> for ConnectionToSpecificDbType { // *** lifetime removed
    fn as_mut(&mut self) -> &mut AsyncPgConnection { // *** function changed
        &mut self.0
    }
}

#[derive(Debug)]
enum TransactionError<E: Send + Sync> {
    UserCaused(E),
    #[allow(dead_code)] // *** added: DieselCaused is not used currently
    DieselCaused(diesel::result::Error),
}

// A diesel transaction requires that a closure error implements `From<Error>`.
// To stay generic, handle errors in the closure and translate them into a generic error
impl<E: Send + Sync> From<diesel::result::Error> for TransactionError<E> {
    fn from(value: diesel::result::Error) -> Self {
        TransactionError::DieselCaused(value)
    }
}

#[async_trait::async_trait] // *** added
impl Connection for ConnectionToSpecificDbType { // *** lifetime removed
    type SpecificConn = AsyncPgConnection;

    // This function doesn't work
    // it should provide a generic abstraction of a transaction
    async fn transaction<'a, R, F>(&mut self, callback: F) -> Result<R, String> // *** changed
    where
        F: for<'r> FnOnce(&'r mut Self) -> ScopedBoxFuture<'a, 'r, Result<R, String>> + Send + 'a, // *** changed
        R: Send + 'a, // *** changed
    {
        // *** inner_conn def removed
        let result = self.as_mut().transaction(|diesel_conn| async move {
            println!("Entered transaction"); // *** added

            // wrap mut ref to diesel connection into connection object that implements Connection
            let inner_conn: &mut ConnectionToSpecificDbType = ConnectionToSpecificDbType::new_from_mut(diesel_conn); // *** changed

            // call closure
            let result = callback(inner_conn).await; // *** changed

            // translate into generic intermediate error type that implements From<Error>
            result.map_err(|e| TransactionError::UserCaused(e))
        }.scope_boxed()).await;

        println!("Left transaction"); // *** added

        // return result
        result.map_err(|e| format!("{e:?}").to_string())
    }
}

mod diesel_async_mock { // *** mod added
    use diesel::ConnectionResult;
    use scoped_futures::ScopedBoxFuture;

    pub struct AsyncPgConnection;

    #[async_trait::async_trait]
    pub trait AsyncConnection: Sized + Send {
        async fn establish(database_url: &str) -> ConnectionResult<Self>;

        async fn transaction<'a, R, E, F>(&mut self, callback: F) -> Result<R, E>
        where
            F: for<'r> FnOnce(&'r mut Self) -> ScopedBoxFuture<'a, 'r, Result<R, E>> + Send + 'a,
            E: From<diesel::result::Error> + Send + 'a,
            R: Send + 'a,
        {
            callback(self).await
        }
    }
    #[async_trait::async_trait]
    impl AsyncConnection for AsyncPgConnection {
        async fn establish(_database_url: &str) -> ConnectionResult<Self> {
            Ok(Self)
        }
    }
}

#[tokio::main]
async fn main() {
    // create a new service instance and define which repository implementation is used
    let service = ServiceImpl {
        repo: RepositoryForSpecificDbType
    };

    assert_eq!(service.maximize_item(5, 3).await.unwrap(), 10);
    assert_eq!(service.maximize_item(5, 8).await.unwrap(), 10);
    assert_eq!(service.maximize_item(5, 13).await.unwrap(), 13);
    assert_eq!(service.maximize_item(5, 21).await.unwrap(), 21);
}

Output:

Entered transaction
Kept item [5] at 10, because 3 is smaller
Left transaction
Entered transaction
Kept item [5] at 10, because 8 is smaller
Left transaction
Entered transaction
Maximized item [5] from 10 to 13
Left transaction
Entered transaction
Maximized item [5] from 10 to 21
Left transaction
Reasons:
  • Blacklisted phrase (1): this guide
  • RegEx Blacklisted phrase (2): I don't know how to fix
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Skru

79073134

Date: 2024-10-10 07:12:02
Score: 2.5
Natty:
Report link

Thanks for sharing this, I have modified above code to convert Kotlin / Compose Multiplatform Color to UIColor

fun toUIColor(c: Color): UIColor {
    return UIColor(red = c.red.toDouble(), green = c.green.toDouble(), blue = c.blue.toDouble(), alpha = c.alpha.toDouble())
}
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (2): Thanks for sharing
  • Low length (0.5):
  • Has code block (-0.5):
Posted by: Sumit

79073126

Date: 2024-10-10 07:10:02
Score: 0.5
Natty:
Report link

Adding

_OLD_VIRTUAL_PYTHONPATH="$PYTHONPATH"
export PYTHONPATH="$VIRTUAL_ENV:/path/to/project:$PYTHONPATH"

and the corresponding revert in deactivate()

if ! [ -z "${_OLD_VIRTUAL_PYTHONPATH+_}" ] ; then
    PYTHONPATH="$_OLD_VIRTUAL_PYTHONPATH"
    export PYTHONPATH
    unset _OLD_VIRTUAL_PYTHONPATH
fi

to the venv activation script and running run.py directly from entry_point (in that way specifically, not from project root) did the trick while being the least intrusive option.

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

79073118

Date: 2024-10-10 07:08:01
Score: 2
Natty:
Report link

you can see class BearerTokenAuthenticationFilter

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

79073107

Date: 2024-10-10 07:06:01
Score: 3.5
Natty:
Report link

I have set my --max-memory-restart to 1300MB (I have 2GB ram on VPS), and it seems to be more stable, now.enter image description here

Those spikes aren't happening for 2 days straight. But if it happens again, I will try to upgrade my VPS specs to like 2 core and 4GB one.

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

79073106

Date: 2024-10-10 07:06:01
Score: 3
Natty:
Report link
const pieConfig = {
        ----OTHER VALUE----
        legend: {
            color: {
                title: true, // try passing this property
                position: 'top', 
                rowPadding: 5,
            },
        },
}

have your tried something like this?

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: myonkun

79073105

Date: 2024-10-10 07:05:00
Score: 0.5
Natty:
Report link

The issue was likely caused by the back_log variable which was set to low by default. Setting this variable to a higher value completely resolved the issue. So pity that MariaDB logs don't give a clue of it.

https://mariadb.com/kb/en/server-system-variables/#back_log

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

79073089

Date: 2024-10-10 07:00:59
Score: 1.5
Natty:
Report link

Quick answer : I was able to make it work with the latest version of Spring Data

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

79073059

Date: 2024-10-10 06:54:57
Score: 0.5
Natty:
Report link

Here you are using string(20) datatype in place of that you can use varchar(20) datatype and also in place of day(date) you can try using day(current_date). Finally end the BEGIN...END block with END statement because BEGIN...END block should end with END statement.

Reasons:
  • Whitelisted phrase (-1.5): you can use
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Dunga sharmila

79073053

Date: 2024-10-10 06:53:57
Score: 0.5
Natty:
Report link

case need to be compile time constant, while pointers are (most of the times) determined in link time (in case of globals) or runtime (in case of stack/heap). hence it make sense that switch won't support pointer.

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

79073052

Date: 2024-10-10 06:52:57
Score: 0.5
Natty:
Report link

according to https://clickhouse.com/docs/en/engines/table-engines/integrations/rabbitmq#creating-a-table CREATE TABLE ... SETTINGS rabbitmq_secure =1 or SETINGS rabbitmq_address = 'amqps://user:password@host:port/vhost'

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

79073047

Date: 2024-10-10 06:51:56
Score: 3.5
Natty:
Report link

i have same problem but you can try to edit amplify.yml in build settings, for example if you use npm

version: 1
frontend:
  phases:
    preBuild:
      commands:
        - npm ci
    build:
      commands:
        - echo "NEXT_NOTION_MARKETING_DATABASE_ID=$NEXT_NOTION_MARKETING_DATABASE_ID" >> .env
        - echo "NEXT_NOTION_BUSINESS_DATABASE_ID=$NEXT_NOTION_BUSINESS_DATABASE_ID" >> .env
        - npm run build
  artifacts:
    baseDirectory: .next
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/*
      - .next/cache/**/*

this works like a charm, and you can try the docs from aws amplify environtment

Reasons:
  • Blacklisted phrase (1): i have same problem
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Me too answer (2.5): i have same problem
  • Low reputation (1):
Posted by: kimchi

79073044

Date: 2024-10-10 06:51:56
Score: 2.5
Natty:
Report link

Print to the console received 'Invitation' and check does it contain this attribute (search line 'a=ice-ufrag:'). When line missed - check server settings (is enabled ICE).

Here https://community.asterisk.org/t/failed-to-set-remote-answer-sdp-called-with-sdp-without-ice-ufrag-and-ice-pwd/77997/11 explanation of the similar issue.

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

79073035

Date: 2024-10-10 06:49:56
Score: 1
Natty:
Report link

Its easy to re install packages and remove them.

Use this command to delete all dependencies and clear project.

flutter pub remove <package-name>

Then this to make them again

flutter pub add <package-name>
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: ADARSH MISHRA

79073031

Date: 2024-10-10 06:47:55
Score: 2
Natty:
Report link

Hello Everyone~(If you met the same issue like this) A magical thing happened: after changing the executor from @angular-devkit/build-angular:browser to @angular-devkit/build-angular:browser-esbuild, everything worked perfectly! (You can now remove all redundant webpack configurations, and you don't even need to include any plugins!)

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

79073015

Date: 2024-10-10 06:43:54
Score: 1.5
Natty:
Report link

jBMN version 5.4.0.Final was released 12 years ago, so it's very unlikely to find someone who can support you in tackling this issue. My suggestion is to update it at least to version 7.x, I would recommend considering moving to the upcoming Apache KIE 10.0.0 that holds jBMN (the latest version)

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

79073000

Date: 2024-10-10 06:39:53
Score: 3
Natty:
Report link

You can enable errors to display in Php using:

error_reporting(E_ALL); 
ini_set('display_errors', 1);

For reference on how to display errors and warnings: https://www.codingdynasty.com/php/print-errors-and-warnings-in-php/

Reasons:
  • Probably link only (1):
  • Low length (1):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Shoaib

79072986

Date: 2024-10-10 06:36:53
Score: 1.5
Natty:
Report link

Thanks to @Schwern and @Steffen Ullrich for the insight on how to fix my issue.

Basicallly, exec.Command wanted you to break your command by "character group". If it's between spaces, it should be a separate argument.

Here's what my updated code is:

func DocxToPdf(srcDocxPath string, outputPath string) error{
    cmd := exec.Command(
        "lowriter",
        "--invisible", 
        "--headless", 
        "--convert-to", 
        "pdf:writer_pdf_Export",
        "--outdir",
        outputPath,
        srcDocxPath,
    )

    output, err := cmd.CombinedOutput() // had to search for this to see the actual error while debugging

    if err != nil {
        fmt.Println(fmt.Sprint(err) + ": " + string(output))
        return err
    }

    return nil
}
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Schwern
  • User mentioned (0): @Steffen
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: rminaj

79072980

Date: 2024-10-10 06:35:52
Score: 0.5
Natty:
Report link

One way to remove such errors is to work with integers as much as possible. Obviously this can be tedious.

This equation =floor((1890-9*201)/(9)) would indeed resolve to 9 in google sheets.

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

79072977

Date: 2024-10-10 06:33:52
Score: 1
Natty:
Report link

in your yaml file introduce : codecov.yaml

ignore:
  - "path/to/folder"  # ignore folders and all its contents
  - "test_.*.rb"       # regex accepted
  - "**/*.py"  
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: S J

79072970

Date: 2024-10-10 06:31:51
Score: 1.5
Natty:
Report link

I was using http://localhost:8761/eureka/ which was printed in the Springboot startup console then I was getting the error "Whitelabel Error Page This application has no explicit mapping for /error" enter image description here

After removing the eureka/ from the ULR it worked. working URL: http://localhost:8761/

Note: I have to define server.port=8761 in the application explicitly.properties file

Reasons:
  • Blacklisted phrase (1): enter image description here
  • Whitelisted phrase (-1): it worked
  • No code block (0.5):
  • Low reputation (1):
Posted by: Vijay

79072969

Date: 2024-10-10 06:31:51
Score: 2.5
Natty:
Report link

I had the same issue and solved it as table_convertion="celenium" not "selenium"...

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

79072965

Date: 2024-10-10 06:28:51
Score: 1.5
Natty:
Report link
            finally {
                if (lk.isHeldByCurrentThread()) {
                    lk.unlock();
                }
            }
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Lijia Tan

79072964

Date: 2024-10-10 06:28:51
Score: 2
Natty:
Report link

It's not just background, they also deprecated onBackground and surfaceVariant and added lot of new color roles. It will be better to read Flutter's color scheme migration guide.

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

79072955

Date: 2024-10-10 06:25:50
Score: 2.5
Natty:
Report link
java -jar -Djava.net.preferIPv4Stack=true appname.jar

Fixed it.

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

79072948

Date: 2024-10-10 06:23:50
Score: 1
Natty:
Report link

It works for two different domains. You have to have a dispatch.yaml only at the root of the default site.

dispatch:
  # send all default_site.com requests to default service.
  - url: "default_site.com/*"
    service: default

  # send all another_site.com requests to another_site service.
  - url: "nother_site.com/*"
    service: another_site
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: agir

79072945

Date: 2024-10-10 06:23:50
Score: 2
Natty:
Report link

Try to use Document Outline in Visual Studio, which allows you easily change the hierarchy of your controls:

View -> Other Windows -> Document Outline

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Fei Xu

79072943

Date: 2024-10-10 06:23:50
Score: 1
Natty:
Report link

An alternative to SCAN for key pattern searches in databases like Redis is the KEYS command, which can quickly return all keys matching a specific pattern. However, KEYS is not recommended for large datasets due to performance issues, as it blocks the database while searching. Another option is SSCAN, which works well with sets and allows for more efficient, incremental searches. You could also consider using ZSCAN for sorted sets or HSCAN for hash fields, depending on the data structure in use. These commands provide non-blocking, scalable searches over large datasets.

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

79072939

Date: 2024-10-10 06:22:49
Score: 1
Natty:
Report link

Try changing the value of tag allowBackup from true to false in your app's AndroidManifest.xml.

<application
    android:allowBackup="false">
</application>
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Rico

79072932

Date: 2024-10-10 06:18:48
Score: 1
Natty:
Report link
new DefaultRedisScript<>(luaScript, Boolean.class)

try this,add '<>'

Reasons:
  • Whitelisted phrase (-1): try this
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: SixSixSix

79072929

Date: 2024-10-10 06:15:48
Score: 0.5
Natty:
Report link

How can I effectively replace SizedBox with Gap in my Flutter project?

You can replace all the places you have used the SizedBox(height/width: number) with Gap(number) by using the regular expression, like this:


In VS Code:

1. Search the entire project

by pressing on the search icon on the side of the screen:

1

or press on Ctrl + Shift + F

2. Click on the regular expression icon to search for regular expressions :

2

3. Press on the arrow at the side of the search to toggle replace

3

or press on Ctrl + Shift + H (no need for step 2)

4. Now replace

type this regular expression in search:

SizedBox\(\s*(height|width):\s*(?=\d+(\.\d+)?\s*\))

this will select all the SizedBox that only have the height/width attribute so if you are using the SizedBox with a child inside it (for example), will not be selected.

and replace it with Gap(

and finally press on Replace all, like this:

4


In Android Studio:

1. Search the entire project

Go to Edit > Find > Replace in path:

5

or press Ctrl + Shift + R

2. Click on the regular expression icon to search for regular expressions

6

3. Now replace

type this regular expression in search:

SizedBox\(\s*(height|width):\s*(?=\d+(\.\d+)?\s*\))

this will select all the SizedBox that only have the height/width attribute so if you are using the SizedBox with a child inside it (for example), will not be selected.

and replace it with Gap(

and finally press on Replace all, like this:

7




What are the main differences or advantages of using Gap over SizedBox?

The main differences between Gap and SizedBox are:

1:

The Gap is designed specifically for adding spacing between widgets.

The SizedBox is a general-purpose widget used to create empty space or define the size of a child widget.

2 Readability:

Gap improves readability.

Reasons:
  • Blacklisted phrase (0.5): How can I
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): How can I
  • Low reputation (0.5):
Posted by: MHMD

79072918

Date: 2024-10-10 06:12:47
Score: 3
Natty:
Report link

use ctrl shift + to increase font size

use ctrl shift - to decrease font size

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

79072916

Date: 2024-10-10 06:11:46
Score: 1
Natty:
Report link

You don’t need to put all the code in one function!

A function should perform only one task assigned to it and return a value. Therefore, asynchronous tasks should be placed in separate functions.

JavaScript itself is not asynchronous, and the async/await keywords simply inform the interpreter that the result of this code will be obtained later. (Read about the Event Loop).

If you call an asynchronous function without await, the code will continue to execute without waiting for it to finish. Await tells the interpreter to wait for the completion of this function

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

79072917

Date: 2024-10-10 06:11:46
Score: 3
Natty:
Report link

The default user directory needed to be used. So I removed the line that sets the user directory, now it works.

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

79072913

Date: 2024-10-10 06:09:45
Score: 2.5
Natty:
Report link

It's called "Nullish coalescing operator" and it's explained here:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing

In your case it sets h.hj to h.hj if h.hj is not NULL, and to the function if h.hj is NULL.

Reasons:
  • Whitelisted phrase (-1): In your case
  • Probably link only (1):
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Odd Veibust

79072903

Date: 2024-10-10 06:04:44
Score: 1
Natty:
Report link

The issue appears to be related to the version and/or configuration of Java in use. Ensure Java 11 is installed and configure JAVA_HOME to point to its location. To use an embedded JDK with Android Studio, it can be changed under File > Project Structure > SDK Location. Try cleaning Gradle by running flutter clean, and deleting the .gradle folder. The gradle-wrapper.properties can be replaced with a compatible gradle version by uncommenting and altering the line below. Do a fresh install of Android SDK Platform 34 using Android Studio and recreate the Android emulator if necessary. This should fix it.

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

79072898

Date: 2024-10-10 06:02:43
Score: 10 🚩
Natty: 5
Report link

i got the same problem like you with the same repo /dexFinal but, I have edited the code in the above way and it still doesn't work. Can you show me your full source code?

Reasons:
  • Blacklisted phrase (1): i got the same problem
  • RegEx Blacklisted phrase (2.5): Can you show me your
  • RegEx Blacklisted phrase (2): it still doesn't work
  • Low length (1):
  • No code block (0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: MKhoaFE

79072895

Date: 2024-10-10 06:01:42
Score: 5
Natty:
Report link

I have face same issue so I have uninstall my python version 3.13 then install python version 3.12 which it's resolved my issue

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Me too answer (2.5): face same issue
  • Low reputation (1):
Posted by: Haroon khan

79072888

Date: 2024-10-10 05:58:40
Score: 7 🚩
Natty:
Report link

I am also trying to do the same thing, but facing issue while including my .h file in jni code. Are you able to resolve your issue?

Reasons:
  • Blacklisted phrase (1): trying to do the same
  • RegEx Blacklisted phrase (1.5): resolve your issue?
  • Low length (1):
  • No code block (0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Anshuman Singh

79072887

Date: 2024-10-10 05:58:40
Score: 3
Natty:
Report link

The only thing remotely close of section seems to be slide masters https://python-pptx.readthedocs.io/en/latest/user/concepts.html . But it won't do the trick I think. You can ask for a new feature : https://python-pptx.readthedocs.io/en/latest/index.html#new-features-releases or even submit the feature yourself : https://github.com/scanny/python-pptx

Reasons:
  • Probably link only (1):
  • Low length (1):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Azog Mugen

79072884

Date: 2024-10-10 05:56:39
Score: 2.5
Natty:
Report link

Thanks, everyone! For future reference: I have successfully optimized memory scanning. I hope my code is clear: (For now I assume every brainfuck code is well-written):

                TokenType::MemoryScan(n) => { 
                        let loop_label = format!("loop_scan{}", label_counter);
                        label_counter += 1;
                        let found_label = format!("loop_scan{}", label_counter);
                        label_counter += 1;
                        let not_found_label = format!("loop_scan{}", label_counter);
                        label_counter += 1;
                        
                        assembly.push_str(&format!("{}:\n", loop_label));  
                        assembly.push_str("    ld1.16b {v0}, [x19]\n"); // Load 16 bytes to registers             
                        assembly.push_str("    cmeq.16b v0, v0, #0\n"); // Compare with zeros  
                        // Keep the zeros only poisitions for [>>] [>>>>] [>>>>>>>>] (Just mask the certain positions)
                        if *n == 2 {
                            assembly.push_str("    movi.8h  v1, #1\n");
                        } else if *n == 4 {
                            assembly.push_str("    movi.4s  v1, #1\n");
                        } else if *n == 8 {
                            assembly.push_str("    movi.2d  v1, #0x000000000000ff\n");
                        }
                        if *n == 2 || *n == 4 || *n == 8 {
                            assembly.push_str("    and.16b  v0, v0, v1\n");
                            assembly.push_str("    shl.16b  v0, v0, #7\n");
                            assembly.push_str("    sshr.16b v0, v0, #7\n");
                        }          
                        // Find the first matching zero
                        assembly.push_str("    shrn.8b v0, v0, #4\n"); // Do shrn: make it 64 bits value             
                        assembly.push_str("    fmov x8, d0\n");  // Move the 64 bit value to general purpose reg
                        assembly.push_str("    rbit x9, x8\n"); // rotate the bits (We do not have ctz so we do rbit then clz which is ctz)
                        assembly.push_str("    clz x9, x9\n"); // Count leading zeros
                        assembly.push_str("    ubfx x9, x9, #2, #30\n"); // Do shifting
                        // Compare x9 with 16 (indicating 64 bits of zeros, since 64 >> 2 = 16)
                        assembly.push_str("    cmp    x9, #16\n"); 
                        // If x9 equals 16, jump to the 'not_found_label'
                        assembly.push_str(&format!("    b.eq    {}\n", not_found_label));
                        // Else jump to the found label
                        assembly.push_str(&format!("    b {}\n", found_label)); 
                        assembly.push_str(&format!("{}:\n", not_found_label)); // Not found label
                        // Increment pointer +16 to load the next 16 bytes
                        assembly.push_str("    add x19, x19, #16\n"); 
                        // Jump back for the next 16 bytes
                        assembly.push_str(&format!("    b {}\n", loop_label)); 
                        // If found adjust the pointer +x9 and continue
                        assembly.push_str(&format!("{}:\n", found_label));
                        assembly.push_str("    add x19, x19, x9\n");            
                },  
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (2): fuck
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: user27680699

79072881

Date: 2024-10-10 05:53:38
Score: 1
Natty:
Report link

Because I run into this problem as well. SAP suggests to use the OPEN CURSOR x WITH HOLD and then use the function module DB_COMMIT to just do a commit on database level. https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapopen_cursor.htm#!ABAP_ONE_ADD@1@

I'm not sure if the statement

INSERT x FROM ( SELECT * FROM y ).

should be used because of rollback area problems.

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

79072860

Date: 2024-10-10 05:44:36
Score: 8.5 🚩
Natty:
Report link

i want to implement the same bubble did you made it ? can you share the code?

Reasons:
  • RegEx Blacklisted phrase (2.5): can you share the code
  • RegEx Blacklisted phrase (1): i want
  • Low length (1.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Mysterious

79072848

Date: 2024-10-10 05:39:34
Score: 3.5
Natty:
Report link

After some days trying, I found what I want is:

PyCharm should 'solidify' the function of this button after it was clicked: When I scroll up and down in the console window, I can scroll, but once I leave and the console window has new content, it automatically locates to the bottom again.

Reasons:
  • RegEx Blacklisted phrase (1): I want
  • Low length (0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: James Wang

79072823

Date: 2024-10-10 05:28:32
Score: 3
Natty:
Report link

Have you check this docs? As mentioned in the documentation, currently reset password is only supported with delegated permissions scope.

Others also said, link

enter image description here

Reasons:
  • Probably link only (1):
  • Low length (1):
  • No code block (0.5):
  • Contains question mark (0.5):
Posted by: wenbo

79072809

Date: 2024-10-10 05:21:30
Score: 2
Natty:
Report link

There is need to add the cross origin headers in the header section of the project..

If you are working in the front end project in technology like react.js or angular then try to add the meta tags in the header of html file.

Meta tags -:

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Rushikesh Gurav

79072808

Date: 2024-10-10 05:21:30
Score: 1
Natty:
Report link

Yeah so this is poorly documented but it looks like Resiliance4j TimeLimiters only support Futures or CompletionStages.

Alternatives appear to be using webflux and setting the async timeout property.

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

79072788

Date: 2024-10-10 05:10:27
Score: 2
Natty:
Report link

I think you should debug the the process and handle the lifecycle

example : when pip mode is active, some lifecycle methods are triggered (onPause and onStop), debug these two and ensure that you are handling these lifecycle changes properly in your activity to avoid crashes.

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

79072787

Date: 2024-10-10 05:10:27
Score: 4
Natty:
Report link

@Jmb 's answer in the comment fixes the issue.

Don't bind to 0.0.0.0, instead bind to 233.113.216.70:21001 and 233.113.216.75:21001.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • User mentioned (1): @Jmb
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Less-Owl-4025

79072766

Date: 2024-10-10 04:56:22
Score: 0.5
Natty:
Report link

Just came across this question when looking for answers myself.

In case you failed to get it working, the only error is because the input to on run is a list. You want the first item in that list, so your truncating line should be:

set outputString to text 1 thru 500 of item 1 of input

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

79072755

Date: 2024-10-10 04:50:20
Score: 0.5
Natty:
Report link

Since you look for Title as first value, why not use it in the query?

Use combination contains() and regex /^Title$/ to make exact match.

const values = ['Title', 'Value1', 'Value2', 'Value3']
cy.contains('button rows span', /^Title$/)
  .parents('button')
  .find('span')
  .each(($span,i) => {
    cy.wrap($span).invoke('text').should('eq', values[i])
  })
Reasons:
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: Bryan Burton

79072750

Date: 2024-10-10 04:49:20
Score: 4
Natty: 4.5
Report link

It's work for me when used Navigator in nested routing

follow the docs: https://docs.flutter.dev/release/breaking-changes/android-predictive-back#migrating-from-willpopscope-to-navigatorpophandler-for-nested-navigators

Reasons:
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Hien Hua

79072734

Date: 2024-10-10 04:36:15
Score: 3.5
Natty:
Report link

Open this kind of csv in Data.olllo, then convert the encoding format by Advanced Save.

It's easy to deal with such things in this software without writing codes.

Reasons:
  • Contains signature (1):
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: OlllO

79072732

Date: 2024-10-10 04:34:14
Score: 0.5
Natty:
Report link

I managed to fix it by doing the following steps.

  1. remove node_module and yarn.lock
  2. run npx nuxt clean
  3. then npm run build

And I generated the project again and it worked fine.

Reasons:
  • Whitelisted phrase (-1): it worked
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Meta

79072716

Date: 2024-10-10 04:24:11
Score: 1
Natty:
Report link

I ran into similar problem with uploadTask(with: request, fromFile: file), the root cause is that the uploadTask(fromFile:) extension will automatically append the header with 'application/octet-stream' as Content-Type if that is not set in the header. While the GCS bucket is expecting an empty Content-Type, thus it keeps failing the upload with a "SignatureDoesNotMatch" error.

I will suggest double check your server's expectation on the Content-Type, and might try setting use headers like let headers = ["Content-Type": "", ...]

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

79072707

Date: 2024-10-10 04:20:10
Score: 3
Natty:
Report link

Either use ingress or port forward.

Reasons:
  • Low length (2):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Mircea Sirghi

79072706

Date: 2024-10-10 04:19:10
Score: 1.5
Natty:
Report link

I’m currently working on a project where I need to convert a 2D floor plan from a DXF file into a 3D model in Unity. I’m using the IxMilia.Dxf Library to read the data from the DXF file, and I can successfully extract the 2D information, which gives me the layout of the floor plan.

Here’s what I have so far: I can read the 2D shapes from the DXF file. The shapes are represented correctly in a 2D plane within Unity. The Challenge: While I can visualize the floor plan in 2D, I’m struggling to generate the corresponding 3D models based on the extracted data. For example:

When I extract a room that should be represented as a cube (with front, back, top, bottom, left, and right faces), I’m able to see the 2D representation. However, I don’t know how to convert this data into a 3D cube in Unity properly. I need assistance with understanding how to map the 2D coordinates and dimensions to create 3D geometry in Unity.

Reasons:
  • Blacklisted phrase (0.5): I need
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Badal Patel

79072704

Date: 2024-10-10 04:17:09
Score: 0.5
Natty:
Report link
<UnixTimeStamp>$([System.DateTimeOffset]::UtcNow.ToUnixTimeSeconds())</UnixTimeStamp>
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Has no white space (0.5):
  • High reputation (-1):
Posted by: Red Riding Hood

79072697

Date: 2024-10-10 04:14:08
Score: 1.5
Natty:
Report link

The precision issue arises from the limited precision of float. To minimize this error you could use double precision. If possible, you could use double for calculations and only convert to float when transferring to the GPU.

I also heard about Kahan summation, but I never actually used it so I can't tell you if this fully applies for your use case.

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

79072696

Date: 2024-10-10 04:13:08
Score: 2.5
Natty:
Report link

Reading the docs more closely, lexicons are not supported for the specific neural voices I was using. It's helpful to use the Speech Studio to debug.

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

79072694

Date: 2024-10-10 04:11:07
Score: 0.5
Natty:
Report link

You can use this:

self.assertQuerysetEqual(some_query_set, [])
Reasons:
  • Whitelisted phrase (-1.5): You can use
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Carlos Correa

79072691

Date: 2024-10-10 04:08:06
Score: 1
Natty:
Report link

Your variable is not existing in the environment, you can try dotenv.config() to make it exist:

import dotenv from 'dotenv';
dotenv.config();
const OPENAI_API_KEY = process.env.OPENAI_API_KEY;
console.log(OPENAI_API_KEY);

Ref: https://www.npmjs.com/package/dotenv

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Duy Phương

79072687

Date: 2024-10-10 04:04:05
Score: 2.5
Natty:
Report link

Considering that it might be due to the EVM, the contract was successfully deployed after changing the Solidity compiler version in Remix. Since Geth no longer supports PoA in versions after 1.14.x, the PoA private chain is deployed using Geth 1.13.15, which supports up to Solidity 0.8.19.

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

79072685

Date: 2024-10-10 04:02:05
Score: 2
Natty:
Report link

Run this command to create a new .sln file

dotnet new sln --name MySolution

When you open your .sln file by VS if you don't see you code project you can follow those steps

https://learn.microsoft.com/en-us/sql/ssms/solution/add-an-existing-project-to-a-solution?view=sql-server-ver16

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

79072683

Date: 2024-10-10 04:00:04
Score: 3.5
Natty:
Report link

Enabling Use Debugging option in Developer option detected device.

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

79072663

Date: 2024-10-10 03:48:00
Score: 4
Natty:
Report link

Perhaps install a browser plugin like https://chromewebstore.google.com/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk

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

79072646

Date: 2024-10-10 03:28:56
Score: 8 🚩
Natty: 6.5
Report link

We had the same issue when we upgraded to Flutter 3.19 but now Flutter 3.24.2 seems to have fixed it.

But I'm curious to know if you found any solutions for this before upgrading?

Reasons:
  • Blacklisted phrase (1.5): any solution
  • RegEx Blacklisted phrase (2): any solutions for this before upgrading?
  • Low length (1):
  • No code block (0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: user2788853

79072637

Date: 2024-10-10 03:21:55
Score: 3
Natty:
Report link

I am got the following error.kindly anyone help me:

Error in predict.gstat(g, newdata = newdata, block = block, nsim = nsim, : gstat: value not allowed for: block kriging for long-lat data undefined

Reasons:
  • Blacklisted phrase (1): help me
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: asadullah stat asad

79072632

Date: 2024-10-10 03:18:54
Score: 3
Natty:
Report link

also u can try to Quit Docker in this method and restart docker

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

79072630

Date: 2024-10-10 03:17:54
Score: 4.5
Natty: 4
Report link

The issue happened with my Bitbucket suddenly. This works for me! https://stackoverflow.com/a/52487332/27723973 Thank you so much!

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Blacklisted phrase (1): stackoverflow
  • Whitelisted phrase (-1): works for me
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Cuong Tran

79072628

Date: 2024-10-10 03:16:53
Score: 3
Natty:
Report link

Make sure you are adding the styling file as well that react grid layout has in many of its examples. https://github.com/react-grid-layout/react-grid-layout/blob/master/css/styles.css

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

79072621

Date: 2024-10-10 03:11:52
Score: 1.5
Natty:
Report link

please downgrade the @types/express package to fix this. you can do so by doing npm i -D @types/express@4

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

79072606

Date: 2024-10-10 03:04:50
Score: 0.5
Natty:
Report link
function savePdf() {
    console.log('hi');
    var element = '';    element = document.getElementsByName('mycontents')[0];
    var opt = {
        margin: [2, 2, 2, 2],
        filename: 'myfile',
        image: { type: 'jpeg', quality: 0.7 },
        html2canvas: { scale: 2, useCORS: true },
        jsPDF: { format: 'a4', unit: 'mm' },
        //  pagebreak: { before: '.i-pdf--page' },
    };

    
    html2pdf().from(element).set(opt).toPdf().get('pdf').then(function (pdf) {

        pdf.setFontSize(10);
    }).get('pdf').then(function (pdf) {

        console.log('hi');
        var pdfBase64 = pdf.output();
        console.log(pdfBase64);
        var pdfcontent = {};

        pdfcontent.PDFBase64 = pdfBase64;
        pdfcontent.FileName = fileName;


        $.ajax({
            type: "POST",
            url: "/pdf/savepdf",
            data: "{pdfcontent:" + JSON.stringify(pdfcontent) + "}",
            contentType: "application/json;charset=utf-8",
            datatype: "json",
            complete: OnComplete
        });
    })
}

Here is complete code in c#, javascript Save a PDF generated from html2pdf in C#, MVC , html2pdf , Ajax

Reasons:
  • Probably link only (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Rishi Dahikar

79072584

Date: 2024-10-10 02:46:46
Score: 3
Natty:
Report link

I had this same problem and found that I had a duplicate installation of 365 on my machine. Uninstalled one of the installations and it solved this problem.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: James

79072579

Date: 2024-10-10 02:45:45
Score: 2.5
Natty:
Report link

@pedro if you would post the SQL query that you are using that would be more useful in finding out what are you trying to do and where the issue is. But given the details, the following query would work for your case -

SELECT IdUser, IdProject, IdTool, NULL as IdEval, Status as StatusA, NULL as StatusB
FROM TableA
UNION ALL
SELECT IdUser, IdProject, IdTool, IdEval, NULL as StatusA, Status as StatusB
FROM TableB;
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @pedro
  • Looks like a comment (1):
  • Low reputation (1):
Posted by: rise.ashok

79072577

Date: 2024-10-10 02:44:45
Score: 1
Natty:
Report link

You can use failed request tracking to trace the full rewrite and FastCGI process for any abnormalities, this will generate detail log file, which will help you to identify the problem.

https://learn.microsoft.com/en-us/iis/extensions/url-rewrite-module/using-failed-request-tracing-to-trace-rewrite-rules

Reasons:
  • Whitelisted phrase (-1.5): You can use
  • Probably link only (1):
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: meiquan

79072566

Date: 2024-10-10 02:36:44
Score: 1
Natty:
Report link

The error is You may need an additional loader to handle...。May be your babel-loader can't handle the symbol ??; @babel/plugin-transform-nullish-coalescing-operator can transforms the nullish coalescing operator(??), although this plugin is included in @babel/preset-env, in ES2020, you can try add this plugin to your craco config; If this project runs perfectly fine on the production server and other developers’ machines, check the Node.js version used by other developers and ensure that yours matches, removenode_modules and reinstall again.

Reasons:
  • Blacklisted phrase (1): this plugin
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Frank

79072561

Date: 2024-10-10 02:33:43
Score: 3
Natty:
Report link

May I have an idea of how do I implement it? I'm very beginner on WP and PHP, that's the challenge! I'd like to know how may I implement those changes, but not directly to the "CORE" of WP or even the core of Woocommerce plug-in (if it's that way I'm imagining that it works in general, by the way). In order to, when it had an update, my code wouldn't be overrided (reset) by the new updated version of the plug-in/wordpress.

Reasons:
  • Blacklisted phrase (1): how do I
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: KingKong

79072539

Date: 2024-10-10 02:23:41
Score: 1
Natty:
Report link

In my scenario, I have provided router path under namespace of the controller. Also, by having View() method in the same controller. remove the View() method if it is an API project. It will help to resolve the issue.


namespace [project_name]{
[Route("api/[controller]")]
[ApiController]
public class AuthController : Controller
{
public IActionResult Index()
{
    return View();
}
public IActionResult Authenticate(string password, string email)
{
// code here
}
}
}
Reasons:
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: user27724583

79072536

Date: 2024-10-10 02:20:40
Score: 2
Natty:
Report link
  1. Open IntelliJ IDEA and go to Help > Find Action
  2. Search for "GitHub Copilot"
  3. Plugins: Github Copilot.
  4. Slide the window to Turn OFF
  5. Restart the Intelij IDE.

You can make it ON anytime you want.

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

79072535

Date: 2024-10-10 02:20:40
Score: 1
Natty:
Report link

Alright looking like I won't have to reinstall Windows.
I created a new Windows User & it works there. No idea what's corrupt on my Windows Account.

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

79072532

Date: 2024-10-10 02:15:39
Score: 5
Natty: 5.5
Report link

@Paul Draper - You mean OpenBSD not FreeBSD (Why won't it let me add a comment to his post?)

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • User mentioned (1): @Paul
  • Looks like a comment (1):
  • Low reputation (1):
Posted by: Jamie Landeg-Jones

79072522

Date: 2024-10-10 02:08:38
Score: 0.5
Natty:
Report link

Could you try make the async false in your ajax and try

<script>
    alert('hello');
        $(document).ready(function () {
            $.ajax({
                url: "/Account/VerifyPhoneNumber",
                async: false,
            type: "POST",
            dataType: "html",
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Yat Fei Leong

79072509

Date: 2024-10-10 02:02:36
Score: 3
Natty:
Report link

The issue key founded https://github.com/nuxt/nuxt/issues/29311 remove vite vue options in nuxt.config.ts, will resolve the issue.

Reasons:
  • Probably link only (1):
  • Low length (1.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Michael Mao

79072505

Date: 2024-10-10 01:56:35
Score: 3
Natty:
Report link

For the latest version for check Require Server Name Indication for both site that hosted with different certificate

enter image description here

Reasons:
  • Probably link only (1):
  • Low length (1):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Yat Fei Leong

79072491

Date: 2024-10-10 01:44:33
Score: 1.5
Natty:
Report link

From https://stjarnhimlen.se/comp/time.html:

"International Atomic Time (Temps Atomique International = TAI) is defined as the weighted average of the time kept by about 200 atomic clocks in over 50 national laboratories worldwide. TAI-UT1 was approximately 0 on 1958 Jan 1."

i.e. 10 leap seconds had occurred between 1958 and 1972.

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

79072489

Date: 2024-10-10 01:43:33
Score: 1
Natty:
Report link

Following your example I managed to get it working this way

const { user } = auth ?? {}

that way you won't get the Cannot destructure property 'nn' of 'nn' as it is null.

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

79072487

Date: 2024-10-10 01:40:32
Score: 2.5
Natty:
Report link

You can extend the Default endpoint and you can add the PaymentMethods entity to it: Entity properties

Entity fields

I only added these three fields, but you can add more if you need.

You can call it something like this: Postman sample

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Zoltan Febert

79072485

Date: 2024-10-10 01:38:32
Score: 1
Natty:
Report link

For Javalin 6

Javalin.create(config -> {
    config.bundledPlugins.enableDevLogging();
});
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Minh Dang

79072484

Date: 2024-10-10 01:37:31
Score: 3
Natty:
Report link

Really? you took the time to tell me not to say "thanks" to a user who logged in and answered his own post? To help me to deliver my project so I can feed my family? Common curtesy and common sense are against the rules? We are all grateful you are here to enforce Stack Overflow rules with vigor. The US just one power outage away from collapse, dev jobs being eaten up by AI, and more than 1/2 us won't eat if we miss a paycheck, BUT thank god we have you to enforce the Stack Overflow rules ensuring no gratitude and kindness permitted on the platform. And yes I am stressed, and yes I am overreacting .. but arriving at work and seeing your post is a reminder of the current mindset that is, and will, doom us all.

Reasons:
  • Blacklisted phrase (0.5): thanks
  • Blacklisted phrase (1): help me
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Valerie K

79072478

Date: 2024-10-10 01:32:30
Score: 2
Natty:
Report link

Finally, I got the reason is that I forgot to parse the field of AvailablePercentage in my function...

So funny... So stupid of me...

:) Thanks all!

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Low length (1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: mayer

79072477

Date: 2024-10-10 01:32:30
Score: 1
Natty:
Report link

I worked it out, so for anyone else wanting a solution here it is

RedirectMatch 301 ^/article/.*$ https://www.newdomain.com/news/

Works a treat

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

79072476

Date: 2024-10-10 01:31:30
Score: 1.5
Natty:
Report link

This threw me for a while just now, none of the answers on Google helped

However, I then spotted that I still had multiple devices selected as the target. Obvious when you see it … shame you don’t get a descriptive error!

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