79129859

Date: 2024-10-27 03:48:06
Score: 1.5
Natty:
Report link
$terms = get_the_terms ( $product_id, 'product_cat' );
foreach ( $terms as $term ) {
 $cat_id = $term->term_id;
    
}
     
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: mohamad abasi

79129856

Date: 2024-10-27 03:44:05
Score: 2.5
Natty:
Report link

After submitting an issue to Apple Developer Technical Support (DTS), I believe the problem has been resolved. I just tested with AirPods and it is now correctly returning 0, 1 for microphone usage.

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

79129855

Date: 2024-10-27 03:43:05
Score: 0.5
Natty:
Report link

Setting a default password is a well-known & commonly exploited vulnerability class (CWE-1392: Use of Default Credentials). If you're setting this up as a private, dev AMI, setting up a password could be OK. Outside of that, I'd recommend the alternatives at the end.


Is it a security issue if anyone can see a (SHA-512) hashed password of my user? How can I mitigate it?

If you absolutely must offer a password to folks using your AMI, the effort required to crack the hash should be as long as the planned lifetime of the AMI. mkpasswd offers options to harden SHA-512 password hashes in Ubuntu:

# invoked this way, mkpasswd will expect you to type in the password
mkpasswd --method sha-512 --salt dont_use_this_salt --rounds some_number_of_rounds --stdin

A older question in the infosec Stack Exchange has a discussion on how many rounds make sense. You should set the number of rounds to be appropriate for your use case.

What is the proper way to configure user's password via cloud-init?

If you absolutely have to set a default password in /etc/cloud/cloud.cfg, you should automate the process by using a custom component in EC2 Image Builder: https://docs.aws.amazon.com/imagebuilder/latest/userguide/create-component-yaml.html

Amazon provides an example using the ExecuteBash action. I'd recommend storing the hash generated by mkpasswd using AWS Secrets Manager and not the AWS Systems Manager Parameter Store. You should also be able to use the GetRandomPassword call from SecretsManager to grab, by default, a random 32-character password with the space [a-zA-Z0-9!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~] and pass that to mkpasswd.

Why is /etc/cloud/cloud.cfg read by all? Can I make it available only for root?

You should assume all users of your AMI can get access to the contents of the filesystem.


Alternatives to default AMI usernames/passwords

Default credentials for your AMI could open the door for folks to exploit the EC2 instance. Here are some alternatives to consider:

Alternative 1: Make the AMI use SSH only + a user's own public/private key pair on instance launch

If your users can use SSH keys, the following may work:

Alternative 2: IAM-based Auth for EC2 instances via AWS Systems Manager

This way, folks have to authenticate either in the AWS console / AWS cli, and have the proper IAM role to get shell access to the instance running your AMI. Role permissions can be revoked as needed, and you won't have to worry about credential provisioning, complexity, rotation, or disposal.

This won't fit your use case if your intended users aren't AWS users logging into your account. For more info:

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

79129844

Date: 2024-10-27 03:31:03
Score: 5.5
Natty: 4
Report link

I also have an issue in the google maps marker that is, when I zoom in the map, the markers position is changing and it showing in the different location.

I face this issue after using this flutter package for custom markers widget_to_marker: ^1.0.4

can somebody help me to make the marker stick in one position rather than moving while zooming in

Reasons:
  • Blacklisted phrase (1): help me
  • RegEx Blacklisted phrase (3): can somebody help me
  • No code block (0.5):
  • Low reputation (1):
Posted by: raagull sakthivel

79129843

Date: 2024-10-27 03:28:02
Score: 0.5
Natty:
Report link

On the Canvas object, in the Inspector go to Canvas -> Render Mode, set to World Space. Then resize the canvas to the screen area and adjust the font as needed.

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

79129835

Date: 2024-10-27 03:20:00
Score: 1
Natty:
Report link

In my case it works by using the #include macro and placing the file name without the quote marks:

#include perlin_noise3d.glsl;

This works on three.js

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

79129832

Date: 2024-10-27 03:16:59
Score: 2
Natty:
Report link

I’m unfamiliar with Angular, but I ran into similar issues with path resolution in esbuild. To address this, I developed the xBuild package, which supports all esbuild configurations and some (ifdef, multi-build [esm, cjs ...]).

You can check out the project here:
GitHub: https://github.com/remotex-lab/xBuild
npm: https://www.npmjs.com/package/@remotex-labs/xbuild

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

79129824

Date: 2024-10-27 03:00:57
Score: 1.5
Natty:
Report link

I am using macbook pro m3 pro. After installing watchman on it

watchman watch-del-all this command helped me.

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

79129820

Date: 2024-10-27 02:56:56
Score: 3.5
Natty:
Report link

You can checkout best truth table maker online to do you tasks conveniently.

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

79129814

Date: 2024-10-27 02:51:55
Score: 4
Natty: 4
Report link

Use: bigcharts.marketwatch.com/quickchart/options.asp?symb=TSLA&showAll=True

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Has no white space (0.5):
  • Low reputation (1):
Posted by: S T

79129802

Date: 2024-10-27 02:25:50
Score: 3
Natty:
Report link

Update. I had something a caching rule in Website / caching / caching-rules that applied to the worker cache. Deleted the rule now it works fine.

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

79129801

Date: 2024-10-27 02:20:49
Score: 4.5
Natty:
Report link

If meta tags are no longer used or important, why does the absence of a meta tag ding my SEO score as evaluated by Google for Developers enter link description here

https://developer.chrome.com/docs/lighthouse/seo/meta-description/?utm_source=lighthouse&utm_medium=lr

And if they are still important, why doesn't Google Sites let me add them?

Google, keep it consistent please.

Reasons:
  • Blacklisted phrase (0.5): enter link description here
  • Probably link only (1):
  • Low length (0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: E.E.

79129799

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

https://github.com/crystalidea/qt6windows7

This graduated to a dedicated repository, so I'm posting an answer.

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

79129797

Date: 2024-10-27 02:13:48
Score: 3
Natty:
Report link

import * as FileType from 'file-type';

//your code const fileInfo = await FileType.fromFile(file.path);

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

79129796

Date: 2024-10-27 02:12:48
Score: 1
Natty:
Report link

I was able to resolve this by using FVM (Flutter Version Manager).

After installing FVM, run

fvm use x.x.x # eg, 3.19.0

Then

fvm dart run build_runner build

And hopefully your issue will be resolved.

In general FVM has resulted in way less headaches working with Flutter.

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

79129795

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

Found the solution, the real issue was regarding a single quote (') that was present in the project path, that let to this issue.

Removed the single quote from the drive name and now it is resolved.

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

79129784

Date: 2024-10-27 01:55:45
Score: 2.5
Natty:
Report link

I just had this issue too, with running my .Net Core Web App on a Plesk hosted server.

Turns out it was the Web Application Firewall. I turned it from On to Off, and it's now working on all browsers:

enter image description here

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

79129781

Date: 2024-10-27 01:53:44
Score: 3
Natty:
Report link

@Nathan Sokalsi,

I'm sorry, but I gave you the wrong project name. The project that has the OnBackPressedCallback is called NavigationGraph7Net7. But as I said earlier, I no longer use it because it is no longer necessary. You won't find it in NavigationGraph8Net8 or any later projects. Could you explain why you think you need it? What are you trying to do with it? Also, what version of Android are you targeting, and what version of .Net?

you also have PackageReferences using Xamarin, which is what we are supposed to be moving away from.

I have already explained the above on the MS forum, but for some reason, several of your questions and their answers have been deleted from there. The last time I saw them was Friday evening (25/10), my time (AU), but now they are gone.

You seem to be confused by the name Xamarin in the package names. They were never removed, and we aren't moving away from them with .Net. They are still just as pertinent as they ever were.

You also seem to be confused by the inclusion of MAUI. If you are writing an Android-only app, you should refer to it as .NET for Android. I'd suggest removing the maui tag in your questions, as it confuses those offering help.

It is only when you are doing cross-platform that MAUI comes into it. If you look on Discord/DotNetEvolution/#Android, you'll see a post 23/10/24 from jpobst, one of the MS Android team members, which should help clarify it for you.

Xamarin.Android -> .NET for Android

Xamarin.Forms -> MAUI

Xamarin was already confusing because to some people it meant Xamarin.Android/Xamarin.iOS and to others, it meant Xamarin.Forms unfortunately we cannot change the NuGet package names as they will break the whole ecosystem, so they still say Xamarin even though they are .NET for Android/MAUI packages.

Do you still need an answer regarding your now-deleted RecyclerView question?

To specifically answer your question about OnBackPressCallback. You would need the NuGet Xamarin.AndroidX.Activity, which you probably already have either directly or transitively.

Definition is: AndroidX.Activity.OnBackPressedDispatcher OnBackPressedDispatcher

To use it, for instance, in a fragment

onBackPressedCallback = new NavFragmentOnBackPressedCallback(this, true);
RequireActivity().OnBackPressedDispatcher.AddCallback(ViewLifecycleOwner, onBackPressedCallback); 
Reasons:
  • RegEx Blacklisted phrase (2.5): Could you explain
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • User mentioned (1): @Nathan
  • Low reputation (0.5):
Posted by: user2153142

79129777

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

Based on this article, one can answer this question as follows:

Program.cs

builder.Services.AddAuthentication(options =>
{
    options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
    options.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme;
})
.AddCookie()
.AddOpenIdConnect("appOne", options =>
{
    builder.Configuration.GetSection("AppOne").Bind(options);
    options.SignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
    options.ResponseType = OpenIdConnectResponseType.Code;
    options.SaveTokens = true;
    options.GetClaimsFromUserInfoEndpoint = true;
    options.TokenValidationParameters = new TokenValidationParameters
    {
        NameClaimType = "name"
    };
    options.MapInboundClaims = false;
})
.AddOpenIdConnect("appTwo", options => 
{
    builder.Configuration.GetSection("AppTwo").Bind(options);
    options.SignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
    options.ResponseType = OpenIdConnectResponseType.Code;
    options.SaveTokens = true;
    options.GetClaimsFromUserInfoEndpoint = true;
    options.TokenValidationParameters = new TokenValidationParameters
    {
        NameClaimType = "name"
    };
});

appsettings.json

"AppOne": {
    "Authority": "***",
    "ClientId": "***",
    "ClientSecret": "***",
    "CallbackPath": "***",
    "SignedOutCallbackPath": "***"
},
"AppTwo": {
    "Authority": "***",
    "ClientId": "***",
    "ClientSecret": "***",
    "CallbackPath": "***",
    "SignedOutCallbackPath": "***"
}

Controller:

[AllowAnonymous]
[HttpGet]
public ActionResult LoginAppOne(string returnUrl)
{
    return Challenge(new AuthenticationProperties
    {
        RedirectUri = !string.IsNullOrEmpty(returnUrl) ? returnUrl : "/", 
    }, "appOne");
}
 
[AllowAnonymous]
[HttpGet]
public ActionResult LoginAppTwo(string returnUrl)
{
    return Challenge(new AuthenticationProperties
    {
        RedirectUri = !string.IsNullOrEmpty(returnUrl) ? returnUrl : "/"
    }, "appTwo");
}

View:

<li class="nav-item">
    <a class="nav-link text-dark"
       href="~/api/Account/LoginAppOne">Login App One</a>
</li>
<li class="nav-item">
    <a class="nav-link text-dark"
       href="~/api/Account/LoginAppTwo">LOgin App Two</a>
</li>
Reasons:
  • Blacklisted phrase (1): this article
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: StanSm789

79129776

Date: 2024-10-27 01:45:42
Score: 2.5
Natty:
Report link

In my case it was because the instance was in a private subnet. After creating a new instance in a public subnet, I could RDP in.

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

79129775

Date: 2024-10-27 01:44:42
Score: 3
Natty:
Report link

My issue was that I was missing default route redirect

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

79129772

Date: 2024-10-27 01:43:42
Score: 0.5
Natty:
Report link
DateTime FileLastModified=DateTime.timestamp();

File(file.path).lastModified().then((value)){
                                           ^
          FileLastModified = value;
});

extra ) here.

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

79129770

Date: 2024-10-27 01:40:41
Score: 4
Natty:
Report link

I found my mistake is not following WordPress documentation about Nginx Advance Administration Server (https://developer.wordpress.org/advanced-administration/server/web-server/nginx/). Now My website running perfectly.

My configuiration for WordPress Multisite Subdirectories

https://github.com/ahmadbagwi/Nginx-WordPress-Multisite

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

79129762

Date: 2024-10-27 01:35:40
Score: 4.5
Natty:
Report link

THis was due to a timeout on the deepgram request. I needed to use callbacks.

Reasons:
  • Blacklisted phrase (0.5): I need
  • Low length (1.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: dave

79129754

Date: 2024-10-27 01:29:38
Score: 0.5
Natty:
Report link

Test if javascript variable obj is valid DOM node element is very simple:

if (obj instanceof Node)
{
  //obj is DOM node element 
}
Reasons:
  • Low length (1):
  • Has code block (-0.5):
Posted by: Eugene Mala

79129732

Date: 2024-10-27 01:03:33
Score: 0.5
Natty:
Report link

This is expected behavior according to the Fetch standard. Any redirected requests from a 302 response should be converted to GET. See the note on https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/302.

The server should respond with 307 to keep POST.

If you can't control the server's response, you'll have to use the manual route.

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

79129731

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

There should not be an issue with re-rendering every second. Infact in a clock like this that should be desirable. Have you checked if your clock is working?

  useEffect(() => {
        let now = new Date()
        while (now.getSeconds() !== 0) {
            const interval = window.setInterval(() => {now = new Date()}, 1000)
            return () => window.clearInterval(interval);
        }
        setTime(now);
    }, [])

You seem to return out of your useEffect before you've set state. Which means your UI would not be receiving any state updates.

useEffect(() => {
    // Adjust this to 60 * 1000 for 1 min (not required)
    const refreshTime = 1000;
    const interval = setInterval(() => {
      setTime(new Date())
    }, refreshTime)

    return () => {
      clearInterval(interval)
    }
  }, []);
Reasons:
  • RegEx Blacklisted phrase (2): working?
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Anubhav

79129722

Date: 2024-10-27 00:56:31
Score: 1.5
Natty:
Report link

Without having access to your specific files, it's impossible to say definitively.

From the GNU tar specifications v1.35:
"Physically, an archive consists of a series of file entries terminated by an end-of-archive entry".

This implies that a totally standard tarball should only have a relative size difference based on the number of files in the archive.

However, from that same page:
"In addition to entries describing archive members, an archive may contain entries which tar itself uses to store information", using labels as an example of entries that don't contain actual file data.

While looking for information about this, I found this article, which contains:
"let's consider a scenario where we have a tarball that is 1GB in size when compressed, and when extracted, the unpacked data is several 100GB. The size difference between the tarball and the unpacked data is 2.32% to 2.38%."

The numbers line up exactly, but the article is talking about a single 1GB compressed tarball vs the 100GB of uncompressed raw data. If you could give more information about your specific case, it would make giving a definitive answer easier.

Reasons:
  • Blacklisted phrase (1): this article
  • Long answer (-1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: donotread123

79129721

Date: 2024-10-27 00:54:31
Score: 2.5
Natty:
Report link

Shortly after posting the question I found the answer. QImage is created with uninitialized data.

Adding this cleared it up: self.image.fill(0)

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

79129704

Date: 2024-10-27 00:38:28
Score: 1.5
Natty:
Report link

Your code looks mostly correct but you can make it more Singletonish by using a static class for your CSingleton class

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

79129697

Date: 2024-10-27 00:33:27
Score: 1.5
Natty:
Report link

I'm using VS2022 and what worked for me was to click the "Show All Files" at the top in the solution explorer:

enter image description here

That will make them visible but they are still not part of the solution. Btw, sometimes I need to reload the solution or Visual Studio to make the button work.

After you see them, right click and select "Include in Project":

enter image description here

Then just click the first button again and you should see only what's in the project: enter image description here

Reasons:
  • Blacklisted phrase (0.5): I need
  • Whitelisted phrase (-1): worked for me
  • Probably link only (1):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: YanMax

79129689

Date: 2024-10-27 00:28:26
Score: 1
Natty:
Report link

Apparently, the CTV News website is using an outdated version of the comScore analytics SDK, preventing the video player from working correctly.

You may try any of these solutions. Maybe one works maybe none:

If none works, contact their support.

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

79129683

Date: 2024-10-27 00:20:25
Score: 5.5
Natty:
Report link

I too want to use the Stripe library on the web with Flutter. Does anyone have a full working example of this with current Flutter version/etc. I am not a JS developer so need a solid working example.

Reasons:
  • RegEx Blacklisted phrase (3): Does anyone have a full
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: user1340123

79129682

Date: 2024-10-27 00:18:23
Score: 1
Natty:
Report link

After some more investigation it seems that the HTTP POST is the initialisation of GRPC connection, since GRPC is using HTTP 2 POST on start of the call. The OTEL implementation has 2 transactions for grpc server -> One for the HTTP 2 POST which happens on the start of GRPC connection and the other one which happens when GRPC call is being done.

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Jakub Zilinek

79129681

Date: 2024-10-27 00:17:23
Score: 2.5
Natty:
Report link

The extension haldlgldplgnggkjaafhelgiaglafanh/admin.js is a admin filter used on managed devices this error cant be Helped as its a client sided Error

if you want to try and fix it you can download the extention at https://crx.goguardian.com/extension-m-4.0.7245.1-stable-crx2.crx

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

79129678

Date: 2024-10-27 00:14:22
Score: 4
Natty:
Report link

Removing extension="ftp.so" from /usr/local/etc/php/7.4/php.ini

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Has no white space (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: blade

79129673

Date: 2024-10-27 00:02:21
Score: 2
Natty:
Report link

Answering my own question: the code compiles just fine; this is a bug in RustRover's (2024.1 and 2024.2 EAP) borrow checker implementation.

Here is the false positive: rustrover false positive

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

79129670

Date: 2024-10-26 23:59:20
Score: 2
Natty:
Report link

The final solution is to unset XDG_CURRENT_DESKTOP or export XDG_CURRENT_DESKTOP="".

Reasons:
  • Whitelisted phrase (-1): solution is
  • Low length (1.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: elight

79129667

Date: 2024-10-26 23:56:19
Score: 5
Natty:
Report link

Here is another solution Click Here to check from github. My problem was all files were crypted and Google Drive was also keeping the crypted and previous versions. I had to convert some files urgently and any script will be run will have issue with the recovered files.So I checked documents and discuss with people who understands.I even searched and ask ai tools. At one point i figured how to solve it and shared it in github for anyone who wants to update , use or even change the code.

Reasons:
  • Blacklisted phrase (1): how to solve
  • RegEx Blacklisted phrase (2): urgently
  • Contains signature (1):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: melic

79129662

Date: 2024-10-26 23:44:17
Score: 0.5
Natty:
Report link

I cannot reproduce this with VS Code 1.94.2 using the search box on Julia extension v1.127.2, which when it is set to search "whole word" for "not" finds all of: "!not", "not", "not!", and "not."

However, if you search as a regex (the .* icon in that Search box) you can get what you want by searching for !?not[^!] which skips "not!".

Reasons:
  • Blacklisted phrase (0.5): I cannot
  • No code block (0.5):
  • Contains question mark (0.5):
  • High reputation (-1):
Posted by: Bill

79129658

Date: 2024-10-26 23:41:16
Score: 0.5
Natty:
Report link

Your actual class which does the job can hold singleton instance, you dont need wrapper class here.

Just do:

internal class COctopus
{
    private COctopus() { }

    public static COctopus Instance { get; } = new();

    public override string ToString()
    {
        // Your stuff here
    }
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Arthur Edgarov

79129643

Date: 2024-10-26 23:29:14
Score: 0.5
Natty:
Report link

You shall use GROUP BY clause.

SELECT 
    Fname AS EmployeeFirstName, 
    Lname AS EmployeeLastName, 
    AVG(Salary) AS Sal
FROM  Employee
GROUP BY employeeId; -- Replace this by the column id specific to the employees

Note: You'll need to set sql_mode to "only_full_group_by" or "" (empty)

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

79129642

Date: 2024-10-26 23:28:14
Score: 3
Natty:
Report link

I have found the answer: the error was in the types, the post:Post had to be a public type of the type any so: public post: Post | any.Maybe a future viewer can benefit from this, and i thank all of you for reading this!!!

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

79129640

Date: 2024-10-26 23:26:13
Score: 4
Natty:
Report link

Install Manim via chocolatey so that it is recognised by VS Code https://community.chocolatey.org/packages/manimce

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

79129634

Date: 2024-10-26 23:20:12
Score: 2
Natty:
Report link

I try this, but isn“t working

I get Permanently a 404 Not Found from NGINX

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

79129629

Date: 2024-10-26 23:14:09
Score: 6.5 🚩
Natty:
Report link

Now I did a change in the sources list (was empty before). now this is the problem: sudo apt-get update enter image description here

my sources list: enter image description here

do you know what is the problem?

Thanks a lot!!

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (1): enter image description here
  • Low length (1):
  • No code block (0.5):
  • Ends in question mark (2):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: user28003404

79129628

Date: 2024-10-26 23:14:09
Score: 0.5
Natty:
Report link

Even if the answer of @Chris is right, I'd like to share mine :)

To check the power p of a number n, you can convert this number to the base p and check if the first digit (on the left) is 1, and the remaining digits are 0.

x = 3**8
y = x - 1
z = x - 9
a = 30

def ternary (n):
    if n == 0:
        return '0'
    nums = []
    while n:
        n, r = divmod(n, 3)
        nums.append(str(r))
    return ''.join(reversed(nums))

def is_power_of_3(n):
    nstr = ternary(n)
    return nstr[0] == '1' and int(nstr[1:]) == 0

print("x = {} {}\ny = {} {}\nz = {} {}\na = {} {}".format(ternary(x), is_power_of_3(x), ternary(y), is_power_of_3(y), ternary(z), is_power_of_3(z), ternary(a), is_power_of_3(a)))

I gave 4 example, only the x is a power of 3

Output:

x = 100000000 True
y = 22222222 False
z = 22222200 False
a = 1010 False
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Chris
  • Low reputation (0.5):
Posted by: Mike

79129622

Date: 2024-10-26 23:11:08
Score: 1.5
Natty:
Report link

The shortest and the most intuitive one.

m = {};
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Kornel Szymkiewicz

79129608

Date: 2024-10-26 23:01:06
Score: 2.5
Natty:
Report link

Research found this :

SendKeys "~", True

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

79129602

Date: 2024-10-26 22:56:05
Score: 2
Natty:
Report link

I commented out socket.pipe(socket); line in .ts script and it works now.

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

79129598

Date: 2024-10-26 22:52:04
Score: 1.5
Natty:
Report link

I was struggling with this same situation. Here's what I did:

For whatever reason it's only available in this edit menu, not when you're setting up the table.

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

79129588

Date: 2024-10-26 22:45:03
Score: 3
Natty:
Report link

After trying through below troubleshooting, I was able to resolve the issue. Solution listed at number (4).

  1. Ensure all the Expo dependencies are updated to latest version. $ npx expo install --fix
  2. Capture "exceptions" via Android Studio Logcat.
  3. Referred the link below, which was exhibiting the same crash behavior seen in my case, which was after installing expo-camera module. However, in this case the build was failing while my app build was successful. expo-camera module breaks bare React Native app

Note that I did implement the steps mentioned by @G26bandit in the above link, since they were already a part of the "app build tutorial" i was following. They are still in place.

  1. Run ./gradlew clean in your "Project/android" folder ( Uses your project's gradle wrapper to execute your project's clean task. Usually, this just means the deletion of the build directory i.e Project/android/app/build directory. )

Now, simply run the node server $ npm start reset-cache

And run the app $ npm run android

I am glad that the issue has been resolved. Hope this is helpful to others.

Reasons:
  • Blacklisted phrase (1): the link below
  • Long answer (-1):
  • No code block (0.5):
  • User mentioned (1): @G26bandit
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Cool1

79129585

Date: 2024-10-26 22:39:02
Score: 0.5
Natty:
Report link

End of 2024, appartently the only solution that worked for me to prograatically clear Select2 (version 4.0.13) options without interfering with other events was the one hidden down in the Select2 documentation for clear select options

I used $('#mySelect2').val(null).trigger('change');

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

79129564

Date: 2024-10-26 22:30:00
Score: 4
Natty:
Report link

It seems like this is not possible. To quote @user17732522, "there is nothing in the language to test the validity of an instantiation."

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

79129562

Date: 2024-10-26 22:27:57
Score: 10.5 🚩
Natty:
Report link

Did you solve the problem? I'm stuck too

Reasons:
  • RegEx Blacklisted phrase (1.5): I'm stuck
  • RegEx Blacklisted phrase (3): Did you solve the problem
  • RegEx Blacklisted phrase (1.5): solve the problem?
  • Low length (1.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • Starts with a question (0.5): Did you solve the
  • Low reputation (1):
Posted by: phellype

79129561

Date: 2024-10-26 22:25:57
Score: 2
Natty:
Report link

MoreLinq has a Partition function doing this : https://github.com/morelinq/examples?tab=readme-ov-file#partition

var (partTrue, partFalse) = myList.Partition(myPredicate);

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

79129534

Date: 2024-10-26 22:05:52
Score: 1.5
Natty:
Report link

you need to create global.d.ts file in your project's root and put this nativewind decorator.

/// <reference types="nativewind/types" />

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

79129528

Date: 2024-10-26 21:58:51
Score: 1
Natty:
Report link

As mentioned by @MT0 using zoneinfo works correctly:

>>> dt(2024, 1, 1, 7, 40, 0, tzinfo=pytz.timezone('America/New_York')).isoformat()
'2024-01-01T07:40:00-04:56'
>>> dt(2024, 1, 1, 7, 40, 0, tzinfo=zoneinfo.ZoneInfo('America/New_York')).isoformat()
'2024-01-01T07:40:00-05:00'
>>> dt(2024, 10, 10, 7, 40, 0, tzinfo=zoneinfo.ZoneInfo('America/New_York')).isoformat()
'2024-10-10T07:40:00-04:00'

In January, NY observes winter time, which is UTC-5, and therefore the offset is correct. If you want to see the -04:00 offset, change date to one where DST is observed, like Oct 10.

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

79129520

Date: 2024-10-26 21:53:50
Score: 0.5
Natty:
Report link

Maybe this will work for you it worked for me, open a new Google shell terminal tab and exit the other tab. Need help? Here's the Official Google cloud document https://cloud.google.com/shell/docs/use-cloud-shell-terminal?cloudshell=true Scroll down until you see "Open multiple terminal sessions"

Reasons:
  • Whitelisted phrase (-1): it worked
  • Whitelisted phrase (-1): worked for me
  • Low length (0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: gitmocha

79129512

Date: 2024-10-26 21:47:49
Score: 2.5
Natty:
Report link

There isn't an official package or plugin like Elastic Search for OpenSearch that allows you to upload a CSV file directly to AWS OpenSearch (formerly Amazon Elasticsearch) and index its contents.

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

79129507

Date: 2024-10-26 21:44:46
Score: 7.5 🚩
Natty: 4
Report link

Actually, the answer above is incorrect. It produces the error Error in if (test$year == 2019) { : the condition has length > 1

and if one uses ifelse then the error is Error in ifelse(test$year == 2018) : argument "yes" is missing, with no default

Can anyone clarify?

Reasons:
  • RegEx Blacklisted phrase (2.5): Can anyone clarify
  • Low length (0.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Looks like a comment (1):
  • Low reputation (1):
Posted by: JohnS

79129497

Date: 2024-10-26 21:35:44
Score: 0.5
Natty:
Report link

This is simply:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{QUERY_STRING} (^|&)7eyS= [NC,OR]
    RewriteCond %{QUERY_STRING} (^|&)8dkG= [NC,OR]
    RewriteCond %{QUERY_STRING} (^|&)viYF= [NC,OR]
    RewriteCond %{QUERY_STRING} (^|&)Wv3y= [NC]
    RewriteRule ^ - [F]
</IfModule>

Or am I missing something?

Reasons:
  • Has code block (-0.5):
  • Ends in question mark (2):
  • High reputation (-1):
Posted by: mayersdesign

79129493

Date: 2024-10-26 21:34:44
Score: 3
Natty:
Report link

If switching libraries is an option, you can implement your own masking solution using regular expressions or libraries like cleave.js or react-text-mask.

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

79129477

Date: 2024-10-26 21:23:42
Score: 1
Natty:
Report link

PHP's GMP does not implement the floating-point (mpf) functions.

If you have access to BCMath, its bcsqrt function has a scale parameter that might work for your purposes.

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

79129472

Date: 2024-10-26 21:18:41
Score: 5.5
Natty:
Report link

please try v5 of [email protected] which does not require storing any temp files on the storage. It does all the processing in memory. It should fix your problem. Please let me know here or create an issue in the officeparser git repo if it does not.

Reasons:
  • RegEx Blacklisted phrase (2.5): Please let me know
  • Contains signature (1):
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Harsh

79129471

Date: 2024-10-26 21:17:40
Score: 1.5
Natty:
Report link

I struggle with this as well, in my particular case I eventually figured out when I pulled the case of that the manufacturer had put the sticker backwards on the case and I had the B-,A+, V- & V+ wires in the reverse order. Once I wired it up to follow the markings on the PCB instead of the case I started getting answers.

My XY-MD02 from aliexpress has a red LED on the board that is constantly on when it has power on V- & V+. That was a clue.

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

79129469

Date: 2024-10-26 21:16:40
Score: 1.5
Natty:
Report link

Declare let parentDismiss: DismissAction?.

In the app parentDismiss is non-nil, in Preview set it to nil.

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

79129461

Date: 2024-10-26 21:12:39
Score: 1.5
Natty:
Report link

Sorry, I think I was not clear. If the antivirus (Defender, ASR etc) does not whitelist designated executables (e.g. myApp.exe) or folders, then the application will be prevented to run (e.g. "access denied" error). We have had a lot of problems with this in the past. Therefore they must whitelist designated executables or folders to prevent these errors. My question was just specific to the executable running for web apps (for our set up, definitely IIS w3wp.exe, and even for .Net Core were also using IIS).

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

79129460

Date: 2024-10-26 21:11:39
Score: 3.5
Natty:
Report link

I missed to annotate customservicedetails with @Service Annotation. After it worked!

Reasons:
  • Whitelisted phrase (-1): it worked
  • Low length (1.5):
  • No code block (0.5):
  • User mentioned (1): @Service
  • Single line (0.5):
  • Low reputation (1):
Posted by: Sandhya Rani

79129427

Date: 2024-10-26 20:48:32
Score: 11.5 🚩
Natty: 5.5
Report link

How did you get just what i am looking for? I want Gallery to ignore .nomedia files, i am very mad deleting .nomedia files every day, multiple times per day ... some applications re-create the .nomedia files.

I hate the person who desing such .nomedia concept without a checkbox to ignore them... better never be born!!!

How much cost to the designer of apps that uses .nomedia files to make an option to ignore and/or not create them?????

Reasons:
  • Blacklisted phrase (2): i am looking for
  • Blacklisted phrase (1): ???
  • RegEx Blacklisted phrase (3): did you get
  • RegEx Blacklisted phrase (1): I want
  • No code block (0.5):
  • Ends in question mark (2):
  • Unregistered user (0.5):
  • Starts with a question (0.5): How did you
  • Low reputation (1):
Posted by: Laura

79129403

Date: 2024-10-26 20:26:27
Score: 0.5
Natty:
Report link

Solved this by using AutoHotkey v2 (working flawlessly, system-wide) (copy, paste and middle mouse button) -> https://github.com/capitanbarbosa/linux_middle_click_for_windows

#Requires AutoHotkey v2.0

MButton::
{
    ; Check if the cursor is over an edit control or other text input
    if (A_Cursor = "IBeam")
    {
        prevClipboard := A_Clipboard
        A_Clipboard := ""
        
        ; Try to copy any selected text
        Send("^c")
        ClipWait(0.5)
        
        if (A_Clipboard != "")
        {
            ; Text was selected and copied, keep it in clipboard
            return
        }
        
        ; If no text was copied and no text is selected, paste the previous clipboard content
        if (A_Clipboard == "")
        {
            A_Clipboard := prevClipboard
            Send("^v")
            return
        }
        
        ; If no text was copied, try to select all text and copy
        Send("^a^c")
        ClipWait(0.5)
        
        if (A_Clipboard != "")
        {
            ; Text was copied after selecting all, keep it in clipboard
            Send("{Right}")  ; Move cursor to end of text
            return
        }
        
        ; If still no text, paste the previous clipboard content
        A_Clipboard := prevClipboard
        Send("^v")
    }
    else
    {
        ; Not over a text input, send normal middle click
        Send("{MButton}")
    }
}
Reasons:
  • Probably link only (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Luis Barbosa

79129401

Date: 2024-10-26 20:25:27
Score: 5.5
Natty: 5.5
Report link

AmazonMQ does not support jmxurl then how should we connect amazon active mq using commandline tools?

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Ends in question mark (2):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: AMAN

79129393

Date: 2024-10-26 20:19:26
Score: 3.5
Natty:
Report link

Add "C:\Users[USERNAME]\AppData\Local\Android\Sdk\cmdline-tools\latest\bin" to 'Path' of 'Environtment Variable'

then try to restart

enter image description here

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

79129379

Date: 2024-10-26 20:08:23
Score: 0.5
Natty:
Report link

You can use @nimpl/getters for this

import { getPathname } from '@nimpl/getters/get-pathname'

export default function Component() {
    const pathname = getPathname()

    return (
        // ...
    )
}
Reasons:
  • Whitelisted phrase (-1.5): You can use
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Alexander Savelyev

79129371

Date: 2024-10-26 20:02:22
Score: 2
Natty:
Report link

I tried rebuilding solution, cleaning etc to no avail but I have found that I had still one reference to missing piece in one of the .csproj files - once removed the problem went away.

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

79129359

Date: 2024-10-26 19:58:21
Score: 3.5
Natty:
Report link

Could it help?

for obj in detected_objects:
        obj["box"] = [int(coord) for coord in obj["box"]]
        obj["distance"] = float(obj["distance"])
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: smdmrrr

79129351

Date: 2024-10-26 19:53:20
Score: 3
Natty:
Report link

12GB of space seems adequate for a small, free environment, but the major issue is that Oracle counts not only data but also the UNDO tablespace, which is absurd. I was testing Oracle 23ai FREE and created an instance for evaluation, and I encountered serious problems:

The auditing scheme generates several gigabytes of data with minimal usage, causing the SYSAUX tablespace to grow to the point where it consumes all 12GB, even with only 1GB in its active tables. This behavior occurs simultaneously in both the CDB and spreads like a virus to the two PDBs. Fortunately, this can be mitigated by disabling the audits.

As soon as I finished the installation and removed the audits, I created a custom PDB. When I went to configure the UNDO area of the PDB, I mistakenly executed the command to set it to 8GB instead of 1GB (ALTER DATABASE DATAFILE /* UNDOTBS1 */ '/db23c/FREE/sgf/undotbs01.dbf' RESIZE 1G;), and I simply ran out of space.

While this was my error, it led to the following observations:

a) It makes no sense for the UNDO area to count against the 12GB limit, and Oracle could rectify this, as UNDO does not represent actual data. b) I tested the TEMP tablespace and found that it does not have the same issue, indicating that Oracle at least allows any size for TEMP, which further weakens the logic of 2.1, since TEMP is used to store data, such as from an "external table." c) If you do not maintain backups, be aware that once you hit the 12GB limit, you will lose all your data, even due to a mistake in resizing the UNDO or an accidental transaction that causes this. I did not find a way to open the database once the limit is exceeded to, for example, clean the recycle bin, resize the UNDO, drop tables, etc.

Thus, while it is known that the XE and FREE versions are not recommended for production, I believe that due to these limitations, they are also not suitable for any purpose.

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Me too answer (2.5): have the same issue
  • Low reputation (1):
Posted by: dba sourcetec

79129347

Date: 2024-10-26 19:51:19
Score: 4
Natty:
Report link

found the problem, just delete the config folder from your robocode folder, it just a bug, idk why these guys dont fix ts, is so bad...........

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Filler text (0.5): ...........
  • Low reputation (1):
Posted by: Dex

79129336

Date: 2024-10-26 19:44:17
Score: 4.5
Natty:
Report link

I just needed to implement this in my code: thank you @mklement0 -

Also, to avoid false positives, use ... -replace ('\b' + [regex]::Escape($oldString) + '\b'), $replacements[$oldString]

It all works now. Thanks!

Reasons:
  • Blacklisted phrase (0.5): thank you
  • Blacklisted phrase (0.5): Thanks
  • Low length (0.5):
  • No code block (0.5):
  • User mentioned (1): @mklement0
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Ryane Helder

79129314

Date: 2024-10-26 19:25:13
Score: 1.5
Natty:
Report link
Account.Order {
    `Product Name`: $.{
      "Price": Price,
      "Qty": Quantity,
      "ProductID": ProductID
    }
} ~> $each(function($v) {
  {
    "Price": $sum($v.Price),
    "Qty": $v[0].Qty,
    "ProductID": $v[0].ProductID
  }
})

Playground link: https://jsonatastudio.com/playground/b99c58af

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

79129311

Date: 2024-10-26 19:24:13
Score: 0.5
Natty:
Report link

It is the same as you would do with any other dockerized workload but using windows containers.

You need to:

To build an asp.net application image using a dockerfile this would be the most straightforward example:

# Use the official Microsoft ASP.NET image with IIS pre-installed
FROM mcr.microsoft.com/dotnet/framework/aspnet:4.8

# Set working directory in container
WORKDIR /inetpub/wwwroot

# Copy the application files to the container
COPY . .

# Expose port 80 for IIS
EXPOSE 80

# No ENTRYPOINT or CMD needed, as IIS is configured to start automatically in this base image

You then need to tag the image, or have composer do that for you, push it to a registry and you are ready to deploy this somewhere. You can also run it locally with composer.

I am using these set of images to host legacy ASP.Net applications and Microsoft SQL Server 2022:

https://github.com/david-garcia-garcia/windowscontainers

My recommendation for hosting Windows Containers is Azure Kubernetes Service:

https://azure.microsoft.com/es-es/products/kubernetes-service

You will find windows support also on other cloud providers, but according to my personal experience the most stable hybrid (Linux + Windows because you cannot have a Windows only K8S cluster) cluster support is on AKS.

Reasons:
  • Contains signature (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: David

79129308

Date: 2024-10-26 19:24:13
Score: 0.5
Natty:
Report link

When you use ClassicEditor form '@ckeditor/ckeditor5-build-classic', it realy have Mention plugin, so you don't need install '@ckeditor/ckeditor5-mention'

     import { CKEditor } from '@ckeditor/ckeditor5-react'
     import ClassicEditor from '@ckeditor/ckeditor5-build-classic'
    
     const CreatePage = () => {
     return (
     <div>
       <h2>CKEditor with Mentions</h2>
       <CKEditor
         editor={ClassicEditor}
         config={{
           mention: {
             feeds: [
               {
                  marker: "@",
                  feed: ["Alice", "Bob", "Charlie"],
                },
              ],
           },
        }}
      />
     </div>
     )
    }
    
    export default CreatePage`
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Starts with a question (0.5): When you use
  • Low reputation (1):
Posted by: Ning

79129291

Date: 2024-10-26 19:16:11
Score: 1.5
Natty:
Report link

The code is written incorrectly, and relies on undefined behavior.

The correct code would read

float plot(vec2 st) {    
    return 1.0 - smoothstep(0.0, 0.02, abs(st.y - st.x));
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: user28002279

79129286

Date: 2024-10-26 19:15:10
Score: 2
Natty:
Report link

It seems like this is an issue with the version of Python you're using. I went to both the PyPI page of typing_extensions and its documentation and it mentions that the library only suports Python 3.8 onwards.

I'm still trying to reproduce the error, since my debugger doesn't support Python 3.7. If I'm successful at doing so, I'll update this answer.

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

79129275

Date: 2024-10-26 19:07:09
Score: 3
Natty:
Report link

Also watch out if you're creating an instance instead of calling the function

BuildConfigField("String", "BASE_URL", ""https"")

instead

buildConfigField("String", "BASE_URL", ""https"")

See the docs: https://developer.android.com/build/gradle-tips#share-custom-fields-and-resource-values-with-your-app-code

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

79129273

Date: 2024-10-26 19:06:08
Score: 1.5
Natty:
Report link

I've solved this error using this, in next.config.js

images: {
    unoptimized: true,
  },
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Jhonattan Aponte

79129269

Date: 2024-10-26 19:02:07
Score: 1
Natty:
Report link

I think you may want to look at Nitro Modules:

Direct Swift <> C++ interop

Unlike Turbo- or Expo-Modules, Nitro-Modules does not use Objective-C at > all. Nitro is built using the new Swift <> C++ interop, which is close to > zero-overhead.

Right now it doesn't easily support Fabric for View Components but if it's just for a Turbo Module alternative, it seems the easiest way to connect to swift right now.

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

79129261

Date: 2024-10-26 19:00:07
Score: 1
Natty:
Report link
Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Yves Daoust

79129260

Date: 2024-10-26 18:59:06
Score: 1
Natty:
Report link

You have an error on the login page in the line <form action="/home" method="POST">. You need to send a username and password to the /login.

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

79129239

Date: 2024-10-26 18:44:04
Score: 0.5
Natty:
Report link
# updated for current versions 
# yt-dlp version 2024.10.22 and 
# ffmpeg #version 7.1

# Prereqs use PS or CMD to Install.
# winget yt-dlp
# winget ffmpeg


# Define URL and time ranges.
$URL = "https://www.youtube.com/watch?v=05j8Ai9riEM&list=PPSV" 
$from = "00:00:00"
$duration = "00:02:14"

# Download and merge video and audio into 'full_video.mkv'.
yt-dlp -f bestvideo+bestaudio --merge-output-format mkv -o 
"full_video.mkv" $URL

# Use FFmpeg to extract the specific portion of the video. 
ffmpeg -i "full_video.mkv" -ss $from -t $duration -c copy output.mkv
Reasons:
  • Blacklisted phrase (1): youtube.com
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: William Foster

79129238

Date: 2024-10-26 18:43:04
Score: 2
Natty:
Report link
{
  "data": $map($.event_date, function($v, $i) { 
    {
      "date": $v,
      "value": $.values[$i]
    }
  }) 
}

Playground link: https://jsonatastudio.com/playground/6bb3385e

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

79129237

Date: 2024-10-26 18:43:04
Score: 0.5
Natty:
Report link

Have you added the assetlinks.json file to you website. Host the file at a URL that resembles the following: <webdomain>/.well-known/assetlinks.json

The file content should look something like this:

[{
  "relation": ["delegate_permission/common.handle_all_urls"],
  "target": {
    "namespace": "android_app",
    "package_name": "com.example.deeplink_cookbook",
    "sha256_cert_fingerprints":
    ["FF:2A:CF:7B:DD:CC:F1:03:3E:E8:B2:27:7C:A2:E3:3C:DE:13:DB:AC:8E:EB:3A:B9:72:A1:0E:26:8A:F5:EC:AF"]
  }
}]

Source - https://docs.flutter.dev/cookbook/navigation/set-up-app-links#assetlinks-json Flutter Deep linking Guide - https://docs.flutter.dev/ui/navigation/deep-linking

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

79129233

Date: 2024-10-26 18:41:03
Score: 1
Natty:
Report link

I want to capture all signals

No you don't. Or at least you shouldn't.

Signals are:

show a message to user and the app just doesn't quit

It's somewhat possible. But if you have a multithreaded program that has just corrupted its memory, the best place to display that message may be from a different process. Some kind of external monitoring process as @Eljay suggests in comments.

I intend to kill the worker thread (therefore avoiding the loop) and signal the main thread to show a message to user and unwind gracefully

If you have a multithreaded program where a worker thread held some locks and you kill it, you're not getting those locks back. Trying to do anything non-trivial in the same process (even in different threads) will likely end up in a deadlock/further crashes.

The most you can do in that handler is record what information you can in as simple way as possible (signal safety reminder) and then poke your monitoring process that its time has come.

If you are working with documents, should you try to save some data if you can? Assume things are corrupted/broken. So usually not.

Reasons:
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • User mentioned (1): @Eljay
  • High reputation (-1):
Posted by: teapot418

79129228

Date: 2024-10-26 18:40:03
Score: 1.5
Natty:
Report link

One possible reason is that there are two classes (e.g. HomeController) with the same name but in different packages or multiple instances for one class, both of them will use the default name (e.g. homeController), and then an exception happens. If this is the case, then @Component(beanName) + @Qualifier(beanName) would be a possible solution.

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

79129199

Date: 2024-10-26 18:25:00
Score: 2.5
Natty:
Report link

For someone having a problem like this try running

rmdir public\storage

and then

php artisan storage:link

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

79129190

Date: 2024-10-26 18:18:59
Score: 1.5
Natty:
Report link

The "invalid ELF header" error typically occurs when the bcrypt module was installed on a different system (e.g., Windows or macOS) but is being run on AWS Lambda, which uses Amazon Linux. bcryptjs package can be use instead of bcrypt

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

79129174

Date: 2024-10-26 18:10:57
Score: 1.5
Natty:
Report link

There is a really great answer about writing/reading/copying for files here: https://stackoverflow.com/a/28129677/15096247

In your case, it is a bit of work to adapt it (split on newlines, basically), but it might be worth it. I use it quite often.

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Whitelisted phrase (-1): In your case
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Hans

79129163

Date: 2024-10-26 18:05:56
Score: 3
Natty:
Report link

I have figured out the issue. I have to make sure that the 'Authorized redirect URIs' list is empty in the Web Application OAuth 2 client.

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

79129159

Date: 2024-10-26 18:03:55
Score: 4
Natty: 4.5
Report link

I'm sorry, can't you just calculate strategy.max_drawdown and strategy.max_drawdown_percent?

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

79129149

Date: 2024-10-26 17:54:53
Score: 1
Natty:
Report link

This is a bug in the requests library, likely caused by REQUESTS_CA_BUNDLE environment variable being set.

For more details, see https://github.com/psf/requests/issues/3829

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