79545161

Date: 2025-03-30 21:06:33
Score: 1.5
Natty:
Report link

I had such a need recently and wrote a small program to estimate the compressed size of directories. After testing various approaches, I found that sampling and compressing fractions of files to be the most accurate - the trick, I found, is in the sampling strategy. Wrote zip-sizer, a small go program, to solve the problem mostly for my personal use. I made releases for windows/mac/linux. Note though, this estimates only for gzip and bzip2, not zip as you require; but you can get a rough idea. (There is also a prototype python script in the "python/" directory that does the same thing; runs with just the stdlib). Hope you find it useful.

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

79545154

Date: 2025-03-30 20:59:31
Score: 0.5
Natty:
Report link

Just had this issue and couldn't find any solid info on it. Make sure that icon on the right side of this input field for files to exclude is enabled. It toggles the global exclude rules within the results.

enter image description here

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Single line (0.5):
  • High reputation (-1):
Posted by: Jacob Thomason

79545153

Date: 2025-03-30 20:59:31
Score: 4.5
Natty: 5
Report link

I just had same problem. Tried everything, including deleting contact & re - entering. My sent emails to this particular new address kept returning. I then sent same address from a secondary email address I have & the email went through. So , yes it seems the comma isn't the issue & I noticed it appearing on other addresses that I know do work. Must be some issue with my email address I was trying to send from. Whether the receiving address was blocking in some way ?

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

79545151

Date: 2025-03-30 20:59:31
Score: 1.5
Natty:
Report link

There is a way to populate a text at the scanner.nextLine() prompt that can be edited by the user.

I'm using this in a console application that prompts for a message with a specific max length. If the user enters a longer message an error message will be shown and the entered text is populated at the next scanner.nextLine() prompt iteration, so the user must not enter the whole message again and can edit it instantly.

The "trick" is to set the entered message to the system clipboard and paste it to the console using keyPress() method of the Robot class.

First we will need a method to set a string to the system clipboard.

public static void setClipboard(String str) {

    // set passed string to clipboard
    Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection(str), null);
}

Next there is a method needed that triggers the ctrl + v key press.

public static void pasteClipboard(int i) {

    // triggers ctrl + v key press and release after a delay of i milliseconds

    try {

        // list containing ctrl + v key events
        List<Integer> keys = new ArrayList<Integer>(List.of(KeyEvent.VK_CONTROL, KeyEvent.VK_V));

        Robot robot = new Robot();

        /*
         * Passed integer argument to set a delay in milliseconds
         * (a value of 50 is recommended) to make sure pasting the
         * clipboard AFTER the System.out print streams are written out.
         * 
         * QUESTIONS:
         * 
         * Without any delay the clipboard will be pasted BEFORE
         * the System.out print streams, starting from the 2nd iteration
         * though this method is called AFTER the print calls, but why?
         * 
         * Is there a way to achieve the correct behavior without any delay workarounds?
         *
         * The following has already been tried, always with the same faulty result:
         * 
         * - using a while loop instead of recursion
         * - flushed the output stream before calling this method
         * - separating the print calls in a thread and waiting til it's finished
         */

        robot.delay(i);

        // key press sequence: ctrl, v
        for (Integer key : keys) {
            robot.keyPress(key);
        }

        // reversing the keys list especially to release the ctrl key
        Collections.reverse(keys);

        // key release sequence: v, ctrl
        for (Integer key : keys) {
            robot.keyRelease(key);
        }

    } catch (AWTException e) {
        e.printStackTrace();
    }
}

Please note the comments in my code. Is anybody out there who can explain / answer my questions?

Now we are coming to the method including all that stuff like message output and the whole logic part of checking the users input. It's built as a recursive method but can be built as a while loop, too.

public static String enterMessageRecursion(Scanner input, String msg, int maxlen) {

    /*
     * ANSI escape codes are used for styling the output:
     * 
     * \033[1;97;41m = red background + white bold bright foreground
     * \033[1;97;42m = green background + white bold bright foreground
     * \033[1m       = bold
     * \033[0m       = reset to default
     */

    System.out.println(String.format("Please enter a message (%smax. %s chars%s):",
            "\033[1m", maxlen, "\033[0m"));

    if (!msg.isBlank())      // true if the user entered message is too long
        pasteClipboard(50);  // triggers ctrl + v key press with a delay of 50ms

    msg = input.nextLine();  // scanner awaits user input

    if (msg.length() > maxlen) {

        // set message to clipboard if it's greater than the max message length
        setClipboard(msg);

        /*
         * print out error message and continues with the next call of this method
         * (see return statement)
         */

        System.out.println(String.format("%sThe entered message is too long (%s chars).%s",
            "\033[1;97;41m", msg.length(), "\033[0m"));

    } else if (!(msg.isBlank() || msg.length() > maxlen)) {

        /*
         * At this point the message is not blank or not greater than the max message length,
         * means the entered message is valid. This is the end of the method and recursion.
         */

        System.out.print(String.format("%sThe entered message is valid (%s chars).%s",
            "\033[1;97;42m", msg.length(), "\033[0m"));
    }

    // recursion til message is not blank or not greater than the max message length
    return (msg.isBlank() || msg.length() > maxlen)
            ? enterMessageRecursion(input, msg, maxlen) : msg;
}

Finally we need a main method of course. Pretty straightforward and nothing exciting in here.

public static void main(String[] args) {

    String msg = "";  // user message
    int maxlen = 20;  // max message length (chars)

    Scanner input = new Scanner(System.in);

    enterMessageRecursion(input, msg, maxlen);

    input.close();
}

The result should look like this:

console output from Eclipse IDE

Important to know for adapting the code is that you need setClipboard() to set the clipboard to the string you want to populate at the scanner prompt. After printing out your prompt message right before your scanner.nextLine() call do pasteClipboard(50) for triggering the ctrl + v key press that should paste the string from the clipboard to the console. This string is editable by the user.

Reasons:
  • Blacklisted phrase (0.5): why?
  • Blacklisted phrase (1): Is there a way
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: burnie

79545144

Date: 2025-03-30 20:53:30
Score: 1.5
Natty:
Report link

I tried to understand the algorithm involving bit operation, and end up with a doubt is this really useful ?
So first explaining how i understand the algorithm :

var bytes = new Byte[8];
rng.GetBytes(bytes);

This a simple "generate me 64 random bits", and it give a 8 bytes array.

var ul = BitConverter.ToUInt64(bytes, 0) / (1 << 11);

Well here is unnecessary divide operation as stated by the author himself in comment.
But I'll explain how i understand it :

  1. given or 64 bits randomly generated, convert them as an unsigned 64 bits integer. For example
    00011101_11100010_00000000_00001001_11101111_11100100_11110000_01011011

  2. perform a left shift bit operation on 1. Given we are working on 64 bits, it would result with 00000000_00000000_00000000_00000000_00000000_00000000_00001000_00000000 (52 0, a 1 and 11 0)

  3. Divide 1. by 2., which as a 2 64 bits numbers is a same as performing a right shift bit operation on 1. by same 11 bits shift.

  4. So in fact the result is 1. but with 11 0 bits first, and with the last extra 11 bits of 1. being discarded :
    00000000_00000011_10111100_01000000_00000001_00111101_11111100_10011110

Double d = ul / (Double)(1UL << 53);

This was the must perpetuating part, because it used the same math operation pattern, and so you might be tricked to think in bit operation again.
But it is not the case anymore because using a double cast here we are leaving the bit world to double one.

So here is a simple common divide operation on 2 doubles (the ulong result in 4. is implicitly converted to double at this step if I'm right).

And understanding the 1UL << 53 is also tricky here because you have to understand the left (and right) shift bit operation only consider the last 5 bits of the right operand on 32 bits world (int, uint ...), whereas it take the 6 last bits in 64 bits world (long, ulong, ... ). And as 53 in binary is 00110101 performing a left shift bit operation on 1 (implicitly a int32) would consider only the last 5 bits of 00110101 => 00010101 = 21. In order to correctly left shift 53 bits, you have to use 1UL instead to be in 64 bits world.
So here we are transforming 1UL in 00000000_00100000_00000000_00000000_00000000_00000000_00000000_00000000
(10 0, a 1 and 53 0)
Then come the double casting. But as you can see, 4. (1. right shifted 11 bits) result at most (if 1. is by chance only 1 bits) as :
00000000_00011111_11111111_11111111_11111111_11111111_11111111_11111111
Which is exactly (1UL << 53) - 1 !

So by dividing 4. result to 1UL << 53 we are simply dividing a random 53 bits binary number to its maximum (excluded) value !

---------------------------------
So here is my doubt after all this.
If this previous understanding is correct, then, why not simply create a random ulong integer like done here, and simply directly dividing it by its maximum value (if a potential issue is overflowing 64 bits, then consider generating a 63 bits integer and dividing it by System.Numerics.BigInteger.Pow(2, 64)-1 instead) ?

Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Filler text (0.5): ---------------------------------
  • Low reputation (0.5):
Posted by: TRex

79545142

Date: 2025-03-30 20:52:30
Score: 0.5
Natty:
Report link

Try also npm install @ant-design/cssinjs and then re-running the build. I had the same error as you until I did that, and then it started working (but npm run dev worked fine without).

Reasons:
  • Whitelisted phrase (-1): I had the same
  • Low length (0.5):
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Phil Ames

79545141

Date: 2025-03-30 20:52:29
Score: 9 🚩
Natty:
Report link

хзхзхзхзхзхзхзхзхзхзхзхзхзхзхзхзхзхзхзхзхзх

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Has no white space (0.5):
  • Single line (0.5):
  • No latin characters (3.5):
  • Low entropy (1):
  • Low reputation (1):
Posted by: Максим Зиновьев

79545139

Date: 2025-03-30 20:52:29
Score: 1
Natty:
Report link

https://github.com/plasmatic1/dmoj-solutions/blob/master/py/thereturnofaplusb.py
this will help

import java.io.*;
import java.util.*;

public class Main {
    private static final String[] EN_VALUES = new String[] { "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten" };
    private static final String[] FR_VALUES = new String[] { "un", "deux", "trois", "quatre", "cinq", "seis", "sept", "huit", "neuf", "dix" };
    private static final String[] CN_VALUES = new String[] { "一", "二", "三", "四", "五", "六", "七", "八", "九", "十"};

    public static void main(String[] args) throws IOException {
        try (BufferedReader in = new BufferedReader(new InputStreamReader(System.in, "UTF-8"))) {
            int lineCount = Integer.parseInt(in.readLine());
            for (int i = 0; i < lineCount; i++) {
                String line = in.readLine();
                String[] token = line.split("\\s+");
                System.out.println(parseNum(token[0]) + parseNum(token[1]));
            }
        }
    }

    private static int parseNum(String token) {
        if (token.matches("\\d+")) {
            return Integer.parseInt(token);
        }
        for (int i = 0; i < EN_VALUES.length; i++) {
            if (token.equalsIgnoreCase(EN_VALUES[i]) || token.equalsIgnoreCase(FR_VALUES[i]) || token.equalsIgnoreCase(CN_VALUES[i])) {
                return i + 1;
            }
        }
        throw new IllegalStateException();
    }
}
Reasons:
  • Probably link only (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: This is Bob Bob says Hi

79545122

Date: 2025-03-30 20:30:24
Score: 3.5
Natty:
Report link

Setting the rotationAlignment property to "horizon" should give you the expected result. Orient markers toward the horizon.

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

79545121

Date: 2025-03-30 20:29:24
Score: 1
Natty:
Report link
from org.openide.util import Lookup
from org.gephi.graph.api import GraphController
from org.gephi.label.api import LabelController
from java.awt import Color

for node in graph.getNodes():
    node.setSize(20.0)
    node.setColor(Color(80, 100, 180)) # blue
    node.setFixed(False) 

Setting size and color.

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

79545108

Date: 2025-03-30 20:18:23
Score: 0.5
Natty:
Report link

[For Windows]

If your packages are located in c:\temp\py\pkgs

import sys
sys.path.append('c:\\temp\\py\\pkgs')
Reasons:
  • Low length (1):
  • Has code block (-0.5):
Posted by: MrCalvin

79545087

Date: 2025-03-30 19:51:18
Score: 0.5
Natty:
Report link

You can also use the hotscript package:

import { Call, Objects } from 'hotscript';

type Result = Call<Objects.AllPaths, typeof person>;

https://github.com/gvergnaud/HOTScript

Reasons:
  • Probably link only (1):
  • Low length (1):
  • Has code block (-0.5):
  • High reputation (-1):
Posted by: François Zaninotto

79545072

Date: 2025-03-30 19:36:14
Score: 9.5 🚩
Natty: 4.5
Report link

were you able to find a solution for this ? I am getting same error. my packages.yml is

packages:
  - git: https://{{env_var('GITTOKEN_ID','NA')}}:{{env_var('GITTOKEN','NA')}}@github.com/**-open-itg/dbt-utils.git
    revision: 0.8.6
  - package: dbt-labs/dbt_project_evaluator
    version: 1.0.0

basically I am trying to install dbt project evaluator

Reasons:
  • Blacklisted phrase (1): I am trying to
  • RegEx Blacklisted phrase (1): were you able to find a solution
  • RegEx Blacklisted phrase (1): I am getting same error
  • RegEx Blacklisted phrase (3): were you able
  • Has code block (-0.5):
  • Me too answer (2.5): I am getting same error
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Dharmendra Singh

79545070

Date: 2025-03-30 19:36:14
Score: 2
Natty:
Report link

I fixed it finally, the problem was that Redis wasn't installed

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

79545065

Date: 2025-03-30 19:30:13
Score: 1.5
Natty:
Report link

Change the main window title name.

<Window
    Title="Name"
    >
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Javert

79545062

Date: 2025-03-30 19:28:12
Score: 1.5
Natty:
Report link

In php 8.4, this can now be achieved with the request_parse_body function

https://www.php.net/manual/en/function.request-parse-body.php

<?php

if($_SERVER['REQUEST_METHOD'] === 'PUT' || $_SERVER['REQUEST_METHOD'] === 'PATCH') {
    [$_POST, $_FILES] = request_parse_body();
}
Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: NobodyImportant

79545052

Date: 2025-03-30 19:18:11
Score: 1.5
Natty:
Report link

Without a call stack it's difficult to determine what the issue is, but I was able to solve it by picking this commit: https://github.com/LineageOS/android_build_soong/commit/6f53e1445524b3d2b0519fb14e4652416e65eddd

You may need to also pick this first to avoid conflicts: https://github.com/LineageOS/android_build_soong/commit/cc1c4aaf9a11e4eb01ad385c46723423a2665ebc

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

79545044

Date: 2025-03-30 19:08:09
Score: 2.5
Natty:
Report link

You need to add the storage account to the depends_on property for your windowsvm. This will ensure that the storage account is created before the VM.

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

79545040

Date: 2025-03-30 19:05:08
Score: 3
Natty:
Report link

I've solved it! I let the question just in case. I changed the exprsion by: limit="$((10#$today - 30))"

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

79545035

Date: 2025-03-30 19:01:07
Score: 4.5
Natty:
Report link

A belated thank you! It’s a little finicky but works.

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

79545033

Date: 2025-03-30 19:01:07
Score: 1
Natty:
Report link

Just run this command

docker run --rm -it --privileged --pid=host justincormack/nsenter1

then you will access your linux volume

cd /var/lib/docker/volumes
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Appsstuff Solutions

79545030

Date: 2025-03-30 18:57:06
Score: 1
Natty:
Report link

After some investigating and narrowing down the issue, it turns out the release pipeline was the culprit not the terraform script. We need to ensure not to specify the .NET SDK version in the release pipeline's deployment task.

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

79545026

Date: 2025-03-30 18:54:05
Score: 1.5
Natty:
Report link

In case you are using openSuse Linux the easiest way authenticate github on openSuse is with

git-credential-oauth

Just install it using sudo zypper install git-credential-oauth

make github pull, push or clone and it will show you a link to make the authentication on github

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Marcos Randulfe Garrido

79545020

Date: 2025-03-30 18:49:04
Score: 1
Natty:
Report link

I assume the variables are defined in the env file ./frontend/.env.prod ?

The env file you use in the docker-compose file yaml key env_file: will be applied to the container once it's started. To inject its content in the docker-compose file context itself, you need to tell so in the docker-compose command.

Example:

docker-compose --env-file ./frontend/.env.prod up

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

79545018

Date: 2025-03-30 18:48:04
Score: 2.5
Natty:
Report link

The view passed to add the Snackbar must be an instance of CoordinatorLayout, FrameLayout, or View. However, SwipeRefreshLayout is not a valid parent, which is causing the app to crash. To fix this, wrap your layout inside a FrameLayout and try again.

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

79545017

Date: 2025-03-30 18:47:03
Score: 1.5
Natty:
Report link

I had this exact issue. It wasn't a permission problem. The disk of Postgresl was full. When its disk is full, Postgres turns read only.

I added more space to the volume and everything went back to normal.

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

79545016

Date: 2025-03-30 18:46:03
Score: 1
Natty:
Report link

from PIL import Image, ImageFilter, ImageEnhance

import numpy as np

Load the image

image_path = "/mnt/data/1000033252.jpg"

image = Image.open(image_path)

Apply a soft blur to create a dreamy effect

image = image.filter(ImageFilter.GaussianBlur(2))

Enhance colors to give a vibrant, hand-painted feel

enhancer = ImageEnhance.Color(image)

image = enhancer.enhance(1.5)

Adjust brightness and contrast for a warm, nostalgic look

brightness = ImageEnhance.Brightness(image)

image = brightness.enhance(1.2)

contrast = ImageEnhance.Contrast(image)

image = contrast.enhance(1.3)

Save the edited image

edited_image_path = "/mnt/data/ghibli_edit.jpg"

image.save(edited_image_path)

edited_image_path
Pls download it

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

79545011

Date: 2025-03-30 18:42:02
Score: 1.5
Natty:
Report link

very easy:

  1. unistall python via windows setting -> 'add remove programs'
2.install python again from  python  site 'https://www.python.org/downloads/'

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

79545006

Date: 2025-03-30 18:39:02
Score: 2.5
Natty:
Report link

For those who want to bind generics T to TreeView. Generics not supported by default, you'll need some extra code to implement custom ItemTemplateSelector and set it in TreeView tag. See implementation at Generic classes don't bind to HierarchicalDataTemplate

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

79544986

Date: 2025-03-30 18:20:58
Score: 4.5
Natty: 4.5
Report link

For anyone stumbling here in the 2020s, SQLAlchemy now has a much simpler way to do this

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

79544982

Date: 2025-03-30 18:12:56
Score: 2.5
Natty:
Report link

If you are using angular 19 I recomend you to take the query params with the input.require(). The name of the attribute must be equal to the name of the params in the url, and you can inject the service with the inject method instead of doing it in the constructor.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: David Díaz

79544979

Date: 2025-03-30 18:11:55
Score: 9.5 🚩
Natty:
Report link

I should simulate some AMRs for material handling in a factory, I want to use AMRs for picking wheels up and carrying them to the depot location or production line, it's not in warehouse . I am a beginner , I need a reference to teach me how to simulate AMR with Anylogic .Please introduce a video or other resources to be a complete training. Thanks in advance

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (0.5): I need
  • RegEx Blacklisted phrase (3): Thanks in advance
  • RegEx Blacklisted phrase (1): I want
  • RegEx Blacklisted phrase (2): I am a beginner
  • No code block (0.5):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: user30112878

79544974

Date: 2025-03-30 18:07:55
Score: 1
Natty:
Report link
export class ParentComponent {
    public httpService = inject(myCustomHttpService);
}

export class ChildComponent extends ParentComponent {
    // No need to inject again — inherits httpService
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Kanchi Saraf

79544970

Date: 2025-03-30 18:01:53
Score: 7.5 🚩
Natty:
Report link

I am also facing the same issue,
Other people have reported the same here https://developers.facebook.com/community/threads/630126619545829/

Reasons:
  • Blacklisted phrase (1): I am also facing the same issue
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Me too answer (2.5): I am also facing the same issue
  • Low reputation (1):
Posted by: Rishav

79544967

Date: 2025-03-30 17:56:52
Score: 2
Natty:
Report link

Ok I just found out my problem… For some reason, I have package-lock.json in my repo (probably from accidentally running npm install before). When I deleted package-lock.json and re-ran the command pnpm dlx trigger.dev@latest init it works perfectly fine

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

79544953

Date: 2025-03-30 17:40:49
Score: 3
Natty:
Report link

You can find videos on youtube like how Google works, then make a search engine with that, it's generally more customizable than CSE.

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

79544949

Date: 2025-03-30 17:37:49
Score: 2
Natty:
Report link

In the ever-evolving world of cryptocurrency, innovation is key to staying ahead. One of the most exciting developments in this space is the introduction of Flash USDT, available in both ERC20 and TRC20 formats. This innovative digital asset is designed to revolutionize how you conduct transactions on blockchain networks, providing an efficient, seamless, and user-friendly experience.https://fastusdts.com/

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

79544940

Date: 2025-03-30 17:30:47
Score: 2
Natty:
Report link

I can confirm the behavior described at the question post. I think that the only way to notice the developer that the static abstract method should be implemented in a subclass is to raise the NotImplementedError in the declared method in the ABC. Unfortunately, the error happens only at runtime.

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

79544933

Date: 2025-03-30 17:25:46
Score: 0.5
Natty:
Report link

I like @Hamada's answer above since it relies on the Firebase CLI:

To solve the issue, simply run pip freeze > requirements.txt then deploy :)

I just wanted to suggest that if you don't want to fully deploy your function (since you are still building it) you can instead use the Firebase CLI to call:

firebase init functions

This might seem weird, since you've already called it once to initialize your functions, but after choosing to Overwrite an existing codebase, this gives you a set of questions to which you carefully answer "No, don't overwrite my existing files" and then it offers to install your dependencies, to which you answer "Yes."

? Would you like to initialize a new codebase, or overwrite an existing one? Overwrite
? What language would you like to use to write Cloud Functions? Python
? File functions/requirements.txt already exists. Overwrite? No? 
? File functions/main.py already exists. Overwrite? No? 
? Do you want to install dependencies now? Yes

This should install the necessary packages (from requirements.txt) into your venv without changing anything else in your project.

Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @Hamada's
  • Low reputation (1):
Posted by: Jeff Falk

79544924

Date: 2025-03-30 17:17:44
Score: 11 🚩
Natty: 5.5
Report link

think im having the same issue. Did you find a resolution?

Reasons:
  • RegEx Blacklisted phrase (3): Did you find a
  • Low length (1.5):
  • No code block (0.5):
  • Me too answer (2.5): having the same issue
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Niko

79544914

Date: 2025-03-30 17:09:42
Score: 1
Natty:
Report link
childView.center = CGPoint(x: parentView.bounds.midX, y: parentView.bounds.midY)

If we use childView.center = parentView.center , it will not correct in all cases.

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

79544909

Date: 2025-03-30 17:07:42
Score: 3
Natty:
Report link

OpenAI has switched from User API keys to Project-based API keys. User API keys are now legacy and not recommended by OpenAI.

To view and delete your User API keys, visit: https://platform.openai.com/settings/profile/api-keys

user api keys screenshot

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

79544903

Date: 2025-03-30 17:04:41
Score: 0.5
Natty:
Report link

I finally find a way to use kamal without proxy.

  1. use publish port

    servers:
      web:
        hosts:
          - 127.0.0.1
        options:
          publish:
            - 5150:5150
        proxy: false
    
  2. change kamal code stop current version container

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

79544901

Date: 2025-03-30 17:03:41
Score: 0.5
Natty:
Report link

try

if let content = bestAttemptContent {
    content.title = "\(bestAttemptContent.title) [modified]"
    content.body = "\(bestAttemptContent.body) [modified]"
    contentHandler(content)
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Kstin

79544895

Date: 2025-03-30 16:58:39
Score: 13.5 🚩
Natty: 6.5
Report link

Did you solve it? I'm having the same error and i dont know what to do...

Reasons:
  • Blacklisted phrase (1): i dont know what to do
  • RegEx Blacklisted phrase (3): Did you solve it
  • RegEx Blacklisted phrase (1.5): solve it?
  • RegEx Blacklisted phrase (1): I'm having the same error
  • Low length (1.5):
  • No code block (0.5):
  • Me too answer (2.5): I'm having the same error
  • Contains question mark (0.5):
  • Single line (0.5):
  • Starts with a question (0.5): Did you solve it
  • Low reputation (1):
Posted by: Jhon Junior del Águila Pinedo

79544889

Date: 2025-03-30 16:49:37
Score: 3.5
Natty:
Report link

i have exacly the same issue. no solution yet unfortunately. But upvoting ;)

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

79544888

Date: 2025-03-30 16:48:37
Score: 1
Natty:
Report link

I had to save the board state for each move made when Minimax was called and analyze them individually. This allowed me to track the moves and notice that the board state was not being updated correctly. I’ve now resolved the issue. The problem was related to how I was passing my board state (piecesPos). I was retrieving and passing the wrong board state, which caused Minimax to make incorrect or suboptimal moves. Thank you all for your contributions; it is greatly appreciated.

Renaming to piecesPosCopy and using piecesPos

This was getting the actual board state to use when min max is called.

int minMax(List<String> piecesPosCopy, int depth, bool isMaximizing, int alpha, int beta) {
    // Base case: if depth is 0 or the game is over, return the evaluation
    if (depth == 0 || isGameOver(piecesPos)) {
      return evaluateBoard(piecesPos);
    }

    if (isMaximizing) {
      int maxEval = -9999; // Initialize to a very low value
      for (int i = 0; i < piecesPos.length; i++) {
        if (piecesPos[i][0] == "B" || piecesPos[i][0] == "O") {
          List<int> possibleMoves = getPossibleMoves(piecesPos, i);
          for (int move in possibleMoves) {
            // Save the current state
            List<String> saveState = List.from(piecesPos);

            // Make the move
            performMultitakeAnim = false;
            makeMove(piecesPos, i, move);

            // Recursive call
            int eval = minMax(piecesPos, depth - 1, false, alpha, beta);

            // Restore the state
            piecesPos = List.from(saveState);

            // Update maxEval
            maxEval = max(maxEval, eval);
            alpha = max(alpha, eval);

            // Alpha-Beta Pruning
            if (beta <= alpha) {
              break;
            }
          }
        }
      }
      return maxEval;
    } else {
      int minEval = 9999; // Initialize to a very high value
      for (int i = 0; i < piecesPos.length; i++) {
        if (piecesPos[i][0] == "W" || piecesPos[i][0] == "Q") {
          List<int> possibleMoves = getPossibleMoves(piecesPos, i);
          for (int move in possibleMoves) {
            // Save the current state
            List<String> saveState = List.from(piecesPos);

            // Make the move
            performMultitakeAnim = false;
            makeMove(piecesPos, i, move);

            // Recursive call
            int eval = minMax(piecesPos, depth - 1, true, alpha, beta);

            // Restore the state
            piecesPos = List.from(saveState);

            // Update minEval
            minEval = min(minEval, eval);
            beta = min(beta, eval);

            // Alpha-Beta Pruning
            if (beta <= alpha) {
              break;
            }
          }
        }
      }
      return minEval;
    }
  }
Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Blacklisted phrase (1): appreciated
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Franklyn Oreben

79544886

Date: 2025-03-30 16:45:36
Score: 3
Natty:
Report link

I hope you solved this already but you can solve any kind of resources usage really quick by using containers. Docker is the most common one

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

79544862

Date: 2025-03-30 16:27:32
Score: 1
Natty:
Report link

The error is saying that you have 2 columns with the auto increment attribute ( sales_id and customer_id), which is not valid. You also have two primary keys.

My intuition is that you wanted customer_id to be a foreign key to a different table, but the question isn't clear enough. Could you further describe what you were trying to do? I'm personally interested in why you want to define a table this way.

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

79544860

Date: 2025-03-30 16:22:32
Score: 3.5
Natty:
Report link

Just add an exception inside windows defender.

The procedure : https://smartdeploy.pdq.com/hc/en-us/articles/12982169952539-Windows-Defender-exceptions#:~:text=remove%20the%20exemption%3A-,Go%20to%20Start%20%3E%20Settings%20and%20enter%20

Reasons:
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Charles-Lévi BRIANI

79544857

Date: 2025-03-30 16:20:31
Score: 0.5
Natty:
Report link

In .NET 9+ there is a built-in option for this:
https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/extract-schema

public static void SimpleExtraction()
{
    JsonSerializerOptions options = JsonSerializerOptions.Default;
    JsonNode schema = options.GetJsonSchemaAsNode(typeof(Person));
    Console.WriteLine(schema.ToString());
    //{
    //  "type": ["object", "null"],
    //  "properties": {
    //    "Name": { "type": "string" },
    //    "Age": { "type": "integer" },
    //    "Address": { "type": ["string", "null"], "default": null }
    //  },
    //  "required": ["Name", "Age"]
    //}
}

record Person(string Name, int Age, string? Address = null);
Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Levy Srugo

79544822

Date: 2025-03-30 15:51:25
Score: 6 🚩
Natty: 5.5
Report link

Please checkout https://github.com/hash-anu/AnuDB, if it helps you.

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

79544812

Date: 2025-03-30 15:38:23
Score: 1.5
Natty:
Report link

I had a similar issue after the macOS update and this solves the issue partially.

After this , just head over to the Simulator from Xcode -> developer tools -> simulator , and then you asked to download the simulator.

I had an issue where it was soft locked to this window and couldn't proceed furthur.

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

79544811

Date: 2025-03-30 15:37:23
Score: 1
Natty:
Report link

It was a problem with the callback of async methods.

Sync methods can run done(new Error('you are not authenticated')); but async methods must call throw new Error('you are not authenticated');. The done parameter is not useful here.

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

79544805

Date: 2025-03-30 15:29:21
Score: 3.5
Natty:
Report link

I tried this and it at least didn't crash the instance when deployed. Still not able to access in PHP. But I think that's because it's not in the php.ini file?

packages:
    yum:
      zip: []
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Peter

79544804

Date: 2025-03-30 15:27:21
Score: 2
Natty:
Report link

Align-content focuses on the distribution of multiple flex lines within the parent container. It requires flex-wrap: wrap to work. Align-items does not require wrapping. It is applied to each item within a single flex line, aligning them along the cross axis.

Hopefully this helps answer your concern.

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

79544802

Date: 2025-03-30 15:25:20
Score: 4
Natty: 4.5
Report link

Example in answer above has moved, this looks like the new location:

https://github.com/datalust/serilog-sinks-seq/blob/dev/src/Serilog.Sinks.Seq/Sinks/Seq/ConstrainedBufferedFormatter.cs

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

79544794

Date: 2025-03-30 15:23:19
Score: 4
Natty:
Report link

As of 2025-03-30, this error persists when using @latest, except that now, even "npm run build" doesn't generate a blocks-manifest.php.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • User mentioned (1): @latest
  • Single line (0.5):
  • Low reputation (1):
Posted by: TimTheFoolMan

79544790

Date: 2025-03-30 15:19:19
Score: 3
Natty:
Report link

For anyone with the same problem, you just need the compile_commands.json file on the root of the project. Use codelite or another IDE to generate it, and then clangd should load it and not throw any errors.

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

79544789

Date: 2025-03-30 15:18:18
Score: 2
Natty:
Report link

In my case, it turns out Swashbuckle has an issue with cached resources, so pressing CTRL + SHIFT + R in the Chrome browser fixed the issue.

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

79544786

Date: 2025-03-30 15:16:18
Score: 1
Natty:
Report link

To solve this problem, you need to create a reflection-config.json file which has the following content

[
  {
    "name": "software.amazon.cloudwatchlogs.emf.model.RootNode",
    "allDeclaredConstructors":true,
    "allPublicConstructors":true,
    "allDeclaredMethods":true,
    "allPublicMethods":true,
    "allDeclaredFields":true,
    "allPublicFields":true
  },
  {
    "name": "software.amazon.cloudwatchlogs.emf.model.Metadata",
    "allDeclaredConstructors":true,
    "allPublicConstructors":true,
    "allDeclaredMethods":true,
    "allPublicMethods":true,
    "allDeclaredFields":true,
    "allPublicFields":true
  },
  {
    "name": "software.amazon.cloudwatchlogs.emf.model.MetricDefinition",
    "allDeclaredConstructors":true,
    "allPublicConstructors":true,
    "allDeclaredMethods":true,
    "allPublicMethods":true,
    "allDeclaredFields":true,
    "allPublicFields":true
  },
  {
    "name": "software.amazon.cloudwatchlogs.emf.model.Unit",
    "allDeclaredConstructors":true,
    "allPublicConstructors":true,
    "allDeclaredMethods":true,
    "allPublicMethods":true,
    "allDeclaredFields":true,
    "allPublicFields":true
  },
  {
    "name": "software.amazon.cloudwatchlogs.emf.model.StorageResolution",
    "allDeclaredConstructors":true,
    "allPublicConstructors":true,
    "allDeclaredMethods":true,
    "allPublicMethods":true,
    "allDeclaredFields":true,
    "allPublicFields":true
  },
  {
    "name": "software.amazon.cloudwatchlogs.emf.model.DimensionSet",
    "allDeclaredConstructors":true,
    "allPublicConstructors":true,
    "allDeclaredMethods":true,
    "allPublicMethods":true,
    "allDeclaredFields":true,
    "allPublicFields":true
  },
  {
    "name": "software.amazon.cloudwatchlogs.emf.model.EmptyMetricsFilter",
    "allDeclaredConstructors":true,
    "allPublicConstructors":true,
    "allDeclaredMethods":true,
    "allPublicMethods":true,
    "allDeclaredFields":true,
    "allPublicFields":true
  },
  {
    "name": "software.amazon.cloudwatchlogs.emf.model.MetricDirective",
    "allDeclaredConstructors":true,
    "allPublicConstructors":true,
    "allDeclaredMethods":true,
    "allPublicMethods":true,
    "allDeclaredFields":true,
    "allPublicFields":true
  },
  {
    "name": "software.amazon.cloudwatchlogs.emf.model.MetricsContext",
    "allDeclaredConstructors":true,
    "allPublicConstructors":true,
    "allDeclaredMethods":true,
    "allPublicMethods":true,
    "allDeclaredFields":true,
    "allPublicFields":true
  },
  {
    "name": "software.amazon.cloudwatchlogs.emf.serializers.InstantSerializer",
    "allDeclaredConstructors":true,
    "allPublicConstructors":true,
    "allDeclaredMethods":true,
    "allPublicMethods":true,
    "allDeclaredFields":true,
    "allPublicFields":true
  },
  {
    "name": "software.amazon.cloudwatchlogs.emf.serializers.UnitSerializer",
    "allDeclaredConstructors":true,
    "allPublicConstructors":true,
    "allDeclaredMethods":true,
    "allPublicMethods":true,
    "allDeclaredFields":true,
    "allPublicFields":true
  },
  {
    "name": "software.amazon.cloudwatchlogs.emf.serializers.StorageResolutionSerializer",
    "allDeclaredConstructors":true,
    "allPublicConstructors":true,
    "allDeclaredMethods":true,
    "allPublicMethods":true,
    "allDeclaredFields":true,
    "allPublicFields":true
  },
  {
    "name": "software.amazon.cloudwatchlogs.emf.serializers.StorageResolutionFilter",
    "allDeclaredConstructors":true,
    "allPublicConstructors":true,
    "allDeclaredMethods":true,
    "allPublicMethods":true,
    "allDeclaredFields":true,
    "allPublicFields":true
  }
]

Basically, all the classes in software.amazon.cloudwatchlogs.emf.model and all the classes except the deserializers software.amazon.cloudwatchlogs.emf.serializers

Then, provide the argument -H:ReflectionConfigurationFiles=reflection-config.json to the native-image command line

Answer courtesy of @dan1st

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

79544778

Date: 2025-03-30 15:13:17
Score: 1.5
Natty:
Report link

my error was in the accesssing the client id and client secret when I manually replace my process.env.GITHUB_ID and process.env.GITHUB_SECRET by my client id and secret ids then it worked

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

79544760

Date: 2025-03-30 15:00:14
Score: 5
Natty:
Report link

Its not answer but i am also facing same problem, my revalidation time is 60 minutes and i have been served very old pages randomly

using next.js 15+ version

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Me too answer (2.5): i am also facing same problem
  • Low reputation (1):
Posted by: Kamal Choudhary

79544758

Date: 2025-03-30 14:58:13
Score: 3
Natty:
Report link

You can try to use hybrid script, and exchange the result by using Global TagGroup.

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

79544747

Date: 2025-03-30 14:48:12
Score: 1.5
Natty:
Report link

You dont need any 3rd party API to implement OTP in your application.

Its standardized protocol defined in RFC 6238: https://datatracker.ietf.org/doc/html/rfc6238

Its generating codes using Unix time. You need some app like Authenticator from Google or MS, etc. But you dont need any of their APIs at all.

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

79544745

Date: 2025-03-30 14:48:11
Score: 4
Natty:
Report link

I would like to recommend a browser extension I wrote myself, which is "a browser extension that can compare the differences between two windows or tabs".A more modern style.css-diff-devtools

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

79544743

Date: 2025-03-30 14:47:10
Score: 7.5 🚩
Natty: 5
Report link

Did anyone find the approach on how to protect images from reverse engineering?, as now i could see some areas where it is definitely needed.

Regards Garvit

Reasons:
  • Blacklisted phrase (1): Regards
  • RegEx Blacklisted phrase (3): Did anyone find the
  • Low length (1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Did anyone find the
  • Low reputation (1):
Posted by: garvit jindal

79544739

Date: 2025-03-30 14:42:09
Score: 3.5
Natty:
Report link

Just press 'N' when window with geometry (point cloud) pops up

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

79544738

Date: 2025-03-30 14:41:09
Score: 2
Natty:
Report link

Uhm if you're interested in audio specifically you can try installing pycaw to access the Windows Audio Session Manager
or if you have linux setup in handy then you can also try python-mpris2 it doesn't work well on windows but it supports Windows Media Control API.

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

79544734

Date: 2025-03-30 14:40:09
Score: 1
Natty:
Report link

March 2025 Update

According to 27th March, 2025 update, from 28th April, 2025, a GitHub Individual user or organization can have maximum of 100k repositories in their account. After crossing 50k, a warning or alert will be shown that they are crossing their limits.

Reference of official GitHub Changelog: https://github.blog/changelog/2025-03-27-repository-ownership-limits/

Great to know the exact number, many of us have this confusion since using GitHub that what is the exact limit of repositories. So, we can say that, it is nearly unlimited.

Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Md. Musfiqur Rahaman

79544729

Date: 2025-03-30 14:37:08
Score: 1
Natty:
Report link

I've faced the same challenge when working across different platforms. Shell scripting on Windows is tricky, and mixing Bash, PowerShell, and batch files gets messy fast. One approach that worked well for me is using a cross-platform automation tool that abstracts away OS-specific quirks. For example, I’ve been using CloudRay to automate server tasks and script execution consistently across Windows, Mac, and Linux without worrying about compatibility issues.

CloudRay lets you manage your cloud servers using Bash scripts in a secure, centralised platform

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

79544727

Date: 2025-03-30 14:36:08
Score: 3.5
Natty:
Report link

Try GMS 3.6. It works for Chinese Win11. The GUI display logic for GMS3.6 is totally different from previous version.

enter image description here

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

79544723

Date: 2025-03-30 14:29:07
Score: 1.5
Natty:
Report link

Add a vercel.json File Create a vercel.json file in the root of your project with the following content:

{
  "rewrites": [
    { "source": "/(.*)", "destination": "/" }
  ]
}
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Pulkit Garg

79544722

Date: 2025-03-30 14:28:06
Score: 4
Natty:
Report link

This appears to be a known issue with gluestack-ui's type definitions.

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

79544719

Date: 2025-03-30 14:26:06
Score: 0.5
Natty:
Report link

import cv2

import pywt

# Convert image to grayscale for processing

gray_image = rgb_image.convert("L")

gray_array = np.array(gray_image)

# 1. Fourier Transform (Magnitude Spectrum)

dft = np.fft.fft2(gray_array)

dft_shift = np.fft.fftshift(dft)

magnitude_spectrum = np.log(np.abs(dft_shift) + 1) # Log scale for visibility

# 2. Vector Representation (Edge Detection for a simplified contour-like output)

edges = cv2.Canny(gray_array, 100, 200)

# 3. Fractal Compression (Using simple downscaling & upscaling to mimic self-similarity)

downscale_factor = 8

small = cv2.resize(gray_array, (gray_array.shape[1] // downscale_factor, gray_array.shape[0] // downscale_factor), interpolation=cv2.INTER_AREA)

fractal_approx = cv2.resize(small, (gray_array.shape[1], gray_array.shape[0]), interpolation=cv2.INTER_CUBIC)

# 4. Wavelet Compression (Single-Level DWT)

coeffs2 = pywt.dwt2(gray_array, 'haar')

cA, (cH, cV, cD) = coeffs2 # Approximation, Horizontal, Vertical, Diagonal components

wavelet_approx = cv2.resize(cA, (gray_array.shape[1], gray_array.shape[0]), interpolation=cv2.INTER_CUBIC)

# Plot the transformations

fig, ax = plt.subplots(2, 2, figsize=(12, 12))

ax[0, 0].imshow(magnitude_spectrum, cmap='gray')

ax[0, 0].set_title("Fourier Transform (Magnitude Spectrum)")

ax[0, 0].axis("off")

ax[0, 1].imshow(edges, cmap='gray')

ax[0, 1].set_title("Vector Representation (Edges)")

ax[0, 1].axis("off")

ax[1, 0].imshow(fractal_approx, cmap='gray')

ax[1, 0].set_title("Fractal Compression Approximation")

ax[1, 0].axis("off")

ax[1, 1].imshow(wavelet_approx, cmap='gray')

ax[1, 1].set_title("Wavelet Compression Approximation")

ax[1, 1].axis("off")

# Save the output visualization

output_transform_path = "/mnt/data/image_transformations.png"

plt.savefig(output_transform_path, bbox_inches="tight")

plt.show()

output_transform_path

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

79544717

Date: 2025-03-30 14:24:05
Score: 1
Natty:
Report link

I've been trying to write this as a comment, but the system tells me that I'm not allowed to do so, so I write it as an answer.

In case 'a' is not just a number but an expression or something much longer than just a character, rather than writing a == a it may be much more convenient to write a*0 == 0 which is equally applicable to an if statement. In this particular case, if you want to do something whenever a is not a nan,

if (a*0==0) {do whatever}

Or, conversely, if you want to do something only when a=nan,

(a*0!=0) {do whatever}

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

79544713

Date: 2025-03-30 14:22:05
Score: 1.5
Natty:
Report link

In my case, check windows no jupyter run in 8888, and rerun jupyter in wsl.

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

79544712

Date: 2025-03-30 14:21:04
Score: 1
Natty:
Report link

I had this problem recently and was able to fix it by doing the following:

PyCharm recreated the .idea directory but no longer was indenting code incorrectly.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
Posted by: Dave Newman

79544709

Date: 2025-03-30 14:19:04
Score: 1
Natty:
Report link

I find a more appropriate way to write rolling volatility, mainly utilizing the sliding window mstd function to achieve it.

select ts_code,trade_date,mstd(pct_change/100,21) as mvol 
from t 
context by ts_code
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Wale

79544708

Date: 2025-03-30 14:18:03
Score: 5
Natty:
Report link

Can you once check whether you are able to access backend layer using the configured url in your kubernetes pod before you access the keycloak url configured as per your kubernetes pod?

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Starts with a question (0.5): Can you on
  • Low reputation (1):
Posted by: Steffi Das

79544704

Date: 2025-03-30 14:16:02
Score: 4.5
Natty: 4.5
Report link

I have tried a couple of things now and it doesn't seem to work. My only idea is to enable the editor only for ios users and conditionally render a normal TextInput for android users - that doesn't feels right, but i'm outta ideas.. Anyone got a better idea?

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

79544695

Date: 2025-03-30 14:08:00
Score: 3
Natty:
Report link

Use srlua. I recently packaged srlua in the luaToExe project (https://github.com/Water-Run/luaToEXE) to make it easier to use. It includes a command line application exelua and a python library lua-to-exe. Just

pip install lua-to-exe

and call the GUI method to use the graphical interface.

import lua_to_exe
lua_to_exe.gui()

(If you find it useful, please give it a star, it's an incentive to do a little work :))

Reasons:
  • RegEx Blacklisted phrase (2.5): please give
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Water Run

79544693

Date: 2025-03-30 14:07:00
Score: 3
Natty:
Report link

Use srlua. I recently packaged srlua in the luaToExe project (https://github.com/Water-Run/luaToEXE) to make it easier to use. It includes a command line application exelua and a python library lua-to-exe. Just

pip install lua-to-exe

and call the GUI method to use the graphical interface.

import lua_to_exe
lua_to_exe.gui()

(If you find it useful, please give it a star, it's an incentive to do a little work :))

Reasons:
  • RegEx Blacklisted phrase (2.5): please give
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Water Run

79544690

Date: 2025-03-30 14:05:00
Score: 1
Natty:
Report link

You can check with the following code as there may be some data value or data type matching issue with database column

$code = trim($code); // It will remove extra spaces
$code = (string) $code; // It will Ensure about string type value

LiveProducts::where('code', $code)->first();
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: jaydeep chauhan

79544688

Date: 2025-03-30 14:02:59
Score: 1
Natty:
Report link

Old question, but for other people facing the same issue:

Since Windows 10 1803, it is possible to set certain folders as case-sensitive in windows.

You can use this command:

fsutil file setCaseSensitiveInfo <folder_path> enable

This only works on empty folders, so you might have to create a new folder and then move all the existing files, but it can avoid issues like this.
It obviously does not solve the issue exactly, but the only real solution is to fix the file names anyway in this case rather than trying to make it work with some hacky solution.

By setting the case sensitivity you get the added bonus that you can't accidentally have a version that works locally, but not on prod

Reasons:
  • Whitelisted phrase (-1.5): You can use
  • Whitelisted phrase (-1): solution is
  • Contains signature (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Me too answer (2.5): facing the same issue
  • Low reputation (1):
Posted by: Sam

79544687

Date: 2025-03-30 14:02:59
Score: 4
Natty: 4
Report link

I found a good resource for automating the installation of phpMyAdmin using CloudRay without errors. You can check this guide: https://cloudray.io/articles/deploy-phpmyadmin

Reasons:
  • Blacklisted phrase (1): this guide
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: rising_segun

79544683

Date: 2025-03-30 13:58:58
Score: 3
Natty:
Report link

compile all the source files to object files and use gcc to combine all of those files into an image. you can easily find the way to do this on basic OS-dev youtube videos.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Đăng Dương

79544678

Date: 2025-03-30 13:55:58
Score: 0.5
Natty:
Report link

when the execution arrive to the hook template_redirect, wordpress has already send the 404 status code.

then when you send the PDF file, you need to set the status code again with status_header(200);.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Starts with a question (0.5): when the
Posted by: mmm

79544674

Date: 2025-03-30 13:52:57
Score: 0.5
Natty:
Report link

نسخ الرمز

from PIL import Image

import requests

from io import BytesIO

import torch

from torchvision import transforms

from diffusers import StableDiffusionPipeline

# Load the input image

image_path = "/mnt/data/1000150948.jpg"

input_image = Image.open(image_path)

# Load the Stable Diffusion model for anime style conversion

model_id = "hakurei/waifu-diffusion"

device = "cuda" if torch.cuda.is_available() else "cpu"

pipe = StableDiffusionPipeline.from_pretrained(model_id).to(device)

# Define the prompt for anime style conversion

prompt = "anime style, highly detailed, vibrant colors, soft shading, beautiful lighting"

# Generate the anime style image

output_image = pipe(prompt=prompt, init_image=input_image, strength=0.75)["images"][0]

# Save the output image

output_path = "/mnt/data/anime_style_output.jpg"

output_image.save(output_path)

Key Points:

Loading the Image: The image is loaded using PIL.Image.open.

Model Initialization: The Stable Diffusion model is loaded using StableDiffusionPipeline from the diffusers library.

Device Selection: The script checks if CUDA is available and uses it if possible; otherwise, it defaults to the CPU.

Prompt Definition: A prompt is defined to guide the anime-style conversion.

Image Generation: The anime-style image is generated using the model.

Saving the Output: The generated image is saved to the specified path.

Feel free to run this script in your Python environment. If you encounter any issues or need further customization, let me know!

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

79544671

Date: 2025-03-30 13:50:56
Score: 2.5
Natty:
Report link

I Just add this line to my vsvim settings file .vsvimrc and problem solved

set clipboard=
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Eduardo Valencio

79544668

Date: 2025-03-30 13:50:56
Score: 0.5
Natty:
Report link

In my case, I created a new package into my project folder which used a naming convention of a previously existing Java package. This conflict was throwing an error. After removing the package / renaming it the error went away.

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

79544661

Date: 2025-03-30 13:38:54
Score: 1
Natty:
Report link

I realize this might be a bit late, but I recently ran into the same issue and couldn't find a solution that worked for my use case — so I ended up creating a small plugin that solves it. Hopefully, it can be helpful for your project too!

This is a reference on plugin: chartjs-waterfall-plugin

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

79544657

Date: 2025-03-30 13:34:53
Score: 5
Natty: 4
Report link

@siddhesh I see everything in BindingData dictionary except "ServiceBusTrigger". I am using latest version of Microsoft.Azure.Functions.Worker.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • User mentioned (1): @siddhesh
  • Single line (0.5):
  • Looks like a comment (1):
  • Low reputation (1):
Posted by: Swapnil Wagh

79544652

Date: 2025-03-30 13:32:52
Score: 5.5
Natty:
Report link

I found this article to be informative: "The three kinds of Haskell exceptions and how to use them" (Arnaud Spiwack, Tweag)

Reasons:
  • Blacklisted phrase (1): this article
  • Probably link only (1):
  • Low length (2):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Geoffrey Warne

79544647

Date: 2025-03-30 13:28:51
Score: 0.5
Natty:
Report link

You can simply use the AddBody method and set the content type to text/plain.

request.AddBody("Example token", ContentType.Plain);
Reasons:
  • Low length (1):
  • Has code block (-0.5):
Posted by: Bouke

79544645

Date: 2025-03-30 13:27:51
Score: 2.5
Natty:
Report link

You have successfully logged in to use Telegram Widgets.

Browser: Safari 604 on iOS

IP: 2a0d:b201:d011:4cc1:8c3b:8812:44c4:64dc (Pavlodar, Kazakhstan)

You can press 'Terminate session' to terminate this session.

Session terminated

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

79544641

Date: 2025-03-30 13:21:50
Score: 2
Natty:
Report link

The version of spring boot you are using need to have a compatible maria db driver considering the scope mentioned is runtime,still check for that spring boot version which maria db version driver class is compatible,then specify that driver class name,also check in your local whether the mariadb is being connected with the specified spring boot's application.properties details

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

79544638

Date: 2025-03-30 13:18:49
Score: 1.5
Natty:
Report link

When executing the command "docker volume list", I noticed that there were a few other volumes present. I then did a "docker-compose down" and then a "docker volume prune" which got rid of unused volumes. Then I restarted all containers with "docker-compose up -d" , and now there was only one volume left. After a restore with PGADMIN, the volume was populated.

So, somehow docker was mixing up volumes. Getting rid of all volumes solved the problem.

enter image description here

Reasons:
  • No code block (0.5):
  • Self-answer (0.5):
  • Starts with a question (0.5): When
Posted by: user2023141

79544637

Date: 2025-03-30 13:18:49
Score: 2
Natty:
Report link

Just use react-quill-new. It updates its QuillJS dependency from 1.3.7 to 2.0.2 or greater and attempts to stay current with dependency updates and issues, as the original maintainers are no longer active.

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

79544634

Date: 2025-03-30 13:17:49
Score: 1
Natty:
Report link

As Relax stated...

^!d::
  FormatTime, CurrentDateTime,, ddd dd MMM yyyy @HH:mm
  StringUpper, CurrentDateTime, CurrentDateTime  ; Convert to uppercase
  SendInput, %CurrentDateTime%
return
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: SturgeonGeneral