79083659

Date: 2024-10-13 16:56:53
Score: 4
Natty:
Report link

I was also facing this issue and tried some stuffs but switching back to nodejs 18 LTS version has helped and now applications are running fine.

Reasons:
  • Blacklisted phrase (1): also facing this
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Nikhil Sharma

79083654

Date: 2024-10-13 16:52:51
Score: 3
Natty:
Report link

This is absolutely wonderful! It works like a charm and no AI could solve this - neither ChatGPT nor Perplexity AI. ;)

Thank you, Andrey

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Ron Side

79083653

Date: 2024-10-13 16:52:51
Score: 3.5
Natty:
Report link

From the information you provided, I don't see any configuration for SimpleJWT which should handle this.

Check out: https://django-rest-framework-simplejwt.readthedocs.io/en/latest/getting_started.html

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

79083647

Date: 2024-10-13 16:49:51
Score: 2.5
Natty:
Report link

I ran into the exact same issue after updating to Xcode 16.

Did you localize the font you were trying to use?

Otherwise it might not show up in the newest version of Xcode.

Just select your font in the asset catalogue and select 'localize' in the inspector.

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

79083643

Date: 2024-10-13 16:48:51
Score: 2
Natty:
Report link

UPDATE on this:

The solution was to NOT use this Lambda layer. Instead I had to package up Sharp in a zipped folder alongside my index.mjs file, and I was able to trigger it that way. There were also weird additional requirements such as, ensuring you install Sharp in the right way so that it's compatible with the AWS Lambda function code architecture you're writing in. It was a genuine slog to figure this out but if you're struggling to get that Lambda layer working, the fix for me was NOT using that Lambda layer.

Reasons:
  • Blacklisted phrase (1): UPDATE on this
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: king_anton

79083639

Date: 2024-10-13 16:46:50
Score: 2.5
Natty:
Report link

The correct order of the tuple contents is this:

meta={'unique_together': [('language_code', 'field_name_here')]}

Official sources (latest version, oct/2024):

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

79083638

Date: 2024-10-13 16:44:49
Score: 9.5
Natty: 7.5
Report link

I also want to scrape fxstreet.com/news but i just can not connect to the server. i have tried it with requests, playwright, selenium but nothing work. Do you have the same problem? (I just want to confirm the problem source. Thank you)

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Blacklisted phrase (1): but nothing work
  • RegEx Blacklisted phrase (2.5): Do you have the
  • Low length (0.5):
  • No code block (0.5):
  • Me too answer (2.5): have the same problem
  • Contains question mark (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Đình Nguyên Trần

79083627

Date: 2024-10-13 16:38:47
Score: 1.5
Natty:
Report link

The reason for the error: let me tell how i face with permission denied: python when i copy my old django project from linux ubuntu 23.04 to linux ubuntu 24.04 after activate venv then i want to run django server by this command:

(venv)-> python manage.py runserver

tatatatam! error - permission denied: python

solve: after try many ways finally i decide to delete venv folder and created new venv by:

python3 -m venv venv (for linux)

and install needed packages from requirements.txt (or you can do it manually)

pip install -r requirements.txt

and here we go! i can run django server by new created venv

Reasons:
  • RegEx Blacklisted phrase (1): i want
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: mehrdad abdi

79083626

Date: 2024-10-13 16:38:47
Score: 3.5
Natty:
Report link

What does the debugger say on the following line?

String localizedMessage = bundle.containsKey(messageTemplate) ? bundle.getString(messageTemplate) : messageTemplate;

is bundle the one you expect for the right locale? AZ or is it taking the wrong file?

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Starts with a question (0.5): What do
  • Low reputation (1):
Posted by: gdevxy

79083625

Date: 2024-10-13 16:37:47
Score: 3.5
Natty:
Report link

I tried everything but nothing worked.. But this worked in my case: npm uninstall punycode

Reasons:
  • Blacklisted phrase (1): but nothing work
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: PUJA SUNCHU

79083616

Date: 2024-10-13 16:31:45
Score: 2.5
Natty:
Report link

Rollback from version 8.1 to 8.0. It will work

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

79083596

Date: 2024-10-13 16:20:43
Score: 1.5
Natty:
Report link

PostgreSQL:

select 
    id,
    (SUM(score) - MAX(score) - MIN(score)) / (COUNT(score) - 2) AS avg_score
from (select 
        id, 
        UNNEST(array[score1, score2, score3, score4, score5, score6, score7]) AS score
     from score_table) AS scores_per_row
group by id
order by id;

Output:

enter image description here

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

79083590

Date: 2024-10-13 16:19:43
Score: 1
Natty:
Report link

=>GCP Services:

GCP services are managed solutions provided by Google Cloud to perform specific tasks such as computing, storage, data analysis, machine learning, networking, etc. These services offer functionality to users and developers without the need to manage the underlying infrastructure.

Examples:

• Cloud Run: A service for deploying containerized applications. • BigQuery: A fully managed data warehouse service.

=>GCP Resources:

GCP resources can be individual instances, databases, or any assets created and used within GCP services. Resources can be seen as the actual components or instances you create and manage as part of using GCP services.

Examples: • A Cloud Storage Bucket: A specific storage bucket created using the Cloud Storage service. • A Cloud SQL Database Instance: A particular instance of a database in Cloud SQL.

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

79083580

Date: 2024-10-13 16:16:42
Score: 3
Natty:
Report link

Just save the favicon as icon.ico in the app directory nextjs will automatically render it as a favicon

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

79083569

Date: 2024-10-13 16:11:40
Score: 2.5
Natty:
Report link

For reference, after talking to a GCP expert it looks like the maximum number of concurrent outgoing requests is 700

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

79083565

Date: 2024-10-13 16:09:40
Score: 1.5
Natty:
Report link

You do not appear to understand how java's threading model works at all. It's hard to highlight any particular line. I'll try:

This:

if (mustCallLater) {
  unstartedRunnables.add(new Socket<A>(notRunningThread, threadPostfix));
}

is fundamentally broken. You are attemping to use advanced footgun concepts such as double checked locking, and yet you also say things like:

@marcinj Can you answer as an unit-test?

Which indicates you should put the foot guns away.

JMM isn't deterministic

The fundamental problem with your understanding is in how you appear to think that the behaviour of java's threading, i.e. when a write in one thread can be seen in another thread, is deterministic. It is not - hence, it is not possible to 'show' that your code is broken with a simple unit test.

The thing you need to wrap your head around is this:

If you attempt to observe in line B a change that line A made and there is no HappensBefore(A, B) then your code is broken.

And that's because the JMM (Java Memory Model; that section of the JVM spec that describes how observability works) says that the JVM is fee to do whatever it wants - line B may observe what A did or it may not observe what A did. If you run it 5000 times, it may show you what A did all 5000 times, and then tomorrow when you have the important demo, it no longer does that.

Your code must function properly regardless of the 'choice' the JVM makes; you cannot ask the JVM what choice it has made/will make and you can't force it to make a choice other than by establishing HappensBefore which is the one and only way the JMM dictates you can guarantee observability. You can't write unit tests because without HB(A, B) it is still possible that B always observes the changes A makes. Today. On your machine. With this song on your music player. With this full moon. Who knows what happens tomorrow? When the song ends? When you run this on a different VM? Or a different version.

A few important facts about HB:

So, how do you establish that all important HB? There's a list of explicit actions that establish it in the JMM. That is the only way. Here's the important parts of that list:

Your mistakes

You make a change to unstartedRunnables without anything that can possibly establish HB. That means the change you make here may not be observable from anywhere. It doesn't matter that you can synchronized (this) elsewhere; both the writes and the reads need to use synchronized in other to get the HB established by synchronized.

Dangerous locking

this tends to be 'public', and locks should never be public unless extensively documented and considered part of your API. If that's too long to remember, 'locks should never be public' is an acceptable shorthand for that if you want to simplify things. You have a private field named lock right there - all those sync blocks should be synchronized (lock) instead!

For the same reason public fields are a bad idea, public locks are a bad idea.

Badly reinventing wheels

If you are getting the sense 'wait.. that means.. any concurrency code is utterly untestable and that means it is impossible to it right!' you have the right idea. Hence, writing your own low-level concurrency tools is rocket science and you should be incredibly smart, and slave away spending hours per line, to do this. Mere mortals should generally not attempt it.

Instead, look at the java.util.concurrent package. What you're trying to do? It has classes that do exactly that, and they were written in that extremely plodding, careful manner, and have been used and tested by millions of people.

executeUntilDeplated

I don't know what that code is meant to do, but it doesn't appear to do anything useful. In the javadoc it says:

If the thread has been interrupted (maybe shutdown of application)

This is wrong. interruptions do not occur due to shutdown of an app. Threads just end, they don't throw InterruptedExceptions. Only one thing causes InterruptedException: t.interrupt(). And nothing in the core java packages call that (except a select few execution pool things in j.u.c and they document it extensively). It means what you want it to mean, in other words.

Reasons:
  • Blacklisted phrase (1): how do you
  • RegEx Blacklisted phrase (2.5): Can you answer
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • User mentioned (1): @marcinj
  • High reputation (-2):
Posted by: rzwitserloot

79083561

Date: 2024-10-13 16:07:39
Score: 2
Natty:
Report link

From your codepoint, IDWriteFontFallback::MapCharacters will give you a IDWriteFont object.

From the IDWriteFont, you can get the font path. I recommand you to see this post to know how to do it.

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

79083544

Date: 2024-10-13 15:57:37
Score: 1
Natty:
Report link

See https://github.com/lukeroth/gdal/pull/102 for solution.

You can just modify the local "algorithms.go" by yourself.

    return CPLErr(C.GDALContourGenerate(
    src.cval,
    C.double(interval),
    C.double(base),
    C.int(len(fixedLevels)),
    fixedLevels_p,
    C.int(useNoDataValue),
    C.double(noDataValue),
    unsafe.Pointer(layer.cval),
    C.int(idFieldIndex),
    C.int(elevationFieldIndex),
    C.goGDALProgressFuncProxyB(),
    unsafe.Pointer(arg),
)).Err()

to

    cErr := C.GDALContourGenerate(
    src.cval,
    C.double(interval),
    C.double(base),
    C.int(len(fixedLevels)),
    fixedLevels_p,
    C.int(useNoDataValue),
    C.double(noDataValue),
    unsafe.Pointer(layer.cval),
    C.int(idFieldIndex),
    C.int(elevationFieldIndex),
    C.goGDALProgressFuncProxyB(),
    unsafe.Pointer(arg),
)
return CPLErrContainer{ErrVal: cErr}.Err()
Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Chenzo

79083539

Date: 2024-10-13 15:55:37
Score: 5
Natty:
Report link

You can ref this good solution for the react project not pre-configured with path alias

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

79083535

Date: 2024-10-13 15:51:36
Score: 2
Natty:
Report link

Its globalStorage folder is provided by the VSCode extension Extension Pack for Java Auto Config. Install this extension.

https://marketplace.visualstudio.com/items?itemName=Pleiades.java-extension-pack-jdk

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

79083534

Date: 2024-10-13 15:51:36
Score: 2
Natty:
Report link

I’m experiencing the same issue with my project as well. It seems that while using the Scheherazade-Regular.ttf font, certain Quranic symbols, especially the Tajweed marks, don’t render correctly in JavaFX. You might want to explore different Arabic fonts specifically designed for Quranic text to ensure accurate display. Also, check out this site for resources on properly displaying Quranic text. It might help guide you toward a better font solution!

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

79083532

Date: 2024-10-13 15:50:36
Score: 0.5
Natty:
Report link

Half working

select mydate,current_day,days,working_date,to_char(working_date,'DAY') from (SELECT
    mydate,
    current_day,
    days,
    CASE
        -- Adjust for current day being Saturday or Sunday
        WHEN TRIM(current_day) = 'SATURDAY' and (days=0 or days=-1) THEN mydate - 1
        WHEN TRIM(current_day) = 'SUNDAY'   and (days=0 or days=-1)  THEN mydate - 2
        ELSE
            CASE 
                WHEN days > 0 AND TRIM(TO_CHAR(mydate + days, 'DAY')) = 'SUNDAY' THEN (mydate + days) - 2
                WHEN days > 0 AND TRIM(TO_CHAR(mydate + days, 'DAY')) = 'SATURDAY' THEN (mydate + days) - 1
                ELSE mydate + days
            END
    END AS working_date
FROM
    (
        SELECT
            mydate,
            TRIM(TO_CHAR(mydate, 'DAY')) AS current_day,
            days
        FROM
            table_name
    )
);
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Darshan Salunke

79083520

Date: 2024-10-13 15:44:34
Score: 3.5
Natty:
Report link

I am working on the same issue… I add this factor… there are some Apps that work correctly, others don’t… in that case, part of what you say may not be correct.

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

79083515

Date: 2024-10-13 15:42:34
Score: 2.5
Natty:
Report link

After many steps taken, Invalidating Caches solved my problem. If anyone has any details to add on, please do so.

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

79083506

Date: 2024-10-13 15:36:33
Score: 1.5
Natty:
Report link

To send json string in body:

response = requests.put(url, data=json.dumps(json_string))
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Maxim

79083489

Date: 2024-10-13 15:25:31
Score: 1.5
Natty:
Report link

In the development version of ggalign, I've introduced a new cutree argument, allowing users to apply any custom function for tree cutting. Just replace the iris data with yours. The object is a ggplot-like object, you can color the branch by mapping.

library(ggalign)
#> Loading required package: ggplot2
ggstack(iris[, -5L], "v") +
    align_dendro(
        aes(color = branch),
        cutree = function(tree, dist, k, h) {
            dynamicTreeCut::cutreeDynamic(tree, distM = dist, method = "tree")
        }
    ) +
    scale_y_continuous(expand = expansion()) +
    scale_color_brewer(palette = "Dark2") +
    theme(axis.text.x = element_text(angle = -90, hjust = 0))

Created on 2024-10-13 with reprex v2.1.0 ~
~

enter image description here

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

79083482

Date: 2024-10-13 15:22:30
Score: 0.5
Natty:
Report link

Correct version (C lang):

float round_offf(float num, int precision)
{
  long power = pow(10, precision + 1);;
  long result = num * power;

  if ((result % 10) >= 5)
    result += 10;

  return ((float)result / (float)power);
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Vladimir Koltunov

79083478

Date: 2024-10-13 15:19:29
Score: 0.5
Natty:
Report link

In my case I was missing NPM install for sqlite. If its same with you try this once.

npm i better-sqlite3

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

79083475

Date: 2024-10-13 15:19:29
Score: 5
Natty: 5
Report link

l33t h4ck0r5 !!!!111OneOneEleven

Reasons:
  • Low length (2):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Has no white space (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: n00b

79083469

Date: 2024-10-13 15:17:28
Score: 1
Natty:
Report link

I had the same issue on Windows. Tried a couple solutions including pipwin but couldn't fix the issue.

After reading https://people.csail.mit.edu/hubert/pyaudio/#downloads, I believe it requires Python 3.8.

I upgrade Python from 3.7 to 3.8. Then I can run "pip install pyaudio" successfully.

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

79083463

Date: 2024-10-13 15:12:27
Score: 5
Natty:
Report link

this was my situation:

(venv)>> python manage.py runserver !!! but permission denied: python

after many searches finally i cant find the solution. i am in ubuntu 24.04. suddenly i try python3 inplace of python in command and it worked

(venv)>> python3 manage.py runserver

Reasons:
  • Whitelisted phrase (-1): it worked
  • RegEx Blacklisted phrase (1.5): cant find the solution
  • RegEx Blacklisted phrase (2): cant find the solution
  • Low length (0.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: mehrdad abdi

79083459

Date: 2024-10-13 15:11:26
Score: 2.5
Natty:
Report link

I found the issue was due to improper ISOString date being passed caused the Moment library to fail parsing the data correctly. Another issue I found is that the date Moment was creating didn't work correctly on Safari because of the single Day and Month value doesn't work on Safari, has to be a two digit value: ex. 2024-01-01 and not 2024-1-1.

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

79083450

Date: 2024-10-13 15:06:25
Score: 1.5
Natty:
Report link

One cause of connection reset in K8s clusters which I have seen a few times has to do with the conntrack table being full. You may want to review that as well.

Also take a look at the article: Debugging an Intermittent Connection Reset. Perhaps it could guide you to a resolution.

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

79083447

Date: 2024-10-13 15:03:25
Score: 2
Natty:
Report link

The problem was on the "go.mongodb.org/mongo-driver/v2/mongo" package after i change to "go.mongodb.org/mongo-driver/mongo" package the decoding method worked just fine. So we have to use the mongoClient on the "go.mongodb.org/mongo-driver/mongo" package

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

79083441

Date: 2024-10-13 14:55:23
Score: 0.5
Natty:
Report link

your ConnectionStrings should be something like :

 "ConnectionStrings": {"DefaultConnection": "Server={DBAddress};Database={DBName};User Id={user};Password={Pass};MultipleActiveResultSets=true"},

and your ApplicationDbContext should be something like :

public MDBContext(IConfiguration config, DbContextOptions<MDBContext> options) : base(options)
{
    appConfig = config;
}
public DbSet<testdb> Mytest { get; set; }

protected override void OnConfiguring(DbContextOptionsBuilder options)
{
    if (!options.IsConfigured)
    {
    options.UseSqlServer(appConfig.GetConnectionString("NameOFYourCNStringInAppsettings"));

    }

}

it is better to reviewed: https://learn.microsoft.com/en-us/ef/core/dbcontext-configuration/

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

79083440

Date: 2024-10-13 14:54:23
Score: 1
Natty:
Report link

Thank you so much everyone for taking the time to add your comments and answers. They helped point me in the right direction. Indeed @Michal's answer works for a fixed number of columns and many may find it useful. What was needed was specifically a VBA code for a selection of columns, whenever a user arbitrarily selects any range of cells spanning any number of columns and have them sorted correctly.

After some research, this crafted solution works and works for anyone.

Sub SortBlanksOnTop()
    On Error Resume Next
    
    ' Set up your variables and turn off screen updating.
      Dim w As Worksheet
      Dim r As Range ' Working range
      Dim v As Double ' Value for blank cells
      Application.ScreenUpdating = False
    
    ' Set title for the range selection user dialog box.
      t = "Selection Range"
    
    ' Get the sheet.
      Set w = ActiveSheet
    
    ' Request and store range from user.
      Set r = Application.InputBox("Range", t, Application.Selection.Address, Type:=8)
    
    ' Create a new least value by subtracting from the least value in the selection.
    ' Doubles are being used because Ms Excel sorting ranks them before alphabets in ascending order.
      v = Application.WorksheetFunction.Small(r, 1) - 1
    
    'Substitute all blank cells in the selection range with this new value.
      r.SpecialCells(xlCellTypeBlanks) = v
    
    ' Clear any existing sort fields.
      w.Sort.SortFields.Clear

    ' Add sort field for each column in the selection range.
      For Each Column In r.Columns
         w.Sort.SortFields.Add Key:=Column, Order:=xlAscending
      Next Column

    ' Apply the sort
      With w.Sort
        .SetRange r
        .Header = xlNo
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
      End With
            
    ' Revert to blank cells.
      r.Replace What:=v, Replacement:="", LookAt:=xlWhole
      
    ' Turn screen updating back on.
      Application.ScreenUpdating = True
End Sub

Feel free to add conditions in the For Each loop to exclude any kinds of cells, columns or rows.

Hope to save someone's time.

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @Michal's
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: John Miller

79083411

Date: 2024-10-13 14:44:21
Score: 2.5
Natty:
Report link

I think you mean something like this ?

excel table sample of the question

if yes, the formula is the following :

=IF(B2<=TODAY();"Yes";"No")
Reasons:
  • Probably link only (1):
  • Low length (1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: VOLTIS

79083407

Date: 2024-10-13 14:42:21
Score: 1
Natty:
Report link

time      X3

6:00:00     0
7:00:00     2
8:00:00     0
9:00:00     50
10:00:00    0
11:00:00    0
12:00:00    0
13:45:00    0
15:00:00    0
16:00:00    0
17:00:00    0
18:00:00    0
19:00:00    20

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

79083400

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

I had the same error previously and it's caused by a dependency not directly related to pip that's missing, In my case I had to install rust dependency and restart the terminal

As indicated by @Treasure Olayinka it's mostly related to "twobody" and "pyproject.toml"

Reasons:
  • Whitelisted phrase (-1): I had the same
  • Low length (0.5):
  • No code block (0.5):
  • User mentioned (1): @Treasure
Posted by: Dhouibi iheb

79083397

Date: 2024-10-13 14:40:20
Score: 8 🚩
Natty:
Report link

Me gustaría saber con quién puedo hablar dentro de tu empresa Btnkumar para comentar la posibilidad de que aparezcáis en prensa. Hemos conseguido que negocios como el tuyo sean publicados en periódicos como La Vanguardia o La Razón, entre muchos otros.

Aparecer en periódicos digitales es una solución de gran valor para vosotros porque os permitirá: Mejorar vuestro posicionamiento y visibilidad en los buscadores, incrementar la confianza que transmitís cuando vuestros clientes os busquen en internet y diferenciaros de la competencia.

Nuestro precio es de 195e. Te puedo enseñar ejemplos y casos de éxito para que veas cómo funciona. Ofrecemos devolución del dinero si no conseguimos resultados.

¿Cuándo te iría mejor que te llamáramos? Puedes reservar una llamada con nosotros: https://calendly.com/prensa-digital/15min

Un saludo.

Reasons:
  • Blacklisted phrase (1): ¿
  • Blacklisted phrase (1): cómo
  • Blacklisted phrase (1): porque
  • Blacklisted phrase (3): solución
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Julia

79083374

Date: 2024-10-13 14:30:18
Score: 2
Natty:
Report link

I have added some very basic jdbc driver in order to be able to view it via datagrip github

it will never become production ready JDBC driver but at least you can view data and do basic updates. Feel free to add PRs if you're interested in more robust functionality

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

79083373

Date: 2024-10-13 14:29:18
Score: 0.5
Natty:
Report link

Add a Spacer in a HStack instead like this

HStack {
          Text(title)
              .font(.subheadline)
              .bold()
          Spacer()
        }
Reasons:
  • Low length (1):
  • Has code block (-0.5):
Posted by: Mike Zriel

79083367

Date: 2024-10-13 14:27:17
Score: 1.5
Natty:
Report link

This works with any sanitized comma separated values.

SET @values = '1,Smith,3';
SELECT * from JSON_TABLE(CONCAT('["', REPLACE(@values, ',', '","'), '"]'),
                  '$[*]' COLUMNS (yourcolumn_name TEXT PATH '$')) jsontable;

query results in rows

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

79083363

Date: 2024-10-13 14:27:17
Score: 0.5
Natty:
Report link

have to tried to remove the different margin and padding in your css ?

if you didn't here is what I think could help you :

ol, ul {
list-style-position: inside; /* Aligns the bullet or number with the text */
margin: 0; /* Removes default margins */
padding: 0; /* Removes default padding */
}


li {
    margin: 0; /* Removes margin from list items */
    padding: 0.5em 0; /* Adjusts vertical spacing */
}

/* Optional: To further control spacing for nested lists */
ul {
    margin-left: 1.5em; /* Indent nested lists */
}
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Tahoune Tarik

79083356

Date: 2024-10-13 14:25:16
Score: 3.5
Natty:
Report link

MaxLand's answer is great, did it for me. great and perfect

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

79083351

Date: 2024-10-13 14:23:16
Score: 2
Natty:
Report link

Appreciate to @liaifat85 gave me a big hint and it solved my issue.

Instead of using the -jar option, you can try the -cp option for both JAR files and specify the main class explicitly.

java -cp Library.jar:MyCode.jar MyCodeKt
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • User mentioned (1): @liaifat85
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Plus

79083335

Date: 2024-10-13 14:19:15
Score: 2.5
Natty:
Report link

You could try accessing the ALLERDET platform for allergen data analysis and prediction, which might offer valuable insights for your project. Paper source: https://doi.org/10.1016/j.jbi.2022.104217

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

79083334

Date: 2024-10-13 14:19:15
Score: 1
Natty:
Report link

It's been a minute! Only just stumbled upon this question while searching for something else, but since I'm kind of passionate about this topic and have argued for it in the past, and I definitely think this is worth hearing, let me explain why and when you should use this property. I want to preface this by saying, that I've had this conversation with quite a few other C# developers, including some of the C# compiler devs, and have found strong disagreement with my position. I hope that I can convince more people of my stance on the issue with this post.

First, just to clear up some confusion to your question (even though you probably resolved whatever issue it was that you were having in the three years since this was posted, but hey, the question was phrased in a generic fashion, so time should not be an issue):

Let's say that I have the following projects:

Project A

Project B - References Project A

Project C - References Project B

If I set true in Project C's .csproj, Project C will not compile since Project A is not explicitly references by Project C. If I do not set this DisableTransitiveProjectReferences flag, it will compile.

This is not generally true - it just means that Project C also depended on A, without referencing it directly - it relied on the transitive reference to A from B. If C didn't use anything from A, it wouldn't need a reference to it, and you could keep the DisableTransitiveProjectReference property.

Now, a small anecdote, and why I came to this question in the first place, to show one of the issues that arises from this behavior. I just wanted to add an instance of JsonSerializerOptions to my code, but I didn't know the specific name. In my head it was something with "Settings", so I started typing JsonSerializerSettings, and saw a suggestion for this specific class. I hit enter, thought I solved the problem. But I got an error about incompatible types. Turns out it included the wrong namespace, and what I really wanted was JsonSerializerOptions, not Settings. I wondered why there were two separate classes that seemed to do the same thing. Turns out one is the built in System.Text.Json version, which I wanted, the other is from Newtonsoft.Json. I was perplexed - I don't use Newtonsoft, and haven't ever used it in this project. Where did it come from? Nothing in my projects referenced it.

Turns out a certain NuGet package that we relied on referenced it. And suddenly, it was in our project! Easily accessible from everywhere, even though it's absolutely nothing we want to use. So now, the predictive abilities of the suggestion feature are diminished, because we polluted the available namespaces with things we never intended to and don't need. If a new developer joined, and didn't know we used System.Text.Json, they would type JsonSerializer and the suggestion shows both Newtonsoft.Json and System.Text.Json, because that name exists in both. But the serialization behavior is different! In the ideal case, it would try to pass an object from one library to something expecting an object of the other library, then the static analyzer would catch it (as in my case above). In the worst case, it sends differently formatted JSON strings to a receiver who can't handle them, or, even worse, handles them differently without erroring. This can be a nightmare to even notice, let alone debug.

There are several more issues with that behavior. And one of those is actually exactly your example. Imagine three projects, A, B, which references A, and C, which references B. Now, C uses features from A, without referencing it - why would anyone have added a reference, no one even knows that it doesn't reference A, since all the types from A have always been available to it. But now B is refactored, and it turns out, that it doesn't need the reference to A anymore. So now that dev removes the reference to A. Suddenly, project C no longer compiles, despite nothing in it having changed!

And this is the simplest case, imagine a project reference chain from A to Z, where A is referenced by B, which is referenced by C, and so on, and finally Z references Y, thus also including a reference to all previous projects. Now, imagine half of those projects use features from A. No one bothered to include A directly, and now B loses the reference to A. Half the projects don't compile anymore! Now you either have to figure out which one of them is the "lowest" in the reference chain, and make sure to reference A from that one, which is C in that case (and projects aren't usually this neatly ordered, figuring that out can be time consuming), and now you have created another weak link, capable of making the remaining projects not compile with a reference change. Alternatively, you have to add the reference to A to every other project that doesn't compile, which is really annoying to have to do all at once, and completely ruins the advantages of transitive references in the first place.

Another, and this time quite devious, issue arises when two projects in a reference chain share a namespace-qualified type name. Now, I know what you're gonna say "that shouldn't ever happen!" and you're right, it shouldn't! But it absolutely can, and often you can't do anything about it, especially in larger projects. Not only are different classes in different projects allowed to share the same namespace, they can also exist in the global namespace. And if that does happen, boy are you out of luck. Now you can't use either of the types, without aliasing the assembly, even if you don't need one of the assemblies at all, just because it was referenced transitively! Let's say you have the same structure as above, C, which references B, which references A. Let's say A and B both have class Foo defined, without a namespace (or the same namespace, whichever). Now in C, you want to use B's foo. How do you specify that? Again, you can't, without an assembly alias. Now you need to alias the B assembly, just to use Foo, because of a conflict with another assembly you don't need and never even wanted. And nowhere in A or B do you get an error or even a warning! Only when you try to use the type from B does the compiler get antsy.

Yet another reason to disable it, is to prevent leaking internal classes and mechanisms. Assume you have a low level project A that does some pretty complex things and needs to be accessed in a certain way. Handling it is complicated, but it is crucial to your program. To avoid having people on your team misuse it, you decide to write a more user-friendly abstraction on top of it, project B, which encapsulates project A's functionality, without exposing unsuspecting devs to its pitfalls. One of the comments on your question mentioned a project that handles database access, those come to mind, but there are more use-cases for this scenario. Now, other projects should not consume A directly - they should consume B. But if B reference A, all of A's low level complex mechanisms will be exposed to any project C that references B.

And the problem here is even deeper, because you cannot even disable C accessing A by just disabling transitive project references on either A or B - you have to disable them on C! The proper way to disable that with the current mechanism, is to edit the reference to A in B's project file, by giving it the PrivateAssets="All" attribute, and you have to do that for everything you don't want to leak externally. If you don't want to do that, that means, that every consumer of B needs to disable transitive project references, to not have access to A. And that has to be done habitually when you create a new project.

Now, if every programmer on the team is perfectly aware of each project's scope and purpose, that's not an issue, and that's often one of the arguments people in favor of this behavior bring to the discussion. And don't get me wrong, I'm all in favor of educating and educated developers, but this just increases the surface area for design problems, and even bugs. We have tooling for a reason, and if it can prevent issues from happening, why shouldn't it?

So with all this said - why does the feature even exist? What does it bring to the table? Well, if you ask me, not much. It saves you from having to add a reference to a project occasionally, which every C# IDE can do for you anyway. And it's not even consistent about when it saves you from having to do that. Sometimes you may still need to add a refernece - if nothing in your current reference list references it (or even if a project in there does reference it, but has the PrivateAssets="All" reference attribute set). Other times, you may not have to. This, so I'm told, is the advantage.

This entire debate has similarities with other situations. In C++ it's a common idiom to "include what you use", to prevent all issues that I just mentioned here. This idiom was developed over years of people having precisely these issues. And while it's easier to get such issues with included headers, compared to referenced projects, the same (and more!) issues still apply.

Tl;dr when should you disable it? If you ask me - always :) It's a pretty insignificant feature with only a slight argument in its favor, that is only partially applicable, and plenty of reasons against it.


Now, the careful reader may have noticed that my particular problem, from my earlier anecdote, is, although strongly related, actually slightly different from the issue presented here. While semantically the same, technically, I am not dealing with a project reference, but a package reference. And while we have the "luxury" of disabling this "feature" for referenced projects, there is currently no way of doing this for referenced packages. Sadly, I will have to live with Newtonsoft.Json being exposed to my project, because I use a NuGet package that happens to reference that. I will have to remind everyone who contributes code to it, to use the right JSON serializer, because two will be available to them at any point in the project's code, and there is little I can do about it.

And with package references, there is yet another issue to worry about. Imagine your project references package X, and it has a reference to package Y. Your project also needs Y, so you've just been using it from X, since you already had it handy, or maybe you just thought someone else had already included it in the project. Now you update X, and suddenly your project doesn't compile. X, apparently, removed the reference to Y in a newer version. Same scenario as above, essentially, except with another headache. Now you decided to add a reference to Y manually. But your project still doesn't compile! Turns out you relied on a specific version of Y, and Y's API changed since then. Now you have to dig out what the last version of X was that you used, and which version of Y it referenced, to manually include that specific version of Y. And this is, again, the best case - where you could statically tell that there was an issue. What if the version of Y you add as a reference compiles, but some of its behavior is different? Think of the JSON example before, what if the serialization behavior changed? What if there was a bug, that you accidentally relied on? What if there was a new bug introduced? Suddenly you start having issues with Y, despite having updated X!

There is a GitHub issue which advocates for adding a similar DisableTransitivePackageReferences project property, which has been happily ignored for four and a half years. While there was some discussion on it, there seems to be a general lack of interest in fixing this issue. Feel free to throw a like on there, if I was able to convince you and you think this is something worth having. Though personally, I would still much prefer, if the entire trasitive references feature was opt-in, rather than opt-out. Or, alternatively, just gone entirely.

P.S. Before comments start suggesting it, I know there are some unpleasant workarounds to my issue. I've read that GitHub thread in detail, so I'm aware of a number of options, but nothing that would work in a similar, clean and generic way to a DisableTransitivePackageReferences property. And this question is not about that.

Reasons:
  • Blacklisted phrase (1): How do you
  • Whitelisted phrase (-2): I solved
  • RegEx Blacklisted phrase (1): I want
  • RegEx Blacklisted phrase (2): But I got an error
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
Posted by: Stjepan Bakrac

79083332

Date: 2024-10-13 14:19:15
Score: 1.5
Natty:
Report link

It turns out 0.1 difference in gcc version matters. I assumed it was not the case because it's just minor version and only differs by 1.

But the builtin function I mentioned was newly introduced in gcc version 13.3.

So I manually install gcc 13.3 on my remote machine and it works now.

for short: minor version matters.

Reasons:
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: S.Y. Kim

79083329

Date: 2024-10-13 14:18:15
Score: 2
Natty:
Report link

The cDAQ-9189 is supported by the latest DAQmx software. Theoretically, if your machine and OS are supported, it should work. DAQ support table

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

79083325

Date: 2024-10-13 14:16:14
Score: 0.5
Natty:
Report link

I just found out that if you have a BOM (Byte Order Mark) in your file before a commit, and don't have one after it, then when you git diff the file before and after the commit, it will appear that the first line is both removed and added, but the removed line will have a mysterious space at the beginning. It turns out that that mysterious space is the BOM.

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

79083321

Date: 2024-10-13 14:15:13
Score: 1
Natty:
Report link

I encountered the same issue, seems like FB sdk doesn't like us passing async function because they stuck on 2010. the stupid workaround I needed to do is pass a regular function, which calls an async function that has it's own try-catch inside

const myAsyncFunction = async (response) => {
 try {
     // Logic goes here...
   } catch (e) {}
}

 FB.login(function() {
    myAsyncFunction() // we don't await here
})
Reasons:
  • Blacklisted phrase (0.5): I need
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Ron Dahan

79083317

Date: 2024-10-13 14:12:12
Score: 2
Natty:
Report link

I found out how to do it.

.foo:nth-of-type(1) .bar:nth-of-type(3),
.foo:nth-of-type(2) .bar:nth-of-type(2) {
  color:yellow;
}
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Matt The Greenside Gallery

79083307

Date: 2024-10-13 14:05:11
Score: 1
Natty:
Report link

I modifie a little the code :

import { Sequelize,Model, InferAttributes, InferCreationAttributes, NonAttribute,CreationOptional, DataTypes, HasManyGetAssociationsMixin} from '@sequelize/core'
import { Attribute, PrimaryKey, AutoIncrement, NotNull, BelongsTo, BelongsToMany, HasOne, HasMany } from '@sequelize/core/decorators-legacy'


import { Club } from './Club';

export class Comitee extends Model<InferAttributes<Comitee>, InferCreationAttributes<Comitee>>  {
    @Attribute(DataTypes.INTEGER)
    @PrimaryKey
    @AutoIncrement
    declare id: CreationOptional<number>

    @HasMany(() => Club, 'comiteeId')
    declare clubs?: NonAttribute<Club[]>
    declare getClubs: HasManyGetAssociationsMixin<Club>
}
export const GET = async (req: NextRequest, res: NextResponse ) => {


    const comitee = await Comitee.findByPk(1)
    if (!comitee) return NextResponse.json(" pas de comité trouvée")
    console.log("comitee", comitee)
    // this return the good value
    
    console.log("comitee get clubs", await comitee.getClubs())
    // this retun getClubs() is not a function
  } 
}

But still the same error.

I do not understand. I make a good link beetween the table and with the "getClubs" in model the type

declare getClubs: HasManyGetAssociationsMixin<Club>

The type say it is a function

What i did bad ?

Sorry to my english and thanks

Reasons:
  • Blacklisted phrase (0.5): thanks
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Huyenlong

79083299

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

They are stored in the same place :) You need to add the repositories separately in the settings.gradle file like so:

pluginManagement {
    repositories {
        mavenCentral()
        gradlePluginPortal()
        maven {
            url 'https://repo.spring.io/milestone'
        }
    }
}

Full example (which builds for me): https://github.com/willb611/hello-world-spring-boot-gradle/pull/1/files

Edit: if in doubt, you can find list of versions available at different repositories (i.e. spring milestone repository) here: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot?repo=springio-milestone

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

79083290

Date: 2024-10-13 13:59:09
Score: 3
Natty:
Report link

In the catch, use console.log(error.response) to get more information about the error, such as status code and response details.

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

79083288

Date: 2024-10-13 13:58:09
Score: 2.5
Natty:
Report link

Here is an article that will help you to understand better how to decode dynamic json (best practice)

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

79083286

Date: 2024-10-13 13:57:09
Score: 1.5
Natty:
Report link

Thanks to all that answered or readed this.

I fixed it, but for you to know, the thing was INKSCAPE (that i will install again) had the python interpreter that VScode was using and was outdated.

Again, thanks

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (0.5): thanks
  • Whitelisted phrase (-2): I fixed
  • Low length (0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Pablo Miguel Saval Sendra

79083284

Date: 2024-10-13 13:54:08
Score: 3.5
Natty:
Report link

Read this article to understand the foundation of async-await mechanism better HERE

Reasons:
  • Blacklisted phrase (1): this article
  • Low length (1.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: TalBenAsulo

79083282

Date: 2024-10-13 13:53:08
Score: 1
Natty:
Report link

just use a fetch request to send a request to backend. for example

const res = await fetch("http://localhost:8080/api/v1/users");
const data = await res.json();

// use the data.

make sure you user "http://10.0.2.2:8080" for react native in development.

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

79083275

Date: 2024-10-13 13:51:07
Score: 3.5
Natty:
Report link

You can read this article to understand the foundation of async await.

here

Reasons:
  • Blacklisted phrase (1): this article
  • Low length (1.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: TalBenAsulo

79083272

Date: 2024-10-13 13:49:07
Score: 1
Natty:
Report link

Here are some concepts: https://people.freedesktop.org/~dbn/pkg-config-guide.html

You just install it into $LIBDIR/pkgconfig.

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

79083265

Date: 2024-10-13 13:45:06
Score: 4
Natty: 4.5
Report link

Cloning https://github.com/Lamprecht/perl-tk.git ... FAIL ! Failed cloning git repository https://github.com/Lamprecht/perl-tk.git ! Couldn't find module or a distribution https://github.com/Lamprecht/[email protected]

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

79083260

Date: 2024-10-13 13:43:05
Score: 3.5
Natty:
Report link

Try this article for understanding aync await mechanism better.

aync await article for beginners

Reasons:
  • Blacklisted phrase (1): this article
  • Whitelisted phrase (-1): Try this
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: TalBenAsulo

79083250

Date: 2024-10-13 13:34:03
Score: 0.5
Natty:
Report link

There's no real problem in the HTML documents, but instead the script file.

The problem is that JavaScript files load from top to bottom of the file. On the about page, it can't find a button going to the about button, so it provides an error in the console and stops loading the rest.

You can fix this by moving the order, which I don't recommend that, because it will still result in an error although it will work.

What I would do is make separate JavaScript files, I would like "a" tags (hyperlinks), or I would check to see if there was a button before adding an event listener to it, like this:

if (document.querySelector("#about")) {
  document.querySelector("#about").addEventListener("click", function () {
    window.location.href = "about_me.html";
  });
}

if (document.querySelector("#about")) {
  document.querySelector("#contact").addEventListener("click", function () {
    window.location.href = "contact_me.html";
  });
}

if (document.querySelector("#home")) {
  document.querySelector("#home").addEventListener("click", function () {
    window.location.href = "home.html";
  });
}

I've been trying to post this for like 20 minutes, but I just posted on another question so I had to wait 30 minutes.

I just saw your response, and it works but the only problem is it runs for every button on the page, which is possible to make it lag if there's a lot of interactivity.

Reasons:
  • Blacklisted phrase (1): another question
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Grant

79083245

Date: 2024-10-13 13:32:03
Score: 2
Natty:
Report link

Just copying the actual file path (even it is in the project directory already) worked for me. Idk why VS code is like this. Other IDEs like netBeans just allow for the file to be in the project and you can access it

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

79083243

Date: 2024-10-13 13:32:03
Score: 1
Natty:
Report link

The title "How to resend webrequest via a firefox extension?" is a bit misleading. It should be something more like "webrequest handler extension doesn't load," since that's the actual question.

I know it's been a while since you asked the question, so maybe you already know the answer, but you said:

The Problem is, I dont even see the "Background script loaded" log at the beginning!

I didn't debug your code, but when I load it as a temporary add-on, I do get "Background script loaded" logged to the console. Make sure you're looking at the right console. On about:debugging > This Firefox, "Inspect" your extension. That's the console where your background logs console messages.

One other thing I'll point out: the extraInfoSpec parameter for addListener doesn't have valid "extraHeaders" and "requestHeaders" values. There would be an uncaught error if you try to load your code with those values. The error shows up in the console, too.

  ["requestBody", "blocking", "extraHeaders", "requestHeaders"]

should be just

  ["requestBody", "blocking"]
Reasons:
  • Blacklisted phrase (1): I know it's been
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Nanigashi

79083241

Date: 2024-10-13 13:31:02
Score: 0.5
Natty:
Report link

This worked in the end:

document.addEventListener("click", function(event) {
    // Check which element was clicked using event.target
    if (event.target.matches("#about")) {
        window.location.href = "about_me.html";
    } else if (event.target.matches("#contact")) {
        window.location.href = "contact_me.html";
    } else if (event.target.matches("#home")) {
        window.location.href = "home.html"
    }
});
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: SolidOpt

79083239

Date: 2024-10-13 13:30:02
Score: 3.5
Natty:
Report link

It's worked for me.

Check here https://github.com/firebase/flutterfire/issues/13342

Reasons:
  • Whitelisted phrase (-1): worked for me
  • Probably link only (1):
  • Low length (2):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Riyazur Rohman Kawchar

79083238

Date: 2024-10-13 13:30:02
Score: 1
Natty:
Report link

+1 to @kartiks77

quite likely that this wasn't available yet at the time of the question (added in version 6.0)

I opted for specifying testpaths, but addopts works too, and it's very good to know for setting defaults

# pyproject.toml
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -q"
testpaths = [
    "tests",
    "integration",
]

from pytest's docs

Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @kartiks77
  • Low reputation (0.5):
Posted by: the-citto

79083231

Date: 2024-10-13 13:26:01
Score: 5
Natty:
Report link

You can try using a border pane :

JavaFX Panes

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

79083208

Date: 2024-10-13 13:13:58
Score: 2
Natty:
Report link

Although this question was asked some time ago, I'd like to provide a more comprehensive solution that might be helpful for others facing similar issues.

To terminate specific TCP connections in PowerShell without third-party tools, we can use the SetTcpEntry function from the Windows API. Here's a complete solution that includes a function for closing TCP connections:

# Define Win32 API functions
Add-Type -TypeDefinition @"
    using System;
    using System.Runtime.InteropServices;

    public class TcpHelper
    {
        [DllImport("iphlpapi.dll", SetLastError=true)]
        public static extern int SetTcpEntry(IntPtr pTcpRow);

        [StructLayout(LayoutKind.Sequential)]
        public struct MIB_TCPROW
        {
            public uint dwState;
            public uint dwLocalAddr;
            public uint dwLocalPort;
            public uint dwRemoteAddr;
            public uint dwRemotePort;
        }
    }
"@

<#
.SYNOPSIS
Closes a specified TCP connection.

.DESCRIPTION
The Close-TcpConnection function closes a TCP connection using the Windows API. It takes a connection object (typically obtained from Get-NetTCPConnection) as input and forcibly closes the connection.

.PARAMETER Connection
An object representing the TCP connection to be closed. This should be an object returned by the Get-NetTCPConnection cmdlet.

.EXAMPLE
$connection = Get-NetTCPConnection -LocalPort 12345 | Select-Object -First 1
Close-TcpConnection -Connection $connection

This example closes the TCP connection on local port 12345.

.NOTES
This function requires administrative privileges to run successfully.
#>
function Close-TcpConnection {
    param (
        [Parameter(Mandatory=$true)]
        [object]$Connection
    )

    if ($null -eq $Connection) {
        Write-Host "Connection is null"
        return
    }

    # Create MIB_TCPROW structure
    $tcpRow = New-Object TcpHelper+MIB_TCPROW
    $tcpRow.dwState = 12  # MIB_TCP_STATE_DELETE_TCB
    $tcpRow.dwLocalAddr = [System.BitConverter]::ToUInt32([System.Net.IPAddress]::Parse($Connection.LocalAddress).GetAddressBytes(), 0)
    $tcpRow.dwLocalPort = [uint16]$Connection.LocalPort -shl 8 -bor [uint16]$Connection.LocalPort -shr 8
    $tcpRow.dwRemoteAddr = [System.BitConverter]::ToUInt32([System.Net.IPAddress]::Parse($Connection.RemoteAddress).GetAddressBytes(), 0)
    $tcpRow.dwRemotePort = [uint16]$Connection.RemotePort -shl 8 -bor [uint16]$Connection.RemotePort -shr 8

    # Allocate unmanaged memory and copy structure
    $pTcpRow = [System.Runtime.InteropServices.Marshal]::AllocHGlobal([System.Runtime.InteropServices.Marshal]::SizeOf($tcpRow))
    [System.Runtime.InteropServices.Marshal]::StructureToPtr($tcpRow, $pTcpRow, $false)

    # Call SetTcpEntry
    $result = [TcpHelper]::SetTcpEntry($pTcpRow)

    # Free unmanaged memory
    [System.Runtime.InteropServices.Marshal]::FreeHGlobal($pTcpRow)

    if ($result -eq 0) {
        Write-Host "Successfully closed TCP connection"
    } else {
        Write-Host "Failed to close TCP connection, error code: $result"
    }
}

Here's how to use it:

  1. First, find the connection you want to close:
$ConnectionToKill = Get-NetTCPConnection | Where-Object { $_.RemoteAddress -eq 'SSHServer1' -and $_.RemotePort -eq 22 } | Select-Object -First 1
  1. Then, use the Close-TcpConnection function to close the connection:
Close-TcpConnection -Connection $ConnectionToKill

Notes: This script may requires administrative privileges to run.

Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • Me too answer (2.5): facing similar issue
  • Low reputation (1):
Posted by: Cesaryuan

79083200

Date: 2024-10-13 13:09:57
Score: 3.5
Natty:
Report link

Got resolved need to

sudo apt install virtiofsd sudo apt install virt-manager

Thanks

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Low length (1.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Ravi

79083199

Date: 2024-10-13 13:09:57
Score: 0.5
Natty:
Report link

Check this repo, I fixed the pybag build by running async game loop and copying the assets folder manually (localhost) and by using github actions in Github Pages. There are some try/cath to check the images load. https://github.com/NikkiAsteinza/convex_hull

Reasons:
  • Whitelisted phrase (-2): I fixed
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Anikkilacion

79083179

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

It's likely they used an AI tool like GitHub Copilot (paid) and Codeium (free), which none are preinstalled. I use Codeium and it works really well with no cost: https://codeium.com

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

79083177

Date: 2024-10-13 13:03:55
Score: 3.5
Natty:
Report link

Fixed, Cloudfare added a zstd content type instead of my initial utf-8

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

79083162

Date: 2024-10-13 12:54:53
Score: 0.5
Natty:
Report link

The other reason for this to suddenly happen is if you have accidentally enabled the screenreader option. To remove this, click in the status bar:

Screen Reader status

Then say "No" to having a screenreader

Say NO to screenreader

After this, multi-select will work as intended without requiring custom configuration changes. If you do need screenreader enabled, the above custom config would be the only way.

Reasons:
  • Probably link only (1):
  • No code block (0.5):
  • High reputation (-1):
Posted by: netniV

79083153

Date: 2024-10-13 12:49:52
Score: 1
Natty:
Report link

The return type for lean documents in generel in mongoose 8 is:

(mongoose.FlattenMaps<unknown> & Required<{ _id: unknown; }>) | null
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: CyberT33N

79083141

Date: 2024-10-13 12:44:51
Score: 2
Natty:
Report link

Prometheus console templates are being used for quick insights rather than comprehensive dashboarding.

Grafana offers customizable visualizations and a more user-friendly interface. In Grafana, you can set alerts that are useful in some cases (for example: monitoring services).

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

79083131

Date: 2024-10-13 12:36:50
Score: 1
Natty:
Report link

Here is my simple variant of regex exspression for finding both negative and positive int and float numbers in code:

(\b|\B-)\d*(\.\d+)?

Works fine for any number variable declarations:

float x = -0.25;
int y = 123;

etc...

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

79083128

Date: 2024-10-13 12:33:50
Score: 1.5
Natty:
Report link

Unfortunately, the requests does not allow cookies to be passed in the headers, so this method does not work. Сookies should be passed as a separate argument r = requests.get(url, cookies=cookies)

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

79083126

Date: 2024-10-13 12:32:49
Score: 0.5
Natty:
Report link

I've figured this out. Instead of having a separate tree with expanded walls (planes) you can add hitbox size to plane distance when traversing BSP tree itself:

return Vector3.Dot(node.plane.normal, position) + (node.plane.distance + hullSize) < 0 ? IsPointInNode(position, node.frontChild) : IsPointInNode(position, node.backChild);

And if your hitbox has different sizes on different dimensions you can just multiply plane normal by hitbox size:

float hullSize = Math.Abs(node.plane.normal.X * size.X) +
                   Math.Abs(node.plane.normal.Y * size.Y) +
                   Math.Abs(node.plane.normal.Z * size.Z);
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Artyoman

79083120

Date: 2024-10-13 12:29:48
Score: 3.5
Natty:
Report link

Okay, how do you feel about painting whites squares on a black background?

procedure TForm3.Button1Click(Sender: TObject);
var PD: TPathData;
    r,c:    Integer;
begin
  ImageControl1.Bitmap.SetSize(Round(ImageControl1.BoundsRect.Width), Round(ImageControl1.BoundsRect.Height));
  if ImageControl1.Bitmap.Canvas.BeginScene then
  try
    with ImageControl1.Bitmap.Canvas do
    begin
      Clear(TAlphaColorRec.Black);
      Fill.Kind := TBrushKind.Solid;
      Fill.Color := TAlphaColorRec.White;
      Stroke.Thickness := 2;

      PD := TPathData.Create;
      for r := 0 to 3 do begin
        for c := 0 to 3 do begin
          PD.MoveTo(PointF(c * 90 + 10, r * 90 + 10));
          PD.HLineToRel(80);
          PD.VLineToRel(80);
          PD.HLineToRel(-80);
          PD.ClosePath;
        end;
      end;

      DrawPath(PD,1);
      FillPath(PD,1);
      PD.Free;
    end;
  finally
    ImageControl1.Bitmap.Canvas.EndScene;
  end;
end;
Reasons:
  • Blacklisted phrase (1): how do you
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Looks like a comment (1):
  • Low reputation (0.5):
Posted by: Philip J. Rayment

79083112

Date: 2024-10-13 12:25:47
Score: 4.5
Natty: 4
Report link

Worked like a charm! How to extract the text within the squares? Tried pytesseract with no much success.

Reasons:
  • Blacklisted phrase (1): Worked like a charm
  • Low length (1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Nayyer

79083106

Date: 2024-10-13 12:22:46
Score: 1
Natty:
Report link

I know it's been a while since you asked the question, so maybe you already know the answer, but you said:

{
  ...
  "permissions": [
    "webRequest",
    "webRequestBlocking",
    "storage",
    "tabs"
  ],
  ...
}

You should make that:

{
  ...
  "permissions": [
    "webRequest",
    "webRequestBlocking",
    "storage",
    "tabs",
    "*://*/*"
  ],
  ...
}

You need permission to intercept the URLs. When you specify the urls property for the filter, that's all it does: filter. If you don't have permission for the URLs, then there's nothing going in the filter, so there's nothing coming out.

You should replace chrome with browser, as you said you did. Sooner or later chrome will go away.

Depending on what else you're doing, you probably don't need tabs. You definitely don't need it for the snippet in the question.

Reasons:
  • Blacklisted phrase (1): I know it's been
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Nanigashi

79083105

Date: 2024-10-13 12:22:46
Score: 2.5
Natty:
Report link

The trick that solved it for me was to do a cold boot of the emulated device. You can do that from the device manager.

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

79083098

Date: 2024-10-13 12:18:45
Score: 3.5
Natty:
Report link

middleware.ts should located in the root of your project. not the app directory

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

79083097

Date: 2024-10-13 12:18:45
Score: 3.5
Natty:
Report link

To answer the question: No there's not.

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

79083078

Date: 2024-10-13 12:13:44
Score: 1.5
Natty:
Report link

There is no way to give input in the output section, as you already know, output means result. But there is a workaround for it.

Step1: Open settings for you VS_Studio Step2: Type (code runner) in the search bar Step3: Look for "Whether to run in Intergrated Terminal"

VS Studio rollout update for this issue and introduce terminal section to tackle this problem

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

79083075

Date: 2024-10-13 12:09:43
Score: 2
Natty:
Report link

It was a multithreading bug. #blush

My code: single thread. Third party library: not so much.

Apologies for the noise.

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

79083059

Date: 2024-10-13 12:02:41
Score: 0.5
Natty:
Report link

The other answers are correct, in that this is not how it really works, you can't send the QueryClient from the server to the client and you don't really want to do that.

Tanstack actually provides a remix example in their post about SSR: https://tanstack.com/query/latest/docs/framework/react/guides/ssr

As a note, and you should not do this for this question, but you can pass stuff from the server to the client in remix by just returning it in the loader. So if you export it somewhere on the server, import it via a loader and return it, it will be accessible on the client. This wouldn't work for react-query but might be useful for other things.

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

79083048

Date: 2024-10-13 11:57:40
Score: 3
Natty:
Report link

This fixes the issue: https://github.com/flame-engine/flame/issues/3337

I was not using the RectangleComponent properly.

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

79083045

Date: 2024-10-13 11:56:40
Score: 3.5
Natty:
Report link

/usr/local/lib/python3.10/dist-packages/torch/nn/modules/transformer.py:307: UserWarning: enable_nested_tensor is True, but self.use_nested_tensor is False because encoder_layer.self_attn.batch_first was not True(use batch_first for better inference performance) warnings.warn(f"enable_nested_tensor is True, but self.use_nested_tensor is False because {why_not_sparsity_fast_path}") what is the issue?

Reasons:
  • No code block (0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Suliman Haqqyar Jan

79083026

Date: 2024-10-13 11:47:38
Score: 1.5
Natty:
Report link

Non-formula solution (not my original idea):

Result with conditional formatting

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

79083013

Date: 2024-10-13 11:37:36
Score: 3
Natty:
Report link

i have the same problem i solved it by change the platform target ios from ios 12 to ios 13 in podfile

ios > podfile platform :ios, '13.0'

and then remove the pod folder

and run this commands

the versions of package i using

Reasons:
  • Blacklisted phrase (1): i have the same problem
  • Whitelisted phrase (-2): i solved
  • No code block (0.5):
  • Me too answer (2.5): i have the same problem
  • Low reputation (1):
Posted by: عبدالله عزب

79083005

Date: 2024-10-13 11:30:33
Score: 3
Natty:
Report link

class student(): name: "" family: "" phone: "" codestudent:0 feild:"" age: "" sex: True

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

79082996

Date: 2024-10-13 11:27:33
Score: 0.5
Natty:
Report link

You should be aware that if users swipe to remove your app from the Android Task Switch panel (accessible from the square button), you app gets killed immediately, and App.onDestroy doesn't get called. :-/

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

79082972

Date: 2024-10-13 11:12:30
Score: 2.5
Natty:
Report link

This is definitely bug or as always m$oft ignorance and amateur. There is no logic to treat declaration "Dim a, b, c As Single" as you said "Dim a As Variant, b As Variant, c As Single" not just in programming rules but every possible normal understanding. It's like saying Adam, Richard, Stefan is a man but Adam and Richard are some variation! Micro$oft is a total destruction of all principles, logic and good practices and especially professionalism in creating any solution. They create, steal and take ideas from others effectively introducing “ another version of visual basic”. I always going to use in separated lines, just for sure what happen in the future.

Reasons:
  • Blacklisted phrase (1.5): any solution
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Dawid Mariusz Pintal

79082968

Date: 2024-10-13 11:10:29
Score: 1
Natty:
Report link

It could be due to a few common issues. Here's a guide to troubleshooting and then checking the quality of your similarity search. 1)check data quality if there is noise in the data, embedding might not capture the right context. 2)try different embedding models. Sometimes, certain model works better for specific types of content. 3)inspect Embedding Distance:After retrieving search results, inspect the distance or similarity scores (if available). This will help you understand whether the embeddings are close enough to be considered similar.

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

79082965

Date: 2024-10-13 11:09:29
Score: 2.5
Natty:
Report link

Importing planet scale OSM is expected to take a very long time. But you would have likely a better experience using https://osm2pgsql.org/ which is dedicated to this task. The GDAL OSM driver uses a temporary SQLite database to be able to work with any output format.

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