79081701

Date: 2024-10-12 19:06:02
Score: 3.5
Natty:
Report link

Try using 'ansi-colors'. I'm using it in firebase project on mac and it works fine.

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

79081693

Date: 2024-10-12 19:03:01
Score: 4
Natty: 4.5
Report link

Since Bootstrap 5.x use text-start instead of text-left

https://getbootstrap.com/docs/5.0/utilities/text/

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

79081681

Date: 2024-10-12 18:56:59
Score: 2.5
Natty:
Report link

Please check your mongodb connection string does contain the database name. Also , you can check your mongodb database as well . If it is using "test" named collection then drop that collection and let it create new one. This resolved issue for me . Thanks

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Aman

79081676

Date: 2024-10-12 18:52:59
Score: 1
Natty:
Report link

Why Were SYSLIB Warnings Introduced Separately from CS0612/CS0618?

The CS0612 and CS0618 warnings are specifically related to Obsolete attributes. These attributes are tied directly to deprecated APIs or types and are typically used by developers when they are marking their own codebase for future removals.

SYSLIB warnings, on the other hand, are part of .NET’s internal library warnings (System Library). These warnings:

By using SYSLIB codes, Microsoft is able to provide more context and clarity on specific categories of deprecations, distinct from the more general-purpose CS0612/CS0618 warnings.

https://learn.microsoft.com/en-us/dotnet/fundamentals/syslib-diagnostics/obsoletions-overview

I believe this post should help you, as you are just doing the reverse of what he is doing

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Why Were
  • Low reputation (0.5):
Posted by: Alander

79081673

Date: 2024-10-12 18:51:58
Score: 1.5
Natty:
Report link

The current version does not allow implementing the example. I am providing the answer from the official forum.

Sorry that it's an unsupported usage. because both at_test_cmd_test() and AT+HTTPCGET=params are executed in at_process_task(), however, in the current design, command processing is linear, and you cannot execute another command before one command is completed. in you case, you can create another task, and in your task, to execute some command like AT+HTTPCGET=. and at_test_cmd_test() to get the status of your task.

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

79081669

Date: 2024-10-12 18:48:58
Score: 1
Natty:
Report link

It totally depends upon the use case. For example, you might not need to fetch all the departments and their professors for a single university. I believe you might need the api endpoints as:

But it totally depends upon your usecase. The usecase i presented may differ from what you need.

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

79081663

Date: 2024-10-12 18:46:57
Score: 3.5
Natty:
Report link

It seems to be that Google requires billing details before your account can be verified

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

79081656

Date: 2024-10-12 18:36:55
Score: 3
Natty:
Report link

this is the correct answer: https://stackoverflow.com/a/76659633/8105487

if it does not work, just make sure you invalidate caches and restart

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Low length (1):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Hasim D

79081654

Date: 2024-10-12 18:35:55
Score: 3
Natty:
Report link

this is the correct answer: https://stackoverflow.com/a/74645969

if it does not work, just make sure you invalidate caches and restart

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Low length (1):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Hasim D

79081651

Date: 2024-10-12 18:33:54
Score: 1.5
Natty:
Report link

Thanks for sharing your insights, however, I noticed a potential oversight that could lead to some confusion. Despite it’s been a while, I’d like to build on your answer by sharing some thoughts that may enhance its clarity and usefulness.

If the goal was to compare a non-blocking server implementation against netty, just replying with a constant string to every client’s request is not enough to reproduce any real-world load. In this case the efforts taken to produce a payload are comparable to (or less than) the efforts to sustain communication, so the testing can go either way and its results can be flaky. Moreover, when you make the server close the connection after each response, you end up benchmarking how quickly the OS kernel sets up TCP connections.

Next, let’s take a close look at two solutions provided in the answer. The initial one that contains blocking code uses Java NIO Selector and Selectable channel API. The alternate “highly performant” solution uses Java NIO.2 Asynchronous channel API. That might be confusing and can lead to the incorrect conclusion that the performance is gained by adopting NIO.2 API instead of NIO.

If we look closer at the implementation of both APIs (I arbitrarily choose the JDK 17, but you can pick another modern JDK version), we’ll see that they both use epoll under the hood:

These API introduce different programming models, but there is no strict reason pointing to one should be much more performant than another. Roughly speaking, NIO.2 with its asynchronous channels doesn’t rely on the OS async file IO (like Linux AIO or else). It uses epoll with a thread pool to emulate asynchronous file operations. Nothing stops you from using the same approach. If you introduce a thread pool to the first server implementation that uses Selector API and utilize it for request processing, the results will be comparable or even better than the second “highly performant” implementation.

Hope this helps provide a more comprehensive view.

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (2): Thanks for sharing
  • Whitelisted phrase (-1): Hope this helps
  • Long answer (-1):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Shamann

79081650

Date: 2024-10-12 18:33:53
Score: 6 🚩
Natty: 5
Report link

Do I need to - - skip-ssl to connect to mysql via php log script? I am having problems when I try to run mtsql service, and privileges escalation errors. Should I use php ssl2 connection first to establish contact with the server first?

Reasons:
  • Blacklisted phrase (0.5): I need
  • Blacklisted phrase (1): I am having problem
  • Low length (0.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: tomescu adrian

79081647

Date: 2024-10-12 18:32:53
Score: 1.5
Natty:
Report link

What you want to do is APPEND the path where MySQL is installed (ex: /opt/mysql/bin) to your PATH variable:

PATH="$PATH:/opt/mysql/bin"
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Starts with a question (0.5): What you
  • Low reputation (0.5):
Posted by: Carlo Arenas

79081645

Date: 2024-10-12 18:30:53
Score: 2
Natty:
Report link

Your config.js add:

config.startupMode = 'source';
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Amir Roox

79081639

Date: 2024-10-12 18:27:52
Score: 0.5
Natty:
Report link

The type Map is not generic; it cannot be parameterized with arguments <String, Integer>

This Error Occurs Due To Your Project File Name Check Your File And Change That.

And Import

import java.util.Map;

It Will Work For Me

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

79081620

Date: 2024-10-12 18:15:49
Score: 1.5
Natty:
Report link

I noticed the same CSS link in the <head> of pages on a local non-internet facing Apache site at home. Looking further I found it in just about any page I browse with Firefox. Like @dude mentioned, I see it when I have the DuckDuckGo Privacy Essentials extension activated.

I found a reddit post that seems to shed some light https://www.reddit.com/r/duckduckgo/comments/14r3vde/does_duckduckgo_privacy_essentials_firefox_uses/

Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @dude
  • Low reputation (1):
Posted by: rixtech

79081617

Date: 2024-10-12 18:15:49
Score: 2
Natty:
Report link

Downloading an MockitoExtension plugin in my Intellij worked for me. (maybe it would for diff ide too ig)

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

79081609

Date: 2024-10-12 18:11:48
Score: 0.5
Natty:
Report link

It was just that I had the server up and running in a terminal. I attempted to run npm run build in a parallel terminal. Just terminate the npm run dev or whatever gets your server up!

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

79081587

Date: 2024-10-12 17:59:46
Score: 2.5
Natty:
Report link

Official documentation, i.e., alive_progress's GitHub repository, mentions that due to PyCharm's default settings, alive_bar is not working properly in PyCharm's console. To change that, please follow the instructions at https://github.com/rsalmei/alive-progress/blob/main/README.md#forcing-animations-on-pycharm-jupyter-etc

Reasons:
  • Blacklisted phrase (0.5): not working properly
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Stefano

79081582

Date: 2024-10-12 17:56:45
Score: 1.5
Natty:
Report link

You can wrap it inside ButtonTheme like:

ButtonTheme(
  alignedDropdown: true,
  child: FormBuilderDropdown()
)
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Andrian Antonio

79081579

Date: 2024-10-12 17:56:45
Score: 3
Natty:
Report link

You're currently using a static or hardcoded value for scrollPosition. Instead, you should calculate it based on the clicked item's position relative to the carousel and its width. This will ensure the clicked item is centered correctly.

const scrollPosition = itemOffset - (carouselWidth / 2) + (itemWidth / 2);

Please give it a try and let me know if it works

Reasons:
  • RegEx Blacklisted phrase (2.5): Please give
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Gaurav Jain

79081565

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

I found a solution which uses DOMDocument but does not add extra tags to your strings; just fixes malformed HTML. See answer here: https://stackoverflow.com/a/79081559/492132

Original github (not mine) here: https://gist.github.com/hubgit/1322324

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Low length (1):
  • No code block (0.5):
  • High reputation (-1):
Posted by: Richard

79081558

Date: 2024-10-12 17:46:44
Score: 3
Natty:
Report link

Tengo problemas con esta versión:

Flutter 2.8 Java 11 SDK Android 33 Gradle 6.7.1 Execution failed for task ':app:checkDebugAarMetadata'.

Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Could not resolve com.github.barteksc:android-pdf-viewer:3.2.0-beta.1. Required by: project :app > project :flutter_pdfview > Could not resolve com.github.barteksc:android-pdf-viewer:3.2.0-beta.1. > Could not get resource 'https://jitpack.io/com/github/barteksc/android-pdf-viewer/3.2.0-beta.1/android-pdf-viewer-3.2.0-beta.1.pom'. > Could not GET 'https://jitpack.io/com/github/barteksc/android-pdf-viewer/3.2.0-beta.1/android-pdf-viewer-3.2.0-beta.1.pom'. Received status code

Reasons:
  • Blacklisted phrase (2): Tengo
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Daniel Asencios

79081557

Date: 2024-10-12 17:46:44
Score: 3.5
Natty:
Report link

in styles.css, try replacing height:100vh with height:100% and also add width:100% to it.

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

79081554

Date: 2024-10-12 17:43:43
Score: 3
Natty:
Report link

I don't know why but for some libraries it is necessary to remove extension from chrome and add it again.

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

79081552

Date: 2024-10-12 17:43:43
Score: 0.5
Natty:
Report link

For me the solution by K. A. Buhr didn't work. If I put a module name that doesn't match the file such as the proposed

-- in Client.hs
module Main where

I get the error "File name does not match module name". I also can't call the file Main.hs because there is already another file called Main.hs.

The only way to solve this was to use

-- in Client.hs
module Client where

add the lines other-modules: [] and - -main-is Client to the package.yaml:

executables:
  ObjectServer:
    main:                Main.hs
    other-modules:       []
    source-dirs:         app
    ghc-options:
    - -threaded
    - -main-is Main
    dependencies:
    - ObjectServer
  Client:
    main:                Client.hs
    other-modules:       []
    source-dirs:         app
    ghc-options:
    - -threaded
    - -main-is Client
    dependencies:
    - ObjectServer
Reasons:
  • RegEx Blacklisted phrase (1): I get the error
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Kvothe

79081543

Date: 2024-10-12 17:35:41
Score: 0.5
Natty:
Report link

Actually, the \Barryvdh\Debugbar\Middleware\InjectDebugbar::class, part needs to be after \App\Http\Middleware\DebugMiddleware::class,.

In your middleware you conditionally enable the Debugbar, and this is InjectDebugbar::class which checks if Debugbar is enabled and injects it into your response.

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

79081542

Date: 2024-10-12 17:35:41
Score: 1
Natty:
Report link

As pointed by maven at https://mvnrepository.com/artifact/org.codehaus.groovy.modules.http-builder/http-builder/0.7.2 I could solve this issue by adding

buildscript {
    repositories {
      maven { url 'https://nexus.web.cern.ch/nexus/content/repositories/public/' }
      ...rest
    }
}
allprojects {
    repositories {
      maven { url 'https://nexus.web.cern.ch/nexus/content/repositories/public/' }
      ...rest

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

79081538

Date: 2024-10-12 17:31:40
Score: 3
Natty:
Report link

The specified class name cannot begin with java . since all classes in the java package can oily be define. By the bostrap class loader

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

79081535

Date: 2024-10-12 17:30:40
Score: 1
Natty:
Report link

io series has lower latency and less variation in latency which is helpful for workloads that need high throughout with low parallelism.

Percona has a nice article with various benchmarks https://www.percona.com/blog/performance-of-various-ebs-storage-types-in-aws/

Anecdotally, we've seen more stable performance and faster database restores on io2 vs gp3 RDS Postgres instances (with the same amount of IOPs).

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

79081530

Date: 2024-10-12 17:28:40
Score: 5
Natty: 4
Report link

Have you ever figured out a solution? I'm encountering the same issue. The web application works fine on the old server, but if running on a new server the "ConvertUrl" function just hangs there forever...

Reasons:
  • RegEx Blacklisted phrase (2): Have you ever figured
  • Low length (0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: user23511052

79081524

Date: 2024-10-12 17:20:38
Score: 1
Natty:
Report link

In SQL, implicit conversion from TEXT to BLOB doesn’t work in the way you're thinking. You need to provide binary data for the BLOB column explicitly.

INSERT INTO "non_strict_table" ("name", "data") VALUES ('name_01', CAST('blob_data' AS BLOB));

This converts the string 'blob_data' to a BLOB and stores it.

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

79081522

Date: 2024-10-12 17:19:38
Score: 3.5
Natty:
Report link

Thanks ooshp,

I have the answer, i needed to drop the .value and just have item.name, spent hours on this

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (0.5): i need
  • Low length (1):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Dave Whitwell

79081521

Date: 2024-10-12 17:19:38
Score: 3
Natty:
Report link

@grid.GetHtml( tableStyle: "grid", headerStyle: "head", alternatingRowStyle: "alt", columns: grid.Columns( grid.Column(format: @Edit), grid.Column("Title"), grid.Column("Genre"), grid.Column("Year") ) )

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • User mentioned (1): @Edit
  • Low reputation (1):
Posted by: Sunny Arya

79081517

Date: 2024-10-12 17:16:37
Score: 2.5
Natty:
Report link

Late 2024 and they didnt fixed this shit yet, looks like WOKEISM is the priority over Developement at META

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

79081516

Date: 2024-10-12 17:16:37
Score: 1.5
Natty:
Report link

All intermediate operations return a new instance Stream. On any single Stream instance only one terminal operator can be invoked, and it terminates the Stream rendering it unusable.

Intermediate operations: filter(), map(), flatMap(), distinct(), sorted(), peek(), limit(), skip() Terminal operations: anyMatch(), allMatch(), noneMatch(), collect(), count(), findAny(), findFirst(), forEach(), min(), max(), reduce(), toArray()

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

79081515

Date: 2024-10-12 17:16:37
Score: 1
Natty:
Report link

You can also use AirDroid for free. Works fine, and I have tried many. Needs a plugin of theirs installed on the phone.

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

79081508

Date: 2024-10-12 17:11:36
Score: 3.5
Natty:
Report link

As @Barmar mentioned, Multiprocessing locks only work between processes in the same script. File locks can be used between unrelated processes.Suspected the same. I tried using the FileLock library, seemed to resolve the issue.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • User mentioned (1): @Barmar
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Dudeness

79081500

Date: 2024-10-12 17:08:36
Score: 0.5
Natty:
Report link

I found a solution for adding a splash screen. It suddenly occurred to me that having the popup code in my app's __init__() method could be the cause of the problem, because the app might not be finished initializing and therefore not ready to display a popup.

Moving the popup code to my app's build() method also did not work, probably for similar reasons.

So I coded the following:

    def __init__(self, **kwargs):
        super().__init__()
        self._popup = None

    def build(self):
        # show splash screen immediately after build() completes
        Clock.schedule_once(self.ShowSplashScreen, 0)
        return self.mainLayout

    def ShowSplashScreen(self, *args):
        content = LoadSplashScreenDialog(cancel=self.dismiss_popup)
        self._popup = Popup(title="Test App", content=content, size_hint=(1.0, 1.0))
        self._popup.open()
        Clock.schedule_once(self.dismiss_popup, 2)

By scheduling the popup to display in the next frame, it will display immediately after the build() method completes and the app is instantiated.

Reasons:
  • Blacklisted phrase (1): did not work
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Todd Hoatson

79081499

Date: 2024-10-12 17:07:35
Score: 0.5
Natty:
Report link

Yes, the ::after pseudo-element assumes the triangle will start exactly at the right edge of the parent .arrow element. But due to subpixel rounding, the browser may interpret the position as slightly off (e.g., -60.5px instead of exactly -60px). When you use pixel values that don't align perfectly with the display's pixel grid, some browsers might round differently, creating small gaps or seams between elements.

One solution might be css-shape.com/arrow that was posted by @Temani Afif in the comments. One other might be to use calc to have better rounding.Something like: right: calc(-1 * 30px);

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

79081485

Date: 2024-10-12 17:00:34
Score: 1
Natty:
Report link

no need for rexeg ...

given your inputs

df[df['col1'].apply(lambda x: any(x.startswith(prefix) for prefix in prefixes))]
       col1
0     12345
2  54467899

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

79081479

Date: 2024-10-12 16:58:34
Score: 2.5
Natty:
Report link

line 3, in import requests ModuleNotFoundError: No module named 'requests'

soln: install the below command: pip install requests

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

79081470

Date: 2024-10-12 16:55:33
Score: 1
Natty:
Report link

Add a shared network in docker-compose.yml to ensure connectivity:

networks:
  app-network:
    driver: bridge
services:
  server:
    networks:
      - app-network
  mysql:
    networks:
      - app-network
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Ry No

79081468

Date: 2024-10-12 16:54:32
Score: 2.5
Natty:
Report link

To my surprise, your advice helped. But what's interesting is that I tried to change the connection types (AI Key and also Microsoft Entra ID) but it didn't work before until I deleted the connection(in AI Studio) - to AI search and added it again (private endpoint was active).

I also left only the API key type enabled in the AI ​​search (settings) - as the only one possible method (there was another recommendation in the Microsoft article)

Thanks for the recommendation!

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Artem

79081462

Date: 2024-10-12 16:51:31
Score: 3
Natty:
Report link

I feel the issue is with the object lock which is over ridding the object life cycle rule.

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

79081437

Date: 2024-10-12 16:40:28
Score: 0.5
Natty:
Report link

You would need a filter on the API side (e.g. 'https://rickandmortyapi.com/api/character?page_size=2'. Unfortunately I don't see one implemented for the rickandmortyapi.

https://rickandmortyapi.com/documentation/

Instead, it uses pagination through the page parameter, which allows you to fetch results in chunks of 20 by default.

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

79081432

Date: 2024-10-12 16:37:28
Score: 1.5
Natty:
Report link

I tried this and it helps with disappearing WebView:

webView.setLayerType(View.LAYER_TYPE_HARDWARE, Paint().apply {
    xfermode = PorterDuffXfermode(PorterDuff.Mode.SRC_OVER)
})
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Max Lebedev

79081431

Date: 2024-10-12 16:36:28
Score: 1.5
Natty:
Report link

The discrepancy between allocated memory (PrivateMemorySize64) and the working set (WorkingSet64) is due to Windows' memory management. When you allocate memory using malloc(), Windows reserves virtual memory, but physical memory (RAM) is only allocated when the memory is accessed. The working set represents the memory portion actively in use and kept in RAM, while less-used pages may be trimmed or not allocated until needed. This behavior is as expected and reflects the efficient optimization of memory, even while the page file is disabled.

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

79081429

Date: 2024-10-12 16:36:28
Score: 2
Natty:
Report link

I DID IT!

So, the working code is below. This answer was made possible by the source code of the NetSurf Browser SVG renderer.

Also, herrstrietzel helped me a lot. The tip to wrap <use> inside <g> was just right.

In my case, text rendering is not needed. But if someone needs to render text in <path>, then this issue is solved with the help of the opentype library. The library is not very well known, but it works magic. In order to apply text transformations, the test must be rendered in <path> before all <path> are processed.

What's next? Either the task needs to be more complicated, or I don't even know. If anyone has a more elegant solution or finds a bug in my code, let me know. You'll probably get a bounty.

    // regular expression to parse numbers
const rxNumberStr = '[+-]?(?:(?:[0-9]+\\.[0-9]+)|(?:\\.[0-9]+)|(?:[0-9]+))(?:[eE][+-]?[0-9]+)?';
// regular expression to  parse next lemma from d attribute of <path> 
const rxDLemmaStr = `[MmLlHhVvCcSsQqTtAaZz]|${rxNumberStr}`;

// D-attribute string parser
// https://www.w3.org/TR/SVG/paths.html#PathData
// https://www.w3.org/TR/SVG/paths.html#PathDataBNF
class D {
  // Result of parsing a D-attribute string
  // path: [[cmd, new D.P({x,y}), ...], ...]
  path = [];
  constructor(d) {
    let rx = new RegExp(rxDLemmaStr, 'g');
    let ps = d.match(rx).map(v => ('MmLlHhVvCcSsQqTtAaZz'.indexOf(v) > -1 ? v : parseFloat(v)));
    let cmd, move, ref = D.P.abs(0, 0);
    for (let i = 0, len = ps.length; i < len; ) {
      if (isNaN(ps[i])) cmd = ps[i++];
      this.path.push(({
        m: () => (ref = D.P.rel(ps[i++], ps[i++], ref), ps[i - 3] == cmd ? ['M', move = ref] : ['L', ref]),
        M: () => (ref = D.P.rel(ps[i++], ps[i++], ref), ps[i - 3] == cmd ? ['M', move = ref] : ['L', ref]),
        l: () => ['L', (ref = D.P.rel(ps[i++], ps[i++], ref))],
        L: () => ['L', (ref = D.P.abs(ps[i++], ps[i++], ref))],
        h: () => ['H', (ref = D.P.rel(ps[i++], 0, ref))],
        H: () => ['H', (ref = D.P.abs(ps[i++], ref.y, ref))],
        v: () => ['V', (ref = D.P.rel(0, ps[i++], ref))],
        V: () => ['V', (ref = D.P.abs(ref.x, ps[i++], ref))],
        c: () => ['C', D.P.rel(ps[i++], ps[i++], ref), D.P.rel(ps[i++], ps[i++], ref), (ref = D.P.rel(ps[i++], ps[i++], ref))],
        C: () => ['C', D.P.abs(ps[i++], ps[i++], ref), D.P.abs(ps[i++], ps[i++], ref), (ref = D.P.abs(ps[i++], ps[i++], ref))],
        s: () => ['S', D.P.rel(ps[i++], ps[i++], ref), (ref = D.P.rel(ps[i++], ps[i++], ref))],
        S: () => ['S', D.P.abs(ps[i++], ps[i++], ref), (ref = D.P.abs(ps[i++], ps[i++], ref))],
        q: () => ['Q', D.P.rel(ps[i++], ps[i++], ref), (ref = D.P.rel(ps[i++], ps[i++], ref))],
        Q: () => ['Q', D.P.abs(ps[i++], ps[i++], ref), (ref = D.P.abs(ps[i++], ps[i++], ref))],
        t: () => ['T', (ref = D.P.rel(ps[i++], ps[i++], ref))],
        T: () => ['T', (ref = D.P.abs(ps[i++], ps[i++], ref))],
        a: () => ['A', ps[i++], ps[i++], ps[i++], ps[i++], ps[i++], (ref = D.P.rel(ps[i++], ps[i++], ref))],
        A: () => ['A', ps[i++], ps[i++], ps[i++], ps[i++], ps[i++], (ref = D.P.abs(ps[i++], ps[i++], ref))],
        z: () => (ref = move, ['Z']),
        Z: () => (ref = move, ['Z']),
      })[cmd]());
    }
  }
  // Compile array with absolute coordinates for new <path d="..." />
  get abs() {
    return this.path.map(s => s.map((v, i) => (!i ? v : { H: v.x, V: v.y }[s[0]] || v.abs))).flat(3);
  }
  // Compile array with relative coordinates for new <path d="..." />
  get rel() {
    return this.path.map(s => s.map((v, i) => !i ? v.toLowerCase() : { H: v.x - v.ref.x, V: v.y - v.ref.y }[s[0]] || v.rel)).flat(3);
  }
  // Compile array with transformed absolute coordinates for new <path d="..." />
  transform(matrix) {
    return this.path.map(s => s.map((v, i) => (!i ? v.replace(/[HV]/i,'L') : v.transform(matrix)))).flat(3);
  }
  // Path Point class 
  static get P() {
    return class P {
      x;
      y;
      // Reference point for relative coordinates
      ref;
      constructor(props) {
        Object.assign(this, props);
      }
      // Absolute coordinates
      get abs() {
        return [this.x, this.y];
      }
      // Relative coordinates
      get rel() {
        return [this.x - this.ref.x, this.y - this.ref.y];
      }
      // Transform point with matrix
      transform([a, b, c, d, e, f]) {
        return [this.x * a + this.y * c + e, this.x * b + this.y * d + f];
      }
      // Create point from absolute coordinates
      static abs = (x, y, ref) => new D.P({ x, y, ref });
      // Create point from relative coordinates
      static rel = (x, y, ref) => new D.P({ x: ref.x + x, y: ref.y + y, ref });
    };
  }
}

// Matrix multiplication
// https://en.wikipedia.org/wiki/Matrix_multiplication
const multiply = ([a1, b1, c1, d1, e1, f1], [a2, b2, c2, d2, e2, f2]) => [
    a1 * a2 + c1 * b2,
    b1 * a2 + d1 * b2,
    a1 * c2 + c1 * d2,
    b1 * c2 + d1 * d2,
    a1 * e2 + c1 * f2 + e1,
    b1 * e2 + d1 * f2 + f1,
  ];

// Consolidate matrix chain
const consolidate = matrices => matrices.reduce((acc, m) => multiply(acc,m), [1, 0, 0, 1, 0, 0]);

// Read SVG element attributes
// https://developer.mozilla.org/en-US/docs/Web/API/SVGElement/attributes
// returns object with attributes
const readAttrs = (element) => [...element.attributes].reduce((acc, { name, value }) => ((acc[name] = value), acc), {});
// Write SVG element attributes
const writeAttrs = (element, attrs) => Object.entries(attrs).forEach(([attr, value]) => element.setAttribute(attr, value));

// Process SVG shape element
// Shape elements are replaced with new <path d="..." /> element
// Shape element attributes are copied to new <path d="..." /> element
// Shape element must not have child elements
// List of shape elements <circle>, <ellipse>, <line>, <path>, <polygon>, <polyline>, <rect>
function processShape(shape) {
  const shape2path = {
    circle: ({ cx, cy, r, ...attrs }) => [
      `M ${[cx - r, cy]} A ${r} ${r} 0 1 1 ${[cx + r, cy]} A ${r} ${r} 0 1 1 ${[cx - r, cy]} Z`,
      attrs,
    ],
    line: ({ x1, y1, x2, y2, ...attrs }) => [`M ${[x1, y1]} L ${[x2, y2]}`, attrs],
    rect: ({ x, y, width, height, rx = 0, ry = 0, ...attrs }) =>
      rx == 0 && ry == 0
        ? [`M ${[x, y]} h ${width} v ${height} h -${width} Z`, attrs]
        : [
            `M ${[x + rx, y]} h  ${width - 2 * rx}  a ${rx} ${ry} 0 0 1  ${rx}  ${ry}
                              v  ${height - 2 * ry} a ${rx} ${ry} 0 0 1 -${rx}  ${ry}
                              h -${width - 2 * rx}  a ${rx} ${ry} 0 0 1 -${rx} -${ry}
                              v -${height - 2 * ry} a ${rx} ${ry} 0 0 1  ${rx} -${ry} Z`,
            attrs,
          ],
    ellipse: ({ cx, cy, rx, ry, ...attrs }) => [
      `M ${[cx - rx, cy]} A ${rx} ${ry} 0 1 1 ${[cx + 2 * rx, cy]}
                          A ${rx} ${ry} 0 1 1 ${[cx + rx, cy - ry]}
                          A ${rx} ${ry} 0 1 1 ${[cx + rx, cy + ry]}
                          A ${rx} ${ry} 0 1 1 ${[cx - rx, cy]} Z`,
      attrs,
    ],
    polygon: ({ points, ...attrs }) => [`M ${points} Z`, attrs],
    polyline: ({ points, ...attrs }) => [`M ${points}`, attrs],
  };

  // return if shape inside <pattern>, <mask> or <clipPath>
  if (shape.closest('pattern') || shape.closest('mask') || shape.closest('clipPath')) {
    return;
  }

  // create d value for new <path>
  let [d, attrs] = shape2path[shape.tagName](readAttrs(shape));
  // create new <path>
  let path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
  // write attributes from object to <path>
  writeAttrs(path, attrs);
  // set attribute "d"
  path.setAttribute('d', d);
  // replace shape with <path>
  shape.replaceWith(path);
  return path;
}

// process <path /> element
function processPath(path){
  // returns all parent Elements
  const getParents = (element)=>{
    let parents = [];
    while(element !== document.documentElement){
      parents.push(element = element.parentNode);
    }
    return parents;
  }
  // parse transform matrix
  const getMatrix = (transform) => {
    let [a, b, c, d, e, f] = transform.match(/^matrix\(([^)]+)\)$/)[1].split(',').map(Number);
    return [a, b, c, d, e, f];
  }
  // parse transform origin
  const getOrigin = (transformOrigin) => {
    // TODO Parse origin coordinates with units
    // from https://source.netsurf-browser.org/libsvgtiny.git/tree/src/svgtiny.c#n1816
    let [x, y] = transformOrigin.split(' ').map(value=>value.trim().replace(/[a-z]+$/i,'')).map(Number);
    return [x, y];
  }
  // calc origed matrix from transform and origin
  const getOTM = (element) => {
    // very useful function for read computed style
    let style = getComputedStyle(element);
    // no matter how exactly the transform is specified
    // (in attributes or in styles or in individual classes),
    // the function returns transform always in a matrix form
    let transform = style.getPropertyValue('transform');
    let transformOrigin = style.getPropertyValue('transform-origin');
    // if no transform is acquired
    if(!transform || transform == 'none') return [1,0,0,1,0,0];
    // parse transform matrix
    let matrix = getMatrix(transform);
    // parse origin
    let origin = getOrigin(transformOrigin);
    // return consolidate matrix
    return consolidate([
      [1,0,0,1,...origin],            // + origin
      matrix,
      [1,0,0,1,...origin.map(v=>-v)]  // - origin
    ]);
  }
  
  // return if <path> inside <pattern>, <mask> or <clipPath>
  if (path.closest('pattern') || path.closest('mask') || path.closest('clipPath')) {
    return;
  }

  // read element transform matrix
  const elementOTM = getOTM(path);
  // get all parent elements
  const parents = getParents(path);
  // clone element transform matrix array
  let resultCTM = [1,0,0,1,0,0];
  // for each parent
  parents.reverse().forEach((parent) => {
    // read parent transform matrix
    let parentOTM = getOTM(parent);
    // calc CTM
    resultCTM = consolidate([resultCTM,parentOTM]);
  });

  consolidate([resultCTM,elementOTM])
  
  // read d attribute, parse it, transform each point and join to single string
  let d = new D(path.getAttribute('d')).transform(resultCTM).join(' ');
  // this variant returns absolute coordinates without transform
  //let d = new D(path.getAttribute('d')).abs.join(' ');
  // remove transform attributes
  path.removeAttribute('transform');
  path.removeAttribute('transform-origin');
  // force init transform matrix
  //path.style.setProperty('transform','matrix(1,0,0,1,0,0)');
  path.style.setProperty('transform-origin', '0 0');
  // set d attribute
  path.setAttribute('d', d);
  // find root element
  let svg = path.closest('svg');
  if(svg){
    // remove element from parent
    path.parentNode.removeChild(path);
    // add element to root
    svg.appendChild(path);
  }
  return path;
}

// Process <use /> element
function  processUse(element) {
  // read attributes to object
  let attrs = readAttrs(element);
  // get href attribute value
  let sel = attrs.href;
  // find referenced element by href="#id"
  let ref = document.querySelector(sel);
  // clone referenced element
  let clone = ref.cloneNode(true);
  // remove id attribute from clone
  clone.removeAttribute('id');
  // remove href from attribute object
  delete attrs.href;
  // Create new <g>
  let group = document.createElementNS('http://www.w3.org/2000/svg', 'g');
  // write attributes from object
  writeAttrs(group, attrs);
  // add clone to <g>
  group.appendChild(clone);
  // replace <use> element to <g>
  element.replaceWith(group);
  return clone;
}


// Create matrix from transform attribute
// This fuction does not used.
// Use of getComputedStyle() completely replaces this implementation
function parseTransform (transform) {
  const rxTransformNameStr = '(?:(?:translate|scale|skew)[XY]?)|matrix|rotate';

  const rad = a => a / 57.29577951308232;

  const { sin, cos, tan } = Math;

  const matricies = {
    identity: () => [1, 0, 0, 1, 0, 0],
    translate: (tx, ty) => [1, 0, 0, 1, tx, ty],
    translateX: tx => [1, 0, 0, 1, tx, 0],
    translateY: ty => [1, 0, 0, 1, 0, ty],
    scale: (sx, sy = sx, cx = 0, cy = 0) => [sx, 0, 0, sy, cx * (1 - sx), cy * (1 - sy)],
    scaleX: (sx, cx = 0) => [sx, 0, 0, 1, cx * (1 - sx), 0],
    scaleY: (sy, cy = 0) => [1, 0, 0, sy, 0, cy * (1 - sy)],
    rotate: (a, cx = 0, cy = 0) => {
      let [s, c] = [sin(rad(a)), cos(rad(a))];
      return [c, s, -s, c, cx * (1 - c) + cy * s, cy * (1 - c) - cx * s];
    },
    skew: (ax, ay = ax) => [1, tan(rad(ay)), tan(rad(ax)), 1, 0, 0],
    skewX: a => [1, 0, tan(rad(a)), 1, 0, 0],
    skewY: a => [1, tan(rad(a)), 0, 1, 0, 0],
    matrix: (a, b, c, d, e, f) => [a, b, c, d, e, f],
  };

  let chain = [...transform.matchAll(new RegExp(`(${rxTransformNameStr})\\(([0-9eE,\\.\\s+-]+)\\)`, 'g'))].map(
    ([, fn, args]) => [fn, [...args.matchAll(new RegExp(rxNumberStr, 'g'))].map(([num]) => parseFloat(num))]
  );

  // For example,
  //    chain = [
  //      [ 'matrix', [ 1, 0, 0, 1, 0, 0 ] ],
  //      [ 'translate', [ 100, 100 ] ],
  //      [ 'rotate', [ 45 ] ],
  //      [ 'scale', [ 2, 2 ] ],
  //    ]

  chain = chain.map(([fn, args]) => matrices[fn](...args));

  // chain = [
  //   [ 1, 0, 0, 1, 0, 0 ],
  //   [ 1, 0, 0, 1, 100, 100 ],
  //   [ 0.7071067811865476, 0.7071067811865475, -0.7071067811865475, 0.7071067811865476, 0, 0 ],
  //   [ 2, 0, 0, 2, 0, 0 ]
  // ]

  // returns single matrix
  return consolidate(chain);
}

function groupPathList(pathList){
  let groupList = [];

  const compareStyleEquals = (s1,s2) => Object.entries(s1).every(([k,v])=>'d'==k?true:v==s2[k]);

  for(let path of pathList){
    let pathStyle = getComputedStyle(path);
    let groupFound = false;
    for(let group of groupList){
      if(compareStyleEquals(group.style,pathStyle)){
        group.list.push(path);
        groupFound = true;
        break;
      }
    }
    if(!groupFound){
      groupList.push({
        style: pathStyle,
        list: [path],
      });
    }
  }
  return groupList;
}

function ungroupPathList(groupList){
  let pathList = [];
  for(let group of groupList){
    let newPath = document.createElementNS('http://www.w3.org/2000/svg','path');
    Object.entries(getComputedStyle(group.list[0])).forEach(([k,v])=>{if(k!=='d')newPath.style.setProperty(k,v)});
    let d = group.list.map(path=>(path.parentNode.removeChild(path),path.getAttribute('d'))).join(' ');
    d = d.replace(/[0-9]+\.[0-9]+/g, num => parseFloat(num).toFixed(1));
    newPath.setAttribute('d', d);
    // this varian to run outside <svg>
    document.querySelector('svg').appendChild(newPath);
    // this variant to run inside <svg>
    //document.documentElement.appendChild(newPath);
    pathList.push(newPath);
  }
  return pathList;
}

setTimeout(()=>{

  // TODO: Parse <svg width="" height="" viewBox=""> to common CTM

  // Replace all <use /> elements to clone elements referenced by the <use>
  document.querySelectorAll('use').forEach(processUse);

  // Replace all shape elements to <path />
  document.querySelectorAll('line, rect, circle, ellipse, polygon, polyline').forEach(processShape);

  // Process all <path /> elements
  let pathList = [...document.querySelectorAll('path')].map(processPath).filter(Boolean);

  // Group all <path> into groups by style values
  let groupList = groupPathList(pathList);

  // Convert each group into single <path>
  pathList = ungroupPathList(groupList);

  // Output new values
  console.log(JSON.stringify(pathList.map(path=>new D(path.getAttribute('d')).rel.join(' ')),null,2));

},1000);
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000">

  <g transform="translate(-100,-100)">

    <g id="hexagon" transform="translate(250,220) scale(1,.5)">
      <line id="line" x1="200" x2="500" y1="100" y2="100" stroke="#000" stroke-width="5" />
      <g transform="rotate(-120)" transform-origin="500 100">
        <use href="#line" />
        <g transform="rotate(-120)" transform-origin="200 100">
          <use href="#line" />
          <g transform="rotate(-120)" transform-origin="500 100">
            <use href="#line" />
            <g transform="rotate(-120)" transform-origin="200 100">
              <use href="#line" />
              <g transform="rotate(-120)" transform-origin="500 100">
                <use href="#line" />
              </g>
            </g>
          </g>
        </g>
      </g>
    </g>


    <g id="hexagon2" transform="translate(250,720) scale(1,.5)">
      <line id="line2" x1="200" x2="500" y1="100" y2="100" stroke="#000" stroke-width="5" />
      <g transform="rotate(60) translate(-300,0)" transform-origin="200 100">
        <use href="#line2" />
        <g transform="rotate(60) translate(-300,0)" transform-origin="200 100">
          <use href="#line2" />
          <g transform="rotate(60) translate(-300,0)" transform-origin="200 100">
            <use href="#line2" />
            <g transform="rotate(60) translate(-300,0)" transform-origin="200 100">
              <use href="#line2" />
              <g transform="rotate(60) translate(-300,0)" transform-origin="200 100">
                <use href="#line2" />
              </g>
            </g>
          </g>
        </g>
      </g>
    </g>

    <use href="#hexagon" transform="scale(1,-1) translate(0,-1200)" />

    <rect x="500" y="500" width="200" height="400" fill="#0008" stroke="#000" stroke-width="5" />
    <g transform="translate(-100,-100) skewY(-45)" transform-origin="500 500">
      <rect x="500" y="500" width="100" height="400" fill="#0004" stroke="#000" stroke-width="5" />
    </g>
    <g transform="translate(-100,-100) skewY(45)" transform-origin="500 500">
      <rect x="500" y="500" width="100" height="400" fill="#0008" stroke="#000" stroke-width="5" />
    </g>
    <g transform="translate(200,-200) skewY(45)" transform-origin="500 500">
      <rect x="500" y="500" width="100" height="400" fill="#0004" stroke="#000" stroke-width="5" />
    </g>
    <g transform="translate(200,0) skewY(-45)" transform-origin="500 500">
      <rect x="500" y="500" width="100" height="400" fill="#0008" stroke="#000" stroke-width="5" />
    </g>
    <rect x="500" y="300" width="200" height="400" fill="#0004" stroke="#000" stroke-width="5" />
  </g>

</svg>

Reasons:
  • Blacklisted phrase (1): helped me a lot
  • Contains signature (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: DiD

79081418

Date: 2024-10-12 16:32:27
Score: 1
Natty:
Report link

This is a problem with triangulation.

Three.js uses a fork of earcut. Looking at the open issues, there are a few similar problems. In particular, earcut does not seem to like when a contour crosses itself and forms a hole next to the edge:

earcut problem

(image source)

Based on this information, I hypothesized that my arcs might be overlapping slightly and crossing each other at intersection. This way, holes/loops would form, completed by the lines automatically added by Three.js. To test this theory, I shortened each arc by 0.001 radians and the glitch disappeared.

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

79081413

Date: 2024-10-12 16:28:26
Score: 1
Natty:
Report link

In my experience, the easiest way is to use a database;

You must consider two scenarios:

My recommendation is that you use Hive, it is simple and for a synchronization task like this I have used it and it has worked well for me.

Keep in mind that in the Background an isolate cannot modify UI components.

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

79081412

Date: 2024-10-12 16:25:26
Score: 0.5
Natty:
Report link

The error message ERROR: The process "3196" not found. occurs because the process with PID 3196 is no longer running, even though it was listed as listening on port 8000 when you checked with netstat. This could happen if the process terminated on its own between the netstat command and your attempt to kill it.

Here are a few things you can try:

Re-run netstat -ano to see if the process is still using port 8000.

If the PID has changed, use the new PID to kill the process. If no process is listening on port 8000, the process may have already terminated. Verify the task:

Run tasklist to see if PID 3196 is listed in the running processes. Restart your terminal:

If you are using a service like a local web server (e.g., a Node.js server), it might have crashed and released the port but left some residual references. Restarting your terminal might help clear any inconsistencies. Clear the port manually:

If the port 8000 is still occupied but no process is visible, restarting your machine or using netsh to free the port might help. If the process is critical, check the source (e.g., a web server, etc.) and restart it manually if needed.

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

79081410

Date: 2024-10-12 16:24:25
Score: 1
Natty:
Report link

I work for a railway contractor. Every time they ask me to go to a different station. I have all the postcodes of the stations. Now I wanted to create a URL (for Excel sheet) which tells me the distance of my workplace from my house.

So, here's my solution.

  1. Create a variable in Excel having my postcode in it. I gave it the name of home_location. I put '+' sign where there was a space (to match the hypertext coding for URL).
  2. Then write the following formula in Excel.

=HYPERLINK("https://www.google.com/maps/dir/" & home_location & "/" & Ref of Destination post code , Ref of the name)

for any additional stop, add &"/"&Ref of Next stop before the ','.

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

79081395

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

You have to add the 'jsx-runtime' to your ESLint config file – for the new flat structure, your eslint.config.js file should be configured as follows:

// Other imports
pluginReact from "eslint-plugin-react";

export default [

  // (...)

  pluginReact.configs.flat['jsx-runtime'],

  // (...)

];
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Consta Gorgan

79081391

Date: 2024-10-12 16:12:23
Score: 3.5
Natty:
Report link

Too bad no one answered. I join the question.

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

79081390

Date: 2024-10-12 16:12:23
Score: 3.5
Natty:
Report link

I was unable to create my own compression / decompression functions. However, I was able to get it to work using a third party package. https://github.com/alta/swift-opus

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

79081378

Date: 2024-10-12 16:09:22
Score: 2
Natty:
Report link

It seems that prelineui uses external libraries that allow the correct functioning of some components of its plugins, the only bad thing is that they don't report that, try placing the loadash and dropzone libraries in your index.html (go in and copy the respective version):

https://cdnjs.com/libraries/lodash.js

https://cdnjs.com/libraries/dropzone

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Brian Uceda Hirata

79081375

Date: 2024-10-12 16:08:22
Score: 1
Natty:
Report link

The issue lies in the url, you have an extra closing Curly brace } in url. This extra curly brace at the end of ${name}} will break the URL and make the request fail. To fix this, simply remove the extra curly brace: const url = http://localhost:8080/cartproducts/${username}/${name};

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

79081374

Date: 2024-10-12 16:07:21
Score: 4.5
Natty:
Report link

Eclipse opening filters .* resources should be unchecked.

unchecking .* resources

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

79081363

Date: 2024-10-12 16:01:20
Score: 2
Natty:
Report link

I've written a zero-dependency ESLint Preprocessor that allows you to lint .js.erb files here. Browse through the source code here. With this, you can configure ESLint such that it will also lint your .js.erb files, see the Readme.

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

79081346

Date: 2024-10-12 15:52:17
Score: 1
Natty:
Report link

It’s definitely possible to extract a list of Dogs from a list of Animals without a cast, but it depends on how your data structures and class hierarchy are set up. If you're using an inheritance model where Dog is a subclass of Animal, you can filter the list based on the instance type. For example, using instanceof in Java or is in Python allows you to identify the Dog objects in the list.

By the way, when working with specific objects like dogs, using a dog lap day calculator could be handy to track how active your pets are and plan their exercise routines! It’s fascinating how technology can tie into real-world applications like keeping our dogs healthy while programming efficient solutions.

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

79081343

Date: 2024-10-12 15:50:17
Score: 1.5
Natty:
Report link
* {
  margin: 0;
  padding: 0;
}

Will reset predefined styles of all elements.

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

79081340

Date: 2024-10-12 15:48:16
Score: 4.5
Natty:
Report link

Anyone found a way to do this for Visual Studio 2022?

So, for example, for #pragma region TEXT, I want to change the colour of TEXT.

I set Preprocessor Text to green (link to screenshot) but it's not changing (another screenshot) TEXT. Is there a different item that I need to select?

Preprocessor Keyword changes the #pragma region bit but not TEXT either (even after restarting Visual Studio).

Reasons:
  • Blacklisted phrase (0.5): I need
  • Blacklisted phrase (2): Anyone found
  • RegEx Blacklisted phrase (1): I want
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Emil Almazov

79081332

Date: 2024-10-12 15:44:15
Score: 3
Natty:
Report link

In my case, in development environment the 'unknown' option mentioned above didn't work. I should explicitly define the environment in the Runner.entitlements and in app delegate to solve the issue runner entitlements

appdelegate.swift file

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

79081330

Date: 2024-10-12 15:43:15
Score: 1
Natty:
Report link

The communication between the terminal and your program (running on the host) is bidirectional. Bytes are sent from the terminal to the host (in response to your read() call) and strings are sent from the host to the terminal (by printf()).

As @Barmar said, your terminal isn't sending the ^V character to the host, and your program never receives it.

Just for clarification: the terminal driver is OS code that runs on your host (in this case, inside the Linux VM), and by disabling some control characters you're just telling the driver (not the terminal itself) that it must not do any special processing of these characters before (or instead of) sending them to your process (ie. to your code).

By the way, something is missing in your example (the orig_termios variable?).

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • User mentioned (1): @Barmar
  • Low reputation (0.5):
Posted by: Diego Ferruchelli

79081329

Date: 2024-10-12 15:43:15
Score: 1
Natty:
Report link

To use ggplot2 to draw dendrogram, another option would be ggalign

knitr::opts_knit$set(upload.fun = identity)
tmp <- structure(list(
    merge = structure(c(
        -2L, -17L, -4L, -8L, -9L,
        -18L, -6L, -1L, -13L, 3L, -22L, 2L, 8L, -5L, -21L, -11L, 12L,
        -14L, 16L, 11L, 15L, 19L, 21L, -3L, -20L, -12L, 1L, -10L, -19L,
        4L, -7L, -16L, 5L, -23L, 7L, 10L, -15L, -24L, 6L, 13L, 9L, 17L,
        14L, 18L, 20L, 22L
    ), dim = c(23L, 2L)), height = c(
        45023.2309258232,
        51012.7856326235, 58268.2644327081, 60190.454758209, 61767.4324786129,
        66285.293896912, 73795.8493548248, 73915.5720738195, 90644.0966914007,
        96920.4596202474, 102068.443095797, 107134.968399678, 115773.032503256,
        117042.164244344, 121274.611506284, 127869.304201595, 131043.636743644,
        158158.916403724, 203042.0850021, 204028.358261787, 267728.385874565,
        289081.126533712, 575641.131737474
    ), order = c(
        21L, 24L, 14L,
        13L, 16L, 11L, 18L, 19L, 17L, 20L, 6L, 8L, 2L, 3L, 1L, 7L, 4L,
        12L, 9L, 10L, 22L, 23L, 5L, 15L
    ), labels = c(
        "D10PBS_1", "D10PBS_2",
        "D10PBS_3", "D10PBS_4", "D10Myo_1", "D10Myo_2", "D10Myo_3", "D10Myo_4",
        "D15PBS_1", "D15PBS_2", "D15PBS_3", "D15PBS_4", "D15Myo_1", "D15Myo_2",
        "D15Myo_3", "D15Myo_4", "D21PBS_1", "D21PBS_2", "D21PBS_3", "D21PBS_4",
        "D21Myo_1", "D21Myo_2", "D21Myo_3", "D21Myo_4"
    ), method = "complete",
    call = quote(hclust(d = dist(t(count.data[gene.masks$Genes, ])))),
    dist.method = "euclidean"
), class = "hclust")
library(ggalign)
#> Loading required package: ggplot2
ggstack(NULL, "v") +
    align_dendro(method = as.dendrogram(tmp)) +
    theme(axis.text.x = element_text(angle = 90))

enter image description here

Created on 2024-10-12 with reprex v2.1.0

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

79081328

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

Ensure pip is installed and accessible

import sys !{sys.executable} -m pip install --upgrade pip

Install scikit-learn

!{sys.executable} -m pip install scikit-learn

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

79081324

Date: 2024-10-12 15:38:13
Score: 4.5
Natty:
Report link

@ImranBinAzhar, @JoelCampos thank you guys it worked!!! I appreciate you spending your time on this question. Thx.

Reasons:
  • Blacklisted phrase (0.5): thank you
  • Blacklisted phrase (1): Thx
  • Whitelisted phrase (-1): it worked
  • Low length (1):
  • No code block (0.5):
  • User mentioned (1): @ImranBinAzhar
  • User mentioned (0): @JoelCampos
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Chris der Hov

79081321

Date: 2024-10-12 15:37:13
Score: 2.5
Natty:
Report link

Lab Task

Question 1

Use your knowledge of stacks to evaluate the given post fix expression:

6 2 3 + - 3 8 2/+*2^3+

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

79081309

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

you are almost there. try the following

(date && ifconfig | awk 'NR == 4' && ifconfig | awk 'NR == 6') | tee -a ./net.log

Reasons:
  • Whitelisted phrase (-1): try the following
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: SPC0nline

79081302

Date: 2024-10-12 15:28:11
Score: 2.5
Natty:
Report link

in the setting.py file, remove 'polls.apps.PollsConfig' or 'polls', and then add 'django_polls.apps.PollsConfig', It will work.

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

79081295

Date: 2024-10-12 15:24:10
Score: 0.5
Natty:
Report link

The GSlice implementation was removed in 2.76, citing improved performance of normal memory allocators. Now g_slice_new() and g_slice_free() will just call g_malloc() and g_free().

Therefore, there's no difference between the two on newer versions.

Reference: https://docs.gtk.org/glib/memory-slices.html

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Khalid Abu Shawarib

79081293

Date: 2024-10-12 15:23:10
Score: 3.5
Natty:
Report link

For partial page reload(show data without reloading), you may use Django HTMX.

Installation guide for django HTMX:- https://django-htmx.readthedocs.io/en/latest/installation.html Docs for Django HTMX:- https://htmx.org/docs/

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

79081291

Date: 2024-10-12 15:23:10
Score: 3
Natty:
Report link

Removing the space in the file name fixed the error for me. I went from 'Topic Chunking' to 'Chunking'. Streamlit was able to run the file after its change.

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

79081290

Date: 2024-10-12 15:23:09
Score: 4
Natty:
Report link

There's a crate to do that: windows-env

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

79081272

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

Thank you for your answer. I followed your instructions but in permissions tab, after clicking on edit principle, when I click to assign roles, "Organization Policy Administrator" is not an option. "Organization Policy Viewer" is an option. "Organization Administrator" is an option. But "Organization Policy Administrator" is not an option. I'm going to throw my computer at a wall and see if that works.

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Brian

79081267

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

Its already reporting your python version...

You have Python 3.12.2

Compiled for AMD64

And what i can see here, you are trying to launch C:\Users\Administrator\OneDrive\Desktop\Python 3.12 (64-bit).lnk

So you will need to exit() first, and then run it again..

this is the dumbest question i ever seen on stackoverflow

like, seriously, are u blind?

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Kirill

79081231

Date: 2024-10-12 14:50:02
Score: 7 🚩
Natty:
Report link

Any news? Same problem here...

Reasons:
  • RegEx Blacklisted phrase (1): Same problem
  • Low length (2):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Jesus Campos

79081230

Date: 2024-10-12 14:49:01
Score: 1
Natty:
Report link

Here's a workaround for the issue as it relates to font properties. It avoids ::part and thus !important, which @Danny'365CSI'Engelman deemed a "red flag".

Setting all of the shadow DOM <input> (the ::part element)'s CSS font properties to inherit allows me to set those properties for the custom element itself, not the ::part. If you have multiple shadow DOM elements with different font settings then this is not possible, but how often does that happen?

<template id="my-template">
  <style>
    input {
      font:inherit;
      font-kerning:inherit;
      font-size-adjust:inherit;
      font-synthesis:inherit;
      font-optical-sizing:inherit;
      font-palette:inherit;
    }
    ...

AFAICT that's all the CSS font properties that are not "experimental" or quasi-deprecated (like font-feature-settings). No more ::part or !important for fonts.

This solution might work for other non-layout properties. For example, it doesn't work for padding because it doubles the amount of padding by applying it to both the DOM and shadow DOM elements. In my case it does help auto-adjust the <input>.nextElementSibling's margin because I set that in em units which I inherit from the custom DOM element. But that's a special case with a negative margin to offset an SVG image.

Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • User mentioned (1): @Danny'365CSI'Engelman
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Sideways S

79081228

Date: 2024-10-12 14:47:01
Score: 3.5
Natty:
Report link

This library may help you and you can add it to your project:

https://github.com/salehyarahmadi/DataTable

Reasons:
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Mohamad Hasan Salmaaniyaan

79081219

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

This is surprising to me because I manually added prefetch in the link, and now the pages open instantly. Before, it took a few milliseconds to load the pages.

I don't understand why, as I found the true default in production, but it works differently for me.

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

79081218

Date: 2024-10-12 14:40:59
Score: 4.5
Natty:
Report link

The only thing that seems to be working for me is - https://github.com/iMerica/dj-rest-auth/issues/503#issuecomment-1937769215

Reasons:
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: D Gopal Krishna

79081207

Date: 2024-10-12 14:35:58
Score: 1
Natty:
Report link
  1. Open cmd from prunsrv folder and execute: start prunmgr.exe //MS//MyServiceName
  2. In right bottom click on manager icon - apache with red square
  3. Go to menu Java
  4. Go to Java Options
  5. Insert your -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=6666 debug block here.
  6. Start service from menu General + idea java remote debug :D
Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: psyopus

79081197

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

1.download Python from the official Python website.

2.During installation, Make sure "Add Python to PATH." is selected.

Mostly it works in this step. Now Check python version , it displays

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

79081196

Date: 2024-10-12 14:28:57
Score: 2.5
Natty:
Report link

Check if you can download the font directly in browser. If not your url to font is wrong.

I experienced the same issue today. If you encounter a similar error, check to make sure that the path to your font file is correct.

enter image description here

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

79081192

Date: 2024-10-12 14:24:55
Score: 1
Natty:
Report link

The issue you're encountering is due to the fact that auto-linking in React Native only works with dependencies installed directly in the project, not with peerDependencies.

Explanation: peerDependencies are meant to indicate the versions of libraries that your library is compatible with, but they are not installed automatically when your library is installed. React Native's auto-linking system works with packages that are listed under dependencies in the project’s package.json. If your libraries like react-native-sqlite-2 are listed as peerDependencies, they won’t be installed automatically, and React Native won't auto-link them.

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

79081186

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

Still did not worked for me. In android I am able load image but ios throws error

> Could not resolve all files for configuration ':composeApp:iosSimulatorArm64CompileKlibraries'.
   > Could not resolve io.coil-kt.coil3:coil-network-okhttp:3.0.0-rc01.

I am using compose multiplatform

here is my gradle

    sourceSets {
    
    androidMain.dependencies {
        implementation(compose.preview)
        implementation(libs.androidx.activity.compose)

        //material3
        implementation(libs.androidx.compose.material3)

        //ktor
        implementation(libs.ktor.client.android)

        //coil
        implementation("io.ktor:ktor-client-okhttp:3.0.0")
    }

    iosMain.dependencies {
        //ktor
        implementation(libs.ktor.client.darwin)

        //coil
        implementation("io.ktor:ktor-client-darwin:3.0.0")
    }


    commonMain.dependencies {
        implementation(compose.runtime)
        implementation(compose.foundation)
        implementation(compose.ui)
        implementation(compose.components.resources)
        implementation(compose.components.uiToolingPreview)
        implementation(libs.androidx.lifecycle.viewmodel)
        implementation(libs.androidx.lifecycle.runtime.compose)

        // material
        implementation(compose.material)
        implementation(compose.material3)

        // coil
        implementation("io.coil-kt.coil3:coil-compose:3.0.0-rc01")
        implementation("io.coil-kt.coil3:coil-network-okhttp:3.0.0-rc01")

        //ktor
        implementation(libs.bundles.ktor)

        //coroutine
        implementation(libs.kotlinx.coroutines.core)

    }
}

Can any one tell what is wring here.

Reasons:
  • Blacklisted phrase (1): did not work
  • Whitelisted phrase (-1): worked for me
  • RegEx Blacklisted phrase (2.5): Can any one tell what
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Developer Ashh

79081178

Date: 2024-10-12 14:16:54
Score: 1
Natty:
Report link

Your problem is that you've got KONG_ADMIN_GUI_URL incorrectly set, causing Kong Manager's Admin API requests to be rejected due to CORS protection.

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

79081174

Date: 2024-10-12 14:15:54
Score: 1.5
Natty:
Report link

It specifies that the repository is a bare Git repository hosted on a remote server (in this case, GitHub)

A bare repository is one that does not have a working directory.

Simply, it is just a convention.

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

79081162

Date: 2024-10-12 14:11:53
Score: 2.5
Natty:
Report link

The solution, is in your answer: Have an extra Master which everyone connects to, so all 4 screens/clients are identical.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Florian Wögerer

79081161

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

llm.invoke() does not actually call a Langchain Tool. It only generates a ToolCall as part of the response's .tool_calls property. This ToolCall then needs to be manually invoked on a Tool.

See here:

https://python.langchain.com/docs/how_to/tool_results_pass_to_model/ https://python.langchain.com/docs/how_to/tool_calling/#defining-tool-schemas

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

79081154

Date: 2024-10-12 14:06:51
Score: 6.5 🚩
Natty: 4
Report link

i am facing the same problem here , in CodeBlocks you can just add the file to the project from (project->addFiles)

Reasons:
  • Blacklisted phrase (1): m facing the same problem
  • Low length (1):
  • No code block (0.5):
  • Me too answer (2.5): i am facing the same problem
  • Single line (0.5):
  • Low reputation (1):
Posted by: DJABRI MAROUANE

79081152

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

You can use this script to change the "Proxied" status https://github.com/Thibs/cloudflare_update_proxied_status_dns/

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

79081151

Date: 2024-10-12 14:05:51
Score: 0.5
Natty:
Report link

L'historique législatif des mutations foncières en Tunisie est un sujet complexe qui reflète l'évolution du pays depuis l'époque coloniale jusqu'à nos jours. Voici un aperçu des principales étapes et lois qui ont marqué cette évolution :

  1. Période coloniale (1881-1956) : • 1885 : Loi foncière établissant le système d'immatriculation des terres. • 1892 : Création du Tribunal Mixte Immobilier pour gérer les litiges fonciers.
  2. Indépendance et réformes initiales (1956-1970) : • 1957 : Abolition des habous privés (biens de mainmorte). • 1964 : Loi sur la nationalisation des terres appartenant aux colons étrangers.
  3. Période de modernisation (1970-1990) : • 1973 : Création de l'Agence Foncière d'Habitation (AFH). • 1976 : Loi sur la protection des terres agricoles, limitant leur conversion en zones urbaines.
  4. Réformes économiques et libéralisation (1990-2010) : • 1991 : Loi encourageant les investissements privés dans le secteur immobilier. • 1995 : Code de l'Aménagement du Territoire et de l'Urbanisme, régulant la planification urbaine.
  5. Période post-révolution (2011-présent) : • 2011 : Réformes visant à améliorer la transparence dans les transactions foncières. • 2015 : Loi sur les Partenariats Public-Privé, impactant le développement immobilier.
Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: RIM FOURTI

79081150

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

As a work around I could temporary lower the free disk threshold, then I could bring the node online and it would update amount of free disk space. Then I could revert to the settings we want.

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

79081149

Date: 2024-10-12 14:04:51
Score: 1
Natty:
Report link

Very simple 2-element sliding window can be implemented as follows

for i, curr in enumerate(arr[1:]):
    prev = arr[i]
    ...
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: RKest

79081138

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

Talking from Redis usage perspective, less grasp on the others:
What is the gain with using many connections to the same server?
You can have some pool depends on the implementation of the client you use, but creating a connection per request is useless.
You should understand the limitations, use the maximum amount of connection Redis server can efficiently handle, and re-use the same connections.
You should also understand the architecture of the client you use, if it is a multiplexer for example, even more than one connection is useless.

Having more and more connections sending more requests of what Redis (or MYSQL for that matter) can serve is just misusing of resources, its using a private car for each request and sitting in traffic instead of all moving to public transportation, its not faster, and you need much much more resources.

If you need more TPS you should scale up Redis, move to cluster mode and add more replications so you can read from more endpoints and the traffic has "load balancing" between shards, the amount of connections should be almost constant compare to the amount of nodes the cluster has.

With the proper usage Redis will be much faster than the requests getting in (Valkey, the OSS fork of Redis, just announced Valkey 8 with 1million TPS, that's more than most apps need, and its not require connection per request).

I guess the same is even more true for MySQL, the amount of connection should be determined by the ability of the DB to serve requests and a small margin, there's no logic holding more.

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

79081137

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

Same lol I’m trying to make a code that gives a player a gold nugget with a name but I get the same output

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

79081123

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

Your problem is that you've got KONG_ADMIN_GUI_URL incorrectly set, causing Kong Manager's Admin API requests to be rejected due to CORS protection.

OR

Note: Be sure to put the asterisk in double-quotes when defining it with a yaml file, or with a docker compose file.

KONG_ADMIN_GUI_URL: "*"

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

79081119

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

derivedAsync from ngxtension solves this also in a clean way:

readonly roles = derivedAsync(() => getRoles(this.userId()), { initialValue: [] });

https://ngxtension.netlify.app/utilities/signals/derived-async/

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

79081112

Date: 2024-10-12 13:41:46
Score: 4.5
Natty: 6
Report link

Thanks this really helped!! :)

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Low length (2):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: ananya-singh-afk