79334014

Date: 2025-01-06 18:48:13
Score: 0.5
Natty:
Report link

The most efficient way to update detached objects efficiently as far as I know is to use update() to create UPDATE sql calls which as you saw can be very repetitive and wasteful in its own way, ie. how can you tell what has changed?

You could possibly detach and clone the original db model and then try to determine the diff yourself with the changes after your service makes changes and then replay those changes onto the db model but you are then just re-creating SQLAlchemy's unit of work pattern yourself and only for the simplest case possible and you are probably going to have a bad time...

Luckily in this case SQLAlchemy + the database model is providing most of the Data Access Layer as I understand it:

In software, a data access object (DAO) is a pattern that provides an abstract interface to some type of database or other persistence mechanism. By mapping application calls to the persistence layer, the DAO provides data operations without exposing database details.

SEE: Data access object

As you make changes to database objects within the session SQLAlchemy can track those changes and then perform the appropriate updates to the database. For example setting user.verified = True in my example will automatically submit an UPDATE SQL statement to the database when commit() is called.

This won't always be the most efficient but usually it is fine. If you need to update many rows with complicated conditions then you can drop down to SQL if needed using update() or insert() and building statements in Python.

You can also set echo=True on your engine to see what changes produce what SQL.

Finally sqlalchemy is meant to be used with an understanding of SQL. You can never fully abstract the fact that you are using a database unless you want terrible performance or massive complexity. It sort of provides the best of both worlds, most of the time you don't need to know you are but you can access all the database features when you need them.

Example

I also usually have a service class that provides some more common data access functions, in this example UserService.

Other business logic is placed into various applicable services like AuthService in this example. Sometimes these services will need direct access to the database session but sometimes they will just work directly on the DAO, ie. User, without knowing there is a database at all.

Whether it is via a commandline or a web app I set up a db session, then combine the services to handle the given request and finally commit and close out the session. Hard to replicate a full flow of control here so I just tried to approximate some common tasks.

import os
from dataclasses import dataclass, fields

from sqlalchemy import (
    Column,
    Integer,
    String,
    BigInteger,
    create_engine,
    ForeignKey,
    Boolean,
)
from sqlalchemy.sql import (
    func,
    select,
    insert,
    text,
)
from sqlalchemy.orm import (
    DeclarativeBase,
    Session,
    relationship
)
from sqlalchemy.schema import MetaData, CreateSchema


def get_engine(env):
    return create_engine(f"postgresql+psycopg2://{env['DB_USER']}:{env['DB_PASSWORD']}@{env['DB_HOST']}:{env['DB_PORT']}/{env['DB_NAME']}", echo=True)


class Base(DeclarativeBase):
    pass


class User(Base):
    __tablename__ = 'users'
    id = Column(Integer, primary_key=True)
    name = Column(String, nullable=False)
    email = Column(String, nullable=False)
    verified = Column(Boolean(), nullable=False, server_default=text('false'), default=False)
    verify_token = Column(String, servier_default=text('null'), default=None, nullable=True)


def run(conn):
    # After signup maybe we set verify token and send email with link ...
    with Session(conn) as db:
        user_service = UserService(db=db)
        auth_service = AuthService()

        u1 = user_service.get_user_by_email('[email protected]')
        verify_token = auth_service.set_verify_token(u1)
        db.commit()

    # Later on after following email link or something better...
    with Session(conn) as db:
        user_service = UserService(db=db)
        auth_service = AuthService()

        u1 = user_service.get_user_by_email('[email protected]')
        if auth_service.verify_user(u1, verify_token):
            print("Verified!")
        else:
            print("Failed to verified!")
        db.commit()

    # On a subsequent login we can check if verified
    with Session(conn) as db:
        user_service = UserService(db=db)
        auth_service = AuthService()

        u1 = user_service.get_user_by_email('[email protected]')
        assert auth_service.is_verified(u1)


class UserService:
    """ Handle some common data access functions. """

    def __init__(self, db):
        self.db = db

    def get_user_by_email(self, user_email):
        return self.db.scalars(select(User).where(User.email == user_email)).first()


class AuthService:
    """ Our business logic goes here. """

    def verify_user(self, user, supplied_verify_token):
        was_verified = False
        if user.verify_token == supplied_verify_token:
            user.verified = True
            user.verify_token = None
            was_verified = True
        return was_verified

    def set_verify_token(self, user):
        user.verify_token = 'MADEUP'
        return user.verify_token

    def is_verified(self, user):
        return user.verified


def populate(conn):
    # Make some fake users.
    with Session(conn) as session:
        u1 = User(name="user1", email="[email protected]")
        session.add(u1)
        u2 = User(name="user2", email="[email protected]")
        session.add(u2)
        session.commit()


def main():
    engine = get_engine(os.environ)

    with engine.begin() as conn:
        Base.metadata.create_all(conn)
        populate(conn)
        run(conn)


if __name__ == '__main__':
    main()


Once you get a feel for how things are working and if you have a large project with many many services stringing them all together all the time is not fun and you probably want to use some sort of dependency injection system and create the services with factories not by calling the constructors as I have done in this example.

Reasons:
  • RegEx Blacklisted phrase (2.5): can you tell what
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • High reputation (-1):
Posted by: Ian Wilson

79333994

Date: 2025-01-06 18:40:11
Score: 1
Natty:
Report link

Unfortunately, my research in the docs has shown that you cannot configure the ruff formatter to ignore trailing commas. There is a difference between the ruff linter (which you CAN configure to ignore trailing commas using ignore = ["COM812"]) and the ruff formatter, which is intended to have very limited configuration options.

From https://docs.astral.sh/ruff/formatter/#philosophy:

Like Black, the Ruff formatter does not support extensive code style configuration; however, unlike Black, it does support configuring the desired quote style, indent style, line endings, and more. (See: Configuration.)

This links to https://docs.astral.sh/ruff/formatter/#configuration, which contains nothing for disabling trailing commas.

Reasons:
  • Blacklisted phrase (1): This link
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: wames

79333991

Date: 2025-01-06 18:37:10
Score: 1.5
Natty:
Report link

In the newer version, you may want to try use this in .env

BROADCAST_CONNECTION=reverb

I had the same issue before, after change to BROADCAST_CONNECTION from BROADCAST_DRIVER, it works for me

Reasons:
  • Whitelisted phrase (-1): I had the same
  • Whitelisted phrase (-1): works for me
  • Contains signature (1):
  • Low length (0.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Sam

79333986

Date: 2025-01-06 18:36:10
Score: 0.5
Natty:
Report link

I assume you use the header file from https://webrtc.googlesource.com/src/+/refs/heads/main/api/peer_connection_interface.h. If that is the case, that peer_connection_interface.h file includes vector.h (https://webrtc.googlesource.com/src/+/refs/heads/main/api/peer_connection_interface.h#78), and probably your local vector.h is similar to https://github.com/microsoft/STL/blob/main/stl/inc/vector#L8 and needs yvals_core.h, an internal header file in Microsoft's Standard Library implementation for C++.

Below is where the error message is coming from.

// This does not use `_EMIT_STL_ERROR`, as it needs to be checked before we include anything else.
// However, `_EMIT_STL_ERROR` has a dependency on `_CRT_STRINGIZE`, defined in `<vcruntime.h>`.
// Here, we employ the same technique as `_CRT_STRINGIZE` in order to avoid needing to update the line number.
#ifndef __cplusplus
#define _STL_STRINGIZE_(S) #S
#define _STL_STRINGIZE(S)  _STL_STRINGIZE_(S)
#pragma message(__FILE__ "(" _STL_STRINGIZE(__LINE__) "): STL1003: Unexpected compiler, expected C++ compiler.")
#error Error in C++ Standard Library usage
#endif // !defined(__cplusplus)

jextract uses clang C API to parse the header file and when you try to run jextract over the peer_connection_interface.h, the indirect reference to yvals_core.h signals that processing does not occur according to C++ standards. Moreover, https://webrtc.googlesource.com/src/+/refs/heads/main/api/peer_connection_interface.h is a C++ header file that does not have a C interface that jextract can further process (please look at https://github.com/openjdk/jextract/blob/master/doc/GUIDE.md#other-languages).

If you would like to generate Java bindings for the webrtc lib, my colleague Jorn Vernee found another standalone implementation of some of the WebRTC features that has a C interface: https://github.com/paullouisageneau/libdatachannel. He gave it a try on a Windows machine and works with jextract.

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

79333982

Date: 2025-01-06 18:32:09
Score: 2
Natty:
Report link

An old question but this happened to me along with the csrf not working and I had no idea why... until I reinstalled the symfony/dotenv package and both started working... I HAVE NO IDEA WHY, my .env file is empty...

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

79333973

Date: 2025-01-06 18:27:06
Score: 8 🚩
Natty: 6.5
Report link

I can't figure out though why this occurs. In researching there are multiple posts about GPO policies but I don't know exactly what is necessary to change and I also don't have access to update these global policies. Anyone else have any solutions?

Reasons:
  • Blacklisted phrase (1.5): any solution
  • RegEx Blacklisted phrase (2): any solutions?
  • Low length (0.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Ken Balestrieri

79333966

Date: 2025-01-06 18:26:06
Score: 1.5
Natty:
Report link

I think this could be a case of instance error rather than issue with the retry policy itself. When the instance fails, the retry number get reset to 0. ref

"It's possible for an instance to have a failure between retry attempts. When an instance fails during a retry policy, the retry count is lost."

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: that one guy on the internet

79333964

Date: 2025-01-06 18:26:06
Score: 1
Natty:
Report link

you are on the right way!

Use LazyVGrid with pinnedViews parameter of it initialiser. docs

Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
Posted by: Nikolai Nagornyi

79333960

Date: 2025-01-06 18:24:05
Score: 3
Natty:
Report link

In your listing the item you have indicated would cause the CPU to push RBX (64-bit) onto the stack whereas if the 40h prefix was not present then this would push EBX (32-bit) onto the stack.

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

79333938

Date: 2025-01-06 18:14:03
Score: 0.5
Natty:
Report link

After further analysis of my code I managed to find the error. It was on the xaml side, since it used an absolutlayout. It did not allow the SKCanvasView to render correctly.

It was solved by using the SKCanvasView, outside of an absolutlayout. A grid was designed to allow correct rendering.

 <skia:SKCanvasView x:Name="CanvasView" PaintSurface="CanvasView_PaintSurface" 
                       HeightRequest="450"
                       ZIndex="0"/>

The aforementioned code together with the code used from c# works perfectly.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Cristian Asprela

79333912

Date: 2025-01-06 18:02:00
Score: 2.5
Natty:
Report link

I think Tradiny is a good option for finance charts, it is a lightweight yet full-featured, highly-extensible, open-source charting platform. You can draw time-series data such as line charts, candlestick charts or bar charts.

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

79333900

Date: 2025-01-06 17:56:58
Score: 10 🚩
Natty: 6
Report link

I'm having the same issues. Did you ended up finding a fix?

Reasons:
  • RegEx Blacklisted phrase (1.5): fix?
  • Low length (1.5):
  • No code block (0.5):
  • Me too answer (2.5): I'm having the same issue
  • Ends in question mark (2):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: user29078439

79333899

Date: 2025-01-06 17:56:58
Score: 1.5
Natty:
Report link

Note - I have not tested this code; I'm using other conversion tools.

user667489 is answering a question about SAS code; Ban Sun is answering a question about how to get the same functionality as some SAS code in PySpark. In PySpark, you use Window.partition functions to set up groups, and orderBy to sort within those groups.

If you choose the correct parameters, that allows you to duplicate the functionality of 'sort by groupingVar', 'set by groupingVar', and then the first. and last. properties.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • User mentioned (1): user667489
  • Low reputation (0.5):
Posted by: Barry DeCicco

79333897

Date: 2025-01-06 17:56:58
Score: 1.5
Natty:
Report link

You can query the metadata tables to get a list of columns. For example:

Oracle:

select column_name 
from all_tab_cols 
where table_name='YOUR_TABLE' 
order by column_id;

Snowflake:

select column_name 
from information_schema.columns 
where lower(table_name)='YOUR_TABLE'
order by ordinal_position;
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: mgscarn

79333895

Date: 2025-01-06 17:55:57
Score: 0.5
Natty:
Report link

There were a few problems that @jqurious pointed out and would like to provide a solution.

  1. Changed geometric_mean() function to take in a Float64Chuck instead of a &[f64]
  2. gmean() function, passed the series name into the new Float64Chunked array, instead of using Series::from_iter().
  3. when using lit(1.0) at the beginning of an expression, this will cause the error above "the name 'literal' is duplicate".

For example, the literal error is caused by having lit(1.0) in front of + self.gmean()

fn gmean_annualized_expr(self, freq:Option<&str>) -> Expr {
        let annualize_factor = lit(annualize_scaler(freq).unwrap());
        ( lit(1.0) + self.gmean()).pow(annualize_factor) - lit(1.0)
    }

By moving lit(1.0) after self.gmean() fixed the problem.

fn gmean_annualized_expr(self, freq:Option<&str>) -> Expr {
        let annualize_factor = lit(annualize_scaler(freq).unwrap());
        (self.gmean() + lit(1.0)).pow(annualize_factor) - lit(1.0)
    }

Here is the full expression for reference

fn geometric_mean(values: &Float64Chunked) -> f64 {
    let adjusted_values: Float64Chunked = values.apply(|opt_v| opt_v.map(|x| x + 1.0));
    let product: f64 = adjusted_values
        .into_iter()
        .filter_map(|opt| opt) // Remove None values
        .product(); // Compute the product of present values
    let count = adjusted_values.len() as f64;
    product.powf(1.0 / count)
}

fn gmean(series: &[Series]) -> PolarsResult<Series> {

    let _series = &series[0]; // This is getting the actual values from the series since there are multiple types of data returns from a series
    let _chunk_array = _series.f64()?;

    let geo_mean= geometric_mean(_chunk_array) - 1.0;
    let new_chunk = Float64Chunked::from_vec(_series.name().clone(), vec![geo_mean]);

    Ok(new_chunk.into_series())
}


fn gmean_column(series: &Column) -> Result<Option<Column>,PolarsError> {
    let materialized_series_slice = std::slice::from_ref(series.as_materialized_series());
    Ok(Some(gmean(materialized_series_slice)?.into_column()))

}

pub trait GeoMean {
    fn gmean(self) -> Expr;
}

impl GeoMean for Expr {
    fn gmean(self) -> Expr {
        self.apply(|column| gmean_column(&column),GetOutput::from_type(DataType::Float64))
    }
}


Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @jqurious
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Trevor Seibert

79333890

Date: 2025-01-06 17:51:56
Score: 0.5
Natty:
Report link

Sometimes, restarting the runner can resolve the issue.

Stop the runner:

./svc.sh stop

Start the runner again:

./svc.sh start

This can help refresh the runner's connection and resolve any temporary issues.

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

79333877

Date: 2025-01-06 17:45:54
Score: 2.5
Natty:
Report link

Remove && node.children.length > 0 from hasChild.So the hasChild should looks like, hasChild = (_: number, node: FoodNode) => !!node.children;

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

79333875

Date: 2025-01-06 17:44:54
Score: 3.5
Natty:
Report link

The fastest way I know to diagonalize a matrix is O(n!). That would get slow quickly.

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

79333872

Date: 2025-01-06 17:43:54
Score: 2
Natty:
Report link

The reason pandas isn't available in your ct-env environment is because conda environments are isolated.

Activate your environment: conda activate ct-env

Install pandas: conda install pandas

Just because pandas is in your base environment doesn't mean it's automatically available in other environments.

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

79333840

Date: 2025-01-06 17:28:50
Score: 0.5
Natty:
Report link

After slogging through a few LLM hallucinations, one of them (ChatGPT 4o) impressed me quite a bit and gave me a glimpse into the future of search. It found a needle-in-haystack source indicating that ffprobe consistently outputs in a standardized period for decimal notation without being influenced by the user's locale. It was a very cursory mention of ffprobe behavior in an Apple discussion forum which couldn't have been found via a Google search: https://discussions.apple.com/thread/255558546?answerId=260330140022&sortBy=rank#260330140022

Reasons:
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • High reputation (-1):
Posted by: pete

79333839

Date: 2025-01-06 17:28:50
Score: 2.5
Natty:
Report link

Try Tradiny, it is a lightweight yet full-featured, highly-extensible, open-source charting platform.

Docs: https://docs.tradiny.com/

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

79333836

Date: 2025-01-06 17:27:50
Score: 2
Natty:
Report link

I think it is related to the cell.xib constraints (leading). check that and reply back to me.

good luck.

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

79333833

Date: 2025-01-06 17:25:50
Score: 2
Natty:
Report link

This worked. https://www.latcoding.com/how-to-solve-kubernetes-dashboard-unauthorized-401-invalid-credentials-provided/

Solution 1: Migrating from kubectl proxy to kubectl port-forward. Add https at the beginning or you'll get 400 Bad Request error. i.e. https://localhost:8443/

Solution 2: Downgrade kubernetes dashboard version and keep using kubectl proxy

Credits to Author [Ambar Hasbiyatmoko].

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

79333829

Date: 2025-01-06 17:25:50
Score: 0.5
Natty:
Report link

I have managed to get it working. I was thinking in the first when case was a '1' when it is a 'l'. As the code was written by someone else who was helping and to be fair they look identical but thanks to @ADyson it now works well. I simply changed the 'l' for liked to a new 'v' for viewed. It may not be the most efficient way but it works.

   CASE 
        WHEN l.to_user IS NOT NULL THEN 'true'
        ELSE 'false'
    END AS isLiked,
    
        CASE 
        WHEN v.to_user IS NOT NULL THEN 'true'
        ELSE 'false'
    END AS hasViewed
    
FROM clients u

LEFT JOIN likes l 
    ON u.userID = l.to_user 
    AND l.from_user = '$logged_user'
    
    LEFT JOIN viewed v 
    ON u.userID = v.to_user 
    AND v.from_user = '$logged_user'

I would not mind any feedback to a better way of doing this if possible but I hope it helps someone struggling with the sample problem.

Reasons:
  • Blacklisted phrase (0.5): thanks
  • Whitelisted phrase (-1): hope it helps
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @ADyson
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: JulesUK

79333826

Date: 2025-01-06 17:24:49
Score: 4.5
Natty:
Report link

Hey You can watch this video to handle the UI with the safe area in Unity Using package in the video given.

https://youtu.be/VXztZYU9YdA?si=NehaeFJ4Qf3Ui8J6

Reasons:
  • Blacklisted phrase (1): youtu.be
  • Blacklisted phrase (1): this video
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Rahmat Ali

79333813

Date: 2025-01-06 17:20:47
Score: 3
Natty:
Report link

I have EditText to enter credit card number. I just want to secure first 12 digits and last 4 digits as normal. There should be spaces in between as well. Like the

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

79333812

Date: 2025-01-06 17:20:47
Score: 1.5
Natty:
Report link

@orphic-lacuna most helpful - thank you. I have all those options set. But I see a different effect of 'new'.

Consider the following script:

outer();

function outer(){
    middle();
    }

function middle(){
    inner();
    }

function inner(){
    bullseye();
    }

function bullseye(){
    throw("Inside bullseye");
    }

As written, it displays just "Inside bullseye". If I replace the penultimate line with

throw new Error("Inside bullseye");

then I get

middle line 8 Error: Inside bullseye
called from outer line 4
called from line 1

However, when I omit the new

throw Error("Inside bullseye");

then I get

inner line 12 Error: Inside bullseye
called from middle line 8
called from outer line 4
called from line 1

which is a deeper trace.

I am happy with this.

Reasons:
  • Blacklisted phrase (0.5): thank you
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @orphic-lacuna
  • Low reputation (1):
Posted by: Antipole

79333810

Date: 2025-01-06 17:19:47
Score: 0.5
Natty:
Report link

If I understand correctly, you're wanting to interopolate between two values? It sounds like you're describing "linear interpolation".

newValue = valueA + (valueB - valueA) * t

Where 't' ranges from 0 to 1.

So if your lowest value is 40 and the max value is 100 then at 50% (0.5) you'll get 70.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
Posted by: Phaelax z

79333803

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

Here’s an example of a linear search implementation in Python:

def linear_search(list, target_element):
    for i, element in enumerate(list):
        if element == target_element:
            return i  # Element found, return its index
    return -1  # Element not found
  
if __name__ == '__main__':
    list = [2, 3, 4, 10, 40]
    target_element = 10
    result = linear_search(list, target_element)
    if result != -1:
        print(f'Element {target_element} found at index {result}.')
    else:
        print(f'Element {target_element} not found in the list.')

You can learn and visualize the step-by-step execution of this code interactively on Coding Canvas, a platform designed to help students understand algorithms and programming visually!
https://codingcanvas.io/
https://codingcanvas.io/topics/
https://codingcanvas.io/topics/python/
https://codingcanvas.io/topics/python/linear-search

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

79333792

Date: 2025-01-06 17:11:45
Score: 1.5
Natty:
Report link

Problem has been resolved by using Swagger to generate the json file. Also as mentioned in one of the links from @dbc, [JsonDerivedType] needed to be added to all classes and interfaces in the inheritance hierarchy. This failed when using app.MapOpenApi() due to the duplicate key issue.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Chris K

79333790

Date: 2025-01-06 17:10:45
Score: 1
Natty:
Report link
`enter code here`# Process streaming response
response_text = ""
for chunk in stream:
    if hasattr(chunk, 'choices') and chunk.choices:
        if hasattr(chunk.choices[0], 'delta'):
            if hasattr(chunk.choices[0].delta, 'content'):
                content = chunk.choices[0].delta.content
                if content is not None:
                        print(content, end="", flush=True)
                        response_text += content
print(response_text)
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Sekar

79333787

Date: 2025-01-06 17:09:44
Score: 1.5
Natty:
Report link

I try to answer the above as follows:

In order to invert a dictionary, we need to do the following:

  1. Identify the set of (the original) dictionary values that shall become keys in the inverse dictionary.
  2. Create groups of keys from the original dictionary partitioned by the values from the previous step. Later we would generate a list of elements (original keys) from each group in order to make it a value in the inverse dictionary.
  3. Generate the new (inverse) dictionary by merging information from the two previous steps.

On condition the LINQ expression in the question does these 3 steps, the LINQ rewrite is correct and fully replaces the "ugly" 20 lines' method I had started with.

There remains one more question:

Is the LINQ compaction worth doing in this case? It might darken the purpose of the method rather than illuminate it.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Pavel Foltyn

79333776

Date: 2025-01-06 17:04:43
Score: 2
Natty:
Report link

ANSWER:

I have it figured out, as i'm new to flask and working with full stack I wasn't aware of this, but it seems you only use url_for to reference static outside of the static folder.

When inside the static folder you use the standard relational paths.

(instead of)

@font-face {
  font-display: block;
  font-family: "bootstrap-icons";
  src: url("{{url_for('static', filename='/fonts/vendor/bootstrap/bootstrap-icons.woff2')}}") format("woff2"),
    url("{{url_for('static', filename='/fonts/vendor/bootstrap/bootstrap-icons.woff')}}") format("woff");
}

(it's this)

@font-face {
  font-display: block;
  font-family: "bootstrap-icons";
  src: url("../../../fonts/vendor/bootstrap/bootstrap-icons.woff2") format("woff2"),
    url("../../../fonts/vendor/bootstrap/bootstrap-icons.woff") format("woff");
}

(not sure if i should delete this question but seeing as I couldn't find the answer on stack overflow will leave it up in case anyone runs into a similar issue)

Reasons:
  • RegEx Blacklisted phrase (1.5): i'm new
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: ShaAnder

79333769

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

If you have an internal registry then you can configure it as an env var or in the testcontainers.properties file. See the docs

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • High reputation (-1):
Posted by: Eddú Meléndez

79333768

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

For me, the fix was far simpler. I had a hung instance of node running. Killed that in Task Manager and it worked after that.

This was true on a Windows system; not sure if this happens on other platforms.

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

79333764

Date: 2025-01-06 17:01:43
Score: 1
Natty:
Report link

you can create a new Schema by combining all of them in to a single One by spreading those schemas in to the new one

export const formSchema = z.object({
...imagePostSchema.shape,
...videoPostSchema.shape,
...textPostSchema.shape,
});

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

79333760

Date: 2025-01-06 16:59:42
Score: 0.5
Natty:
Report link

You can find a complete example here. It uses org.testcontainers.kafka.KafkaContainer, but you can replace it with org.testcontainers.kafka.ConfluentKafkaContainer. Both, allow to register additional listeners.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • High reputation (-1):
Posted by: Eddú Meléndez

79333754

Date: 2025-01-06 16:57:42
Score: 9
Natty: 7
Report link

Can anyone help me i want json file for 1.20.2

Reasons:
  • Blacklisted phrase (1): help me
  • RegEx Blacklisted phrase (3): Can anyone help me
  • RegEx Blacklisted phrase (1): i want
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Starts with a question (0.5): Can anyone help me i
  • Low reputation (1):
Posted by: MOHAM ALI

79333748

Date: 2025-01-06 16:54:40
Score: 2.5
Natty:
Report link

try to add "sudo" to your command line, following command prints to console: sudo influxd inspect export-lp --bucket-id YOURBUCKETID --engine-path /var/lib/influxdb/engine --output-path -

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

79333741

Date: 2025-01-06 16:51:40
Score: 3.5
Natty:
Report link

Same issue here, I moved my repo in question to the Public directory. The repo was previously located within the Documents directory.

TCC issue averted!

Reasons:
  • RegEx Blacklisted phrase (1): Same issue
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: MB123

79333734

Date: 2025-01-06 16:48:39
Score: 10.5 🚩
Natty: 4.5
Report link

I have the same issue and indeed changing the bot residency from "Europe" to "Global" worked but isn't that bad for security concerns ? Did someone found another way to make it work ?

Reasons:
  • Blacklisted phrase (1): I have the same issue
  • RegEx Blacklisted phrase (3): Did someone found
  • Low length (0.5):
  • No code block (0.5):
  • Me too answer (2.5): I have the same issue
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: M Cho

79333732

Date: 2025-01-06 16:47:38
Score: 4.5
Natty: 7
Report link

With this code it works very well on the product page but how can I do the same on the archive-product catalog page to display only the minimum price and when they are also on sale. How to do it? Thank you for your feedback,

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Blacklisted phrase (0.5): how can I
  • Blacklisted phrase (1): can I do
  • Low length (0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: user29059777

79333721

Date: 2025-01-06 16:43:36
Score: 2.5
Natty:
Report link

Delphi has got a global variable AssertErrorProc. Maybe you have assigned a handler to it?

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • High reputation (-2):
Posted by: dummzeuch

79333715

Date: 2025-01-06 16:40:35
Score: 1
Natty:
Report link

Unexpectedly, i have tried change const URL = 'ws://websocket-server:2700'; with const URL = 'ws://localhost:2700'; and it worked.

Reasons:
  • Whitelisted phrase (-1): it worked
  • Low length (1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Fedor

79333711

Date: 2025-01-06 16:39:35
Score: 1
Natty:
Report link

In my case the problem was with LocalDate in Java 17, even though my project was configured as Java 11 project, IntelliJ was using Java 17, so I change the configuration on IntelliJ to use Java 11 and then it worked, apparently Java 17 is not entirely compatible with GSON dependency.

Reasons:
  • Whitelisted phrase (-1): it worked
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Carlos Marmolejo

79333710

Date: 2025-01-06 16:38:35
Score: 1.5
Natty:
Report link

I just started getting this error when calling an Instagram feed. I had to replace my Instagram Basic Display app with a new app running the Instagram API, and the error was fixed.

In my case, I think it had to do with the Dec 4, 2024 Instagram Basic Display deprecation.

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

79333709

Date: 2025-01-06 16:37:34
Score: 3.5
Natty:
Report link

In 2021, Microsoft introduced compiler warnings if using .NET Remoting that you had to manually suppress: https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/5.0/remoting-apis-obsolete

Replacement: use WCF or HTTP REST

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

79333702

Date: 2025-01-06 16:34:34
Score: 1.5
Natty:
Report link

OK, so I have an answer, and it's stupid, but I'm going to leave the question and post an answer here in case it helps someone. In this case, the max queue size was set to 1, so the system was dropping the other span. That value is an erroneous and historical wart that I hadn't noticed until I'd put way too much work into debugging this.

Long story short: if you're seeing this behavior, check your configuration for dumb values. :)

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

79333694

Date: 2025-01-06 16:32:33
Score: 3.5
Natty:
Report link

It is now possible using the database roles in your provider account. Please see: https://community.snowflake.com/s/article/How-to-use-Database-Roles-in-a-Data-Share

Reasons:
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
Posted by: Erce Tilav

79333693

Date: 2025-01-06 16:32:33
Score: 3.5
Natty:
Report link

There is an online tool npz-web-viewer where you can view the numpy array along with some visualizations.

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

79333684

Date: 2025-01-06 16:29:33
Score: 1
Natty:
Report link

I could think of two ways to handle it with Kafka.

  1. Single partition for a topic. You could have only one partition and a consumer that can process messages. Issue would be blocking parallelism processing and bottleneck in performance.
  2. You may have multiple partitions, and producer can insert messages to a specific partition based on a hash outcome. For ex. if you want to make sure a messages for a specific domains are processed in the order, Producer can decide a partition based on a domain value. So all the messages for a particular domain go to same partition, will be processed by the same consumer in order. Possible issue with this approach is uneven data distribution.
Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Digant Patel

79333678

Date: 2025-01-06 16:26:32
Score: 1
Natty:
Report link

Explanation:

•   findstr "not found /source": Filters lines containing /source.
•   for /F "tokens=3 delims= ": Extracts the 3rd token (file path).
•   for /F "tokens=* delims=/": Splits the file path by / and extracts the last token.
•   %~nB: Extracts just the file name (without extension).
  1. Remove Duplicates

Pipe the output to sort /unique to remove duplicates:

findstr "/source" logfile.txt ^ | for /F "tokens=3 delims= " %A in ('findstr "/source" logfile.txt') do @for /F "tokens=* delims=/" %B in ("%A") do @echo %~nB ^ | sort /unique

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @for
  • User mentioned (0): @echo
  • Low reputation (1):
Posted by: rihab BJ

79333665

Date: 2025-01-06 16:23:31
Score: 3.5
Natty:
Report link

There's now a page with instructions to install Anaconda/Miniconda via command-line on its official website

For Anaconda https://docs.anaconda.com/anaconda/install/

For Miniconda https://docs.anaconda.com/miniconda/install/#quick-command-line-install]

Reasons:
  • Probably link only (1):
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Je Qin Chooi Jay

79333652

Date: 2025-01-06 16:17:30
Score: 3.5
Natty:
Report link

Only the space and special characters removed from the printer share made the command operate accordingly (copy), sending a txt.

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

79333646

Date: 2025-01-06 16:14:29
Score: 2
Natty:
Report link

To convert Ethereum (ETH) to USD in real-time, you need access to live exchange rates between ETH and USD. Unfortunately, Nethereum doesn’t provide built-in functionality for fetching real-time exchange rates because it focuses on Ethereum blockchain interactions. However, you can integrate a third-party API to retrieve real-time ETH/USD conversion rates.

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

79333636

Date: 2025-01-06 16:09:28
Score: 2
Natty:
Report link

The runtime outcome is effectively identical. The difference is that Python 3.12 introduces a way to declare type parameters right in the class definition instead of requiring manual TypeVar declarations.

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

79333623

Date: 2025-01-06 16:05:27
Score: 1.5
Natty:
Report link

I know it's been a while, here's a quick answer :

If you want to use raw flowbite library, prefere using it within afterNextRender.

I you can and are not afraid of witching libraries, I can say you that flowbite-angular is released now and fully compatible with with angular 18+ version. :)

Reasons:
  • Blacklisted phrase (1): I know it's been
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: miguel gremy

79333613

Date: 2025-01-06 16:03:27
Score: 2.5
Natty:
Report link

I enabled the "fontconfig-dlopen" feature. This makes the build less dependent on the OS

Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Jeffrey Fagerberg

79333602

Date: 2025-01-06 15:59:25
Score: 5.5
Natty:
Report link

Yogi, Thank you... Perfect, Regards

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Blacklisted phrase (1): Regards
  • Low length (2):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Nigel

79333595

Date: 2025-01-06 15:57:25
Score: 0.5
Natty:
Report link

Use the native URL constructor

Don't use a regular expression here; there is no need, and it opens up the possibility of making mistakes. Use javascript's native URL constructor instead:

let url = new URL('https://stackoverflow.com/questions/7000995/jquery-removing-part-of-string-after-and-removing-too/7001040#7001040');
let hostname = url.hostname;
console.log(hostname); // stackoverflow.com

https://developer.mozilla.org/en-US/docs/Web/API/URL/URL

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Has code block (-0.5):
Posted by: tklodd

79333587

Date: 2025-01-06 15:54:24
Score: 1
Natty:
Report link

As suggested by @Patrick, changing the shape coordinate from meters to degress solved this problem.

shp_file=shp_file.to_crs('EPSG:4326’)

the mask function of the regionmask package treats the meter coordinate as a degree coordinate; I think it will be good if the function tests first the type of Coordinate reference system CRS. Since the error that I got (below) makes me feel that the problem is the netcdf data file ValueError: lon has data that is larger than 180 and smaller than 0. Set `wrap_lon=False` to skip this check.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Patrick
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Kernel

79333578

Date: 2025-01-06 15:51:23
Score: 2.5
Natty:
Report link

Sub CrearPresentacionBovinos() Dim pptApp As Object Dim pptPres As Object Dim slideIndex As Integer Dim slide As Object

' Crear una nueva presentación de PowerPoint
Set pptApp = CreateObject("PowerPoint.Application")
pptApp.Visible = True
Set pptPres = pptApp.Presentations.Add

' Título de la presentación
slideIndex = slideIndex + 1
Set slide = pptPres.Slides.Add(slideIndex, 1) ' 1 = Título
slide.Shapes(1).TextFrame.TextRange.Text = "Los Bovinos"
slide.Shapes(2).TextFrame.TextRange.Text = "Introducción a los bovinos y su importancia en la agricultura"

' Slide 2 - Introducción
slideIndex = slideIndex + 1
Set slide = pptPres.Slides.Add(slideIndex, 2) ' 2 = Título y contenido
slide.Shapes(1).TextFrame.TextRange.Text = "¿Qué son los Bovinos?"
slide.Shapes(2).TextFrame.TextRange.Text = "Los bovinos son animales de granja que incluyen vacas, toros y bueyes. Son conocidos por su importancia en la producción de leche, carne y cuero."

' Slide 3 - Características de los Bovinos
slideIndex = slideIndex + 1
Set slide = pptPres.Slides.Add(slideIndex, 2)
slide.Shapes(1).TextFrame.TextRange.Text = "Características de los Bovinos"
slide.Shapes(2).TextFrame.TextRange.Text = "• Tienen una complexión robusta y son animales herbívoros. " & vbCrLf & _
                                            "• Cuentan con cuernos (aunque no todos) y un sistema digestivo especializado. " & vbCrLf & _
                                            "• Los machos se llaman toros y las hembras vacas."

' Slide 4 - Tipos de Bovinos
slideIndex = slideIndex + 1
Set slide = pptPres.Slides.Add(slideIndex, 2)
slide.Shapes(1).TextFrame.TextRange.Text = "Tipos de Bovinos"
slide.Shapes(2).TextFrame.TextRange.Text = "Existen dos tipos principales de bovinos:" & vbCrLf & _
                                            "1. Bovinos de carne (ej. Hereford, Charolais)." & vbCrLf & _
                                            "2. Bovinos de leche (ej. Holstein, Jersey)."

' Slide 5 - Importancia de los Bovinos
slideIndex = slideIndex + 1
Set slide = pptPres.Slides.Add(slideIndex, 2)
slide.Shapes(1).TextFrame.TextRange.Text = "Importancia de los Bovinos"
slide.Shapes(2).TextFrame.TextRange.Text = "Los bovinos son esenciales en la agricultura debido a su contribución en:" & vbCrLf & _
                                            "• Producción de leche." & vbCrLf & _
                                            "• Producción de carne." & vbCrLf & _
                                            "• Aporte al abono y fertilizantes." & vbCrLf & _
                                            "• Fuente de trabajo y economía en muchas regiones del mundo."

' Slide 6 - Alimentación y cuidado
slideIndex = slideIndex + 1
Set slide = pptPres.Slides.Add(slideIndex, 2)
slide.Shapes(1).TextFrame.TextRange.Text = "Alimentación y Cuidado de los Bovinos"
slide.Shapes(2).TextFrame.TextRange.Text = "Los bovinos son animales rumiantes y necesitan una dieta balanceada basada en pasto, heno, y alimentos concentrados. El cuidado incluye:" & vbCrLf & _
                                            "• Provisión de agua fresca." & vbCrLf & _
                                            "• Control sanitario y vacunación." & vbCrLf & _
                                            "• Espacio adecuado para el pastoreo."

' Slide 7 - Enfermedades Comunes
slideIndex = slideIndex + 1
Set slide = pptPres.Slides.Add(slideIndex, 2)
slide.Shapes(1).TextFrame.TextRange.Text = "Enfermedades Comunes"
slide.Shapes(2).TextFrame.TextRange.Text = "Entre las enfermedades comunes de los bovinos se encuentran:" & vbCrLf & _
                                            "• Brucelosis." & vbCrLf & _
                                            "• Tuberculosis." & vbCrLf & _
                                            "• Mastitis (en las vacas lecheras)." & vbCrLf & _
                                            "Es importante tener medidas de control y prevención para garantizar la salud del ganado."

' Slide 8 - Producción y Comercio
slideIndex = slideIndex + 1
Set slide = pptPres.Slides.Add(slideIndex, 2)
slide.Shapes(1).TextFrame.TextRange.Text = "Producción y Comercio"
slide.Shapes(2).TextFrame.TextRange.Text = "Los bovinos son parte fundamental en la economía mundial." & vbCrLf & _
                                            "• Exportación de carne y productos lácteos." & vbCrLf & _
                                            "• El comercio de ganado también tiene un impacto significativo en países productores."

' Slide 9 - Conclusión
slideIndex = slideIndex + 1
Set slide = pptPres.Slides.Add(slideIndex, 2)
slide.Shapes(1).TextFrame.TextRange.Text = "Conclusión"
slide.Shapes(2).TextFrame.TextRange.Text = "Los bovinos son animales esenciales para la agricultura moderna, con un rol destacado en la alimentación humana y el desarrollo económico."

' Finalizar y limpiar objetos
Set slide = Nothing
Set pptPres = Nothing
Set pptApp = Nothing

End Sub

Reasons:
  • Blacklisted phrase (1): ¿
  • Blacklisted phrase (2): Crear
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: M'aria G'onzalez

79333572

Date: 2025-01-06 15:50:23
Score: 1.5
Natty:
Report link

It's a typo issue in the info plist file. Use this name for your font file:

myFont.ttf

ttf should be in small letters

Reasons:
  • Low length (1):
  • No code block (0.5):
Posted by: Taimoor Arif

79333565

Date: 2025-01-06 15:48:22
Score: 0.5
Natty:
Report link

you can use the smsmobileapi Python module to connect your WhatsApp account and send messages directly.

The setup is quick — just authenticate your WhatsApp account through their dashboard, and you’re good to go, I use it for serveral project for my customers

Here’s the link https://smsmobileapi.com/python/

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

79333563

Date: 2025-01-06 15:46:22
Score: 2
Natty:
Report link

All these years later this issue is still present. I am just learning scraping in Python. I am getting a 503 error. Seems to be an issue with parsing UK Amazon web pages. Any advice on this? This is using bs4. I just get an error message along the lines of it being a problem their end and they are looking into it. I looked into using the official API mentioned above. It seems you can't use the Product Advertising API unless you have been accepted as an Amazon associate, as the API requires an Associate ID as part of its authentication.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Michael Jones

79333561

Date: 2025-01-06 15:46:22
Score: 2
Natty:
Report link

Use the below line to make the button fill the space:

playButton.imageView?.contentMode = .scaleAspectFit

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Contains question mark (0.5):
Posted by: Taimoor Arif

79333558

Date: 2025-01-06 15:45:22
Score: 1.5
Natty:
Report link

ARP responses in AWS EC2 is generally given by the gateway (router) IP address (usually N.N.N.1 IP Address).

Yes you can receive broadcasted ARP request in another ec2 instance but the response is given by the router only. (I could not see the destination machine giving ARP response in TCPDump and this is the reason for my conclusion.)

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

79333557

Date: 2025-01-06 15:45:22
Score: 2
Natty:
Report link

You can find the Microsoft Ribbon Control .NET 9.0 on github

https://github.com/Dragan-Radovac-75/ribbon-net9.0-windows

All Ribbon components have been styled using framework only.

The Ribbon can also be hosted in a Winforms Application using ElementHost in Winforms.

How to use ElementHost in Winforms

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

79333556

Date: 2025-01-06 15:45:22
Score: 1.5
Natty:
Report link

@banterCZ I am using the same WEB-INF/jboss-deployment-structure.xml file but getting below issue

Caused by: java.lang.IllegalArgumentException: methods with same signature getSchemaManager() but incompatible return types: [interface org.hibernate.relational.SchemaManager, interface jakarta.persistence.SchemaManager]
at java.base/java.lang.reflect.ProxyGenerator.checkReturnTypes(ProxyGenerator.java:311)
at java.base/java.lang.reflect.ProxyGenerator.generateClassFile(ProxyGenerator.java:488)
at java.base/java.lang.reflect.ProxyGenerator.generateProxyClass(ProxyGenerator.java:178)
at java.base/java.lang.reflect.Proxy$ProxyBuilder.defineProxyClass(Proxy.java:558)
at java.base/java.lang.reflect.Proxy$ProxyBuilder.build(Proxy.java:670)
at java.base/java.lang.reflect.Proxy.lambda$getProxyConstructor$1(Proxy.java:440)
at java.base/jdk.internal.loader.AbstractClassLoaderValue$Memoizer.get(AbstractClassLoaderValue.java:329)
at java.base/jdk.internal.loader.AbstractClassLoaderValue.computeIfAbsent(AbstractClassLoaderValue.java:205)
at java.base/java.lang.reflect.Proxy.getProxyConstructor(Proxy.java:438)
at java.base/java.lang.reflect.Proxy.newProxyInstance(Proxy.java:1037)
at deployment.wildfly-0.0.1-SNAPSHOT.war//org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.createEntityManagerFactoryProxy(AbstractEntityManagerFactoryBean.java:464)
... 40 more
Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @banterCZ
  • Looks like a comment (1):
  • Low reputation (1):
Posted by: ashwani gupta

79333546

Date: 2025-01-06 15:43:21
Score: 1
Natty:
Report link

Debugging with the 32bit runtime is no longer supported, as of Visual Studio 2022. You can still deploy the package and run with the 32bit runtime.

enter image description here

Reasons:
  • Probably link only (1):
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • High reputation (-2):
Posted by: David Browne - Microsoft

79333544

Date: 2025-01-06 15:42:21
Score: 3.5
Natty:
Report link

Make sure you have gorilla/mux installed and reload the vscode.

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

79333534

Date: 2025-01-06 15:36:20
Score: 1.5
Natty:
Report link

You are missing ensures fresh(heap) clause in constructor.

Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Single line (0.5):
Posted by: Divyanshu Ranjan

79333532

Date: 2025-01-06 15:35:19
Score: 2.5
Natty:
Report link

easebuzz is the worst payment gateway provider. their support was so unprofessional and they dont have qualified employees. I recently had a very bad experience with them. I will suggest you to use stripe or cashfree. I think razorpay has resumed onboarding new clients now so its all good

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

79333527

Date: 2025-01-06 15:32:18
Score: 3
Natty:
Report link

I have added the following in the Dockerfile. But the error in question still persists. Could someone please help. I have been juggling with this issue since 2 days

FROM python:3.9 AS backend-builder

RUN apt-get update && \
    apt-get install -y unixodbc unixodbc-dev && \
    apt-get clean

# Set LD_LIBRARY_PATH
#ENV LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH

# Set LD_LIBRARY_PATH properly with conditional appending
ENV LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}

# Debug: Print environment variable and check the installed libraries
RUN echo "LD_LIBRARY_PATH is: $LD_LIBRARY_PATH"
RUN ldconfig -p | grep libodbc

RUN pip install -r requirements.txt

My requirements.txt already has pyodbc

Reasons:
  • RegEx Blacklisted phrase (3): please help
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: dawat1234

79333523

Date: 2025-01-06 15:32:18
Score: 0.5
Natty:
Report link

After trying out several options (thaks to everyoe that helped!), my choice was usig a regular experssion:

protected function validator(array $data)
{
    $rules = [
        'first_name' => ['required', 'string', 'max:255'],
        'last_name' => ['required', 'string', 'max:255'],
        'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
        'password' => ['required', 'string', 'min:6', 'confirmed', 'regex:/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{6,}$/'],
        'password_confirmation' => ['required', 'same:password'],
        'accept' => ['accepted'],
    ];

    $messages = [
        'first_name.required' => 'The "First name" field is required',
        'last_name.required' => 'The "Last name" field is required',
        'email.required' => 'Please provide a valid email address',
        'email.email' => 'The email address you provided is not valid',
        'email.unique' => 'The email address you provided is already in use',
        'password.required' => 'A password is required',
        'password.min' => 'The password must have at least :min characters',
        'password.regex' => 'Include uppercase and lowercase letters, at least one number and one symbol (special character)',
        'accept.required' => 'You must accept the Terms & conditions of service'
    ];
    
    return Validator::make($data, $rules, $messages);
}
Reasons:
  • RegEx Blacklisted phrase (2.5): Please provide
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • High reputation (-1):
Posted by: Razvan Zamfir

79333522

Date: 2025-01-06 15:31:18
Score: 1.5
Natty:
Report link

This was a big headache to me, I don't see really why unity bugs are so ridiculous, and miss guided for beginners

Ya as said by @Last_Imba and @emredesu it works when adding a one frame delay

previous code

 gunCtrl.Shoot();

The Fix

IEnumerator ShootThread()
    {
        yield return new WaitForEndOfFrame();
        gunCtrl.Shoot();
        yield return null;
    }

Posting this as it would help some beginners like me.

Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @Last_Imba
  • User mentioned (0): @emredesu
  • Low reputation (1):
Posted by: chandrasekaran Natarajan

79333517

Date: 2025-01-06 15:29:18
Score: 1.5
Natty:
Report link

I was facing same issue, all because of folder permission issue, it resolved by running this on terminal sudo chmod a+w /private/var/tmp/

Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Surendra Kumar

79333514

Date: 2025-01-06 15:28:17
Score: 2
Natty:
Report link

Step 1: npm i webpack-node-externals

Step 2: Make below changes in the webpack.config.js

const nodeExternals = require('webpack-node-externals');

module.exports = { target: 'node', externals: [nodeExternals()], };

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

79333513

Date: 2025-01-06 15:28:17
Score: 4
Natty:
Report link

This does not work on WC Version 9.5.1

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

79333499

Date: 2025-01-06 15:25:16
Score: 2
Natty:
Report link

The Facebook Groups API is deprecated in v19 and was removed from all versions. This deprecation included all Permissions (publish_to_groups, groups_access_member_info) and Reviewable Features (Groups API) associated with the Facebook Groups API. https://developers.facebook.com/blog/post/2024/01/23/introducing-facebook-graph-and-marketing-api-v19/

I can't find a way to post to the Facebook group via Graph API

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

79333494

Date: 2025-01-06 15:23:15
Score: 1.5
Natty:
Report link

Yes, you can create a persistent dictionary in Python and modify it using regular dictionary methods.

Among the options, I'd look at shelve, persidict, pickle, sqlite3.

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

79333493

Date: 2025-01-06 15:23:15
Score: 2
Natty:
Report link

I want to adapt your source code python in arcgis pro 3.1.5 but I have received th error in feature class. I nead to know how can fix this issue please inform me at the email : [email protected]

Thank you

Dr. DEHNI. A

enter code herearcpy.CreateFeatureclass_management(rep, nFcOut, "MULTIPOINT", "", "", "", prj) Traceback (most recent call last): File "", line 1, in File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 3858, in CreateFeatureclass raise e File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 3855, in CreateFeatureclass retval = convertArcObjectToPythonObject(gp.CreateFeatureclass_management(*gp_fixargs((out_path, out_name, geometry_type, template, has_m, has_z, spatial_reference, config_keyword, spatial_grid_1, spatial_grid_2, spatial_grid_3, out_alias), True))) File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing_base.py", line 512, in return lambda *args: val(*gp_fixargs(args, True)) arcgisscripting.ExecuteError: Échec de l’exécution. Les paramètres ne sont pas valides. ERROR 000735: Nom de la classe d’entités : Value Requested Valeur requise Échec de l’exécution de Execution fail (CreateFeatureclass).

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • RegEx Blacklisted phrase (1): I want
  • RegEx Blacklisted phrase (1): I nead to know how can fix this issue please
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Dehni Geomaticien

79333481

Date: 2025-01-06 15:19:14
Score: 1
Natty:
Report link

answer from here plus the header tweak down thread:

.headers on
.mode ascii
.separator "\t" "\n"
.import my_pure_tsv_file SomeTable
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: njamescouk

79333475

Date: 2025-01-06 15:16:14
Score: 1
Natty:
Report link

your code probably looks ok i dont think there is problem in it... maybe the problem is in the request itself, are you certain that the botToken provided is valid ?

try by curling a request there :

$ curl https://api.telegram.org/bot<token>/getMe

it should return a response with no error if the token we valid.

Reasons:
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Imrane Aabbou

79333474

Date: 2025-01-06 15:16:14
Score: 1
Natty:
Report link

Big thank you to OP for sharing their solution!

Just to add my findings when I used it these days on the iOS Safari browser …

google.script.run.withSuccessHandler(google.script.host.close).passResult(result);
google.script.run.withSuccessHandler(google.script.host.close).passResult(JSON.stringify(result));
const parsedResult = JSON.parse(result);
Reasons:
  • Blacklisted phrase (0.5): thank you
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Anonymous

79333469

Date: 2025-01-06 15:14:13
Score: 1
Natty:
Report link

To fix this issue is as simple as looking at the docs and it shows you how to do this without extra css.

<ion-item lines="none">
 <ion-label>Item Lines None</ion-label>
</ion-item>
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: StackOverHoes

79333451

Date: 2025-01-06 15:09:11
Score: 2
Natty:
Report link

Check out this service called Z0rath, it's a centralized responsive authorization system. It's not open source, however it has a free version. It also has a react plugin for easy integration.

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

79333448

Date: 2025-01-06 15:08:11
Score: 1
Natty:
Report link

It appears that I was able to find a temporary solution for the majority of the options that I wanted hidden but it does require me to disable the Project Manager for Java extension shown in the screenshot below for each non-Java project/workspace. This should suffice for now but I'd be open to alternatives.

Screenshot showing Project Manager for Java disabled

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • High reputation (-2):
Posted by: jpierson

79333444

Date: 2025-01-06 15:07:11
Score: 1.5
Natty:
Report link

The beam size is the number of "nodes" you remember in your search. I would say when the beam size is infinity, that is you have all the nodes in graph as your size of beam then it becomes a Breadth-First-Search (BFS). On the other hand, if the beam size is 1, then it basically becomes the Depth-First-Search (DFS). The beam size is the amount of information you want to retain during the entire algorithm. The more memory/space you have the better the results but slower and vice-versa.

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

79333435

Date: 2025-01-06 15:03:10
Score: 2
Natty:
Report link

After hours on it, I could get everything working as:

Note: Don't forget to restart your machine, as environments vars and editors may keep old values.

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

79333432

Date: 2025-01-06 15:02:09
Score: 5
Natty: 4.5
Report link

I want a execut.asmx in asp.net core project and I have tried to install the http://abctest.asmx url but I am getting error.

HTTP GET ERROR

The remote name could not be resolved: "abctest.asmx".

Reasons:
  • Blacklisted phrase (1.5): m getting error
  • RegEx Blacklisted phrase (1): I want
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: ManishaNand tech

79333431

Date: 2025-01-06 15:01:08
Score: 1.5
Natty:
Report link

You maybe able to get what you are looking for via the dashboard serviceability menu.

Click on the visualization in the dashboard and then click CTRL+.

Within the available menu, click the fetch SQL to obtain and view the SQL.

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

79333428

Date: 2025-01-06 15:00:08
Score: 3.5
Natty:
Report link

The behavior was fixed in maven-doxia-sitetools:1.8.1 for my use case (see DOXIASITETOOLS-179).

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

79333414

Date: 2025-01-06 14:55:06
Score: 11.5 🚩
Natty: 6
Report link

have you found any solutions? Sorry, I couldn't ask in the comments because I need 50 reputation for this.

Reasons:
  • Blacklisted phrase (0.5): I need
  • Blacklisted phrase (1.5): any solution
  • RegEx Blacklisted phrase (1.5): 50 reputation
  • RegEx Blacklisted phrase (2.5): have you found any solutions
  • RegEx Blacklisted phrase (2): any solutions?
  • Low length (1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Tokyo boy

79333406

Date: 2025-01-06 14:49:03
Score: 6.5 🚩
Natty: 4.5
Report link

I wanted to comment on @GET T's answer, but the site wouldn't let me.

The solution presented is a creative solution, but it doesn't work for dates in full, suggestions?

E.g.:

{ IF { MERGEFIELD ESTADO_CIVIL_DATA \ @"dd"} > 12 { MERGEFIELD ESTADO_CIVIL_DATA \@"dd' de 'MMMM' de 'yyyy" } { MERGEFIELD ESTADO_CIVIL_DATA \@ "MM' de 'dddd' de 'yyyy" } }

The date 'October 8, 1984' result with the code above: "08 of friday of 1984" (Brazilian date standard) If it were the date in numbers it would work, but for this document I need it like this.

@LMORSE did find a solution?

Reasons:
  • Blacklisted phrase (1): this document
  • Blacklisted phrase (0.5): I need
  • Blacklisted phrase (1): to comment
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • User mentioned (1): @GET
  • User mentioned (0): @LMORSE
  • Looks like a comment (1):
  • Low reputation (1):
Posted by: Ibraim

79333405

Date: 2025-01-06 14:49:03
Score: 1
Natty:
Report link

Similar to Nathan's answer, i find this works on material-ui v6 outlined-input:

<TextField
  slotProps={{
    input: {
      inputProps: {
        size: "small"
      }
    }
  }}
/>

Here is the docs:

  1. slotProps
  2. inputProps
  3. size
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Rongjin Zhang

79333403

Date: 2025-01-06 14:48:03
Score: 1.5
Natty:
Report link

"data": [

"minesNext": {

"id": "b53d83f9-cffd-43fd-Bab8-c6bb78bf239e",

"active": true,

"payoutMultiplier": 0,

"asountMultiplier": 1,

"ancunt": 0,

"payout": 0,

"updatedAt": "Mon, 17 Jun 2824 19:57:12 GMT",

"currency": "btc",

"game": "mines",

"user": {

"id": "72ab99ed-b185-4c1d-86c0-6ed3b0be46f9",

"name": "hagemaruindian

"state": [

"mines": null,

"minesCount": 3,

"rounds":[

"field": 7,

"payout Multiplier: 1.125

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

79333400

Date: 2025-01-06 14:48:03
Score: 1.5
Natty:
Report link

Please go through the amazing plugin developed by transitor software which is great so far for the background location tracking in every aspect and there great community support plugin is

flutter_background_geolocation

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

79333395

Date: 2025-01-06 14:47:02
Score: 3
Natty:
Report link

This part worked to send the variable, so much so that in the web browser I see it being sent.

chatflowConfig: { vars: { apiKey: "TEST_KEY" }

However, I cannot receive it in the Flowise stream. According to JanR, it would be possible to receive it via prompt from the agent, which I was unable to do.

Could someone, especially JanR, show in the flow how they received the variable?

Reasons:
  • Blacklisted phrase (0.5): I cannot
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Alexandre Guimarães

79333389

Date: 2025-01-06 14:46:02
Score: 2.5
Natty:
Report link

You can use piecewise functions to make a gap. See this graph for an example: https://www.desmos.com/calculator/rrro8oc2ke

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