79613546

Date: 2025-05-09 05:51:34
Score: 6 🚩
Natty:
Report link

Are we posting AI answers now? sumon mia

Reasons:
  • Low length (2):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Dennis Fransén

79613530

Date: 2025-05-09 05:37:31
Score: 0.5
Natty:
Report link

Is @angular/flex-layout deprecated or no longer compatible with Angular 18?

Ans: Yes, you can check the deprecation on @angular/flex-layout - npm.js. The last version published is 15.0.0-beta.42 so it will work only up to Angular 15.


What are the recommended alternatives for responsive layout in Angular 18? Is there any migration guide from fxLayout to CSS/Tailwind/CDK?

These are the details provided in their GitHub repo:

NOTE: The Angular team no longer publishes new releases of this project. Please review this blog post for alternatives, and this article for the explanation and next steps.

Reasons:
  • Blacklisted phrase (1): this blog
  • Blacklisted phrase (1): this article
  • Blacklisted phrase (1): Is there any
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • High reputation (-2):
Posted by: Naren Murali

79613528

Date: 2025-05-09 05:35:30
Score: 0.5
Natty:
Report link

Here's an idea. Not sure if it is optimal but it should be correct.

  1. sort each set.
  2. pop the smallest item from each set into a minheap
  3. track the max - min of elements in the heap
  4. repeat:
    1. pop min from heap
    2. replace it the next smallest item from the same set (pop min from set again)
    3. (if said set is empty, stop. you've reached the optimal answer)

of course, you'd insert tuples of (value, parent_set) into the heap so you know which value came from which set once they're popped from the heap and needs to be replaced

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

79613518

Date: 2025-05-09 05:20:26
Score: 3.5
Natty:
Report link

So apparently, I had to spm_encode my input text first, then run the above commands.

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

79613507

Date: 2025-05-09 05:05:22
Score: 4
Natty:
Report link

I am getting this error "No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.)." when i do blob trigger, the code is running fine in local after azure deployment, throwing this error.

Reasons:
  • Blacklisted phrase (1): I am getting this error
  • RegEx Blacklisted phrase (1): I am getting this error
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Kiruba Babu

79613506

Date: 2025-05-09 05:03:21
Score: 0.5
Natty:
Report link

Be aware, # is not a special character, you do not need to escape it with %

The correct answer for your first question is lehtmi's, Using frontier pattern is the way to go, and yes it does work on latest 5.1 and luajit to make a match using string.match

string.match(str, "%f[^\n\r\0]###?[^#\r\n\0]+")

Should yield ##First line

How could I go about matching a pattern that starts with "line start" in Lua?

The simplest is to split the string into lines

for line in str:gmatch"[^\r\n]*[^\n]?" do
 if line:find"^###?.+" then -- stuff here
 end
end

Should be enough.

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

79613505

Date: 2025-05-09 05:02:21
Score: 0.5
Natty:
Report link

When you run below query, your are asking mysql to display the result of database() function. (Reference).

mysql> select database();

But in the below case, mysql throws an error as no database is selected till this point.

mysql> select databese();
ERROR 1046 (3D000): No database selected

When you have selected a database, mysql looks for a function named databese() within your DB but since it is not defined it throws the given error.

mysql> select databese();
ERROR 1305 (42000): FUNCTION hoge.databese does not exist
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Starts with a question (0.5): When you
  • Low reputation (1):
Posted by: Nitin Rawat

79613501

Date: 2025-05-09 04:59:20
Score: 1
Natty:
Report link

Do this to sort your selection in the Visual Studio code editor

Tools->Option->Environment->Keyboard

enter image description here


I reassigned the shortcut for Edit.SortLines from (Shift-Alt-S) to (Ctrl-S Ctrl-S)

(Shift-Alt-S) activates the File menu which can be frustrating and in my case the cause for reassignment

Anything in the selection will be sorted. If you keep invoking the shortcut on the same selection it will sort backwards and forwards until your heart desires.

That's any selection not just Enumerators.

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

79613500

Date: 2025-05-09 04:58:20
Score: 1.5
Natty:
Report link

My code is too much fragment to be posted as it is for a solution here, but what i essentially do is recursively go into each $result and then see where is the 'english' appearing & handle it accordingly, all dynamically. Code is work in progress and we are testing it now, but it works!!

foreach ( recursiveFind($tempF, 'english') as $result) {

For the long term, we shall refactor and find a much better & scalable solution. Thank you all once again!

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: SSMan74

79613499

Date: 2025-05-09 04:55:19
Score: 0.5
Natty:
Report link

Can you make controller class mocked instead of other? Unit testing on a real DB isn't a good idea. Just use controller public methods like if you are using API. I had a unit test like that:

@ExtendWith(MockitoExtension.class)
class TestLaunch {

    @Mock
    private ReposMineserver mineservers; 

    @Mock
    private ReposTariff tariffs; 
    
    @Mock
    private ServiceMinecraftServerObserver observers; 

    @Mock
    private ServiceHandlers handlers; 

    @InjectMocks
    private RootController controller;
    
    
    @Test
    void launch_serverExists_shouldReturnOk() {
        
        Config.PATH_TO_SERVERS = "test/";
        Integer id = 2;
        Mineserver mineserver = new Mineserver(); 
        mineserver.setId(id);
        mineserver.setIdTariff(id);
        
        Tariff tariff = new Tariff();
        tariff.setCpuThreads((short)2);
        tariff.setHoursWorkMax(9999);
        tariff.setMemoryLimit((long)9999);
        tariff.setRam((short)4);
        
        lenient().when(handlers.get(2)).thenReturn(new MinecraftHandler(mineserver, tariff));
        lenient().when(mineservers.findById(id)).thenReturn(Optional.of(mineserver));
        lenient().when(tariffs.findById(id)).thenReturn(Optional.of(tariff));

        // Test data files (emit minecraft)
        File file = new File("test/server_2");
        file.mkdirs();
        file = new File("test/server_2/run.sh");
        System.out.println(file.getAbsolutePath());
        if (!file.exists()) {
            try {         
                file.createNewFile();
                FileWriter f = new FileWriter(file);        
                f.append("while true; do echo 123; done");
                f.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        file = new File("test/server_2/server.properties");
        System.out.println(file.getAbsolutePath());
        if (!file.exists()) {
            try {         
                file.createNewFile();
                FileWriter f = new FileWriter(file);        
                f.append("max-players=2\nserver-port=25565\nquery.port=25565");
                f.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        
        ResponseEntity<Void> response = controller.launch(id);

        assertEquals(HttpStatus.OK, response.getStatusCode());
        try {
            Thread.sleep(200);
        } catch (InterruptedException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        
        String errOutput = errContent.toString();
        System.out.println("Captured error output: " + errOutput);
        
        assertEquals(true, controller.is_alive(id).getBody());
    }    
    
    
    private final ByteArrayOutputStream errContent = new ByteArrayOutputStream();
    private final PrintStream originalErr = System.err;

    @BeforeEach
    public void setUp() {
        System.setErr(new PrintStream(errContent));
    }

    @AfterEach
    public void restoreStreams() {
        System.setErr(originalErr);
    }
}

Integration testing may be including http requests to a real server with database, but unit testing with a real db makes errors while "maven clean install". All your data in test must be independent from the enviroment

Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Can you
  • Low reputation (1):
Posted by: tankoman 228

79613491

Date: 2025-05-09 04:41:17
Score: 1.5
Natty:
Report link

The following reference link will certainly assist in implementing the Swagger Aggregator using Spring Cloud Gateway

https://www.baeldung.com/spring-cloud-gateway-integrate-openapi

Hope that helps. I am happy to assist you further.

Thanks,

Mahendra

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Whitelisted phrase (-1): Hope that helps
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: bs.mahi

79613484

Date: 2025-05-09 04:31:14
Score: 1
Natty:
Report link

I figured out what was going on. It turns out that MySQL tries to look for a user-defined function when no built-in function matches, and if no database is selected, it throws the "No database selected" error.

Reasons:
  • Whitelisted phrase (-2): I figured out
  • Low length (0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: arubaito

79613482

Date: 2025-05-09 04:29:13
Score: 1
Natty:
Report link

on the application overview page of your app in Partner Center, you'll find a section called manage package flights. Upload your package there and assign a group to this flight. If you don't have groups so far, you'll find a button to create one.
Wenn certification is done and app is published, it will only be delivered to those users in the group. They need to be signed in to the Microsoft store, of course.

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

79613480

Date: 2025-05-09 04:27:13
Score: 0.5
Natty:
Report link

With Serenity framework, config in "serenity.conf":

chrome.preferences {
    credentials_enable_service = false
    profile.password_manager_enabled = false
    profile.password_manager_leak_detection = false
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Long Nguyễn Văn

79613467

Date: 2025-05-09 04:07:08
Score: 2.5
Natty:
Report link

You need to go in the project folder directly, not in xcode, then click on info.plist. This will now make the file visible in xcode. And you can right click and select edit as source code now.

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

79613463

Date: 2025-05-09 04:02:07
Score: 0.5
Natty:
Report link

build file location refrence is in memory, in task manager clean all node.exe.

Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Single line (0.5):
  • High reputation (-1):
Posted by: yu yang Jian

79613452

Date: 2025-05-09 03:40:02
Score: 3
Natty:
Report link

It is recommended to use SmartCodable. None of this is a problem. Support type conversion and fault-tolerant processing. Even support inheritance

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

79613450

Date: 2025-05-09 03:34:01
Score: 1
Natty:
Report link

Change the "android:name="com.google.android.gms.wearable.MESSAGE_RECEIVED" action from your manifest to "android:name="com.google.android.gms.wearable.DATA_CHANGED"...

I don't know whether in fluter is the same, but usually you have to set a data tag to the intent, e.g.:

<data android:scheme="wear" android:host="*"

android:path="/start-activity"

Doc

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

79613445

Date: 2025-05-09 03:22:59
Score: 1.5
Natty:
Report link

You can force the Firestore client to use the REST transport instead of gRPC. Follow below steps

Install the required packages

Set the transport to REST when creating the Firestore client

Authenticate as usual (using service account credentials)

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

79613427

Date: 2025-05-09 02:55:53
Score: 1
Natty:
Report link

In your HTML, inside of your <head> (after <title></title>) you will need to use

<link rel= "icon" href="./Images/image name.png" type= "image/png" />

replace "image name" with your actual image name

here is the code that I have tested it with

<title>Dark Mode Toggle</title>
    <link rel="icon" href="./Images/yorha crewpic.png" type="image/png" />

This works fine with me.

Reasons:
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Bradford Owens

79613423

Date: 2025-05-09 02:51:52
Score: 0.5
Natty:
Report link

Well, it seems that you have to either pass a second type parameter or pass no type parameters at all:

searchBar = viewChild<SearchBarComponent, ElementRef>('searchBar', { read: ElementRef });

Or

searchBar = viewChild('searchBar', { read: ElementRef });

This is TypeScript behavior. Since the read option relies on the second type, it either has to be specified or no types should be specified - at which TypeScript will infer the type from whatever you pass in.

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

79613419

Date: 2025-05-09 02:46:51
Score: 1
Natty:
Report link

I'm not very familiar with how discord bots work but there seems plenty of good documentation on their API
https://discord.com/developers/docs/intro

If you really want to stick with using Python it is worth checking out webhooks for discord. Python seems to have a library for that as well:
https://pypi.org/project/discord-webhook/

Python is a interpreted language that runs on a virtual environment, pip is an excellent tool for handling all the necessary packages needed to run a python script.
More information on how to set up a virtual environment:
https://docs.python.org/3/library/venv.html

It is best you try and figure out what you want your bot to do first as there are probably lots of different way to accomplish your goal. In the future it helps to ask more specific questions about what you want your bot to do, which language/libraries you want to use, exactly what the problem you are encountering as well as providing code that you've written. Best of luck!

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

79613417

Date: 2025-05-09 02:43:50
Score: 2.5
Natty:
Report link

I met this problem too. You should check your fastapi version and then find it's Starlette version, now you could find python-multipart package version at Starlette's requirements. Install the correct version of python-multipart and problem solved.

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

79613415

Date: 2025-05-09 02:38:49
Score: 2
Natty:
Report link

Had some trouble understanding the "why?" of these answers and their differences and wanted to give an explainer/re-summation based on my additional 1 hour rabbit hole for anyone else based on when each is needed. First,

TLDR:

PLBIFLR (Pretty Long But I Felt Like Reading)

My main question was why were all 3 still actively maintained, if the shade-plugin is just better, why bother with the others existing? And the answer seems to lie in the three different audiences that these libraries assist.

JAR: Traditional Maven Libraries

Any traditional library being uploaded to a maven repo is going to aim for an emphasis on the slimmest possible jar ONLY containing their requirements, instead leaning on the pom.xml to define what people should download from elsewhere. (avoiding the nightmare of shipping every package)

Fat-Jar: Packaged Executable Tools and Additional Resources

When I personally wanted to ship a quick executable jar for a script I was using along with a runtime I leaned on the assembly jar. It can effectively package up a fat-jar with all the dependent classes from other jars copied into your main jar, but also can do additional steps after, like taking the jar, and a jre, and some helpdocs into a zip file, that's the assembly plugin's strength.

The assembly plugin is also much more straightforward, it does basic dependency management and packaging and that's it, it was published earlier (version 2.0 was published to mvnrepository in 2006 2 years before shade v1.0) and shade came later with a much more complicated problem to solve.

Uber/shaded Jar: plugins, special dependencies, etcetera

Ok now, the final use case, the so called uber or shaded jar (have seen it referenced as both). this is for situations where you REALLY need an EXACT version of a library packaged with your library and know that other people may have a different version of the same library getting called.

In my case, I made it here from looking into using kotlin (and the kotlin std lib) with a minecraft server plugin and was curious why I needed to use shade for building. In that scenario, there will be a buuuuunch of other plugins all running similar versions of the kotlin std lib, but every one a diff version AND there is no dependency management like maven, my jar needs to ship pre-packed to drop and go.

This is where a so called uber-jar is needed that both needs to have all the dependencies packed in but also needs to not conflict with other versions, even the assembly plugin says it cannot effectively manage this requirement:

If your project wants to package your artifact in an uber-jar, the assembly plugin provides only basic support. For more control, use the Maven Shade Plugin.

- Maven Assembly Page

This is the entire purpose of the shade plugin, it creates a jar with all the dependency classes copied in BUT it also renames all those classes and refactors your code to match so that your classes will not conflict with any other classes in other libraries being imported elsewhere by the code. This is the only purpose of the shade plugin and is incredibly important, you could still use the assembly plugin after even to pack it all up in a zip or other things, but refactoring like that is not assembly's purpose.

References

Reasons:
  • Blacklisted phrase (0.5): I need
  • Blacklisted phrase (0.5): why?
  • Blacklisted phrase (1): stackoverflow
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Matthew Fallon

79613414

Date: 2025-05-09 02:37:49
Score: 2.5
Natty:
Report link

Have you tried this?

import myImage from './assets/myImage.png';
<img src={myImage} alt="description" />
Reasons:
  • Whitelisted phrase (-1): Have you tried
  • Low length (1):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: rsmukesh.pro

79613412

Date: 2025-05-09 02:36:48
Score: 1
Natty:
Report link

You can try the src folder as well

Your best options would be placing the image in the components folder!

as mentioned in a previous answer

here's a quick summary of the previous answer:

Adding images in the public folder and the src folder both are acceptable methods, however, importing images into your component has the benefit that your assets will be handled by the build system, and will receive hashes which improves caching/performance. You'll also have the added benefit that it will throw an error if the file is moved/renamed/deleted.

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

79613400

Date: 2025-05-09 02:18:40
Score: 10 🚩
Natty: 4
Report link

I had the same issue on 2025/05/09 when I changed from short token to long token. It shows me this error, and I have no idea how to resolve it. Does anyone have a solution?

Reasons:
  • Blacklisted phrase (3): have a solution?
  • Whitelisted phrase (-1): I had the same
  • RegEx Blacklisted phrase (3): Does anyone have a solution
  • Low length (1):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Duy Nam Nguyễn

79613396

Date: 2025-05-09 02:14:39
Score: 0.5
Natty:
Report link

button[aria-label^="Follow"]

You can also use $= for the ending instead or *= for substring matches

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

79613390

Date: 2025-05-09 02:04:37
Score: 1.5
Natty:
Report link

All of it boils down to as much as I hate to swear pure shit because now it shows in the code that you can change the timeframe of when things were posted to everything in the Micro stacks . You guys have one ahead and literally reformat a time on how things are posted that’s cheating I don’t care about what means or what you try to write into the code if you’re doing things at a later tense, and then dating to. To not have happened yet so that It can work out for you when that time does come you’re cheating…AND YOU TELL THAT WHICH FROM WITCH TO WITCH TYPE OF PIKE DESERVING …THAT I don’t care WHICH FUTURE PASSED NOSTALGIA THROUGHOUT THE WHOLE META VERSE COMES FROM. Once it gets boiled down, you’re all cheating. Now trust me. I very well know how this sounds to the average person so yeah you can make it like some crazy person wrote this, but I’ll take you back through and show you where I got this information from not that it matters probably because you’ll just reformat that also, but that in itself will prove..

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

79613387

Date: 2025-05-09 01:58:35
Score: 2
Natty:
Report link

Check for the image size of your image, firefox allows the size of 1-2MB. Secondly, it can occur due to security problem. Firefox may block base64 encoded images...so you can check console for csp errors or disable extensions to test Csp error may look like: Content-Security-Policy: img-src 'self'; If it is so then you can fix it by adding- data: ie, Content-Security-Policy: img-src 'self' data:;

Reasons:
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Spandana K S

79613378

Date: 2025-05-09 01:42:32
Score: 3.5
Natty:
Report link

Not 100% sure, but personally I like the Prettier extension which just has great support for all languages.

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

79613367

Date: 2025-05-09 01:24:28
Score: 1
Natty:
Report link

it will work using below tx

iif(isNull($df_var_last_update_dt),fromUTC(currentUTC(),'UTC-4'),toTimestamp($df_var_last_update_dt,'yyyy-MM-dd\'T\'HH:mm:ss.SSS'))

    "df_var_last_update_dt": "2025-02-10T23:22:08.657Z"
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: PySparkLearner

79613365

Date: 2025-05-09 01:17:26
Score: 4.5
Natty: 4
Report link

just don't unless your making minecraft

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

79613363

Date: 2025-05-09 01:15:25
Score: 0.5
Natty:
Report link

Okay, so I found a solution that works. Apparently I can't use Open to open excel in excel. I have to use workbooks.open. This solution simply opens the source file, copies the relevant sheet into the current document and closes the sourcefile. problem solved. (The help document that it is based on is here, but it is a bit incorrect and needed playing with: https://learn.microsoft.com/en-us/office/vba/api/excel.workbooks.open)

Sub ImportWorksheet()
    Dim sourcefile, sourceloc, sourcetab As String
    sourcefile = "space flight.xlsx"
    sourceloc = "C:\Users\moish\OneDrive\Documents\space flight.xlsx"
    sourcetab = "Bodies"
    
    Destination = ActiveWorkbook.Name
    
    Workbooks.Open sourceloc
    
    
    ActiveSheet.Name = tabname
    Sheets(sourcetab).Copy Before:=Workbooks(Destination).Sheets(1)
    
    Windows(sourcefile).Activate
    ActiveWorkbook.Close SaveChanges:=False
    Windows(Destination).Activate
End Sub

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

79613346

Date: 2025-05-09 00:47:19
Score: 1.5
Natty:
Report link

On top of your android app having RECORD_AUDIO permission, check if your Google / Google Speech Recognition & Synthesis app in the settings of your android device have both microphone and notification permissions enabled. I was missing notification permissions for Google Speech Recognition & Synthesis app that was providing SpeechRecognizer and kept getting ERROR_INSUFFICIENT_PERMISSIONS

Reasons:
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: user30487223

79613343

Date: 2025-05-09 00:44:19
Score: 2
Natty:
Report link

There could be several cases that end up seeing ERR_EMPTY_RESPONSE . In my case, it was due to using http instead of https. Please check this link for some other cases like:

Reasons:
  • Blacklisted phrase (1): Please check this
  • Blacklisted phrase (1): this link
  • RegEx Blacklisted phrase (1): check this link
  • Low length (0.5):
  • Has code block (-0.5):
  • High reputation (-1):
Posted by: Iman Mahmoudinasab

79613337

Date: 2025-05-09 00:33:16
Score: 1
Natty:
Report link

Since you have no logic or outputs, your design is being optimized down to nothing. You can run the get_ports command by itself to see a list of all the ports that remain.

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

79613330

Date: 2025-05-09 00:18:12
Score: 1
Natty:
Report link

The question, and all of the answers so far, are repeating the error message's mistake to not say which service account they are talking about. There are typically three service accounts:

  1. There is the account which the Cloud Run Service will use at run time (when invoked). This error is not about it.

  2. The error is for the Cloud build account which needs roles/run.builder. That's probably the Compute Engine default service account.

  3. The deployment, eg. the gcloud command, has to be logged in as someone. That may also be a service account. Whoever runs the command needs roles/run.developer or roles/run.sourceDeveloper

The problem here is that too much of the documentation and some of the error messages don't say which account. Granting the correct permission to the wrong account doesn't help, which is probably the source of the comments saying "it doesn't work for me"

Reasons:
  • RegEx Blacklisted phrase (2): doesn't work for me
  • Long answer (-0.5):
  • Has code block (-0.5):
Posted by: Steven Ensslen

79613329

Date: 2025-05-09 00:15:11
Score: 3.5
Natty:
Report link

solution found, I had to move the line setting the window visible after initiating gamePanel

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

79613326

Date: 2025-05-09 00:12:10
Score: 5.5
Natty:
Report link

You might find this video helpful.

https://youtu.be/Ngsz9pfgBUo

The associated GitHub project is - https://github.com/mamonaco1973/container-intro/tree/main/.github/workflows

We walk through configuring GitHub actions for AWS, Azure and GCP.

Reasons:
  • Blacklisted phrase (1): youtu.be
  • Blacklisted phrase (1): this video
  • Probably link only (1):
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Michael Monaco

79613322

Date: 2025-05-09 00:08:09
Score: 3.5
Natty:
Report link

Samething here, I'd like to disable the SQL validation as I used to...

enter image description here

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

79613317

Date: 2025-05-08 23:59:07
Score: 3.5
Natty:
Report link

I was able to resolve the 401 error, turned out to be a basic mistake from my side of providing the incorrect credentials. Closing issue

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

79613316

Date: 2025-05-08 23:59:07
Score: 1.5
Natty:
Report link

pbpaste with double quotes or `pbpaste | sed 's/ /\\\ /g'z` used to work perfectly on my old MBP2012 with paths copied with Cmd+Shift+C, but the same approach doesn't work anymore on a new M4 Mac mini. So, say open `pbpaste` for a path like /Users/yyy/Documents/My File 1.pdf throughs an error "The files /Users/yyy/'/Users/yyy/Documents/My, /Users/yyy/Documents/File, /Users/yyy/Documents/1.pdf' do not exist." Adding quotes open "`pbpaste`" yields "The files /Users/yyy/'/Users/yyy/Documents/My File 1.pdf' do not exist." Using sed doesn't change the situation at all. I tried in Mac's native Terminal, iTerm and Kitty. All same. Clueless. Lost. Need your help.

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

79613309

Date: 2025-05-08 23:45:04
Score: 5.5
Natty:
Report link

It's 9 years later and I'm disappointed the "Accepted Answer" on this is completely wrong. I also can't downvote or comment on anything because of the broken reputation system on here too. The issue with

tennis_window.title('Top Ten Tennis')

Has nothing to do with the error OP is asking about as I'm getting the exact same error without ever trying to set the Title or a string anywhere. Something about just creating a new Window with TopLevel is causing a weird error where python keeps thinking it is a string object for whatever reason. I'm currently unable to just call something as basic as:

NewWindow = TopLevel()

without getting this exact same error where it says 'str' obj is not callable. I've even used type hinting to explicitly say the type but it always seems to think it is a 'str' obj for whatever reason. It'd be awesome if someone had the real answer for this.

For reference here is the entirety of the code I'm using to get this exact same type error:

def CreateNewWindow():
    NewWindow = Toplevel()

That's literally it. I then just call the function from a ttk.Button with command=CreateNewWindow()

Reasons:
  • RegEx Blacklisted phrase (1.5): reputation
  • RegEx Blacklisted phrase (2): downvote
  • Long answer (-1):
  • Has code block (-0.5):
  • Me too answer (2.5): I'm getting the exact same error
  • Low reputation (1):
Posted by: Tommy Wilkinson

79613303

Date: 2025-05-08 23:39:02
Score: 0.5
Natty:
Report link

You may also fix the issue with updating these packages to the latest version:

@testing-library/jest-dom
@testing-library/react
Reasons:
  • Low length (1):
  • Has code block (-0.5):
Posted by: Sam

79613302

Date: 2025-05-08 23:38:02
Score: 0.5
Natty:
Report link

According to my Review from The answers, practice code and Documentation I discovered that the onMessageReceived() method is called effectively depending on the type of message whether notification message or data message. All you have commented but the solution that make me to comment is that:

The stack started when tried to send a message the message was received in the foreground app but not in the background. This is not true in the onMessageReceived() method when the message is either Data or Data plus notification.

In the on message was trying to send the data to the server but the server don't get the data when on background or killed while after Logging the onMessageReceived() run effectively. The problem was the way was handling the logic of data sending.

I tried to start a service to do this until finally after making the service foreground the data was received to server whether the app is killed, or foreground. You need to perform short job in the method or will not be run, schedule a job and run with worker or use foreground service otherwise.

Reasons:
  • Blacklisted phrase (1): to comment
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Daudi Mabula

79613300

Date: 2025-05-08 23:36:01
Score: 2
Natty:
Report link

I have the exact same problem, currently running pytest 8.3.5 from vscode, in my case I tried a couple of thing, including changing pytest.ini to

[pytest]
addopts =
noops = true #it didn't work

Another attempt was to find run_pytest_script.py inside your .vscode-server/extensions.. and replace

            #arg_array = ["-p", "vscode_pytest", *args, *ids]

            print("Running pytest with args: " + str(arg_array))
            pytest.main([]) #removed arg_array from params 

That breaks to vscode testing for some bizarre issue I couldn't find. Original code here
What ended up works was a change in my code since I use pedantic:

        ExeConfig.config = SettingsConfigDict(
            case_sensitive=False,
            cli_parse_args=True,
            cli_ignore_unknown_args=True, # this should ignore the --rootdir ...
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Me too answer (2.5): I have the exact same problem
  • Low reputation (0.5):
Posted by: martin

79613294

Date: 2025-05-08 23:28:59
Score: 1.5
Natty:
Report link

Create a new Running Total:
Creating a new Running Total

And elect to Evaluate 'on change of group' and select the JOB Group (assuming the report is Grouped on JOB). Set the RESET level to the desired logic.

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

79613287

Date: 2025-05-08 23:18:58
Score: 0.5
Natty:
Report link

The correct answer for .NET 6.0 and later is CULong, and CLong for its signed counterpart.

Those two types correctly handle the differences in size of C's long type between Windows/non-Windows and 32-bit/64-bit targets.

See https://github.com/dotnet/runtime/issues/13788 for more context.

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

79613286

Date: 2025-05-08 23:14:56
Score: 5
Natty:
Report link

Found the answer - it is here:

https://community.powerplatform.com/forums/thread/details/?threadid=63fa952a-b513-4095-8e71-e50f932b772f

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

79613281

Date: 2025-05-08 23:11:55
Score: 1.5
Natty:
Report link

I have this exact issue:

The email fails when power automate initially runs, but if I re-test the same exact run that failed from Power Automate it will process everything properly and the files gets to Azure DevOps properly. If I change "Body is Base64" to No, then the workflow seems to be successful but when I try to open any attachment in Azure DevOps it's corrupted.

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

79613264

Date: 2025-05-08 22:49:49
Score: 1.5
Natty:
Report link

I considered this issue in my current project (https://github.com/uonrobotics/ctmd) and redefined mdarray to use the std::array container when rank_dynamic() is 0.

namespace detail {

template <extents_c extent_t>
[[nodiscard]] inline constexpr size_t static_mdarray_size() noexcept {
    if constexpr (extent_t::rank() == 0) {
        return 0;

    } else {
        return []<size_t... Is>(std::index_sequence<Is...>) {
            return (extent_t::static_extent(Is) * ...);
        }(std::make_index_sequence<extent_t::rank()>{});
    }
}

} // namespace detail

template <size_t Rank, class IndexType = size_t>
using dims = dextents<IndexType, Rank>

template <typename T, extents_c extent_t>
using mdarray = std::conditional_t<
    extent_t::rank_dynamic() == 0,
    std::experimental::mdarray<
        T, extent_t, layout_right,
        std::array<T, detail::static_mdarray_size<extent_t>()>>,
    std::experimental::mdarray<T, extent_t, layout_right, std::vector<T>>>;

With this definition, the mdarray can be instantiated as a constexpr when the rank is static, for example:

constexpr auto a = mdarray<T, extents<size_t, 2, 1, 2>>{std::array<T, 4>{1, 2, 3, 4}};

Alternatively, it can be created as a non-constexpr object with dynamic extents:

const auto a = mdarray<T, dims<3>>{std::vector<T>{1, 2, 3, 4}, dims<3>{2, 1, 2}};

Is this approach helpful for your problem?

Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Chan-Soon Lim

79613258

Date: 2025-05-08 22:41:47
Score: 1
Natty:
Report link

There are many ways to do this. What you really need is a webserver to serve your content, in a way similar to production. And you have a lot of options: nginx, apache, etc.

But for something simpler you can even use a built-in php server.

Example: php -S localhost:8000 -t public (run that in the project server)

Before you do that though, there are some important steps:
- npm run build
Set these in .env:
APP_ENV=production
APP_DEBUG=false

You may also run these to optimize the server:
php artisan config:cache
php artisan route:cache
php artisan view:cache

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

79613257

Date: 2025-05-08 22:38:46
Score: 1.5
Natty:
Report link

If performance is a concern you need to avoid the ORM as much as you can, if it's a repetitive operation to look up vendors Id based on the account number, you can write an insert/update trigger on the vendor to get the userId from the Accounts table.

To summarize you can apply this update SQL query once, then write a trigger on both insert and update actions on the vendor table to update it's userId.

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

79613255

Date: 2025-05-08 22:35:45
Score: 0.5
Natty:
Report link

Why not the following Dockerfile:

# Build stage
FROM node:alpine AS builder

WORKDIR /usr/src/app

COPY package.json package-lock.json* ./
RUN npm install --save-dev @types/node

COPY . .
RUN npm run build

# Production stage
FROM node:alpine

WORKDIR /usr/src/app

RUN npm install -g serve

COPY --from=builder /usr/src/app/dist ./dist

EXPOSE 80

CMD ["serve", "-s", "dist", "-l", "80"]

For some reason I cannot use nginx solution above. Not sure if it is because I am using nginx as another docker to orchestrate many dockers to work together. I use npm serve function. Not sure what is the downside. Would love to hear any comment from you.

Reasons:
  • Blacklisted phrase (0.5): I cannot
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Starts with a question (0.5): Why not the
  • Low reputation (0.5):
Posted by: hongkail

79613239

Date: 2025-05-08 22:21:41
Score: 1.5
Natty:
Report link

My idea is, you might have not set the Service Account permission on the IAM & Admin, try to locate your IAM & Admin in Google Cloud Console and make sure that the Document AI user has permission for each.

There is also a quota on API usage that shows the 403 Forbidden error, try to check it also at the IAM & Admin then Quotas to check your allocation.

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

79613237

Date: 2025-05-08 22:19:40
Score: 2.5
Natty:
Report link

I think your best choice might be to try Laravel Herd, or better still, use Laravel Valet. It might give you the closest to what you can get a prod environment feel.

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

79613231

Date: 2025-05-08 22:12:38
Score: 6 🚩
Natty: 5
Report link

I have the same problem, as do others. It only seems an issue with a list long enough to nessesitate a fair amount of scrolling and becomes more evident as you scroll up and down a few times while tapping onto the items.

Reasons:
  • Blacklisted phrase (1): I have the same problem
  • Low length (0.5):
  • No code block (0.5):
  • Me too answer (2.5): I have the same problem
  • Single line (0.5):
  • Low reputation (1):
Posted by: John

79613230

Date: 2025-05-08 22:10:37
Score: 1
Natty:
Report link

Two ways to run jest without using npm and without global install, but you will need to install npm (and have run npm install):

npx jest

Or

node node_modules/jest/bin/jest
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Moika Turns

79613222

Date: 2025-05-08 21:55:34
Score: 2.5
Natty:
Report link

This is probably because the image by default has a 'display: inline' you can try 'display: inline-block', or you can put in inside a div and rotate and float the div.

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

79613215

Date: 2025-05-08 21:49:32
Score: 2.5
Natty:
Report link

According to this page, you might need to include the --allow-unk so that unknown words can appear in the output.

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

79613200

Date: 2025-05-08 21:35:27
Score: 1
Natty:
Report link

Here is a Scrappy Workaround way, though it might not be as you intended

<table>
  <tr>
    <td width="500px" align="left">⬅️ Left</td>
    <td width="500px" align="right">Right ➡️</td>
  </tr>
</table>
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: ShadowForger

79613199

Date: 2025-05-08 21:35:27
Score: 1
Natty:
Report link

If you're looking for a solution to handle large files in a decentralized way, you might want to consider using GraphDB, a distributed graph database that leverages the Origin Private File System (OPFS) for efficient file storage. Unlike GUN.js, which has a 5MB localStorage limitation, GraphDB is designed for scalable storage and real-time data modeling. You can explore it further and give it a try here: GraphDB. and you can see the documentation here GraphDB Wiki.

Reasons:
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Esteban Fuster Pozzi

79613195

Date: 2025-05-08 21:32:27
Score: 1.5
Natty:
Report link

With json v2, you can have this struct

type Foo struct {
  // Known fields
  A int `json:"a"`
  B int `json:"b"`
  // The type may be a jsontext.Value or map[string]T.
  Unknown jsontext.Value `json:",unknown"`
}

Official documentation and example here: https://pkg.go.dev/github.com/go-json-experiment/json#example-package-UnknownMembers

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

79613194

Date: 2025-05-08 21:31:26
Score: 0.5
Natty:
Report link

You can now customize the severity of specific events, and setting an event to ResilienceEventSeverity.None will suppress the logs.

https://www.pollydocs.org/advanced/telemetry.html#customizing-the-severity-of-telemetry-events

services.AddResiliencePipeline("my-strategy", (builder, context) =>
{
    var telemetryOptions = new TelemetryOptions(context.GetOptions<TelemetryOptions>());

    telemetryOptions.SeverityProvider = args => args.Event.EventName switch
    {
        // Suppress logging of ExecutionAttempt events
        "ExecutionAttempt" => ResilienceEventSeverity.None,
        _ => args.Event.Severity
    };

    builder.ConfigureTelemetry(telemetryOptions);
});
Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: vincentj

79613185

Date: 2025-05-08 21:23:24
Score: 1
Natty:
Report link

because during a series of redirects the page context becomes invalid, and waitForNavigation can stop on one page of the redirects and / or the neccessary selector is missing and waitForSelector faild - because of : JSHandles can be evaluated!

But in my case I need to find an element on the final page after a series of redirects and That means the page has already finished with redirects!

All the suggestions above fails with an error.

I came to a crude solution - a try-catch loop with pauses (sleeps), which simply works...

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

79613184

Date: 2025-05-08 21:23:24
Score: 2.5
Natty:
Report link

Based on comments, i decided to remove as much as i can until the error was gone and eventually the only thing in the cpp file was int main() { return 0:} and i still had the error!

So i deleted the project and created a new editor project, which actually works now.

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

79613175

Date: 2025-05-08 21:17:23
Score: 2.5
Natty:
Report link

<----------------Cannot find 'GeneratedPluginRegistrant' in scope---------------->

Remove This -----> GeneratedPluginRegistrant.register(with: self)

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Filler text (0.5): ----------------
  • Filler text (0): ----------------
  • Low reputation (0.5):
Posted by: Fares Mohamed

79613172

Date: 2025-05-08 21:16:22
Score: 3.5
Natty:
Report link

What does the Postgres log file say about it? It is refusing the connection, so why?

I think Postgres by default has pretty tight security and as such will only allow known connections.

Reasons:
  • Blacklisted phrase (0.5): why?
  • Low length (0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): What do
  • Low reputation (1):
Posted by: youldave

79613169

Date: 2025-05-08 21:13:21
Score: 1
Natty:
Report link

There is a new set of tools for performing SQL Server migrations at https://github.com/Schema-Smith/SchemaSmithyFree. They are free to use for small businesses and teams under a community license. All code is available in the repository, no black boxes or hidden anything.

The update process, SchemaQuench, takes a state based approach to update tables. You define the final state you want your table to look like and the update process does whatever alter statements are necessary to get you there. SchemaQuench can apply all of your objects, tables, functions, views, etc as well.

There is also a tool for reverse engineering your database(s) into the expected metadata format all of which can be checked into your repository just like any other code.

Documentation can be found at https://github.com/Schema-Smith/SchemaSmithyFree/wiki

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

79613166

Date: 2025-05-08 21:11:21
Score: 1
Natty:
Report link

When using androidx.appcompat.widget.Toolbar then execute ToolbarUtils.getActionMenuView(toolbar).setExpandedActionViewsExclusive(false); after inflating the menu in onCreateOptionsMenu, this seems to resolve most issues with an expandActionView call. The workaround use library restricted features, so they may be removed at any time.

Reasons:
  • Has code block (-0.5):
  • Single line (0.5):
  • Starts with a question (0.5): When
  • Low reputation (0.5):
Posted by: ballzak

79613163

Date: 2025-05-08 21:10:20
Score: 2
Natty:
Report link

I found it, I think

environment: 
  - ENV_VARIABLE_IN_CONTAINER=$ENV_VARIABLE_ON_HOST

seems to have worked.

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

79613161

Date: 2025-05-08 21:08:20
Score: 1
Natty:
Report link

Try below one, it will help to create own package/application id

npx @react-native-community/cli init MyTestApp --package-name com.thinesh.mytest --title "My Test App"
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Thinesh

79613157

Date: 2025-05-08 21:05:19
Score: 4
Natty:
Report link

How your infrastructure looks like? С program on one computer, browser - on another? Do you have any web-server?

There are a lot of different ways.

  1. You can write web-server in your С program and open it in browser.
  2. You can send (with a lot of protocols - http API, snmp, syslog, raw udp, etc) data from С program to WEB server, save there and show in browser.
  3. If you have everything on one computer, you can also make web server with your С program, or make the page in files with js that uses websocket to communicate. Then you will need to use websockets on С side.
  4. The easiest way - save data to file and use html page with js which will parse local file every n seconds.
Reasons:
  • RegEx Blacklisted phrase (2.5): Do you have any
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): How you
  • Low reputation (0.5):
Posted by: Sergey Soltanov

79613151

Date: 2025-05-08 20:59:17
Score: 5
Natty: 5
Report link

FileNotFoundError: [Errno 2] No such file or directory: 'movies.txt' problema solucionado lo fuy cambiando de directorio asta que termine en el directorio principal del proyecto. Y ta lo deje AY

Reasons:
  • Blacklisted phrase (2.5): solucion
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Jorge Coimbra

79613148

Date: 2025-05-08 20:54:16
Score: 1
Natty:
Report link

I ultimately reached out to AWS support with this same question and they confirmed that it is not possible due to the fact that Google initiates the link between it and Cognito and therefore does not allow you to pass any data into that pre sign up trigger. I understand this is likely by design to not allow any additional data passed in with the google token to not allow anyone to manipulate the sign up process. Fully understandable from Google's perspective.

In terms of what to do, it's a pretty niche use case to require linking two accounts with different emails. Moving forward I will add the user's business email to the newly created social account as an attribute from the session once they are logged in. I will end up with duplicates of some users in Cognito but I will have to live with that. The social login account will be the one with access when the user logs in again. I could even run a lookup on users' attributes to find if someone has a separate account when logging in.

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

79613147

Date: 2025-05-08 20:53:16
Score: 1
Natty:
Report link

here is the most accurate way to find the maximum average salary:

select max ( avg(salary)) 
from workers
group by worker_id;

You can apply a group function to a group function retreiving a column of data values, ie max to avg(salary).

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Muhammad Umer Farooq Bajwa

79613143

Date: 2025-05-08 20:48:14
Score: 1
Natty:
Report link

You can create a util method to wrap the amount.:

private BigDecimal resolveScientificAmount(BigDecimal amount) {
        if (amount == null) {
            return null;
        }
        return new BigDecimal(amount.toPlainString());
    }
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Oladejo Olajide

79613140

Date: 2025-05-08 20:44:13
Score: 1.5
Natty:
Report link

Check the Anaconda environment you are working on, because it might be installed in another environment, so you can exit the current one you are working on by running: conda deactivate and then check again if you are able to import the module.

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

79613136

Date: 2025-05-08 20:42:12
Score: 4.5
Natty:
Report link

English
You're encountering this issue because you're trying to load a .pyd (native extension module) using a SourceLoader, which is intended for .py files (text). Native extensions like .pyd must be loaded using ExtensionFileLoader — otherwise, you’ll get DLL or encoding-related errors.

Assuming you dynamically created this structure:

/a/temp/dir/foo/
    __init__.py
    bar.pyd

You can correctly import the package and the .pyd module like this:

import sys
import importlib.util
import importlib.machinery
import os

def import_pyd_module(package_name, module_name, path_to_pyd, path_to_init):
    # Ensure package is imported first
    if package_name not in sys.modules:
        spec_pkg = importlib.util.spec_from_file_location(
            package_name,
            path_to_init,
            submodule_search_locations=[os.path.dirname(path_to_init)]
        )
        module_pkg = importlib.util.module_from_spec(spec_pkg)
        sys.modules[package_name] = module_pkg
        spec_pkg.loader.exec_module(module_pkg)

    # Load the compiled submodule
    fullname = f"{package_name}.{module_name}"
    loader = importlib.machinery.ExtensionFileLoader(fullname, path_to_pyd)
    spec = importlib.util.spec_from_file_location(fullname, path_to_pyd, loader=loader)
    module = importlib.util.module_from_spec(spec)
    sys.modules[fullname] = module
    spec.loader.exec_module(module)
    return module

Why Your Custom Loader Fails

Your MyLoader inherits from SourceLoader, which expects a .py file and calls get_data() expecting text. This cannot be used for .pyd files, which are binary and must be handled using the built-in ExtensionFileLoader.

If you want a custom import system with dynamic .pyd loading, you can still use a MetaPathFinder, but your loader must delegate to ExtensionFileLoader.

Usage:

mod = import_pyd_module(
    package_name="foo",
    module_name="bar",
    path_to_pyd="/a/temp/dir/foo/bar.pyd",
    path_to_init="/a/temp/dir/foo/__init__.py"
)

mod.some_method()

Spanish
Estás teniendo este problema porque intentas cargar un módulo compilado .pyd usando un SourceLoader, que está diseñado para archivos .py (texto fuente). Los archivos .pyd (extensiones nativas en Windows) deben cargarse usando ExtensionFileLoader, o de lo contrario recibirás errores como el de carga de DLL o problemas de codificación.

Supongamos que creaste dinámicamente la siguiente estructura:

/a/temp/dir/foo/
    __init__.py
    bar.pyd

Puedes importar correctamente el paquete y el módulo .pyd con el siguiente código:

import sys
import importlib.util
import importlib.machinery
import os

def importar_pyd_como_modulo(nombre_paquete, nombre_modulo, ruta_pyd, ruta_init):
    # Asegurar que el paquete esté importado primero
    if nombre_paquete not in sys.modules:
        spec_pkg = importlib.util.spec_from_file_location(
            nombre_paquete,
            ruta_init,
            submodule_search_locations=[os.path.dirname(ruta_init)]
        )
        modulo_pkg = importlib.util.module_from_spec(spec_pkg)
        sys.modules[nombre_paquete] = modulo_pkg
        spec_pkg.loader.exec_module(modulo_pkg)

    # Cargar el submódulo compilado
    nombre_completo = f"{nombre_paquete}.{nombre_modulo}"
    loader = importlib.machinery.ExtensionFileLoader(nombre_completo, ruta_pyd)
    spec = importlib.util.spec_from_file_location(nombre_completo, ruta_pyd, loader=loader)
    modulo = importlib.util.module_from_spec(spec)
    sys.modules[nombre_completo] = modulo
    spec.loader.exec_module(modulo)
    return modulo

Por qué falla tu MyLoader

Tu clase MyLoader hereda de SourceLoader, lo cual no sirve para archivos .pyd, porque espera archivos fuente .py y llama a get_data() esperando texto plano. Sin embargo, .pyd es binario, y debe manejarse con el loader nativo de extensiones: ExtensionFileLoader.

Si deseas implementar un sistema de carga personalizado, puedes seguir usando MetaPathFinder, pero el loader debe delegar a ExtensionFileLoader.

Reasons:
  • Blacklisted phrase (1): Está
  • Blacklisted phrase (1): está
  • Blacklisted phrase (1): porque
  • Blacklisted phrase (2): código
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Take36500

79613129

Date: 2025-05-08 20:35:11
Score: 2
Natty:
Report link

I am using the AWS CDK for .Net today and experienced the same issue as described above. I always got an error (could not find Policy node) when attempting to the the dependency like in Hayden's example.

I was able to resolve the issue by updating the Amazon.CDK.Lib nuget package from 2.191.0 to 2.195.0

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

79613126

Date: 2025-05-08 20:34:10
Score: 2.5
Natty:
Report link

Check out Defang.io - single command (defang compose up) to deploy your Docker Compose project to your account on AWS / GCP / DigitalOcean. Supports networking, compute, storage, LLMs, etc. Even integrated into IDEs such as VS Code, Cursor, Windsurf via their MCP Server so you can deploy straight from the IDE.

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

79613124

Date: 2025-05-08 20:33:10
Score: 1
Natty:
Report link

You can also grep everything before 'list:' and pipe to grep for email:

grep -B 1000000 "list:" example.txt | grep "[email protected]"

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

79613123

Date: 2025-05-08 20:32:10
Score: 3.5
Natty:
Report link

I don't think there is a built-in method to do this, but what's stopping you from using sites to format JS code? Js-beautify should meet your needs.

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

79613118

Date: 2025-05-08 20:29:09
Score: 1.5
Natty:
Report link

This looks like a similar issue to this question to summarize:

Is the profile you used for signing a public trust one? Publicly trusted certificates should be trusted by default as those are included on latest versions of windows 11 for more information, see here.

If you're signing with a privately trusted certificate, you will need to install the root on your system in order for it to be trustable. Here's a sample on how to do it using powershell.

Reasons:
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: Jaxel Rojas

79613111

Date: 2025-05-08 20:23:06
Score: 8.5 🚩
Natty: 5.5
Report link

I'm faced with the same issue. Did you ever sort this out?

Reasons:
  • RegEx Blacklisted phrase (3): Did you ever
  • Low length (1.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Jeff Wessling

79613109

Date: 2025-05-08 20:22:06
Score: 4
Natty:
Report link

I try you code but got an error

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

79613106

Date: 2025-05-08 20:18:04
Score: 1
Natty:
Report link

It should be possible with the correct API permissions for the Graph API. You need one of the following Permissions to do your request:

Reference at Microsoft

The API permissions need to be added to your App Registration that you created for your GitHub Workflow. In the end it should look like the image at the bottom. enter image description here

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

79613102

Date: 2025-05-08 20:15:03
Score: 0.5
Natty:
Report link

In Dapper, the order of columns matters when performing 1-to-many mappings using the Query method with multi-mapping. Here's what you need to know:

Id Column Position:

    • The split-on column (usually the Id) must appear first in the column sequence for each entity

    • Dapper splits rows when it sees a duplicate Id in this column.

      Proper Sequence Example:
      
      sql
      SELECT 
          u.Id, u.Name,  -- User columns (must start with Id)
          p.Id, p.Title, p.UserId  -- Post columns (must start with Id)
      FROM Users u
      JOIN Posts p ON u.Id = p.UserId
      
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: saibin

79613097

Date: 2025-05-08 20:11:02
Score: 3.5
Natty:
Report link

As shared by @Marc, Microsoft.Data.SqlClient v6+ works with .net8+ and as per @it-all-makes-cents Microsoft.Data.SqlClient v5.2.3+ works with .net6 . thank you guys for solving this issue.

Reasons:
  • Blacklisted phrase (0.5): thank you
  • Low length (1):
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Shalini Raj

79613091

Date: 2025-05-08 20:08:01
Score: 1.5
Natty:
Report link

The best way to do it is to use the overrides in styles.scss https://material.angular.dev/components/checkbox/styling

:root {
  @include mat.checkbox-overrides((
     label-text-font: Open Sans
  ));
}
Reasons:
  • Probably link only (1):
  • Low length (1):
  • Has code block (-0.5):
Posted by: Stephen DuMont

79613078

Date: 2025-05-08 19:58:59
Score: 1.5
Natty:
Report link

English:
You're absolutely right in your intuition: threads in a thread pool are not supposed to die after running one Runnable. The whole point of a thread pool is to reuse threads, avoiding the overhead of frequent thread creation and destruction.

Code:You're absolutely right in your intuition: threads in a thread pool are not supposed to die after running one Runnable. The whole point of a thread pool is to reuse threads, avoiding the overhead of frequent thread creation and destruction.

Code

public void run(){
  while(!isStopped()){
    try{
      Runnable runnable = (Runnable) taskQueue.dequeue();
      runnable.run();
    } catch(Exception e){
      // log or otherwise report exception,
      // but keep pool thread alive.
    }
  }
}

…is actually doing exactly what a thread pool worker thread should do. The while (!isStopped()) loop ensures that the thread:

Waits for tasks from the queue,

Executes them, and

Loops back to wait again, rather than terminating.

This loop enables the thread to stay alive, sleeping (or blocking) when no tasks are available, and waking up when a new one arrives. It doesn't die after runnable.run() – it continues waiting for the next task.

So no, the thread is not garbage collected after a single task unless the pool is being shut down or the thread terminates due to a fatal exception. Instead, it's parked (blocked) on the task queue, consuming little to no CPU.

Spanish:
Tu intuición es completamente acertada: los hilos dentro de un thread pool no mueren después de ejecutar un solo Runnable. Justamente, el propósito de un pool de hilos es reutilizar los mismos hilos para múltiples tareas, reduciendo así el costo de rendimiento asociado a crear y destruir hilos frecuentemente.

Codigo:

public void run(){
  while(!isStopped()){
    try{
      Runnable runnable = (Runnable) taskQueue.dequeue();
      runnable.run();
    } catch(Exception e){
      // log o manejar la excepción,
      // pero mantener el hilo del pool vivo.
    }
  }
}

…en realidad representa correctamente el comportamiento de un hilo trabajador (worker) en un thread pool. La condición while (!isStopped()) asegura que el hilo:

🔁 Este bucle permite que el hilo siga vivo, esperando (bloqueado) cuando no hay tareas, y despertando automáticamente cuando se encola una nueva. No se destruye ni se recolecta por el GC después de cada tarea.

Dicho de otra forma: el hilo entra en estado inactivo (bloqueado, sin consumir CPU) y se reutiliza cuando llega la siguiente tarea. Solo muere cuando el pool se cierra (shutdown()), o en casos de errores fatales no controlados.

Reasons:
  • Blacklisted phrase (2): crear
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Take36500

79613077

Date: 2025-05-08 19:57:58
Score: 0.5
Natty:
Report link

Following the Nova upgrade guide, you need to update the register method in your application’s App\Providers\NovaServiceProvider class to call the parent’s register method. The parent::register() method should be invoked before any other code in the method:

public function register(): void 
{
    parent::register();
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Johnny Fekete

79613072

Date: 2025-05-08 19:53:57
Score: 1.5
Natty:
Report link

Simply add half second then truncate.

myInstant.plusMillis(500).truncatedTo(ChronoUnit.SECONDS);
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Michael Hua

79613067

Date: 2025-05-08 19:48:55
Score: 1.5
Natty:
Report link

I'm trying to build a Discord bot that generates images, but I faced a problem. I'm getting the following error:

Configuration is not a constructor

I'm following a YouTube tutorial. I have the following code:

const { SlashCommandBuilder, EmbedBuilder} = require(discord.js); const { Configuration, OpenAIApi } = require("openai");

const configuration = new Configuration({ apiKey: 'My Key' }); const openai = new OpenAIApi(configuration);https://www.bastcar.com/

Reasons:
  • RegEx Blacklisted phrase (1): I'm getting the following error
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: wazidmirza

79613061

Date: 2025-05-08 19:43:54
Score: 0.5
Natty:
Report link

I found a method, but it is not complete. I wrote a T4 file as follows:

<#
    // Define your model types
    var models = new string[] { "Academic", "Ostad", "Course" };
#>
using Core.Interfaces;
using DataAccessLibrary.Models;
using Microsoft.AspNetCore.Mvc;

namespace Snapp.site.Controllers
{
<#
    foreach (var model in models)
    {
#>
    public class <#= model #>Controller : GenericController<<#= model #>>
    {
        public <#= model #>Controller(IRepository<<#= model #>> repository) : base(repository) { }
    }
<#
    } // Closing foreach loop
#>
}

But I can't dynamically generate the models array.

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

79613060

Date: 2025-05-08 19:41:53
Score: 2.5
Natty:
Report link

The how was easy enough, there is a not so hard to find "Package sources" setting in the settings.

The what took me a bit longer: https://api.nuget.org/v3/index.json

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

79613059

Date: 2025-05-08 19:40:53
Score: 3.5
Natty:
Report link
$requirement.verifyMethod.name works!!
Reasons:
  • Low length (2):
  • Has code block (-0.5):
  • Has no white space (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Prasad Bhat

79613044

Date: 2025-05-08 19:29:50
Score: 2
Natty:
Report link

Gambling and math are an underrated combo! Because behind every spin of the slot or move in the game is probability, not magic. That is why I am interested in exploring formats such as Sweepstakes on sixty6, where you can enjoy the game mechanics without risking your wallet - just have fun, testing your logic and luck in a safe environment.

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

79613043

Date: 2025-05-08 19:27:49
Score: 1.5
Natty:
Report link

Region

  1.  "region" (new (" when attempting to fetch resource.", "indonesia"))
    accept console.: Region.jsm: "region" 
    
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Bagas KP Bagas Saputra Saputra